-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
17,458 additions
and
15,861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ build/* | |
contracts/* | ||
contracts-test/* | ||
coverage/* | ||
lib/* | ||
lib/* | ||
scripts/coverage.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
client: require('ganache-cli'), | ||
skipFiles: [ | ||
"../contracts-test", | ||
"../contracts-legacy", | ||
"../lib" | ||
], | ||
providerOptions: { | ||
port: 8555, | ||
_chainId: 1895, | ||
network_id: 1597649375983, | ||
account_keys_path: "./ganache-accounts.json", | ||
default_balance_ether: 10000 | ||
} | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
checks: | ||
- name: eth-gas-reporter/codechecks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
pragma solidity ^0.6.12; | ||
import "../contracts/infrastructure/base/Owned.sol"; | ||
|
||
/** | ||
* @title TestOwnedContract | ||
* @notice Represents an arbitrary contract implementing Owned. | ||
*/ | ||
contract TestOwnedContract is Owned { | ||
|
||
uint256 public state; | ||
|
||
event StateSet(uint256 indexed _state, uint256 indexed _value); | ||
|
||
function setStateRestricted(uint256 _state) public onlyOwner payable { | ||
state = _state; | ||
emit StateSet(_state, msg.value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* global artifacts */ | ||
global.web3 = web3; | ||
const chai = require("chai"); | ||
const BN = require("bn.js"); | ||
const bnChai = require("bn-chai"); | ||
|
||
const { expect } = chai; | ||
chai.use(bnChai(BN)); | ||
|
||
const TestOwnedContract = artifacts.require("TestOwnedContract"); | ||
const MultiSig = artifacts.require("MultiSigWallet"); | ||
|
||
const deployManager = require("../utils/deploy-manager.js"); | ||
const MultisigExecutor = require("../utils/multisigexecutor.js"); | ||
|
||
async function main() { | ||
const { deploymentAccount, configurator } = await deployManager.getProps(); | ||
console.log("deploymentAccount", deploymentAccount); | ||
const { config } = configurator; | ||
|
||
const testContractWrapper = await TestOwnedContract.new(); | ||
console.log("TestOwnedContract created at", testContractWrapper.address); | ||
|
||
await testContractWrapper.changeOwner(config.contracts.MultiSigWallet); | ||
console.log("Set the MultiSig as the owner of TestOwnedContract"); | ||
|
||
const MultiSigWrapper = await MultiSig.at(config.contracts.MultiSigWallet); | ||
const multisigExecutor = new MultisigExecutor(MultiSigWrapper, deploymentAccount, config.multisig.autosign); | ||
await multisigExecutor.executeCall(testContractWrapper, "setStateRestricted", [99]); | ||
const stateValue = await testContractWrapper.state(); | ||
expect(stateValue).to.eq.BN(99); | ||
|
||
console.log("## completed deployment script 7 ##"); | ||
} | ||
|
||
// For truffle exec | ||
module.exports = function (callback) { | ||
main().then(() => callback()).catch((err) => callback(err)); | ||
}; |
Oops, something went wrong.