diff options
Diffstat (limited to 'contracts/multisig')
-rw-r--r-- | contracts/multisig/compiler.json | 16 | ||||
-rw-r--r-- | contracts/multisig/package.json | 7 | ||||
-rw-r--r-- | contracts/multisig/src/artifacts.ts | 21 | ||||
-rw-r--r-- | contracts/multisig/src/artifacts/index.ts | 15 | ||||
-rw-r--r-- | contracts/multisig/src/wrappers.ts | 11 | ||||
-rw-r--r-- | contracts/multisig/src/wrappers/index.ts | 5 | ||||
-rw-r--r-- | contracts/multisig/test/asset_proxy_owner.ts | 6 | ||||
-rw-r--r-- | contracts/multisig/test/utils/asset_proxy_owner_wrapper.ts | 4 | ||||
-rw-r--r-- | contracts/multisig/tsconfig.json | 17 |
9 files changed, 55 insertions, 47 deletions
diff --git a/contracts/multisig/compiler.json b/contracts/multisig/compiler.json index ae3905238..336a9ed7b 100644 --- a/contracts/multisig/compiler.json +++ b/contracts/multisig/compiler.json @@ -3,10 +3,7 @@ "contractsDir": "./contracts", "useDockerisedSolc": true, "compilerSettings": { - "optimizer": { - "enabled": true, - "runs": 1000000 - }, + "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ @@ -20,10 +17,11 @@ } }, "contracts": [ - "AssetProxyOwner", - "MultiSigWallet", - "MultiSigWalletWithTimeLock", - "TestAssetProxyOwner", - "TestRejectEther" + "@0x/contracts-asset-proxy/contracts/src/MixinAuthorizable.sol", + "src/AssetProxyOwner.sol", + "src/MultiSigWallet.sol", + "src/MultiSigWalletWithTimeLock.sol", + "test/TestAssetProxyOwner.sol", + "test/TestRejectEther.sol" ] } diff --git a/contracts/multisig/package.json b/contracts/multisig/package.json index bc83bbf05..ce29122c4 100644 --- a/contracts/multisig/package.json +++ b/contracts/multisig/package.json @@ -29,10 +29,12 @@ "profiler:report:html": "istanbul report html && open coverage/index.html", "coverage:report:lcov": "istanbul report lcov", "test:circleci": "yarn test", + "contracts:gen": "contracts-gen", "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol" }, "config": { - "abis": "generated-artifacts/@(AssetProxyOwner|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestRejectEther).json" + "abis": "./generated-artifacts/@(AssetProxyOwner|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestRejectEther).json", + "abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually." }, "repository": { "type": "git", @@ -44,6 +46,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md", "devDependencies": { + "@0x/contracts-gen": "^1.0.0", "@0x/abi-gen": "^2.0.1", "@0x/contracts-test-utils": "^3.0.2", "@0x/dev-utils": "^2.0.1", @@ -72,7 +75,7 @@ "@0x/utils": "^4.0.2", "@0x/web3-wrapper": "^4.0.1", "ethereum-types": "^2.0.0", - "lodash": "^4.17.5" + "lodash": "^4.17.11" }, "publishConfig": { "access": "public" diff --git a/contracts/multisig/src/artifacts.ts b/contracts/multisig/src/artifacts.ts new file mode 100644 index 000000000..7d8a85884 --- /dev/null +++ b/contracts/multisig/src/artifacts.ts @@ -0,0 +1,21 @@ +/* + * ----------------------------------------------------------------------------- + * Warning: This file is auto-generated by contracts-gen. Don't edit manually. + * ----------------------------------------------------------------------------- + */ +import { ContractArtifact } from 'ethereum-types'; + +import * as AssetProxyOwner from '../generated-artifacts/AssetProxyOwner.json'; +import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json'; +import * as MultiSigWallet from '../generated-artifacts/MultiSigWallet.json'; +import * as MultiSigWalletWithTimeLock from '../generated-artifacts/MultiSigWalletWithTimeLock.json'; +import * as TestAssetProxyOwner from '../generated-artifacts/TestAssetProxyOwner.json'; +import * as TestRejectEther from '../generated-artifacts/TestRejectEther.json'; +export const artifacts = { + MixinAuthorizable: MixinAuthorizable as ContractArtifact, + AssetProxyOwner: AssetProxyOwner as ContractArtifact, + MultiSigWallet: MultiSigWallet as ContractArtifact, + MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact, + TestAssetProxyOwner: TestAssetProxyOwner as ContractArtifact, + TestRejectEther: TestRejectEther as ContractArtifact, +}; diff --git a/contracts/multisig/src/artifacts/index.ts b/contracts/multisig/src/artifacts/index.ts deleted file mode 100644 index 326d79000..000000000 --- a/contracts/multisig/src/artifacts/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ContractArtifact } from 'ethereum-types'; - -import * as AssetProxyOwner from '../../generated-artifacts/AssetProxyOwner.json'; -import * as MultiSigWallet from '../../generated-artifacts/MultiSigWallet.json'; -import * as MultiSigWalletWithTimeLock from '../../generated-artifacts/MultiSigWalletWithTimeLock.json'; -import * as TestAssetProxyOwner from '../../generated-artifacts/TestAssetProxyOwner.json'; -import * as TestRejectEther from '../../generated-artifacts/TestRejectEther.json'; - -export const artifacts = { - AssetProxyOwner: AssetProxyOwner as ContractArtifact, - MultiSigWallet: MultiSigWallet as ContractArtifact, - MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact, - TestAssetProxyOwner: TestAssetProxyOwner as ContractArtifact, - TestRejectEther: TestRejectEther as ContractArtifact, -}; diff --git a/contracts/multisig/src/wrappers.ts b/contracts/multisig/src/wrappers.ts new file mode 100644 index 000000000..81aab39da --- /dev/null +++ b/contracts/multisig/src/wrappers.ts @@ -0,0 +1,11 @@ +/* + * ----------------------------------------------------------------------------- + * Warning: This file is auto-generated by contracts-gen. Don't edit manually. + * ----------------------------------------------------------------------------- + */ +export * from '../generated-wrappers/asset_proxy_owner'; +export * from '../generated-wrappers/mixin_authorizable'; +export * from '../generated-wrappers/multi_sig_wallet'; +export * from '../generated-wrappers/multi_sig_wallet_with_time_lock'; +export * from '../generated-wrappers/test_asset_proxy_owner'; +export * from '../generated-wrappers/test_reject_ether'; diff --git a/contracts/multisig/src/wrappers/index.ts b/contracts/multisig/src/wrappers/index.ts deleted file mode 100644 index 43ab25704..000000000 --- a/contracts/multisig/src/wrappers/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from '../../generated-wrappers/asset_proxy_owner'; -export * from '../../generated-wrappers/multi_sig_wallet'; -export * from '../../generated-wrappers/multi_sig_wallet_with_time_lock'; -export * from '../../generated-wrappers/test_asset_proxy_owner'; -export * from '../../generated-wrappers/test_reject_ether'; diff --git a/contracts/multisig/test/asset_proxy_owner.ts b/contracts/multisig/test/asset_proxy_owner.ts index 62081554b..7bf4069cb 100644 --- a/contracts/multisig/test/asset_proxy_owner.ts +++ b/contracts/multisig/test/asset_proxy_owner.ts @@ -1,4 +1,3 @@ -import { artifacts as proxyArtifacts, MixinAuthorizableContract } from '@0x/contracts-asset-proxy'; import { chaiSetup, constants, @@ -26,6 +25,7 @@ import { AssetProxyOwnerExecutionFailureEventArgs, AssetProxyOwnerSubmissionEventArgs, AssetProxyOwnerWrapper, + MixinAuthorizableContract, TestAssetProxyOwnerContract, } from '../src'; @@ -58,12 +58,12 @@ describe('AssetProxyOwner', () => { notOwner = accounts[3]; const initialOwner = accounts[0]; erc20Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync( - proxyArtifacts.MixinAuthorizable, + artifacts.MixinAuthorizable, provider, txDefaults, ); erc721Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync( - proxyArtifacts.MixinAuthorizable, + artifacts.MixinAuthorizable, provider, txDefaults, ); diff --git a/contracts/multisig/test/utils/asset_proxy_owner_wrapper.ts b/contracts/multisig/test/utils/asset_proxy_owner_wrapper.ts index b6040d8e3..d5aaaf519 100644 --- a/contracts/multisig/test/utils/asset_proxy_owner_wrapper.ts +++ b/contracts/multisig/test/utils/asset_proxy_owner_wrapper.ts @@ -1,5 +1,3 @@ -import { artifacts as proxyArtifacts } from '@0x/contracts-asset-proxy'; -import { artifacts as erc20Artifacts } from '@0x/contracts-erc20'; import { LogDecoder } from '@0x/contracts-test-utils'; import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; @@ -16,7 +14,7 @@ export class AssetProxyOwnerWrapper { constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Provider) { this._assetProxyOwner = assetproxyOwnerContract; this._web3Wrapper = new Web3Wrapper(provider); - this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...proxyArtifacts }); + this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts); } public async submitTransactionAsync( destination: string, diff --git a/contracts/multisig/tsconfig.json b/contracts/multisig/tsconfig.json index ad1707e43..094f89413 100644 --- a/contracts/multisig/tsconfig.json +++ b/contracts/multisig/tsconfig.json @@ -1,17 +1,14 @@ { "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": ".", - "resolveJsonModule": true - }, + "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true }, "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"], "files": [ - "./generated-artifacts/AssetProxyOwner.json", - "./generated-artifacts/MultiSigWallet.json", - "./generated-artifacts/MultiSigWalletWithTimeLock.json", - "./generated-artifacts/TestAssetProxyOwner.json", - "./generated-artifacts/TestRejectEther.json" + "generated-artifacts/AssetProxyOwner.json", + "generated-artifacts/MixinAuthorizable.json", + "generated-artifacts/MultiSigWallet.json", + "generated-artifacts/MultiSigWalletWithTimeLock.json", + "generated-artifacts/TestAssetProxyOwner.json", + "generated-artifacts/TestRejectEther.json" ], "exclude": ["./deploy/solc/solc_bin"] } |