From 99d9a9583ae15e8a5bd7c679d50794b557a6f07d Mon Sep 17 00:00:00 2001 From: xianny Date: Fri, 4 Oct 2019 10:57:59 -0700 Subject: [PATCH 1/8] introduce debug option and remove debug functions from @0x/abi-gen-wrappers --- contracts/asset-proxy/package.json | 2 +- contracts/coordinator/package.json | 2 +- contracts/dev-utils/package.json | 2 +- contracts/erc1155/package.json | 2 +- contracts/erc20/package.json | 2 +- contracts/erc721/package.json | 2 +- contracts/exchange-forwarder/package.json | 2 +- contracts/exchange-libs/package.json | 2 +- contracts/exchange/package.json | 2 +- contracts/extensions/package.json | 2 +- contracts/multisig/package.json | 2 +- contracts/staking/package.json | 2 +- contracts/utils/package.json | 2 +- .../generated-wrappers/asset_proxy_owner.ts | 842 ------ .../src/generated-wrappers/coordinator.ts | 382 --- .../coordinator_registry.ts | 63 - .../src/generated-wrappers/dev_utils.ts | 1864 +----------- .../generated-wrappers/dummy_erc20_token.ts | 433 --- .../generated-wrappers/dummy_erc721_token.ts | 450 --- .../src/generated-wrappers/dutch_auction.ts | 158 - .../src/generated-wrappers/erc1155_proxy.ts | 299 -- .../src/generated-wrappers/erc20_proxy.ts | 275 -- .../src/generated-wrappers/erc20_token.ts | 186 -- .../src/generated-wrappers/erc721_proxy.ts | 275 -- .../src/generated-wrappers/erc721_token.ts | 273 -- .../generated-wrappers/eth_balance_checker.ts | 37 - .../src/generated-wrappers/exchange.ts | 2348 +-------------- .../src/generated-wrappers/forwarder.ts | 257 -- .../src/generated-wrappers/i_asset_proxy.ts | 59 - .../src/generated-wrappers/i_validator.ts | 45 - .../src/generated-wrappers/i_wallet.ts | 42 - .../generated-wrappers/multi_asset_proxy.ts | 372 --- .../src/generated-wrappers/order_validator.ts | 586 ---- .../generated-wrappers/static_call_proxy.ts | 82 - .../src/generated-wrappers/weth9.ts | 338 --- .../src/generated-wrappers/zrx_token.ts | 288 -- packages/abi-gen/package.json | 2 +- packages/abi-gen/src/index.ts | 8 +- .../templates/TypeScript/contract.handlebars | 2 +- .../partials/method_abi_helper.handlebars | 24 + .../fixtures/artifacts/AbiGenDummy.json | 753 ++--- .../test-cli/fixtures/artifacts/LibDummy.json | 12 +- .../fixtures/artifacts/TestLibDummy.json | 16 +- .../fixtures/contracts/AbiGenDummy.sol | 9 + .../output/python/abi_gen_dummy/__init__.py | 1650 ++++++----- .../output/python/test_lib_dummy/__init__.py | 2 +- .../output/typescript/abi_gen_dummy.ts | 2634 +++++++++-------- .../test-cli/output/typescript/lib_dummy.ts | 2 +- .../output/typescript/test_lib_dummy.ts | 2 +- 49 files changed, 2974 insertions(+), 12122 deletions(-) diff --git a/contracts/asset-proxy/package.json b/contracts/asset-proxy/package.json index bbd5b8a108..4c1a685950 100644 --- a/contracts/asset-proxy/package.json +++ b/contracts/asset-proxy/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/coordinator/package.json b/contracts/coordinator/package.json index 17b480ea21..d9258f47da 100644 --- a/contracts/coordinator/package.json +++ b/contracts/coordinator/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/dev-utils/package.json b/contracts/dev-utils/package.json index b88780e996..99ba92c705 100644 --- a/contracts/dev-utils/package.json +++ b/contracts/dev-utils/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/erc1155/package.json b/contracts/erc1155/package.json index f931f4ec11..f3111ac48c 100644 --- a/contracts/erc1155/package.json +++ b/contracts/erc1155/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/erc20/package.json b/contracts/erc20/package.json index 6e2d280cfc..bd851a7056 100644 --- a/contracts/erc20/package.json +++ b/contracts/erc20/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/erc721/package.json b/contracts/erc721/package.json index cc3c04f2a1..2bbebbba84 100644 --- a/contracts/erc721/package.json +++ b/contracts/erc721/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/exchange-forwarder/package.json b/contracts/exchange-forwarder/package.json index 3880356015..23a86f264e 100644 --- a/contracts/exchange-forwarder/package.json +++ b/contracts/exchange-forwarder/package.json @@ -23,7 +23,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/contracts/exchange-libs/package.json b/contracts/exchange-libs/package.json index b22d8ec706..903381ac8c 100644 --- a/contracts/exchange-libs/package.json +++ b/contracts/exchange-libs/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/exchange/package.json b/contracts/exchange/package.json index c8199af93e..9b6007ceaf 100644 --- a/contracts/exchange/package.json +++ b/contracts/exchange/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/extensions/package.json b/contracts/extensions/package.json index 982f4edf5e..6d7716c0a3 100644 --- a/contracts/extensions/package.json +++ b/contracts/extensions/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/multisig/package.json b/contracts/multisig/package.json index 1e4d940868..bc861442a5 100644 --- a/contracts/multisig/package.json +++ b/contracts/multisig/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/staking/package.json b/contracts/staking/package.json index a168d7e721..eac315af1d 100644 --- a/contracts/staking/package.json +++ b/contracts/staking/package.json @@ -23,7 +23,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/contracts/utils/package.json b/contracts/utils/package.json index 7f9631d7fc..b4232fdee6 100644 --- a/contracts/utils/package.json +++ b/contracts/utils/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "watch": "sol-compiler -w", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --debug --abis ${npm_package_config_abis} --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "fix": "tslint --fix --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index 7f9cb9d1e0..61f7d6b72a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -157,41 +157,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('MAX_OWNER_COUNT()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('MAX_OWNER_COUNT()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('MAX_OWNER_COUNT()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows to add a new owner. Transaction has to be sent by wallet. @@ -338,30 +303,6 @@ export class AssetProxyOwnerContract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('addOwner(address)', [owner.toLowerCase()]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('addOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('addOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows to change the number of required confirmations. Transaction has to be sent by wallet. @@ -515,30 +456,6 @@ export class AssetProxyOwnerContract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('changeRequirement(uint256)', [_required]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('changeRequirement(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Changes the duration of the time lock for transactions. @@ -702,30 +619,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('changeTimeLock(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows an owner to confirm a transaction. @@ -881,30 +774,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmTransaction(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public confirmationTimes = { /** @@ -953,42 +822,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('confirmationTimes(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmationTimes(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmationTimes(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public confirmations = { /** @@ -1042,46 +875,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber, index_1: string): string { - assert.isBigNumber('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('confirmations(uint256,address)', [ - index_0, - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmations(uint256,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('confirmations(uint256,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows anyone to execute a confirmed transaction. @@ -1240,30 +1033,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public functionCallTimeLocks = { /** @@ -1317,46 +1086,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string, index_1: string): string { - assert.isString('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('functionCallTimeLocks(bytes4,address)', [ - index_0, - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('functionCallTimeLocks(bytes4,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [boolean, BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('functionCallTimeLocks(bytes4,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[boolean, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; /** * Returns number of confirmations of a transaction. @@ -1410,45 +1139,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transactionId Transaction ID. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(transactionId: BigNumber): string { - assert.isBigNumber('transactionId', transactionId); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getConfirmationCount(uint256)', [ - transactionId, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getConfirmationCount(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getConfirmationCount(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns array with owner addresses, which confirmed transaction. @@ -1502,43 +1192,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transactionId Transaction ID. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(transactionId: BigNumber): string { - assert.isBigNumber('transactionId', transactionId); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getConfirmations(uint256)', [transactionId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getConfirmations(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getConfirmations(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns list of owners. @@ -1586,41 +1239,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getOwners()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getOwners()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getOwners()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns total number of transactions after filers are applied. @@ -1677,48 +1295,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param pending Include pending transactions. - * @param executed Include executed transactions. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(pending: boolean, executed: boolean): string { - assert.isBoolean('pending', pending); - assert.isBoolean('executed', executed); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getTransactionCount(bool,bool)', [ - pending, - executed, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): boolean { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionCount(bool,bool)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionCount(bool,bool)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns list of transaction IDs in defined range. @@ -1786,52 +1362,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param from Index start position of transaction array. - * @param to Index end position of transaction array. - * @param pending Include pending transactions. - * @param executed Include executed transactions. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(from: BigNumber, to: BigNumber, pending: boolean, executed: boolean): string { - assert.isBigNumber('from', from); - assert.isBigNumber('to', to); - assert.isBoolean('pending', pending); - assert.isBoolean('executed', executed); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getTransactionIds(uint256,uint256,bool,bool)', - [from, to, pending, executed], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionIds(uint256,uint256,bool,bool)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber[] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionIds(uint256,uint256,bool,bool)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns the confirmation status of a transaction. @@ -1885,43 +1415,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transactionId Transaction ID. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(transactionId: BigNumber): string { - assert.isBigNumber('transactionId', transactionId); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isConfirmed(uint256)', [transactionId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('isConfirmed(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('isConfirmed(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public isOwner = { /** @@ -1970,42 +1463,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isOwner(address)', [index_0.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('isOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('isOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owners = { /** @@ -2054,42 +1511,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owners(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('owners(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('owners(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Registers a custom timelock to a specific function selector / destination combo @@ -2340,30 +1761,6 @@ export class AssetProxyOwnerContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [boolean, string, string, BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('registerFunctionCall(bool,bytes4,address,uint128)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[boolean, string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('registerFunctionCall(bool,bytes4,address,uint128)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows to remove an owner. Transaction has to be sent by wallet. @@ -2512,30 +1909,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('removeOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('removeOwner(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows to replace an owner with a new owner. Transaction has to be sent by wallet. @@ -2722,30 +2095,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('replaceOwner(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public required = { /** @@ -2789,41 +2138,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('required()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('required()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('required()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows an owner to revoke a confirmation for a transaction. @@ -2979,30 +2293,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('revokeConfirmation(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public secondsTimeLocked = { /** @@ -3046,41 +2336,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('secondsTimeLocked()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('secondsTimeLocked()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('secondsTimeLocked()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows an owner to submit and confirm a transaction. @@ -3292,30 +2547,6 @@ export class AssetProxyOwnerContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('submitTransaction(address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transactionCount = { /** @@ -3359,41 +2590,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transactionCount()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('transactionCount()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('transactionCount()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transactions = { /** @@ -3442,44 +2638,6 @@ export class AssetProxyOwnerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as AssetProxyOwnerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transactions(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('transactions(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, BigNumber, string, boolean] { - const self = (this as any) as AssetProxyOwnerContract; - const abiEncoder = self._lookupAbiEncoder('transactions(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, BigNumber, string, boolean]>( - returnData, - ); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 482663decc..86ce6a2e74 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -75,48 +75,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param hash Any 32 byte hash. - * @param signature Proof that the hash has been signed by signer. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(hash: string, signature: string): string { - assert.isString('hash', hash); - assert.isString('signature', signature); - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [ - hash, - signature, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Calculates the EIP712 hash of a 0x transaction using the domain separator of the Exchange contract. @@ -171,49 +129,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transaction 0x transaction containing salt, signerAddress, and data. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(transaction: { salt: BigNumber; signerAddress: string; data: string }): string { - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getTransactionHash((uint256,address,bytes))', - [transaction], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): { salt: BigNumber; signerAddress: string; data: string } { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionHash((uint256,address,bytes))'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - salt: BigNumber; - signerAddress: string; - data: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getTransactionHash((uint256,address,bytes))'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Calculated the EIP712 hash of the Coordinator approval mesasage using the domain separator of this contract. @@ -275,63 +190,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param approval Coordinator approval message containing the transaction - * hash, transaction signature, and expiration of the approval. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(approval: { - txOrigin: string; - transactionHash: string; - transactionSignature: string; - approvalExpirationTimeSeconds: BigNumber; - }): string { - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getCoordinatorApprovalHash((address,bytes32,bytes,uint256))', - [approval], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - txOrigin: string; - transactionHash: string; - transactionSignature: string; - approvalExpirationTimeSeconds: BigNumber; - } { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getCoordinatorApprovalHash((address,bytes32,bytes,uint256))'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - txOrigin: string; - transactionHash: string; - transactionSignature: string; - approvalExpirationTimeSeconds: BigNumber; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('getCoordinatorApprovalHash((address,bytes32,bytes,uint256))'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Executes a 0x transaction that has been signed by the feeRecipients that correspond to each order in the transaction's Exchange calldata. @@ -631,38 +489,6 @@ export class CoordinatorContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public EIP712_EXCHANGE_DOMAIN_HASH = { /** @@ -706,41 +532,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('EIP712_EXCHANGE_DOMAIN_HASH()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Validates that the 0x transaction has been approved by all of the feeRecipients @@ -820,77 +611,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transaction 0x transaction containing salt, signerAddress, and data. - * @param txOrigin Required signer of Ethereum transaction calling this - * function. - * @param transactionSignature Proof that the transaction has been signed by - * the signer. - * @param approvalExpirationTimeSeconds Array of expiration times in seconds - * for which each corresponding approval signature expires. - * @param approvalSignatures Array of signatures that correspond to the - * feeRecipients of each order in the transaction's Exchange calldata. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - transaction: { salt: BigNumber; signerAddress: string; data: string }, - txOrigin: string, - transactionSignature: string, - approvalExpirationTimeSeconds: BigNumber[], - approvalSignatures: string[], - ): string { - assert.isString('txOrigin', txOrigin); - assert.isString('transactionSignature', transactionSignature); - assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds); - assert.isArray('approvalSignatures', approvalSignatures); - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])', - [ - transaction, - txOrigin.toLowerCase(), - transactionSignature, - approvalExpirationTimeSeconds, - approvalSignatures, - ], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [{ salt: BigNumber; signerAddress: string; data: string }, string, string, BigNumber[], string[]] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Decodes the orders from Exchange calldata representing any fill method. @@ -966,73 +686,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param data Exchange calldata representing a fill method. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(data: string): string { - assert.isString('data', data); - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeOrdersFromFillData(bytes)', [data]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrdersFromFillData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }> { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrdersFromFillData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }> - >(returnData); - return abiDecodedReturnData; - }, }; public EIP712_COORDINATOR_DOMAIN_HASH = { /** @@ -1076,41 +729,6 @@ export class CoordinatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as CoordinatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('EIP712_COORDINATOR_DOMAIN_HASH()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_COORDINATOR_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_COORDINATOR_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 827b221b04..2c8205fd32 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -195,30 +195,6 @@ export class CoordinatorRegistryContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as CoordinatorRegistryContract; - const abiEncoder = self._lookupAbiEncoder('setCoordinatorEndpoint(string)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as CoordinatorRegistryContract; - const abiEncoder = self._lookupAbiEncoder('setCoordinatorEndpoint(string)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the endpoint for a Coordinator. @@ -273,45 +249,6 @@ export class CoordinatorRegistryContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param coordinatorOperator operator of the Coordinator endpoint. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(coordinatorOperator: string): string { - assert.isString('coordinatorOperator', coordinatorOperator); - const self = (this as any) as CoordinatorRegistryContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [ - coordinatorOperator.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as CoordinatorRegistryContract; - const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as CoordinatorRegistryContract; - const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index ea3cf1904a..d357696bfb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -74,45 +74,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeAssetProxyDispatchError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyDispatchError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyDispatchError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded AssetProxyExistsError. @@ -158,45 +119,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeAssetProxyExistsError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyExistsError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyExistsError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded AssetProxyTransferError. @@ -242,45 +164,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeAssetProxyTransferError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyTransferError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeAssetProxyTransferError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded SignatureValidatorError. @@ -326,47 +209,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeEIP1271SignatureError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeEIP1271SignatureError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeEIP1271SignatureError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string, string]>( - returnData, - ); - return abiDecodedReturnData; - }, }; /** * Decode ERC-1155 asset data from the format described in the AssetProxy contract specification. @@ -415,46 +257,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetData AssetProxy-compliant asset data describing an ERC-1155 set - * of assets. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetData: string): string { - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeERC1155AssetData(bytes)', [assetData]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC1155AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, BigNumber[], BigNumber[], string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC1155AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - [string, string, BigNumber[], BigNumber[], string] - >(returnData); - return abiDecodedReturnData; - }, }; /** * Decode ERC-20 asset data from the format described in the AssetProxy contract specification. @@ -500,43 +302,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetData AssetProxy-compliant asset data describing an ERC-20 asset. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetData: string): string { - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeERC20AssetData(bytes)', [assetData]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC20AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC20AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decode ERC-721 asset data from the format described in the AssetProxy contract specification. @@ -583,44 +348,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetData AssetProxy-compliant asset data describing an ERC-721 - * asset. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetData: string): string { - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeERC721AssetData(bytes)', [assetData]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC721AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, BigNumber] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeERC721AssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded OrderStatusError. @@ -666,45 +393,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeExchangeInvalidContextError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeExchangeInvalidContextError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeExchangeInvalidContextError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded FillError. @@ -750,43 +438,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeFillError(bytes)', [encoded]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeFillError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeFillError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded IncompleteFillError. @@ -832,45 +483,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeIncompleteFillError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeIncompleteFillError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, BigNumber, BigNumber] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeIncompleteFillError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, BigNumber, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decode multi-asset data from the format described in the AssetProxy contract specification. @@ -916,50 +528,11 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetData AssetProxy-compliant data describing a multi-asset basket. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetData: string): string { - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeMultiAssetData(bytes)', [assetData]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeMultiAssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, BigNumber[], string[]] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeMultiAssetData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, BigNumber[], string[]]>( - returnData, - ); - return abiDecodedReturnData; - }, - }; - /** - * Decompose an ABI-encoded NegativeSpreadError. - */ - public decodeNegativeSpreadError = { + }; + /** + * Decompose an ABI-encoded NegativeSpreadError. + */ + public decodeNegativeSpreadError = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1000,45 +573,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeNegativeSpreadError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeNegativeSpreadError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeNegativeSpreadError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded OrderEpochError. @@ -1084,43 +618,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeOrderEpochError(bytes)', [encoded]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrderEpochError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, BigNumber] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrderEpochError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded OrderStatusError. @@ -1166,43 +663,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeOrderStatusError(bytes)', [encoded]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrderStatusError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, number] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeOrderStatusError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, number]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded SignatureError. @@ -1248,45 +708,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeSignatureError(bytes)', [encoded]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, string, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, string, string, string]>( - returnData, - ); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded SignatureValidatorNotApprovedError. @@ -1334,46 +755,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'decodeSignatureValidatorNotApprovedError(bytes)', - [encoded], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureValidatorNotApprovedError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureValidatorNotApprovedError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded SignatureWalletError. @@ -1419,47 +800,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeSignatureWalletError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureWalletError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string, string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeSignatureWalletError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string, string]>( - returnData, - ); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded TransactionError. @@ -1505,43 +845,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeTransactionError(bytes)', [encoded]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeTransactionError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [number, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeTransactionError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[number, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decompose an ABI-encoded TransactionExecutionError. @@ -1587,45 +890,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param encoded ABI-encoded revert error. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(encoded: string): string { - assert.isString('encoded', encoded); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeTransactionExecutionError(bytes)', [ - encoded, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeTransactionExecutionError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeTransactionExecutionError(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string]>(returnData); - return abiDecodedReturnData; - }, }; /** * Decodes the call data for an Exchange contract method call. @@ -1716,123 +980,39 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, + }; + /** + * Encode ERC-1155 asset data into the format described in the AssetProxy contract specification. + */ + public encodeERC1155AssetData = { /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transactionData ABI-encoded calldata for an Exchange contract - * method call. - * @returns The ABI encoded transaction data as a string + * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an + * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas + * since they don't modify state. + * @param tokenAddress The address of the ERC-1155 contract hosting the + * asset(s) to be traded. + * @param tokenIds The identifiers of the specific assets to be traded. + * @param tokenValues The amounts of each asset to be traded. + * @param callbackData Data to be passed to receiving contracts when a transfer + * is performed. + * @returns AssetProxy-compliant asset data describing the set of assets. */ - getABIEncodedTransactionData(transactionData: string): string { - assert.isString('transactionData', transactionData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decodeZeroExTransactionData(bytes)', [ - transactionData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeZeroExTransactionData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): [ - string, - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - BigNumber[], - string[] - ] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('decodeZeroExTransactionData(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - [ - string, - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - BigNumber[], - string[] - ] - >(returnData); - return abiDecodedReturnData; - }, - }; - /** - * Encode ERC-1155 asset data into the format described in the AssetProxy contract specification. - */ - public encodeERC1155AssetData = { - /** - * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an - * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. - * @param tokenAddress The address of the ERC-1155 contract hosting the - * asset(s) to be traded. - * @param tokenIds The identifiers of the specific assets to be traded. - * @param tokenValues The amounts of each asset to be traded. - * @param callbackData Data to be passed to receiving contracts when a transfer - * is performed. - * @returns AssetProxy-compliant asset data describing the set of assets. - */ - async callAsync( - tokenAddress: string, - tokenIds: BigNumber[], - tokenValues: BigNumber[], - callbackData: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isString('tokenAddress', tokenAddress); - assert.isArray('tokenIds', tokenIds); - assert.isArray('tokenValues', tokenValues); - assert.isString('callbackData', callbackData); - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, + async callAsync( + tokenAddress: string, + tokenIds: BigNumber[], + tokenValues: BigNumber[], + callbackData: string, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isString('tokenAddress', tokenAddress); + assert.isArray('tokenIds', tokenIds); + assert.isArray('tokenValues', tokenValues); + assert.isString('callbackData', callbackData); + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, ]); if (defaultBlock !== undefined) { assert.isBlockParam('defaultBlock', defaultBlock); @@ -1859,59 +1039,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param tokenAddress The address of the ERC-1155 contract hosting the - * asset(s) to be traded. - * @param tokenIds The identifiers of the specific assets to be traded. - * @param tokenValues The amounts of each asset to be traded. - * @param callbackData Data to be passed to receiving contracts when a transfer - * is performed. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - tokenAddress: string, - tokenIds: BigNumber[], - tokenValues: BigNumber[], - callbackData: string, - ): string { - assert.isString('tokenAddress', tokenAddress); - assert.isArray('tokenIds', tokenIds); - assert.isArray('tokenValues', tokenValues); - assert.isString('callbackData', callbackData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'encodeERC1155AssetData(address,uint256[],uint256[],bytes)', - [tokenAddress.toLowerCase(), tokenIds, tokenValues, callbackData], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC1155AssetData(address,uint256[],uint256[],bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC1155AssetData(address,uint256[],uint256[],bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Encode ERC-20 asset data into the format described in the AssetProxy contract specification. @@ -1960,46 +1087,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param tokenAddress The address of the ERC-20 contract hosting the asset to - * be traded. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(tokenAddress: string): string { - assert.isString('tokenAddress', tokenAddress); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('encodeERC20AssetData(address)', [ - tokenAddress.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC20AssetData(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC20AssetData(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Encode ERC-721 asset data into the format described in the AssetProxy specification. @@ -2052,49 +1139,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param tokenAddress The address of the ERC-721 contract hosting the asset to - * be traded. - * @param tokenId The identifier of the specific asset to be traded. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(tokenAddress: string, tokenId: BigNumber): string { - assert.isString('tokenAddress', tokenAddress); - assert.isBigNumber('tokenId', tokenId); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('encodeERC721AssetData(address,uint256)', [ - tokenAddress.toLowerCase(), - tokenId, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC721AssetData(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeERC721AssetData(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Encode data for multiple assets, per the AssetProxy contract specification. @@ -2147,49 +1191,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param amounts The amounts of each asset to be traded. - * @param nestedAssetData AssetProxy-compliant data describing each asset to be - * traded. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(amounts: BigNumber[], nestedAssetData: string[]): string { - assert.isArray('amounts', amounts); - assert.isArray('nestedAssetData', nestedAssetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('encodeMultiAssetData(uint256[],bytes[])', [ - amounts, - nestedAssetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeMultiAssetData(uint256[],bytes[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('encodeMultiAssetData(uint256[],bytes[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns the number of asset(s) (described by assetData) that the corresponding AssetProxy contract is authorized to spend. When the asset data contains multiple assets (eg for Multi-Asset), the return value indicates how many complete "baskets" of those assets may be spent by all of the corresponding AssetProxy contracts. @@ -2250,49 +1251,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Details of asset, encoded per the AssetProxy contract - * specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string): string { - assert.isString('ownerAddress', ownerAddress); - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAssetProxyAllowance(address,bytes)', [ - ownerAddress.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxyAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxyAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Returns the owner's balance of the assets(s) specified in assetData. When the asset data contains multiple assets (eg in ERC1155 or Multi-Asset), the return value indicates how many complete "baskets" of those assets are owned by owner. @@ -2345,56 +1303,13 @@ export class DevUtilsContract extends BaseContract { } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; - } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('getBalance(address,bytes)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Details of asset, encoded per the AssetProxy contract - * specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string): string { - assert.isString('ownerAddress', ownerAddress); - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getBalance(address,bytes)', [ - ownerAddress.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBalance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DevUtilsContract; + } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); const abiEncoder = self._lookupAbiEncoder('getBalance(address,bytes)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; }, }; /** @@ -2456,49 +1371,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Details of asset, encoded per the AssetProxy contract - * specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string): string { - assert.isString('ownerAddress', ownerAddress); - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getBalanceAndAssetProxyAllowance(address,bytes)', - [ownerAddress.toLowerCase(), assetData], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBalanceAndAssetProxyAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber, BigNumber] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBalanceAndAssetProxyAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; /** * Calls getAssetProxyAllowance() for each element of assetData. @@ -2559,49 +1431,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Array of asset details, each encoded per the AssetProxy - * contract specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string[]): string { - assert.isString('ownerAddress', ownerAddress); - assert.isArray('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getBatchAssetProxyAllowances(address,bytes[])', - [ownerAddress.toLowerCase(), assetData], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchAssetProxyAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchAssetProxyAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Calls getBalance() for each element of assetData. @@ -2662,49 +1491,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Array of asset details, each encoded per the AssetProxy - * contract specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string[]): string { - assert.isString('ownerAddress', ownerAddress); - assert.isArray('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getBatchBalances(address,bytes[])', [ - ownerAddress.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchBalances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchBalances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Calls getBatchBalances() and getBatchAllowances() for each element of assetData. @@ -2765,49 +1551,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Owner of the assets specified by assetData. - * @param assetData Array of asset details, each encoded per the AssetProxy - * contract specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string[]): string { - assert.isString('ownerAddress', ownerAddress); - assert.isArray('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getBatchBalancesAndAssetProxyAllowances(address,bytes[])', - [ownerAddress.toLowerCase(), assetData], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string[]] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchBalancesAndAssetProxyAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string[]]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber[], BigNumber[]] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getBatchBalancesAndAssetProxyAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber[], BigNumber[]]>(returnData); - return abiDecodedReturnData; - }, }; /** * Batch fetches ETH balances @@ -2861,43 +1604,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param addresses Array of addresses. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(addresses: string[]): string { - assert.isArray('addresses', addresses); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getEthBalances(address[])', [addresses]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Fetches all order-relevant information needed to validate if the supplied order is fillable. @@ -2906,125 +1612,15 @@ export class DevUtilsContract extends BaseContract { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. - * @param order The order structure. - * @param signature Signature provided by maker that proves the order's - * authenticity. `0x01` can always be provided if the signature does not - * need to be validated. - * @returns The orderInfo (hash, status, and `takerAssetAmount` already filled for the given order), fillableTakerAssetAmount (amount of the order's `takerAssetAmount` that is fillable given all on-chain state), and isValidSignature (validity of the provided signature). NOTE: If the `takerAssetData` encodes data for multiple assets, `fillableTakerAssetAmount` will represent a "scaled" amount, meaning it must be multiplied by all the individual asset amounts within the `takerAssetData` to get the final amount of each asset that can be filled. - */ - async callAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - signature: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise< - [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean] - > { - assert.isString('signature', signature); - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (defaultBlock !== undefined) { - assert.isBlockParam('defaultBlock', defaultBlock); - } - const self = (this as any) as DevUtilsContract; - const encodedData = self._strictEncodeArguments( - 'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - [order, signature], - ); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; - let rawCallResult; - try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - } catch (err) { - BaseContract._throwIfThrownErrorIsRevertError(err); - throw err; - } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder( - 'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - ); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue< - [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean] - >(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param order The order structure. - * @param signature Signature provided by maker that proves the order's - * authenticity. `0x01` can always be provided if the signature does not - * need to be validated. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - signature: string, - ): string { - assert.isString('signature', signature); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - [order, signature], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. + * since they don't modify state. + * @param order The order structure. + * @param signature Signature provided by maker that proves the order's + * authenticity. `0x01` can always be provided if the signature does not + * need to be validated. + * @returns The orderInfo (hash, status, and `takerAssetAmount` already filled for the given order), fillableTakerAssetAmount (amount of the order's `takerAssetAmount` that is fillable given all on-chain state), and isValidSignature (validity of the provided signature). NOTE: If the `takerAssetData` encodes data for multiple assets, `fillableTakerAssetAmount` will represent a "scaled" amount, meaning it must be multiplied by all the individual asset amounts within the `takerAssetData` to get the final amount of each asset that can be filled. */ - getABIDecodedTransactionData( - callData: string, - ): [ - { + async callAsync( + order: { makerAddress: string; takerAddress: string; feeRecipientAddress: string; @@ -3040,53 +1636,54 @@ export class DevUtilsContract extends BaseContract { makerFeeAssetData: string; takerFeeAssetData: string; }, - string - ] { + signature: string, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise< + [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean] + > { + assert.isString('signature', signature); + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (defaultBlock !== undefined) { + assert.isBlockParam('defaultBlock', defaultBlock); + } const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( + const encodedData = self._strictEncodeArguments( 'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', + [order, signature], ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - string - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean] { - const self = (this as any) as DevUtilsContract; + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; + let rawCallResult; + try { + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + } catch (err) { + BaseContract._throwIfThrownErrorIsRevertError(err); + throw err; + } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); const abiEncoder = self._lookupAbiEncoder( 'getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', ); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< + const result = abiEncoder.strictDecodeReturnValue< [{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, BigNumber, boolean] - >(returnData); - return abiDecodedReturnData; + >(rawCallResult); + // tslint:enable boolean-naming + return result; }, }; /** @@ -3178,124 +1775,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param orders Array of order structures. - * @param signatures Array of signatures provided by makers that prove the - * authenticity of the orders. `0x01` can always be provided if a signature - * does not need to be validated. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - signatures: string[], - ): string { - assert.isArray('orders', orders); - assert.isArray('signatures', signatures); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])', - [orders, signatures], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - string[] - ] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - string[] - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): [ - Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>, - BigNumber[], - boolean[] - ] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - [ - Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>, - BigNumber[], - boolean[] - ] - >(returnData); - return abiDecodedReturnData; - }, }; /** * Simulates all of the transfers within an order and returns the index of the first failed transfer. @@ -3609,66 +2088,6 @@ export class DevUtilsContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getSimulatedOrderTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),address,uint256)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): number { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getSimulatedOrderTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),address,uint256)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Simulates all of the transfers for each given order and returns the indices of each first failed transfer. @@ -3992,68 +2411,6 @@ export class DevUtilsContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getSimulatedOrdersTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],address[],uint256[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): number[] { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder( - 'getSimulatedOrdersTransferResults((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],address[],uint256[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the amount of an asset transferable by the owner. @@ -4114,49 +2471,6 @@ export class DevUtilsContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param ownerAddress Address of the owner of the asset. - * @param assetData Description of tokens, per the AssetProxy contract - * specification. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(ownerAddress: string, assetData: string): string { - assert.isString('ownerAddress', ownerAddress); - assert.isString('assetData', assetData); - const self = (this as any) as DevUtilsContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getTransferableAssetAmount(address,bytes)', [ - ownerAddress.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getTransferableAssetAmount(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DevUtilsContract; - const abiEncoder = self._lookupAbiEncoder('getTransferableAssetAmount(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index b8b2279a97..ef938361a1 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -92,41 +92,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('MAX_MINT_AMOUNT()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('MAX_MINT_AMOUNT()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('MAX_MINT_AMOUNT()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public allowance = { /** @@ -183,48 +148,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address of the account owning tokens - * @param _spender The address of the account able to transfer the tokens - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string, _spender: string): string { - assert.isString('_owner', _owner); - assert.isString('_spender', _spender); - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('allowance(address,address)', [ - _owner.toLowerCase(), - _spender.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * `msg.sender` approves `_spender` to spend `_value` tokens @@ -412,30 +335,6 @@ export class DummyERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Query the balance of owner @@ -489,43 +388,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address from which the balance will be retrieved - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string): string { - assert.isString('_owner', _owner); - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public decimals = { /** @@ -569,41 +431,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Mints new tokens for sender @@ -753,30 +580,6 @@ export class DummyERC20TokenContract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('mint(uint256)', [_value]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('mint(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('mint(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public name = { /** @@ -820,41 +623,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('name()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -898,41 +666,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Sets the balance of target address @@ -1119,30 +852,6 @@ export class DummyERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('setBalance(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('setBalance(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public symbol = { /** @@ -1186,41 +895,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Query total supply of token @@ -1268,41 +942,6 @@ export class DummyERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * send `value` token to `to` from `msg.sender` @@ -1477,30 +1116,6 @@ export class DummyERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717 @@ -1712,30 +1327,6 @@ export class DummyERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1876,30 +1467,6 @@ export class DummyERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index 5540962892..c25fe1bf64 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -247,30 +247,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * NFTs assigned to the zero address are considered invalid, and this @@ -325,43 +301,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner An address for whom to query the balance - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string): string { - assert.isString('_owner', _owner); - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Function to burn a token @@ -540,30 +479,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('burn(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('burn(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws if `_tokenId` is not a valid NFT. @@ -617,43 +532,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _tokenId The NFT to find the approved address for - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_tokenId: BigNumber): string { - assert.isBigNumber('_tokenId', _tokenId); - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public isApprovedForAll = { /** @@ -710,48 +588,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address that owns the NFTs - * @param _operator The address that acts on behalf of the owner - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string, _operator: string): string { - assert.isString('_owner', _owner); - assert.isString('_operator', _operator); - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isApprovedForAll(address,address)', [ - _owner.toLowerCase(), - _operator.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Function to mint a new token @@ -930,30 +766,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('mint(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('mint(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public name = { /** @@ -997,41 +809,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('name()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -1075,41 +852,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * NFTs assigned to zero address are considered invalid, and queries @@ -1164,43 +906,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _tokenId The identifier for an NFT - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_tokenId: BigNumber): string { - assert.isBigNumber('_tokenId', _tokenId); - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * This works identically to the other function with an extra data parameter, @@ -1412,30 +1117,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws unless `msg.sender` is the current owner, an authorized @@ -1676,30 +1357,6 @@ export class DummyERC721TokenContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber, string] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Emits the ApprovalForAll event. The contract MUST allow @@ -1891,30 +1548,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, boolean] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, boolean]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public symbol = { /** @@ -1958,41 +1591,6 @@ export class DummyERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws unless `msg.sender` is the current owner, an authorized @@ -2206,30 +1804,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -2370,30 +1944,6 @@ export class DummyERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as DummyERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index c0d8d3fb7c..d32901a91e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -289,78 +289,6 @@ export class DutchAuctionContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - } { - const self = (this as any) as DutchAuctionContract; - const abiEncoder = self._lookupAbiEncoder( - 'getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - beginTimeSeconds: BigNumber; - endTimeSeconds: BigNumber; - beginAmount: BigNumber; - endAmount: BigNumber; - currentAmount: BigNumber; - currentTimeSeconds: BigNumber; - } { - const self = (this as any) as DutchAuctionContract; - const abiEncoder = self._lookupAbiEncoder( - 'getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - beginTimeSeconds: BigNumber; - endTimeSeconds: BigNumber; - beginAmount: BigNumber; - endAmount: BigNumber; - currentAmount: BigNumber; - currentTimeSeconds: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Matches the buy and sell orders at an amount given the following: the current block time, the auction @@ -795,92 +723,6 @@ export class DutchAuctionContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - } { - const self = (this as any) as DutchAuctionContract; - const abiEncoder = self._lookupAbiEncoder( - 'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - }; - leftMakerAssetSpreadAmount: BigNumber; - } { - const self = (this as any) as DutchAuctionContract; - const abiEncoder = self._lookupAbiEncoder( - 'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - }; - leftMakerAssetSpreadAmount: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index ad2fcd745e..3816ce9f4d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -197,30 +197,6 @@ export class ERC1155ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorities = { /** @@ -269,42 +245,6 @@ export class ERC1155ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as ERC1155ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorized = { /** @@ -353,44 +293,6 @@ export class ERC1155ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ERC1155ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorized(address)', [ - index_0.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets all authorized addresses. @@ -438,41 +340,6 @@ export class ERC1155ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -512,41 +379,6 @@ export class ERC1155ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -590,41 +422,6 @@ export class ERC1155ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -773,30 +570,6 @@ export class ERC1155ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -991,30 +764,6 @@ export class ERC1155ProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Transfers batch of ERC1155 assets. Either succeeds or throws. @@ -1253,30 +1002,6 @@ export class ERC1155ProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1417,30 +1142,6 @@ export class ERC1155ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC1155ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index f50041fe22..81b5885dcf 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -197,30 +197,6 @@ export class ERC20ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorities = { /** @@ -269,42 +245,6 @@ export class ERC20ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -453,30 +393,6 @@ export class ERC20ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -520,41 +436,6 @@ export class ERC20ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -749,30 +630,6 @@ export class ERC20ProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -812,41 +669,6 @@ export class ERC20ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorized = { /** @@ -895,44 +717,6 @@ export class ERC20ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorized(address)', [ - index_0.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets all authorized addresses. @@ -980,41 +764,6 @@ export class ERC20ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC20ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1155,30 +904,6 @@ export class ERC20ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC20ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index 7ce2e25780..f8bef75384 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -236,30 +236,6 @@ export class ERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Query total supply of token @@ -307,41 +283,6 @@ export class ERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * send `value` token to `to` from `from` on the condition it is approved by `from` @@ -553,30 +494,6 @@ export class ERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Query the balance of owner @@ -630,43 +547,6 @@ export class ERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address from which the balance will be retrieved - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string): string { - assert.isString('_owner', _owner); - const self = (this as any) as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * send `value` token to `to` from `msg.sender` @@ -841,30 +721,6 @@ export class ERC20TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public allowance = { /** @@ -921,48 +777,6 @@ export class ERC20TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address of the account owning tokens - * @param _spender The address of the account able to transfer the tokens - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string, _spender: string): string { - assert.isString('_owner', _owner); - assert.isString('_spender', _spender); - const self = (this as any) as ERC20TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('allowance(address,address)', [ - _owner.toLowerCase(), - _spender.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ERC20TokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index c93e5df751..6011d7ef8b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -197,30 +197,6 @@ export class ERC721ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorities = { /** @@ -269,42 +245,6 @@ export class ERC721ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -453,30 +393,6 @@ export class ERC721ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -520,41 +436,6 @@ export class ERC721ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -749,30 +630,6 @@ export class ERC721ProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -812,41 +669,6 @@ export class ERC721ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorized = { /** @@ -895,44 +717,6 @@ export class ERC721ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorized(address)', [ - index_0.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets all authorized addresses. @@ -980,41 +764,6 @@ export class ERC721ProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ERC721ProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1155,30 +904,6 @@ export class ERC721ProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721ProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index 6609198dec..49bfe06439 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -247,30 +247,6 @@ export class ERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * NFTs assigned to the zero address are considered invalid, and this @@ -325,43 +301,6 @@ export class ERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner An address for whom to query the balance - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string): string { - assert.isString('_owner', _owner); - const self = (this as any) as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws if `_tokenId` is not a valid NFT. @@ -415,43 +354,6 @@ export class ERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _tokenId The NFT to find the approved address for - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_tokenId: BigNumber): string { - assert.isBigNumber('_tokenId', _tokenId); - const self = (this as any) as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getApproved(uint256)', [_tokenId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('getApproved(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public isApprovedForAll = { /** @@ -508,48 +410,6 @@ export class ERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _owner The address that owns the NFTs - * @param _operator The address that acts on behalf of the owner - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string, _operator: string): string { - assert.isString('_owner', _owner); - assert.isString('_operator', _operator); - const self = (this as any) as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isApprovedForAll(address,address)', [ - _owner.toLowerCase(), - _operator.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('isApprovedForAll(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * NFTs assigned to zero address are considered invalid, and queries @@ -604,43 +464,6 @@ export class ERC721TokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param _tokenId The identifier for an NFT - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_tokenId: BigNumber): string { - assert.isBigNumber('_tokenId', _tokenId); - const self = (this as any) as ERC721TokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('ownerOf(uint256)', [_tokenId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('ownerOf(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * This works identically to the other function with an extra data parameter, @@ -852,30 +675,6 @@ export class ERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber] { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws unless `msg.sender` is the current owner, an authorized @@ -1116,30 +915,6 @@ export class ERC721TokenContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber, string] { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('safeTransferFrom(address,address,uint256,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Emits the ApprovalForAll event. The contract MUST allow @@ -1331,30 +1106,6 @@ export class ERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, boolean] { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, boolean]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('setApprovalForAll(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Throws unless `msg.sender` is the current owner, an authorized @@ -1568,30 +1319,6 @@ export class ERC721TokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, BigNumber] { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ERC721TokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts index c973546cf0..5ffcb51c88 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts @@ -82,43 +82,6 @@ export class EthBalanceCheckerContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param addresses Array of addresses. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(addresses: string[]): string { - assert.isArray('addresses', addresses); - const self = (this as any) as EthBalanceCheckerContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getEthBalances(address[])', [addresses]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string[] { - const self = (this as any) as EthBalanceCheckerContract; - const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber[] { - const self = (this as any) as EthBalanceCheckerContract; - const abiEncoder = self._lookupAbiEncoder('getEthBalances(address[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index bb8fc0584c..22db9efa04 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -151,41 +151,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('EIP1271_MAGIC_VALUE()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('EIP1271_MAGIC_VALUE()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('EIP1271_MAGIC_VALUE()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public EIP712_EXCHANGE_DOMAIN_HASH = { /** @@ -229,41 +194,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('EIP712_EXCHANGE_DOMAIN_HASH()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('EIP712_EXCHANGE_DOMAIN_HASH()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public allowedValidators = { /** @@ -317,46 +247,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string, index_1: string): string { - assert.isString('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('allowedValidators(address,address)', [ - index_0.toLowerCase(), - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('allowedValidators(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('allowedValidators(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of cancelOrder. @@ -622,72 +512,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - ] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Executes a batch of Exchange method calls in the context of signer(s). @@ -925,50 +749,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchExecuteTransactions((uint256,uint256,uint256,address,bytes)[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchExecuteTransactions((uint256,uint256,uint256,address,bytes)[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of fillOrKillOrder. @@ -1298,84 +1078,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> - >(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of fillOrder. @@ -1705,84 +1407,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> - >(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of fillOrder. If any fill reverts, the error is caught and ignored. @@ -2112,84 +1736,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }> - >(returnData); - return abiDecodedReturnData; - }, }; /** * Match complementary orders that have a profitable spread. @@ -2658,104 +2204,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - left: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - right: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - left: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - right: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Match complementary orders that have a profitable spread. @@ -3225,104 +2673,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchMatchOrdersWithMaximalFill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - left: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - right: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'batchMatchOrdersWithMaximalFill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - left: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - right: Array<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * After calling, the order can not be filled anymore. @@ -3581,72 +2931,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } - ] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch @@ -3808,30 +3092,6 @@ export class ExchangeContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public cancelled = { /** @@ -3880,42 +3140,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('cancelled(bytes32)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('cancelled(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('cancelled(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public currentContextAddress = { /** @@ -3959,41 +3183,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('currentContextAddress()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('currentContextAddress()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('currentContextAddress()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Executes an Exchange method call in the context of signer. @@ -4217,48 +3406,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'executeTransaction((uint256,uint256,uint256,address,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'executeTransaction((uint256,uint256,uint256,address,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Fills the input order. Reverts if exact takerAssetFillAmount not filled. @@ -4573,93 +3720,19 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, + }; + /** + * Fills the input order. + */ + public fillOrder = { /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, - }; - /** - * Fills the input order. - */ - public fillOrder = { - /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param order Order struct containing order specifications. - * @param takerAssetFillAmount Desired amount of takerAsset to sell. - * @param signature Proof that order has been created by maker. - * @param txData Additional data for transaction - * @returns The hash of the transaction + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param order Order struct containing order specifications. + * @param takerAssetFillAmount Desired amount of takerAsset to sell. + * @param signature Proof that order has been created by maker. + * @param txData Additional data for transaction + * @returns The hash of the transaction */ async sendTransactionAsync( order: { @@ -4957,80 +4030,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),uint256,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; public filled = { /** @@ -5079,42 +4078,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('filled(bytes32)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('filled(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('filled(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets an asset proxy. @@ -5168,43 +4131,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetProxyId Id of the asset proxy. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetProxyId: string): string { - assert.isString('assetProxyId', assetProxyId); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAssetProxy(bytes4)', [assetProxyId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets information about an order: status, hash, and amount filled. @@ -5281,102 +4207,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param order Order to gather information on. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', - [order], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - orderStatus: number; - orderHash: string; - orderTakerAssetFilledAmount: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Verifies that a hash has been signed by the given signer. @@ -5440,50 +4270,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param hash Any 32-byte hash. - * @param signerAddress Address that should have signed the given hash. - * @param signature Proof that the hash has been signed by signer. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(hash: string, signerAddress: string, signature: string): string { - assert.isString('hash', hash); - assert.isString('signerAddress', signerAddress); - assert.isString('signature', signature); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'isValidHashSignature(bytes32,address,bytes)', - [hash, signerAddress.toLowerCase(), signature], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('isValidHashSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('isValidHashSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Verifies that a signature for an order is valid. @@ -5559,101 +4345,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param order The order. - * @param signature Proof that the order has been signed by signer. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - signature: string, - ): string { - assert.isString('signature', signature); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'isValidOrderSignature((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - [order, signature], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'isValidOrderSignature((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'isValidOrderSignature((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Verifies that a signature for a transaction is valid. @@ -5720,74 +4411,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param transaction The transaction. - * @param signature Proof that the order has been signed by signer. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - transaction: { - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }, - signature: string, - ): string { - assert.isString('signature', signature); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'isValidTransactionSignature((uint256,uint256,uint256,address,bytes),bytes)', - [transaction, signature], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'isValidTransactionSignature((uint256,uint256,uint256,address,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'isValidTransactionSignature((uint256,uint256,uint256,address,bytes),bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Calls marketBuyOrdersNoThrow then reverts if < makerAssetFillAmount has been bought. @@ -6109,82 +4732,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketBuyOrdersFillOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketBuyOrdersFillOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of fillOrder until total amount of makerAsset is bought by taker. @@ -6487,101 +5034,25 @@ export class ExchangeContract extends BaseContract { takerAssetAmount: BigNumber; makerFee: BigNumber; takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - makerAssetFillAmount: BigNumber, - signatures: string[], - ): string { - assert.isArray('orders', orders); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - assert.isArray('signatures', signatures); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - [orders, makerAssetFillAmount, signatures], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { + expirationTimeSeconds: BigNumber; + salt: BigNumber; + makerAssetData: string; + takerAssetData: string; + makerFeeAssetData: string; + takerFeeAssetData: string; + }>, + makerAssetFillAmount: BigNumber, + signatures: string[], + ): string { + assert.isArray('orders', orders); + assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); + assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( + const abiEncodedTransactionData = self._strictEncodeArguments( 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', + [orders, makerAssetFillAmount, signatures], ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; + return abiEncodedTransactionData; }, }; /** @@ -6904,82 +5375,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersFillOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersFillOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Executes multiple calls of fillOrder until total amount of takerAsset is sold by taker. @@ -7302,82 +5697,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Match two complementary orders that have a profitable spread. @@ -7821,102 +6140,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; /** * Match two complementary orders that have a profitable spread. @@ -8349,118 +6572,22 @@ export class ExchangeContract extends BaseContract { takerFee: BigNumber; expirationTimeSeconds: BigNumber; salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - leftSignature: string, - rightSignature: string, - ): string { - assert.isString('leftSignature', leftSignature); - assert.isString('rightSignature', rightSignature); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'matchOrdersWithMaximalFill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes,bytes)', - [leftOrder, rightOrder, leftSignature, rightSignature], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - } { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'matchOrdersWithMaximalFill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes,bytes)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - } { + makerAssetData: string; + takerAssetData: string; + makerFeeAssetData: string; + takerFeeAssetData: string; + }, + leftSignature: string, + rightSignature: string, + ): string { + assert.isString('leftSignature', leftSignature); + assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( + const abiEncodedTransactionData = self._strictEncodeArguments( 'matchOrdersWithMaximalFill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes),bytes,bytes)', + [leftOrder, rightOrder, leftSignature, rightSignature], ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - left: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - right: { - makerAssetFilledAmount: BigNumber; - takerAssetFilledAmount: BigNumber; - makerFeePaid: BigNumber; - takerFeePaid: BigNumber; - protocolFeePaid: BigNumber; - }; - profitInLeftMakerAsset: BigNumber; - profitInRightMakerAsset: BigNumber; - }>(returnData); - return abiDecodedReturnData; + return abiEncodedTransactionData; }, }; public orderEpoch = { @@ -8515,46 +6642,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string, index_1: string): string { - assert.isString('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('orderEpoch(address,address)', [ - index_0.toLowerCase(), - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('orderEpoch(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('orderEpoch(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -8598,41 +6685,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Approves a hash on-chain. @@ -8780,30 +6832,6 @@ export class ExchangeContract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('preSign(bytes32)', [hash]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('preSign(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('preSign(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public preSigned = { /** @@ -8857,46 +6885,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string, index_1: string): string { - assert.isString('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('preSigned(bytes32,address)', [ - index_0, - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('preSigned(bytes32,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('preSigned(bytes32,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public protocolFeeCollector = { /** @@ -8940,41 +6928,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('protocolFeeCollector()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('protocolFeeCollector()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('protocolFeeCollector()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public protocolFeeMultiplier = { /** @@ -9018,41 +6971,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('protocolFeeMultiplier()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('protocolFeeMultiplier()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('protocolFeeMultiplier()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Registers an asset proxy to its asset proxy id. @@ -9209,30 +7127,6 @@ export class ExchangeContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows the owner to update the protocolFeeCollector address. @@ -9411,30 +7305,6 @@ export class ExchangeContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setProtocolFeeCollectorAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setProtocolFeeCollectorAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Allows the owner to update the protocol fee multiplier. @@ -9608,30 +7478,6 @@ export class ExchangeContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setProtocolFeeMultiplier(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setProtocolFeeMultiplier(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Approves/unnapproves a Validator contract to verify signatures on signer's behalf @@ -9827,30 +7673,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, boolean] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, boolean]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * This function may be used to simulate any amount of transfers As they would occur through the Exchange contract. Note that this function will always revert, even if all transfers are successful. However, it may be used with eth_call or with a try/catch pattern in order to simulate the results of the transfers. @@ -10113,34 +7935,6 @@ export class ExchangeContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string[], string[], string[], BigNumber[]] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'simulateDispatchTransferFromCalls(bytes[],address[],address[],uint256[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string[], string[], string[], BigNumber[]]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder( - 'simulateDispatchTransferFromCalls(bytes[],address[],address[],uint256[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transactionsExecuted = { /** @@ -10189,42 +7983,6 @@ export class ExchangeContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as ExchangeContract; - const abiEncodedTransactionData = self._strictEncodeArguments('transactionsExecuted(bytes32)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('transactionsExecuted(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('transactionsExecuted(bytes32)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -10365,30 +8123,6 @@ export class ExchangeContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ExchangeContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 64e7d4abd3..6773bdc1eb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -182,30 +182,6 @@ export class ForwarderContract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('approveMakerAssetProxy(bytes)', [assetData]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('approveMakerAssetProxy(bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('approveMakerAssetProxy(bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Attempt to buy makerAssetBuyAmount of makerAsset by selling ETH provided with transaction. @@ -570,82 +546,6 @@ export class ForwarderContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - BigNumber, - string[], - BigNumber, - string - ] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[],uint256,address)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - BigNumber, - string[], - BigNumber, - string - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber, BigNumber, BigNumber] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[],uint256,address)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber, BigNumber]>( - returnData, - ); - return abiDecodedReturnData; - }, }; /** * Purchases as much of orders' makerAssets as possible by selling as much of the ETH value sent @@ -989,80 +889,6 @@ export class ForwarderContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - string[], - BigNumber, - string - ] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],uint256,address)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - string[], - BigNumber, - string - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber, BigNumber, BigNumber] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder( - 'marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],uint256,address)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber, BigNumber]>( - returnData, - ); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -1106,41 +932,6 @@ export class ForwarderContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ForwarderContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1281,30 +1072,6 @@ export class ForwarderContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Withdraws assets from this contract. The contract formerly required a ZRX balance in order @@ -1484,30 +1251,6 @@ export class ForwarderContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('withdrawAsset(bytes,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as ForwarderContract; - const abiEncoder = self._lookupAbiEncoder('withdrawAsset(bytes,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index 4a91819df5..7dd8259d06 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -256,30 +256,6 @@ export class IAssetProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] { - const self = (this as any) as IAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as IAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -319,41 +295,6 @@ export class IAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as IAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as IAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as IAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index d1cd5b401b..8e1a6f255e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -91,51 +91,6 @@ export class IValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param hash Message hash that is signed. - * @param signerAddress Address that should have signed the given hash. - * @param signature Proof of signing. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(hash: string, signerAddress: string, signature: string): string { - assert.isString('hash', hash); - assert.isString('signerAddress', signerAddress); - assert.isString('signature', signature); - const self = (this as any) as IValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isValidSignature(bytes32,address,bytes)', [ - hash, - signerAddress.toLowerCase(), - signature, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as IValidatorContract; - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as IValidatorContract; - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 9c8399f017..232d59fab6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -84,48 +84,6 @@ export class IWalletContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param hash Message hash that is signed. - * @param signature Proof of signing. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(hash: string, signature: string): string { - assert.isString('hash', hash); - assert.isString('signature', signature); - const self = (this as any) as IWalletContract; - const abiEncodedTransactionData = self._strictEncodeArguments('isValidSignature(bytes32,bytes)', [ - hash, - signature, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as IWalletContract; - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as IWalletContract; - const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index ddac12e1de..aeb29c0cd7 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -100,42 +100,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('assetProxies(bytes4)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('assetProxies(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Authorizes an address. @@ -284,30 +248,6 @@ export class MultiAssetProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('addAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorities = { /** @@ -356,42 +296,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorities(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorities(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets an asset proxy. @@ -445,43 +349,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetProxyId Id of the asset proxy. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetProxyId: string): string { - assert.isString('assetProxyId', assetProxyId); - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAssetProxy(bytes4)', [assetProxyId]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAssetProxy(bytes4)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -630,30 +497,6 @@ export class MultiAssetProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddress(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public owner = { /** @@ -697,41 +540,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('owner()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('owner()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Removes authorizion of an address. @@ -926,30 +734,6 @@ export class MultiAssetProxyContract extends BaseContract { ); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, BigNumber] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('removeAuthorizedAddressAtIndex(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -989,41 +773,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public authorized = { /** @@ -1072,44 +821,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('authorized(address)', [ - index_0.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('authorized(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Registers an asset proxy to its asset proxy id. @@ -1266,30 +977,6 @@ export class MultiAssetProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets all authorized addresses. @@ -1337,41 +1024,6 @@ export class MultiAssetProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as MultiAssetProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getAuthorizedAddresses()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string[] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('getAuthorizedAddresses()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferOwnership = { /** @@ -1512,30 +1164,6 @@ export class MultiAssetProxyContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string] { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as MultiAssetProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index de5099cd21..b3e1146913 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -123,129 +123,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - takerAddress: string, - ): string { - assert.isString('takerAddress', takerAddress); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - [order, takerAddress.toLowerCase()], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - string - ] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - string - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): [ - { orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, - { - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - } - ] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - [ - { orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }, - { - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - } - ] - >(returnData); - return abiDecodedReturnData; - }, }; public getBalanceAndAllowance = { /** @@ -299,46 +176,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(target: string, assetData: string): string { - assert.isString('target', target); - assert.isString('assetData', assetData); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getBalanceAndAllowance(address,bytes)', [ - target.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getBalanceAndAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber, BigNumber] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getBalanceAndAllowance(address,bytes)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, BigNumber]>(returnData); - return abiDecodedReturnData; - }, }; public getOrdersAndTradersInfo = { /** @@ -435,130 +272,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>, - takerAddresses: string[], - ): string { - assert.isArray('orders', orders); - assert.isArray('takerAddresses', takerAddresses); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - [orders, takerAddresses], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>, - string[] - ] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>, - string[] - ] - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): [ - Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>, - Array<{ - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - }> - ] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - [ - Array<{ orderStatus: number; orderHash: string; orderTakerAssetFilledAmount: BigNumber }>, - Array<{ - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - }> - ] - >(returnData); - return abiDecodedReturnData; - }, }; public getTradersInfo = { /** @@ -649,118 +362,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>, - takerAddresses: string[], - ): string { - assert.isArray('orders', orders); - assert.isArray('takerAddresses', takerAddresses); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - [orders, takerAddresses], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }> { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }> - >(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - }> { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - }> - >(returnData); - return abiDecodedReturnData; - }, }; public getERC721TokenOwner = { /** @@ -814,46 +415,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(token: string, tokenId: BigNumber): string { - assert.isString('token', token); - assert.isBigNumber('tokenId', tokenId); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getERC721TokenOwner(address,uint256)', [ - token.toLowerCase(), - tokenId, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getERC721TokenOwner(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getERC721TokenOwner(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public getBalancesAndAllowances = { /** @@ -907,46 +468,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(target: string, assetData: string[]): string { - assert.isString('target', target); - assert.isArray('assetData', assetData); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getBalancesAndAllowances(address,bytes[])', [ - target.toLowerCase(), - assetData, - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string[]] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getBalancesAndAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string[]]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): [BigNumber[], BigNumber[]] { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder('getBalancesAndAllowances(address,bytes[])'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber[], BigNumber[]]>(returnData); - return abiDecodedReturnData; - }, }; public getTraderInfo = { /** @@ -1032,113 +553,6 @@ export class OrderValidatorContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - takerAddress: string, - ): string { - assert.isString('takerAddress', takerAddress); - const self = (this as any) as OrderValidatorContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - [order, takerAddress.toLowerCase()], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData( - callData: string, - ): { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - } { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - ); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - } { - const self = (this as any) as OrderValidatorContract; - const abiEncoder = self._lookupAbiEncoder( - 'getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)', - ); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - makerBalance: BigNumber; - makerAllowance: BigNumber; - takerBalance: BigNumber; - takerAllowance: BigNumber; - makerZrxBalance: BigNumber; - makerZrxAllowance: BigNumber; - takerZrxBalance: BigNumber; - takerZrxAllowance: BigNumber; - }>(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts index 954be6b254..417529758a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts @@ -96,53 +96,6 @@ export class StaticCallProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param assetData Byte array encoded with staticCallTarget, staticCallData, - * and expectedCallResultHash - * @param from This value is ignored. - * @param to This value is ignored. - * @param amount This value is ignored. - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(assetData: string, from: string, to: string, amount: BigNumber): string { - assert.isString('assetData', assetData); - assert.isString('from', from); - assert.isString('to', to); - assert.isBigNumber('amount', amount); - const self = (this as any) as StaticCallProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'transferFrom(bytes,address,address,uint256)', - [assetData, from.toLowerCase(), to.toLowerCase(), amount], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [string, string, string, BigNumber] { - const self = (this as any) as StaticCallProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string, BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as StaticCallProxyContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(bytes,address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * Gets the proxy id associated with the proxy address. @@ -182,41 +135,6 @@ export class StaticCallProxyContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as StaticCallProxyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('getProxyId()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as StaticCallProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as StaticCallProxyContract; - const abiEncoder = self._lookupAbiEncoder('getProxyId()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 699f18d94c..9f66206793 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -108,41 +108,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('name()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public approve = { /** @@ -299,30 +264,6 @@ export class WETH9Contract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public totalSupply = { /** @@ -366,41 +307,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transferFrom = { /** @@ -593,30 +499,6 @@ export class WETH9Contract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public withdraw = { /** @@ -755,30 +637,6 @@ export class WETH9Contract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): [BigNumber] { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public decimals = { /** @@ -822,41 +680,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): number { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public balanceOf = { /** @@ -905,44 +728,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string): string { - assert.isString('index_0', index_0); - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [ - index_0.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public symbol = { /** @@ -986,41 +771,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transfer = { /** @@ -1177,30 +927,6 @@ export class WETH9Contract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public deposit = { /** @@ -1333,30 +1059,6 @@ export class WETH9Contract extends BaseContract { const abiEncodedTransactionData = self._strictEncodeArguments('deposit()', []); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('deposit()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): void { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('deposit()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public allowance = { /** @@ -1410,46 +1112,6 @@ export class WETH9Contract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: string, index_1: string): string { - assert.isString('index_0', index_0); - assert.isString('index_1', index_1); - const self = (this as any) as WETH9Contract; - const abiEncodedTransactionData = self._strictEncodeArguments('allowance(address,address)', [ - index_0.toLowerCase(), - index_1.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as WETH9Contract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 6f60e3abab..980af3290e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -92,41 +92,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('name()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('name()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public approve = { /** @@ -300,30 +265,6 @@ export class ZRXTokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('approve(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public totalSupply = { /** @@ -367,41 +308,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('totalSupply()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('totalSupply()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; /** * ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. @@ -613,30 +519,6 @@ export class ZRXTokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('transferFrom(address,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public decimals = { /** @@ -680,41 +562,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('decimals()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): number { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('decimals()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public balanceOf = { /** @@ -763,42 +610,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string): string { - assert.isString('_owner', _owner); - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('balanceOf(address)', [_owner.toLowerCase()]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('balanceOf(address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public symbol = { /** @@ -842,41 +653,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(): string { - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('symbol()', []); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): void { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('symbol()'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public transfer = { /** @@ -1037,30 +813,6 @@ export class ZRXTokenContract extends BaseContract { ]); return abiEncodedTransactionData; }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): boolean { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('transfer(address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; public allowance = { /** @@ -1114,46 +866,6 @@ export class ZRXTokenContract extends BaseContract { // tslint:enable boolean-naming return result; }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(_owner: string, _spender: string): string { - assert.isString('_owner', _owner); - assert.isString('_spender', _spender); - const self = (this as any) as ZRXTokenContract; - const abiEncodedTransactionData = self._strictEncodeArguments('allowance(address,address)', [ - _owner.toLowerCase(), - _spender.toLowerCase(), - ]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as ZRXTokenContract; - const abiEncoder = self._lookupAbiEncoder('allowance(address,address)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, }; private readonly _subscriptionManager: SubscriptionManager; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 79d7557875..e35586ca43 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -36,7 +36,7 @@ "watch:sol": "sol-compiler -w", "prettier_contract_wrappers": "prettier --write ./test-cli/output/typescript/* --config ../../.prettierrc", "generate_contract_wrappers": "run-p gen_typescript gen_python", - "gen_typescript": "abi-gen --abis ${npm_package_config_abis} --output ./test-cli/output/typescript --backend ethers", + "gen_typescript": "abi-gen --abis ${npm_package_config_abis} --debug --output ./test-cli/output/typescript --backend ethers", "gen_python": "pip install black && abi-gen --abis ${npm_package_config_abis} --output ./test-cli/output/python --language Python", "diff_contract_wrappers": "git diff --exit-code ./test-cli/output", "coverage:report:text": "istanbul report text", diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index c7b243e97b..a5902a5cff 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -44,6 +44,10 @@ const args = yargs normalize: true, demandOption: true, }) + .option('debug', { + describe: 'Enable debug functions', + type: 'count', + }) .option('partials', { describe: 'Glob pattern for the partial template files', type: 'string', @@ -73,12 +77,11 @@ const args = yargs default: 'TypeScript', }) .example( - "$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'", + "$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --debug --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'", 'Full usage example', ).argv; const templateFilename = args.template || `${__dirname}/../../templates/${args.language}/contract.handlebars`; - const mainTemplate = utils.getNamedContent(templateFilename); const template = Handlebars.compile(mainTemplate.content); const abiFileNames = globSync(args.abis); @@ -425,6 +428,7 @@ for (const abiFileName of abiFileNames) { ABIString: JSON.stringify(ABI), methods: methodsData, events: eventsData, + debug: args.debug > 0, }; const renderedCode = template(contextData); utils.writeOutputFile(outFilePath, renderedCode); diff --git a/packages/abi-gen/templates/TypeScript/contract.handlebars b/packages/abi-gen/templates/TypeScript/contract.handlebars index d7dd089680..e984f59117 100644 --- a/packages/abi-gen/templates/TypeScript/contract.handlebars +++ b/packages/abi-gen/templates/TypeScript/contract.handlebars @@ -69,7 +69,7 @@ export class {{contractName}}Contract extends BaseContract { {{else}} {{> method_call contractName=../contractName}} {{/ifEquals}} - {{> method_abi_helper contractName=../contractName}} + {{> method_abi_helper contractName=../contractName debug=../debug}} }; {{/each}} {{#if events}}private readonly _subscriptionManager: SubscriptionManager<{{contractName}}EventArgs, {{contractName}}Events>; diff --git a/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars index 0c8f1893af..ad7f26ed82 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars @@ -1,3 +1,26 @@ +{{^if constant~}} +{{^if debug~}} +/** + * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before + * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used + * to create a 0x transaction (see protocol spec for more details). +{{> params_docstring inputs=inputs docstrings=devdoc.params}} + * @returns The ABI encoded transaction data as a string + */ +getABIEncodedTransactionData( + {{> typed_params inputs=inputs}} + ): string { + {{#each inputs}} + {{#assertionType name type}}{{/assertionType}} + {{/each}} + const self = this as any as {{contractName}}Contract; + const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> normalized_params inputs=inputs}}]); + return abiEncodedTransactionData; +}, +{{/if~}} +{{/if~}} + +{{#if debug~}} /** * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used @@ -43,3 +66,4 @@ getABIDecodedReturnData( const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(returnData); return abiDecodedReturnData; }, +{{/if}} diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json index d6f248d320..355fe2119a 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json @@ -4,100 +4,144 @@ "compilerOutput": { "abi": [ { - "constant": true, - "inputs": [], - "name": "simpleRequire", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "bytes[]", - "name": "a", - "type": "bytes[]" + "indexed": false, + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "string", + "name": "someString", + "type": "string" } ], - "name": "acceptsAnArrayOfBytes", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" + "name": "SimpleEvent", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "_value", "type": "uint256" } ], - "name": "simpleInputSimpleOutput", - "outputs": [ + "name": "Withdrawal", + "type": "event" + }, + { + "constant": true, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes[]", + "name": "a", + "type": "bytes[]" } ], + "name": "acceptsAnArrayOfBytes", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "wad", - "type": "uint256" + "internalType": "bytes", + "name": "a", + "type": "bytes" } ], - "name": "withdraw", + "name": "acceptsBytes", "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "string", - "name": "", - "type": "string" + "components": [ + { + "internalType": "uint256", + "name": "foo", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "bar", + "type": "bytes" + }, + { + "internalType": "string", + "name": "car", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexInput", + "name": "complexInput", + "type": "tuple" } ], - "name": "multiInputMultiOutput", + "name": "complexInputComplexOutput", "outputs": [ { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "string", + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "foo", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "bar", + "type": "bytes" + }, + { + "internalType": "string", + "name": "car", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexInput", + "name": "input", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "lorem", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ipsum", + "type": "bytes" + }, + { + "internalType": "string", + "name": "dolor", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexOutput", "name": "", - "type": "string" + "type": "tuple" } ], "payable": false, @@ -140,17 +184,48 @@ "stateMutability": "pure", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "emitSimpleEvent", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "methodReturningArrayOfStructs", + "outputs": [ { - "internalType": "bytes", - "name": "a", - "type": "bytes" + "components": [ + { + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "anInteger", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "aDynamicArrayOfBytes", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "aString", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.Struct[]", + "name": "", + "type": "tuple[]" } ], - "name": "acceptsBytes", - "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" @@ -158,12 +233,17 @@ { "constant": true, "inputs": [], - "name": "noInputSimpleOutput", + "name": "methodReturningMultipleValues", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" + }, + { + "internalType": "string", + "name": "", + "type": "string" } ], "payable": false, @@ -173,46 +253,118 @@ { "constant": true, "inputs": [], - "name": "revertWithConstant", - "outputs": [], + "name": "methodUsingNestedStructWithInnerStructNotUsedElsewhere", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "aField", + "type": "uint256" + } + ], + "internalType": "struct AbiGenDummy.StructNotDirectlyUsedAnywhere", + "name": "innerStruct", + "type": "tuple" + } + ], + "internalType": "struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere", + "name": "", + "type": "tuple" + } + ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, - "inputs": [], - "name": "simpleRevert", - "outputs": [], + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "multiInputMultiOutput", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, - "inputs": [], - "name": "methodUsingNestedStructWithInnerStructNotUsedElsewhere", - "outputs": [ + "inputs": [ { "components": [ { "components": [ { - "internalType": "uint256", - "name": "aField", - "type": "uint256" + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "anInteger", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "aDynamicArrayOfBytes", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "aString", + "type": "string" } ], - "internalType": "struct AbiGenDummy.StructNotDirectlyUsedAnywhere", + "internalType": "struct AbiGenDummy.Struct", "name": "innerStruct", "type": "tuple" + }, + { + "internalType": "string", + "name": "description", + "type": "string" } ], - "internalType": "struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere", - "name": "", + "internalType": "struct AbiGenDummy.NestedStruct", + "name": "n", "type": "tuple" } ], + "name": "nestedStructInput", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" @@ -269,7 +421,7 @@ { "constant": true, "inputs": [], - "name": "requireWithConstant", + "name": "noInputNoOutput", "outputs": [], "payable": false, "stateMutability": "pure", @@ -277,80 +429,43 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "x", - "type": "address" - }, + "inputs": [], + "name": "noInputSimpleOutput", + "outputs": [ { "internalType": "uint256", - "name": "a", + "name": "", "type": "uint256" - }, + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "b", + "name": "id", "type": "uint256" }, - { - "internalType": "address", - "name": "y", - "type": "address" - }, { "internalType": "uint256", - "name": "c", + "name": "someValue", "type": "uint256" } ], - "name": "withAddressInput", + "name": "nonPureFunction", "outputs": [ { - "internalType": "address", - "name": "z", - "type": "address" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "anInteger", - "type": "uint32" - }, - { - "internalType": "bytes[]", - "name": "aDynamicArrayOfBytes", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "aString", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.Struct", - "name": "s", - "type": "tuple" + "internalType": "uint256", + "name": "result", + "type": "uint256" } ], - "name": "structInput", - "outputs": [], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", "type": "function" }, { @@ -368,77 +483,54 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "nonPureMethodThatReturnsNothing", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "foo", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "bar", - "type": "bytes" - }, - { - "internalType": "string", - "name": "car", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexInput", - "name": "complexInput", - "type": "tuple" + "internalType": "string", + "name": "a", + "type": "string" } ], - "name": "complexInputComplexOutput", - "outputs": [ + "name": "overloadedMethod", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "foo", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "bar", - "type": "bytes" - }, - { - "internalType": "string", - "name": "car", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexInput", - "name": "input", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "lorem", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ipsum", - "type": "bytes" - }, - { - "internalType": "string", - "name": "dolor", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexOutput", - "name": "", - "type": "tuple" + "internalType": "int256", + "name": "a", + "type": "int256" + } + ], + "name": "overloadedMethod", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pureFunctionWithConstant", + "outputs": [ + { + "internalType": "uint256", + "name": "someConstant", + "type": "uint256" } ], "payable": false, @@ -448,7 +540,16 @@ { "constant": true, "inputs": [], - "name": "noInputNoOutput", + "name": "requireWithConstant", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "revertWithConstant", "outputs": [], "payable": false, "stateMutability": "pure", @@ -459,15 +560,30 @@ "inputs": [ { "internalType": "uint256", - "name": "x", + "name": "", "type": "uint256" } ], - "name": "simplePureFunctionWithInput", + "name": "simpleInputNoOutput", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "simpleInputSimpleOutput", "outputs": [ { "internalType": "uint256", - "name": "sum", + "name": "", "type": "uint256" } ], @@ -475,15 +591,6 @@ "stateMutability": "pure", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "nonPureMethodThatReturnsNothing", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -503,46 +610,27 @@ "constant": true, "inputs": [ { - "components": [ - { - "components": [ - { - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "anInteger", - "type": "uint32" - }, - { - "internalType": "bytes[]", - "name": "aDynamicArrayOfBytes", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "aString", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.Struct", - "name": "innerStruct", - "type": "tuple" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.NestedStruct", - "name": "n", - "type": "tuple" + "internalType": "uint256", + "name": "x", + "type": "uint256" } ], - "name": "nestedStructInput", + "name": "simplePureFunctionWithInput", + "outputs": [ + { + "internalType": "uint256", + "name": "sum", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "simpleRequire", "outputs": [], "payable": false, "stateMutability": "pure", @@ -551,28 +639,36 @@ { "constant": true, "inputs": [], - "name": "methodReturningMultipleValues", - "outputs": [ + "name": "simpleRevert", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - }, + } + ], + "name": "someMapping", + "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "methodReturningArrayOfStructs", - "outputs": [ + "inputs": [ { "components": [ { @@ -596,22 +692,15 @@ "type": "string" } ], - "internalType": "struct AbiGenDummy.Struct[]", - "name": "", - "type": "tuple[]" + "internalType": "struct AbiGenDummy.Struct", + "name": "s", + "type": "tuple" } ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "emitSimpleEvent", + "name": "structInput", "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { @@ -653,101 +742,59 @@ }, { "constant": true, - "inputs": [], - "name": "pureFunctionWithConstant", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "x", + "type": "address" + }, { "internalType": "uint256", - "name": "someConstant", + "name": "a", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "b", "type": "uint256" - } - ], - "name": "simpleInputNoOutput", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, { - "internalType": "string", - "name": "a", - "type": "string" + "internalType": "address", + "name": "y", + "type": "address" + }, + { + "internalType": "uint256", + "name": "c", + "type": "uint256" } ], - "name": "overloadedMethod", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ + "name": "withAddressInput", + "outputs": [ { - "internalType": "int256", - "name": "a", - "type": "int256" + "internalType": "address", + "name": "z", + "type": "address" } ], - "name": "overloadedMethod", - "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "_value", + "name": "wad", "type": "uint256" } ], - "name": "Withdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "string", - "name": "someString", - "type": "string" - } - ], - "name": "SimpleEvent", - "type": "event" + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" } ], "devdoc": { @@ -795,15 +842,15 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b50611478806100206000396000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1478 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1D9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x76F15D5B GT PUSH2 0x104 JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x39B JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3A3 JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3B6 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x353 JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x369 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x37E JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x386 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x322 JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x345 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x2F2 JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x2FA JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x31A JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x59C28ADD GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2B4 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x2C9 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x2D1 JUMPI DUP1 PUSH4 0x647341EB EQ PUSH2 0x2E4 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x297 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x29F JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x2E1A7D4D GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x224 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x237 JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x259 JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x279 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1DE JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1E8 JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x1FB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1E6 PUSH2 0x3C4 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xC7F JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x209 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x404 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E6 PUSH2 0x232 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x40B JUMP JUMPDEST PUSH2 0x24A PUSH2 0x245 CALLDATASIZE PUSH1 0x4 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x45C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x26C PUSH2 0x267 CALLDATASIZE PUSH1 0x4 PUSH2 0xCBC JUMP JUMPDEST PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1045 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x20E PUSH2 0x5DE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x5E5 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x64A JUMP JUMPDEST PUSH2 0x2A7 PUSH2 0x67C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1325 JUMP JUMPDEST PUSH2 0x2BC PUSH2 0x684 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1330 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x68C JUMP JUMPDEST PUSH2 0x26C PUSH2 0x2DF CALLDATASIZE PUSH1 0x4 PUSH2 0xC2D JUMP JUMPDEST PUSH2 0x6F1 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xE77 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x6FA JUMP JUMPDEST PUSH2 0x30D PUSH2 0x308 CALLDATASIZE PUSH1 0x4 PUSH2 0xD4D JUMP JUMPDEST PUSH2 0x708 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1239 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7C5 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x330 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7D0 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x7DB JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xDE7 JUMP JUMPDEST PUSH2 0x35B PUSH2 0x7E0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP3 SWAP2 SWAP1 PUSH2 0x13A3 JUMP JUMPDEST PUSH2 0x371 PUSH2 0x819 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x81E JUMP JUMPDEST PUSH2 0x38E PUSH2 0x855 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1387 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x9AE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x3B1 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x1F6 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x1202 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x451 SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x54D SWAP3 SWAP2 SWAP1 PUSH2 0x1023 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x588 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x10E5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x11CB JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9B4 JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9CC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x710 PUSH2 0x9EC JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x3FF JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x84B SWAP1 PUSH2 0x115F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x85D PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x873 JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x8CD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x91B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9C7 PUSH2 0xA48 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9DF PUSH2 0xA1A JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9FF PUSH2 0xA5B JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA8C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH2 0xAB1 DUP2 DUP3 DUP5 MUL ADD PUSH2 0x13BC JUMP JUMPDEST DUP3 DUP2 MSTORE SWAP3 POP DUP1 DUP4 ADD DUP5 DUP3 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0xAE8 JUMPI PUSH2 0xAD6 DUP9 DUP6 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0xAF3 JUMP JUMPDEST DUP4 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xABF JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB03 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB19 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB4A PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x13BC JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xB61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB8B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xB95 PUSH1 0x80 PUSH2 0x13BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xBB0 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBBC DUP7 DUP4 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP2 POP PUSH4 0xFFFFFFFF DUP3 AND DUP3 EQ PUSH2 0xBD6 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xBEF JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBFB DUP7 DUP4 DUP8 ADD PUSH2 0xA7C JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC13 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xC20 DUP6 DUP3 DUP7 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x60 DUP5 ADD MSTORE POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xC45 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xC50 DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xC6E DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xCA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xA7C JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xCD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xCEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xD75 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xD87 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xD91 PUSH1 0x60 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDA8 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDB4 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDCB JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDD7 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDF8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE0F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE21 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE2B PUSH1 0x40 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE3B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE47 DUP8 DUP3 DUP5 ADD PUSH2 0xB7A JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE67 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xB7A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xEC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEDE JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xEEA DUP8 DUP4 DUP9 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xEFF JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xF0C DUP7 DUP3 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xF2E DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x13E3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0xF75 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD PUSH1 0x0 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0xFFC JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0xFE8 DUP3 DUP3 MLOAD PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0xFAE JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x1016 DUP2 DUP8 PUSH2 0xF16 JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1035 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x13E3 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x10D8 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x10C6 DUP6 DUP4 MLOAD PUSH2 0xF60 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x108C JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x1116 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1128 DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x113A DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x80 PUSH1 0x20 DUP5 ADD MSTORE DUP1 MLOAD PUSH1 0xA0 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0xC0 DUP6 ADD MSTORE PUSH2 0x1269 PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP6 DUP3 SUB ADD PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x12A4 DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x12E2 DUP4 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x12FD DUP2 DUP6 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x134C PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xF60 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF60 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCB4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x13DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13FE JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x13E6 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x140D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x401 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 PUSH32 0x854B76FC684DE0BE1F1A5DB2D486BC187FF28D1E99D27CA0F61B452A1942F6C PUSH6 0x78706572696D PUSH6 0x6E74616CF564 PUSH20 0x6F6C634300050B00400000000000000000000000 ", - "sourceMap": "641:6754:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:6754:0;;;;;;;" + "object": "0x608060405234801561001057600080fd5b50611517806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1517 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1EF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x647341EB GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x3D7 JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3F2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x38F JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x3A5 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x3BA JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x3C2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x35E JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x371 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x379 JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x381 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x647341EB EQ PUSH2 0x320 JUMPI DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x32E JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x336 JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x356 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x586F84B2 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2F0 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x30D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x2AD JUMPI DUP1 PUSH4 0x4BB9A37B EQ PUSH2 0x2B5 JUMPI DUP1 PUSH4 0x51BD9CE7 EQ PUSH2 0x2C8 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x3687617D GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x26F JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x4303A542 EQ PUSH2 0x29D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1F4 JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1FE JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x211 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x23A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FC PUSH2 0x400 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xCE2 JUMP JUMPDEST PUSH2 0x43D JUMP JUMPDEST PUSH2 0x224 PUSH2 0x21F CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x440 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1FC PUSH2 0x248 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x447 JUMP JUMPDEST PUSH2 0x260 PUSH2 0x25B CALLDATASIZE PUSH1 0x4 PUSH2 0xF5F JUMP JUMPDEST PUSH2 0x498 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x11A3 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x27D CALLDATASIZE PUSH1 0x4 PUSH2 0xD6E JUMP JUMPDEST PUSH2 0x538 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDAF JUMP JUMPDEST PUSH2 0x224 PUSH2 0x61A JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x621 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x686 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2C3 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x6B8 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2D6 CALLDATASIZE PUSH1 0x4 PUSH2 0xFC9 JUMP JUMPDEST PUSH2 0x6CA JUMP JUMPDEST PUSH2 0x2E3 PUSH2 0x6E7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13A4 JUMP JUMPDEST PUSH2 0x2F8 PUSH2 0x6EF JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13AF JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x6F7 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x31B CALLDATASIZE PUSH1 0x4 PUSH2 0xC91 JUMP JUMPDEST PUSH2 0x75C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xF2C JUMP JUMPDEST PUSH2 0x224 PUSH2 0x765 JUMP JUMPDEST PUSH2 0x349 PUSH2 0x344 CALLDATASIZE PUSH1 0x4 PUSH2 0xE02 JUMP JUMPDEST PUSH2 0x772 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x12D9 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x82F JUMP JUMPDEST PUSH2 0x224 PUSH2 0x36C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x834 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x83A JUMP JUMPDEST PUSH2 0x224 PUSH2 0x844 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xE9C JUMP JUMPDEST PUSH2 0x397 PUSH2 0x849 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP3 SWAP2 SWAP1 PUSH2 0x1422 JUMP JUMPDEST PUSH2 0x3AD PUSH2 0x882 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1139 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x887 JUMP JUMPDEST PUSH2 0x3CA PUSH2 0x8BE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1406 JUMP JUMPDEST PUSH2 0x224 PUSH2 0xA17 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x20C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x48D SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x589 SWAP3 SWAP2 SWAP1 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5C4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1185 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x126B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 SWAP1 MSTORE SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP3 ADD SWAP1 DUP2 SWAP1 SSTORE JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA1D JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA35 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x77A PUSH2 0xA55 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x43B JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x8B4 SWAP1 PUSH2 0x11FF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x8C6 PUSH2 0xA83 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x8DC JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x936 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x984 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA30 PUSH2 0xAB1 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA48 PUSH2 0xA83 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA68 PUSH2 0xAC4 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xAF5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xB08 PUSH2 0xB03 DUP3 PUSH2 0x1462 JUMP JUMPDEST PUSH2 0x143B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 ADD PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB45 JUMPI PUSH2 0xB30 DUP8 PUSH1 0x20 DUP5 CALLDATALOAD DUP10 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 SWAP3 DUP4 ADD SWAP3 SWAP2 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xB18 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB5F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB75 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBA6 PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x143B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xBBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBE7 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xBF1 PUSH1 0x80 PUSH2 0x143B JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xC0B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC17 DUP6 DUP4 DUP7 ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH2 0xC26 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xC7D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC3F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC4B DUP6 DUP4 DUP7 ADD PUSH2 0xAE5 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xC71 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x6E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xCA8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xCB3 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xCD1 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xCF4 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD0A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 DUP5 ADD DUP6 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xD1B JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0xD2B PUSH2 0xB03 DUP4 PUSH2 0x1462 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP3 DUP6 ADD DUP7 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0xD60 JUMPI PUSH2 0xD4E DUP11 DUP9 DUP5 CALLDATALOAD DUP9 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP7 ADD SWAP3 SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xD37 JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xD83 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xD9A JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDD6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDFB JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE2A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE3C JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE46 PUSH1 0x60 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5D JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE69 DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE80 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE8C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEAD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEC4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xED6 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xEE0 PUSH1 0x40 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xEF0 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xEFC DUP8 DUP3 DUP5 ADD PUSH2 0xBD6 JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xF10 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xF1C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF3D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF53 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xBD6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xF73 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF91 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xF9D DUP8 DUP4 DUP9 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xFB2 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xFBF DUP7 DUP3 DUP8 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDB JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x1002 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1482 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0x1049 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD DUP8 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x10CF JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0x10BB DUP3 DUP3 MLOAD PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0x1081 JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x10E9 DUP2 DUP8 PUSH2 0xFEA JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1108 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x1482 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE DUP4 DUP4 ADD SWAP2 POP DUP2 SWAP3 POP DUP4 DUP2 MUL DUP3 ADD DUP5 DUP9 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD60 JUMPI DUP6 DUP4 SUB DUP6 MSTORE PUSH2 0x1173 DUP4 DUP4 MLOAD PUSH2 0x1034 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x115B JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x11B6 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x11C8 DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x11DA DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH1 0xA0 DUP3 ADD DUP4 MLOAD PUSH1 0x80 PUSH1 0x20 DUP6 ADD MSTORE DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1309 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x1322 DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP4 POP POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x1361 DUP4 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x137C DUP2 DUP6 PUSH2 0xFEA JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x13CB PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1034 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1034 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xDE2 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x145A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1478 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x149D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1485 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x14AC JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x43D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 GAS SWAP9 PUSH5 0x6A73BBDA26 PUSH10 0x99B92495C98B4F927E58 JUMPDEST 0xf6 0xc0 DUP2 SWAP8 0xe2 SUB 0xd8 0xda RETURNDATASIZE CALLDATASIZE NUMBER PUSH23 0x6C6578706572696D656E74616CF564736F6C634300050C STOP BLOCKHASH ", + "sourceMap": "641:7002:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:7002:0;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1D9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x76F15D5B GT PUSH2 0x104 JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x39B JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3A3 JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3B6 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x353 JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x369 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x37E JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x386 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x322 JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x345 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x2F2 JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x2FA JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x31A JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x59C28ADD GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2B4 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x2C9 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x2D1 JUMPI DUP1 PUSH4 0x647341EB EQ PUSH2 0x2E4 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x297 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x29F JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x2E1A7D4D GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x224 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x237 JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x259 JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x279 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1DE JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1E8 JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x1FB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1E6 PUSH2 0x3C4 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xC7F JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x209 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x404 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E6 PUSH2 0x232 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x40B JUMP JUMPDEST PUSH2 0x24A PUSH2 0x245 CALLDATASIZE PUSH1 0x4 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x45C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x26C PUSH2 0x267 CALLDATASIZE PUSH1 0x4 PUSH2 0xCBC JUMP JUMPDEST PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1045 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x20E PUSH2 0x5DE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x5E5 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x64A JUMP JUMPDEST PUSH2 0x2A7 PUSH2 0x67C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1325 JUMP JUMPDEST PUSH2 0x2BC PUSH2 0x684 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1330 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x68C JUMP JUMPDEST PUSH2 0x26C PUSH2 0x2DF CALLDATASIZE PUSH1 0x4 PUSH2 0xC2D JUMP JUMPDEST PUSH2 0x6F1 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xE77 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x6FA JUMP JUMPDEST PUSH2 0x30D PUSH2 0x308 CALLDATASIZE PUSH1 0x4 PUSH2 0xD4D JUMP JUMPDEST PUSH2 0x708 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1239 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7C5 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x330 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7D0 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x7DB JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xDE7 JUMP JUMPDEST PUSH2 0x35B PUSH2 0x7E0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP3 SWAP2 SWAP1 PUSH2 0x13A3 JUMP JUMPDEST PUSH2 0x371 PUSH2 0x819 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x81E JUMP JUMPDEST PUSH2 0x38E PUSH2 0x855 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1387 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x9AE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x3B1 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x1F6 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x1202 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x451 SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x54D SWAP3 SWAP2 SWAP1 PUSH2 0x1023 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x588 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x10E5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x11CB JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9B4 JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9CC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x710 PUSH2 0x9EC JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x3FF JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x84B SWAP1 PUSH2 0x115F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x85D PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x873 JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x8CD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x91B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9C7 PUSH2 0xA48 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9DF PUSH2 0xA1A JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9FF PUSH2 0xA5B JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA8C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH2 0xAB1 DUP2 DUP3 DUP5 MUL ADD PUSH2 0x13BC JUMP JUMPDEST DUP3 DUP2 MSTORE SWAP3 POP DUP1 DUP4 ADD DUP5 DUP3 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0xAE8 JUMPI PUSH2 0xAD6 DUP9 DUP6 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0xAF3 JUMP JUMPDEST DUP4 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xABF JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB03 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB19 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB4A PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x13BC JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xB61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB8B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xB95 PUSH1 0x80 PUSH2 0x13BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xBB0 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBBC DUP7 DUP4 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP2 POP PUSH4 0xFFFFFFFF DUP3 AND DUP3 EQ PUSH2 0xBD6 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xBEF JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBFB DUP7 DUP4 DUP8 ADD PUSH2 0xA7C JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC13 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xC20 DUP6 DUP3 DUP7 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x60 DUP5 ADD MSTORE POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xC45 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xC50 DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xC6E DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xCA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xA7C JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xCD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xCEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xD75 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xD87 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xD91 PUSH1 0x60 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDA8 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDB4 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDCB JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDD7 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDF8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE0F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE21 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE2B PUSH1 0x40 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE3B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE47 DUP8 DUP3 DUP5 ADD PUSH2 0xB7A JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE67 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xB7A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xEC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEDE JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xEEA DUP8 DUP4 DUP9 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xEFF JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xF0C DUP7 DUP3 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xF2E DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x13E3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0xF75 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD PUSH1 0x0 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0xFFC JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0xFE8 DUP3 DUP3 MLOAD PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0xFAE JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x1016 DUP2 DUP8 PUSH2 0xF16 JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1035 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x13E3 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x10D8 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x10C6 DUP6 DUP4 MLOAD PUSH2 0xF60 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x108C JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x1116 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1128 DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x113A DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x80 PUSH1 0x20 DUP5 ADD MSTORE DUP1 MLOAD PUSH1 0xA0 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0xC0 DUP6 ADD MSTORE PUSH2 0x1269 PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP6 DUP3 SUB ADD PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x12A4 DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x12E2 DUP4 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x12FD DUP2 DUP6 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x134C PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xF60 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF60 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCB4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x13DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13FE JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x13E6 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x140D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x401 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 PUSH32 0x854B76FC684DE0BE1F1A5DB2D486BC187FF28D1E99D27CA0F61B452A1942F6C PUSH6 0x78706572696D PUSH6 0x6E74616CF564 PUSH20 0x6F6C634300050B00400000000000000000000000 ", - "sourceMap": "641:6754:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:6754:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1496:107;;;:::i;:::-;;3110:63;;;;;;;;;:::i;6359:128::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;4968:84;;;;;;;;;:::i;6982:345::-;;;;;;;;;:::i;:::-;;;;;;;;;;2288:334;;;;;;;;;:::i;:::-;;;;;;;;2948:52;;;;;;;5964:117;;;:::i;1389:101::-;;;:::i;1286:97::-;;;:::i;4321:153::-;;;:::i;:::-;;;;;;;;4053:73;;;:::i;:::-;;;;;;;;1609:111;;;:::i;2776:166::-;;;;;;;;;:::i;3319:52::-;;;;;;;4500:72;;;:::i;6560:317::-;;;;;;;;;:::i;:::-;;;;;;;;5773:112;;;:::i;989:140::-;;;;;;;;;:::i;4577:69::-;;;:::i;862:121::-;;;:::i;3984:64::-;;;;;;;4652:134;;;:::i;:::-;;;;;;;;;3809:80;;;:::i;:::-;;;;;;;;5118:125;;;:::i;3453:350::-;;;:::i;:::-;;;;;;;;1135:145;;;:::i;6160:123::-;;;;;;;;;:::i;4792:47::-;;;;;;;1496:107;1564:32;;;;;;;;;;;;;;;;;;;;1496:107::o;3110:63::-;;:::o;6359:128::-;-1:-1:-1;6476:4:0;;6359:128::o;4968:84::-;5029:10;5018:27;;;5041:3;5018:27;;;;;;;;;;;;;;;4968:84;:::o;6982:345::-;-1:-1:-1;;7229:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6982:345:0:o;2288:334::-;2399:21;2436:19;:56;;;;;;;;;;;;;;;;;;;2502:20;2552:6;2560:4;2535:30;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2535:30:0;;;2525:41;;;;;;2502:64;;2583:32;2593:12;2607:1;2610;2613;2583:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2583:32:0;;;;;;2288:334;-1:-1:-1;;;;;;;;2288:334:0:o;5964:117::-;6070:4;5964:117;;:::o;1389:101::-;1469:13;;;;;;;;;;;;;;;;1462:21;;;;;;;1469:13;1462:21;;;;1286:97;1353:23;;;;;;;;;;;4321:153;4415:51;;:::i;4053:73::-;4103:19;;:::i;1609:111::-;1698:14;;;;;;;;;;;;;;;;1683:30;;;;;;;1698:14;1683:30;;;;2776:166;-1:-1:-1;2934:1:0;;2776:166;-1:-1:-1;;;2776:166:0:o;4500:72::-;4540:4;4555:14;;4568:1;4555:14;;;;;4500:72;:::o;6560:317::-;6674:20;;:::i;:::-;-1:-1:-1;6717:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6560:317::o;5773:112::-;5857:21;;989:140;1117:1;:5;;989:140::o;4577:69::-;4629:9;:14;;4642:1;4629:14;;;4577:69::o;862:121::-;975:1;862:121;:::o;4652:134::-;4760:19;;;;;;;;;;;;;;;;;4768:1;4652:134;:::o;3809:80::-;3870:15;3809:80;:::o;5118:125::-;5167:69;;;;;;;;;;;;;;;5118:125::o;3453:350::-;3497:15;;:::i;:::-;3551:14;;;3563:1;3551:14;;;3524:24;3551:14;;;;;;;;;;;;;;;;;;;;;;;;;;3524:41;;3575:22;;;;;;;;;;;;;;;;;:9;3585:1;3575:12;;;;;;;;;;;;;:22;;;;3607;;;;;;;;;;;;;;;;;:9;3617:1;3607:12;;;;;;;;;;;;;;;;;;:22;;;;3647:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3647:149:0;;;;-1:-1:-1;3453:350:0;:::o;1135:145::-;711:4;1135:145;:::o;641:6754::-;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;158:685:-1:-;;276:3;269:4;261:6;257:17;253:27;243:2;;-1:-1;;284:12;243:2;331:6;318:20;32471:18;32463:6;32460:30;32457:2;;;-1:-1;;32493:12;32457:2;32538:4;353:81;32601:4;32538;32530:6;32526:17;32591:15;353:81;;;462:21;;;344:90;-1:-1;519:14;;;494:17;;;614:1;599:238;624:6;621:1;618:13;599:238;;;731:42;769:3;506:4;707:3;694:17;498:6;682:30;;731:42;;;719:55;;788:14;;;;816;;;;646:1;639:9;599:238;;;603:14;;;;;236:607;;;;;1706:432;;1803:3;1796:4;1788:6;1784:17;1780:27;1770:2;;-1:-1;;1811:12;1770:2;1858:6;1845:20;33078:18;33070:6;33067:30;33064:2;;;-1:-1;;33100:12;33064:2;1880:60;33241:4;33173:9;1796:4;33158:6;33154:17;33150:33;33231:15;1880:60;;;1871:69;;1960:6;1953:5;1946:21;2064:3;33241:4;2055:6;1988;2046:16;;2043:25;2040:2;;;2081:1;;2071:12;2040:2;37579:6;33241:4;1988:6;1984:17;33241:4;2022:5;2018:16;37556:30;37635:1;37617:16;;;33241:4;37617:16;37610:27;2022:5;1763:375;-1:-1;;1763:375;5221:1071;;5329:4;5317:9;5312:3;5308:19;5304:30;5301:2;;;-1:-1;;5337:12;5301:2;5365:20;5329:4;5365:20;;;5356:29;;5468:1;5453:17;5440:31;5491:18;;5483:6;5480:30;5477:2;;;5523:1;5520;5513:12;5477:2;5557:54;5607:3;5598:6;5587:9;5583:22;5557:54;;;5540:15;5533:79;5678:2;5735:9;5731:22;7616:20;7607:29;;37386:10;38693:5;37375:22;38669:5;38666:34;38656:2;;38714:1;38711;38704:12;38656:2;5711:48;5678:2;5697:5;5693:16;5686:74;5865:2;5854:9;5850:18;5837:32;5823:46;;5889:18;5881:6;5878:30;5875:2;;;5921:1;5918;5911:12;5875:2;5956:75;6027:3;6018:6;6007:9;6003:22;5956:75;;;5865:2;5942:5;5938:16;5931:101;6124:2;6113:9;6109:18;6096:32;6082:46;;6148:18;6140:6;6137:30;6134:2;;;6180:1;6177;6170:12;6134:2;;6215:55;6266:3;6257:6;6246:9;6242:22;6215:55;;;6124:2;6201:5;6197:16;6190:81;;;5295:997;;;;;7818:743;;;;;;7990:3;7978:9;7969:7;7965:23;7961:33;7958:2;;;-1:-1;;7997:12;7958:2;85:6;72:20;97:33;124:5;97:33;;;8049:63;-1:-1;8149:2;8188:22;;7480:20;;-1:-1;8257:2;8296:22;;7480:20;;-1:-1;8365:2;8404:22;;72:20;97:33;72:20;97:33;;;7952:609;;;;-1:-1;7952:609;;8473:3;8513:22;7480:20;;7952:609;-1:-1;;7952:609;8568:387;;8702:2;8690:9;8681:7;8677:23;8673:32;8670:2;;;-1:-1;;8708:12;8670:2;8766:17;8753:31;8804:18;8796:6;8793:30;8790:2;;;-1:-1;;8826:12;8790:2;8856:83;8931:7;8922:6;8911:9;8907:22;8856:83;;;8846:93;8664:291;-1:-1;;;;8664:291;8962:613;;;;;9115:3;9103:9;9094:7;9090:23;9086:33;9083:2;;;-1:-1;;9122:12;9083:2;1648:6;1635:20;9174:63;;9274:2;9315:9;9311:22;7750:20;37480:4;38813:5;37469:16;38790:5;38787:33;38777:2;;-1:-1;;38824:12;38777:2;9077:498;;9282:61;;-1:-1;;;;9380:2;9419:22;;1635:20;;9488:2;9527:22;1635:20;;9077:498;9582:345;;9695:2;9683:9;9674:7;9670:23;9666:32;9663:2;;;-1:-1;;9701:12;9663:2;9759:17;9746:31;9797:18;9789:6;9786:30;9783:2;;;-1:-1;;9819:12;9783:2;9849:62;9903:7;9894:6;9883:9;9879:22;9849:62;;9934:239;;10037:2;10025:9;10016:7;10012:23;10008:32;10005:2;;;-1:-1;;10043:12;10005:2;-1:-1;2661:20;;9999:174;-1:-1;9999:174;10534:385;;10667:2;10655:9;10646:7;10642:23;10638:32;10635:2;;;10683:1;10680;10673:12;10635:2;10731:17;10718:31;10769:18;;10761:6;10758:30;10755:2;;;10801:1;10798;10791:12;10755:2;10886:6;10875:9;10871:22;3780:4;3768:9;3763:3;3759:19;3755:30;3752:2;;;3798:1;3795;3788:12;3752:2;3816:20;3780:4;3816:20;;;3807:29;;7493:6;7480:20;3899:15;3892:74;10667:2;4043:9;4039:18;4026:32;4078:18;4070:6;4067:30;4064:2;;;4110:1;4107;4100:12;4064:2;4145:54;4195:3;4186:6;4175:9;4171:22;4145:54;;;10667:2;4131:5;4127:16;4120:80;;4288:2;4277:9;4273:18;4260:32;4312:18;4304:6;4301:30;4298:2;;;4344:1;4341;4334:12;4298:2;4379:55;4430:3;4421:6;4410:9;4406:22;4379:55;;;4288:2;4361:16;;4354:81;-1:-1;4365:5;;10629:290;-1:-1;;;;;10629:290;10926:385;;11059:2;11047:9;11038:7;11034:23;11030:32;11027:2;;;11075:1;11072;11065:12;11027:2;11123:17;11110:31;11161:18;;11153:6;11150:30;11147:2;;;11193:1;11190;11183:12;11147:2;11278:6;11267:9;11263:22;4619:4;4607:9;4602:3;4598:19;4594:30;4591:2;;;4637:1;4634;4627:12;4591:2;4655:20;4619:4;4655:20;;;4646:29;;4745:17;4732:31;4783:18;4775:6;4772:30;4769:2;;;4815:1;4812;4805:12;4769:2;4849:68;4913:3;4904:6;4893:9;4889:22;4849:68;;;4832:15;4825:93;;11059:2;5003:9;4999:18;4986:32;5038:18;5030:6;5027:30;5024:2;;;5070:1;5067;5060:12;5024:2;5105:55;5156:3;5147:6;5136:9;5132:22;5105:55;;;11059:2;5087:16;;5080:81;-1:-1;5091:5;;11021:290;-1:-1;;;;;11021:290;11318:373;;11445:2;11433:9;11424:7;11420:23;11416:32;11413:2;;;-1:-1;;11451:12;11413:2;11509:17;11496:31;11547:18;11539:6;11536:30;11533:2;;;-1:-1;;11569:12;11533:2;11599:76;11667:7;11658:6;11647:9;11643:22;11599:76;;11946:701;;;;12103:2;12091:9;12082:7;12078:23;12074:32;12071:2;;;12119:1;12116;12109:12;12071:2;7493:6;7480:20;12161:63;;12289:2;12278:9;12274:18;12261:32;12313:18;;12305:6;12302:30;12299:2;;;12345:1;12342;12335:12;12299:2;12365:62;12419:7;12410:6;12399:9;12395:22;12365:62;;;12355:72;;12492:2;12481:9;12477:18;12464:32;12450:46;;12516:18;12508:6;12505:30;12502:2;;;12548:1;12545;12538:12;12502:2;;12568:63;12623:7;12614:6;12603:9;12599:22;12568:63;;;12558:73;;;12065:582;;;;;;15443:343;;15585:5;34685:12;35771:6;35766:3;35759:19;15678:52;15723:6;35808:4;35803:3;35799:14;35808:4;15704:5;15700:16;15678:52;;;38097:2;38077:14;38093:7;38073:28;15742:39;;;;35808:4;15742:39;;15533:253;-1:-1;;15533:253;22988:1078;;23212:15;23206:22;23135:4;23248:13;23241:37;23293:67;23135:4;23130:3;23126:14;23341:12;23293:67;;;23450:4;;;37386:10;23450:4;23443:5;23439:16;23433:23;37375:22;23517:4;23512:3;23508:14;25494:36;23618:4;23611:5;23607:16;23601:23;23670:3;23664:4;23660:14;23618:4;23648:3;23644:14;23637:38;23690:109;13419:5;34685:12;35771:6;35766:3;35759:19;35808:4;35803:3;35799:14;13431:88;;23450:4;13584;13576:6;13572:17;35803:3;13563:27;;34370:4;13662:5;34361:14;-1:-1;13707:10;;13701:341;13726:6;13723:1;13720:13;13701:341;;;13778:20;35803:3;13782:4;13778:20;;13773:3;13766:33;12766:60;12822:3;13833:6;13827:13;12766:60;;;13748:1;13741:9;;;;;14021:14;;;;13847:82;-1:-1;35485:14;;13701:341;;;13705:14;23887:4;23880:5;23876:16;23870:23;23850:43;;23939:3;23933:4;23929:14;23887:4;23917:3;23913:14;23906:38;23959:69;24023:4;24009:12;23959:69;;;24050:11;23108:958;-1:-1;;;;;;;;;23108:958;25656:401;;15953:5;34685:12;16064:52;16109:6;16104:3;16097:4;16090:5;16086:16;16064:52;;;16128:16;;;;15235:37;;;-1:-1;16097:4;26020:12;;25809:248;-1:-1;25809:248;26064:213;37180:42;37169:54;;;;13153:37;;26182:2;26167:18;;26153:124;26284:437;;26490:2;;26479:9;26475:18;26530:20;26511:17;26504:47;26565:146;14406:5;34685:12;35771:6;35766:3;35759:19;35799:14;26479:9;35799:14;14418:112;;35799:14;14595:4;14587:6;14583:17;26479:9;14574:27;;14562:39;;34370:4;14691:5;34361:14;-1:-1;14730:387;14755:6;14752:1;14749:13;14730:387;;;14807:20;26479:9;14811:4;14807:20;;14802:3;14795:33;12980:88;13064:3;14862:6;14856:13;12980:88;;;14876:110;-1:-1;15096:14;;;;35485;;;;14777:1;14770:9;14730:387;;;-1:-1;26557:154;;26461:260;-1:-1;;;;;;;26461:260;26728:539;15235:37;;;37480:4;37469:16;;;;27087:2;27072:18;;25609:35;27170:2;27155:18;;15235:37;27253:2;27238:18;;15235:37;26926:3;26911:19;;26897:370;27274:691;;27504:2;27525:17;27518:47;27579:76;27504:2;27493:9;27489:18;27641:6;27579:76;;;27703:9;27697:4;27693:20;27688:2;27677:9;27673:18;27666:48;27728:76;27799:4;27790:6;27728:76;;;27852:9;27846:4;27842:20;27837:2;27826:9;27822:18;27815:48;27877:78;27950:4;27941:6;27877:78;;;27869:86;27475:490;-1:-1;;;;;;;27475:490;27972:293;;28106:2;28127:17;28120:47;28181:74;28106:2;28095:9;28091:18;28241:6;28181:74;;;28173:82;28077:188;-1:-1;;;28077:188;28272:710;28563:2;28577:47;;;18099:1;28548:18;;;35759:19;18134:66;35799:14;;;18114:87;18220:12;35808:4;28786:18;;28779:48;;;17729:1;18220:12;;;35759:19;17764:66;35799:14;;;17744:87;17850:12;;;28534:448;28989:407;29180:2;29194:47;;;18471:2;29165:18;;;35759:19;18507:66;35799:14;;;18487:87;18593:12;;;29151:245;29403:407;29594:2;29608:47;;;18844:2;29579:18;;;35759:19;18880:66;35799:14;;;18860:87;18966:12;;;29565:245;29817:381;;29995:2;30016:17;30009:47;20161:15;20155:22;20088:4;29995:2;29984:9;29980:18;20190:37;19281:15;19275:22;20079:14;29984:9;20079:14;15235:37;29995:2;19436:5;19432:16;19426:23;19210:4;19469:14;29984:9;19469:14;19462:38;19515:67;19201:14;29984:9;19201:14;19563:12;19515:67;;;19666:4;19659:5;19655:16;19649:23;19629:43;;19708:14;29984:9;19712:4;19708:14;;19692;29984:9;19692:14;19685:38;19738:69;19802:4;19788:12;19738:69;;;19829:11;;;;29995:2;20428:5;20424:16;20418:23;20477:14;;29984:9;20481:4;20477:14;;19666:4;29984:9;20461:14;20454:38;20507:67;20569:4;20555:12;20507:67;;;19666:4;20653:5;20649:16;20643:23;20623:43;;20702:14;29984:9;20706:4;20702:14;;19210:4;29984:9;20686:14;20679:38;20732:67;20794:4;20780:12;20732:67;;;20724:75;;;19210:4;20878:5;20874:16;20868:23;20848:43;;20927:14;29984:9;20931:4;20927:14;;20088:4;29984:9;20911:14;20904:38;;20957:69;21021:4;21007:12;20957:69;;;30062:126;29966:232;-1:-1;;;;;29966:232;30205:453;21492:22;;22809;15235:37;;30443:2;30428:18;;30414:244;30665:377;;30841:2;30862:17;30855:47;22009:15;22003:22;21930:4;30841:2;30830:9;30826:18;22038:37;22090:95;21921:14;30830:9;21921:14;22166:12;22090:95;;;30841:2;22270:5;22266:16;22260:23;22240:43;;22319:14;30830:9;22323:4;22319:14;;21930:4;30830:9;22303:14;22296:38;22349:69;22413:4;22399:12;22349:69;;31049:353;;31213:2;31234:17;31227:47;31288:104;31213:2;31202:9;31198:18;31378:6;31288:104;;31409:213;15235:37;;;31527:2;31512:18;;31498:124;31629:412;;15265:5;15242:3;15235:37;31795:2;31913;31902:9;31898:18;31891:48;31953:78;31795:2;31784:9;31780:18;32017:6;31953:78;;32048:256;32110:2;32104:9;32136:17;;;32211:18;32196:34;;32232:22;;;32193:62;32190:2;;;32268:1;;32258:12;32190:2;32110;32277:22;32088:216;;-1:-1;32088:216;37652:268;37717:1;37724:101;37738:6;37735:1;37732:13;37724:101;;;37805:11;;;37799:18;37786:11;;;37779:39;37760:2;37753:10;37724:101;;;37840:6;37837:1;37834:13;37831:2;;;37717:1;37896:6;37891:3;37887:16;37880:27;37831:2;;37701:219;;;;38114:117;37180:42;38201:5;37169:54;38176:5;38173:35;38163:2;;38222:1;;38212:12" + "object": "0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1EF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x647341EB GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x3D7 JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3F2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x38F JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x3A5 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x3BA JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x3C2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x35E JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x371 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x379 JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x381 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x647341EB EQ PUSH2 0x320 JUMPI DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x32E JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x336 JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x356 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x586F84B2 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2F0 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x30D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x2AD JUMPI DUP1 PUSH4 0x4BB9A37B EQ PUSH2 0x2B5 JUMPI DUP1 PUSH4 0x51BD9CE7 EQ PUSH2 0x2C8 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x3687617D GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x26F JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x4303A542 EQ PUSH2 0x29D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1F4 JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1FE JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x211 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x23A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FC PUSH2 0x400 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xCE2 JUMP JUMPDEST PUSH2 0x43D JUMP JUMPDEST PUSH2 0x224 PUSH2 0x21F CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x440 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1FC PUSH2 0x248 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x447 JUMP JUMPDEST PUSH2 0x260 PUSH2 0x25B CALLDATASIZE PUSH1 0x4 PUSH2 0xF5F JUMP JUMPDEST PUSH2 0x498 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x11A3 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x27D CALLDATASIZE PUSH1 0x4 PUSH2 0xD6E JUMP JUMPDEST PUSH2 0x538 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDAF JUMP JUMPDEST PUSH2 0x224 PUSH2 0x61A JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x621 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x686 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2C3 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x6B8 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2D6 CALLDATASIZE PUSH1 0x4 PUSH2 0xFC9 JUMP JUMPDEST PUSH2 0x6CA JUMP JUMPDEST PUSH2 0x2E3 PUSH2 0x6E7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13A4 JUMP JUMPDEST PUSH2 0x2F8 PUSH2 0x6EF JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13AF JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x6F7 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x31B CALLDATASIZE PUSH1 0x4 PUSH2 0xC91 JUMP JUMPDEST PUSH2 0x75C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xF2C JUMP JUMPDEST PUSH2 0x224 PUSH2 0x765 JUMP JUMPDEST PUSH2 0x349 PUSH2 0x344 CALLDATASIZE PUSH1 0x4 PUSH2 0xE02 JUMP JUMPDEST PUSH2 0x772 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x12D9 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x82F JUMP JUMPDEST PUSH2 0x224 PUSH2 0x36C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x834 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x83A JUMP JUMPDEST PUSH2 0x224 PUSH2 0x844 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xE9C JUMP JUMPDEST PUSH2 0x397 PUSH2 0x849 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP3 SWAP2 SWAP1 PUSH2 0x1422 JUMP JUMPDEST PUSH2 0x3AD PUSH2 0x882 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1139 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x887 JUMP JUMPDEST PUSH2 0x3CA PUSH2 0x8BE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1406 JUMP JUMPDEST PUSH2 0x224 PUSH2 0xA17 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x20C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x48D SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x589 SWAP3 SWAP2 SWAP1 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5C4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1185 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x126B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 SWAP1 MSTORE SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP3 ADD SWAP1 DUP2 SWAP1 SSTORE JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA1D JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA35 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x77A PUSH2 0xA55 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x43B JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x8B4 SWAP1 PUSH2 0x11FF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x8C6 PUSH2 0xA83 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x8DC JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x936 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x984 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA30 PUSH2 0xAB1 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA48 PUSH2 0xA83 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA68 PUSH2 0xAC4 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xAF5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xB08 PUSH2 0xB03 DUP3 PUSH2 0x1462 JUMP JUMPDEST PUSH2 0x143B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 ADD PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB45 JUMPI PUSH2 0xB30 DUP8 PUSH1 0x20 DUP5 CALLDATALOAD DUP10 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 SWAP3 DUP4 ADD SWAP3 SWAP2 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xB18 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB5F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB75 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBA6 PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x143B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xBBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBE7 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xBF1 PUSH1 0x80 PUSH2 0x143B JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xC0B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC17 DUP6 DUP4 DUP7 ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH2 0xC26 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xC7D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC3F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC4B DUP6 DUP4 DUP7 ADD PUSH2 0xAE5 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xC71 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x6E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xCA8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xCB3 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xCD1 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xCF4 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD0A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 DUP5 ADD DUP6 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xD1B JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0xD2B PUSH2 0xB03 DUP4 PUSH2 0x1462 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP3 DUP6 ADD DUP7 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0xD60 JUMPI PUSH2 0xD4E DUP11 DUP9 DUP5 CALLDATALOAD DUP9 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP7 ADD SWAP3 SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xD37 JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xD83 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xD9A JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDD6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDFB JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE2A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE3C JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE46 PUSH1 0x60 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5D JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE69 DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE80 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE8C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEAD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEC4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xED6 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xEE0 PUSH1 0x40 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xEF0 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xEFC DUP8 DUP3 DUP5 ADD PUSH2 0xBD6 JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xF10 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xF1C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF3D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF53 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xBD6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xF73 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF91 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xF9D DUP8 DUP4 DUP9 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xFB2 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xFBF DUP7 DUP3 DUP8 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDB JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x1002 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1482 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0x1049 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD DUP8 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x10CF JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0x10BB DUP3 DUP3 MLOAD PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0x1081 JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x10E9 DUP2 DUP8 PUSH2 0xFEA JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1108 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x1482 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE DUP4 DUP4 ADD SWAP2 POP DUP2 SWAP3 POP DUP4 DUP2 MUL DUP3 ADD DUP5 DUP9 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD60 JUMPI DUP6 DUP4 SUB DUP6 MSTORE PUSH2 0x1173 DUP4 DUP4 MLOAD PUSH2 0x1034 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x115B JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x11B6 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x11C8 DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x11DA DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH1 0xA0 DUP3 ADD DUP4 MLOAD PUSH1 0x80 PUSH1 0x20 DUP6 ADD MSTORE DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1309 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x1322 DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP4 POP POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x1361 DUP4 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x137C DUP2 DUP6 PUSH2 0xFEA JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x13CB PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1034 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1034 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xDE2 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x145A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1478 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x149D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1485 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x14AC JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x43D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 GAS SWAP9 PUSH5 0x6A73BBDA26 PUSH10 0x99B92495C98B4F927E58 JUMPDEST 0xf6 0xc0 DUP2 SWAP8 0xe2 SUB 0xd8 0xda RETURNDATASIZE CALLDATASIZE NUMBER PUSH23 0x6C6578706572696D656E74616CF564736F6C634300050C STOP BLOCKHASH ", + "sourceMap": "641:7002:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:7002:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1549:107;;;:::i;:::-;;3163:63;;;;;;;;;:::i;6607:128::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;5021:84;;;;;;;;;:::i;7230:345::-;;;;;;;;;:::i;:::-;;;;;;;;;;2341:334;;;;;;;;;:::i;:::-;;;;;;;;3001:52;;;;;;;6212:117;;;:::i;1442:101::-;;;:::i;1339:97::-;;;:::i;861:47::-;;;;;;;;;:::i;5302:189::-;;;;;;;;;:::i;4374:153::-;;;:::i;:::-;;;;;;;;4106:73;;;:::i;:::-;;;;;;;;1662:111;;;:::i;2829:166::-;;;;;;;;;:::i;3372:52::-;;;;;;;4553:72;;;:::i;6808:317::-;;;;;;;;;:::i;:::-;;;;;;;;6021:112;;;:::i;1042:140::-;;;;;;;;;:::i;4630:69::-;;;:::i;915:121::-;;;:::i;4037:64::-;;;;;;;4705:134;;;:::i;:::-;;;;;;;;;3862:80;;;:::i;:::-;;;;;;;;5171:125;;;:::i;3506:350::-;;;:::i;:::-;;;;;;;;1188:145;;;:::i;6408:123::-;;;;;;;;;:::i;4845:47::-;;;;;;;1549:107;1617:32;;;;;;;;;;;;;;;;;;;;1549:107::o;3163:63::-;;:::o;6607:128::-;-1:-1:-1;6724:4:0;;6607:128::o;5021:84::-;5082:10;5071:27;;;5094:3;5071:27;;;;;;;;;;;;;;;5021:84;:::o;7230:345::-;-1:-1:-1;;7477:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7230:345:0:o;2341:334::-;2452:21;2489:19;:56;;;;;;;;;;;;;;;;;;;2555:20;2605:6;2613:4;2588:30;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2588:30:0;;;2578:41;;;;;;2555:64;;2636:32;2646:12;2660:1;2663;2666;2636:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2636:32:0;;;;;;2341:334;-1:-1:-1;;;;;;;;2341:334:0:o;6212:117::-;6318:4;6212:117;;:::o;1442:101::-;1522:13;;;;;;;;;;;;;;;;1515:21;;;;;;;1522:13;1515:21;;;;1339:97;1406:23;;;;;;;;;;;861:47;;;;;;;;;;;;;;:::o;5302:189::-;5391:14;5421:15;;;;;;;;;;5451:1;5439:13;;5421:31;;;;5302:189;;;;;:::o;4374:153::-;4468:51;;:::i;4106:73::-;4156:19;;:::i;1662:111::-;1751:14;;;;;;;;;;;;;;;;1736:30;;;;;;;1751:14;1736:30;;;;2829:166;-1:-1:-1;2987:1:0;;2829:166;-1:-1:-1;;;2829:166:0:o;4553:72::-;4621:1;4608:14;;;;;;;;4553:72;:::o;6808:317::-;6922:20;;:::i;:::-;-1:-1:-1;6965:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6808:317::o;6021:112::-;6105:21;;1042:140;1170:1;:5;;1042:140::o;4630:69::-;4695:1;4682:14;;;;;;4630:69::o;915:121::-;1028:1;915:121;:::o;4705:134::-;4813:19;;;;;;;;;;;;;;;;;4821:1;4705:134;:::o;3862:80::-;3923:15;3862:80;:::o;5171:125::-;5220:69;;;;;;;;;;;;;;;5171:125::o;3506:350::-;3550:15;;:::i;:::-;3604:14;;;3616:1;3604:14;;;3577:24;3604:14;;;;;;;;;;;;;;;;;;;;;;;;;;3577:41;;3628:22;;;;;;;;;;;;;;;;;:9;3638:1;3628:12;;;;;;;;;;;;;:22;;;;3660;;;;;;;;;;;;;;;;;:9;3670:1;3660:12;;;;;;;;;;;;;;;;;;:22;;;;3700:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3700:149:0;;;;-1:-1:-1;3506:350:0;:::o;1188:145::-;711:4;1188:145;:::o;641:7002::-;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;158:685:-1:-;;276:3;269:4;261:6;257:17;253:27;243:2;;-1:-1;;284:12;243:2;331:6;318:20;353:81;368:65;426:6;368:65;;;353:81;;;462:21;;;344:90;-1:-1;506:4;519:14;;;;494:17;;614:1;599:238;624:6;621:1;618:13;599:238;;;731:42;769:3;506:4;707:3;694:17;498:6;682:30;;731:42;;;719:55;;506:4;788:14;;;;816;;;;;646:1;639:9;599:238;;;603:14;;;;236:607;;;;;1706:432;;1803:3;1796:4;1788:6;1784:17;1780:27;1770:2;;-1:-1;;1811:12;1770:2;1858:6;1845:20;33451:18;33443:6;33440:30;33437:2;;;-1:-1;;33473:12;33437:2;1880:60;33614:4;33546:9;1796:4;33531:6;33527:17;33523:33;33604:15;1880:60;;;1871:69;;1960:6;1953:5;1946:21;2064:3;33614:4;2055:6;1988;2046:16;;2043:25;2040:2;;;2081:1;;2071:12;2040:2;37952:6;33614:4;1988:6;1984:17;33614:4;2022:5;2018:16;37929:30;38008:1;37990:16;;;33614:4;37990:16;37983:27;2022:5;1763:375;-1:-1;;1763:375;5221:1071;;5329:4;5317:9;5312:3;5308:19;5304:30;5301:2;;;-1:-1;;5337:12;5301:2;5365:20;5329:4;5365:20;;;5356:29;;5453:17;5440:31;5491:18;;5483:6;5480:30;5477:2;;;5468:1;;5513:12;5477:2;5557:54;5607:3;5598:6;5587:9;5583:22;5557:54;;;5540:15;5533:79;5711:48;5755:3;5678:2;5735:9;5731:22;5711:48;;;5678:2;5697:5;5693:16;5686:74;5865:2;5854:9;5850:18;5837:32;5823:46;;5491:18;5881:6;5878:30;5875:2;;;5468:1;;5911:12;5875:2;5956:75;6027:3;6018:6;6007:9;6003:22;5956:75;;;5865:2;5942:5;5938:16;5931:101;6124:2;6113:9;6109:18;6096:32;6082:46;;5491:18;6140:6;6137:30;6134:2;;;5468:1;;6170:12;6134:2;;6215:55;6266:3;6257:6;6246:9;6242:22;6215:55;;;6124:2;6201:5;6197:16;6190:81;;5295:997;;;;;7550:128;7616:20;;37759:10;37748:22;;39039:34;;39029:2;;39087:1;;39077:12;7818:743;;;;;;7990:3;7978:9;7969:7;7965:23;7961:33;7958:2;;;-1:-1;;7997:12;7958:2;85:6;72:20;97:33;124:5;97:33;;;8049:63;-1:-1;8149:2;8188:22;;7480:20;;-1:-1;8257:2;8296:22;;7480:20;;-1:-1;8365:2;8404:22;;72:20;97:33;72:20;97:33;;;7952:609;;;;-1:-1;7952:609;;8473:3;8513:22;7480:20;;7952:609;-1:-1;;7952:609;8568:387;;8702:2;;8690:9;8681:7;8677:23;8673:32;8670:2;;;-1:-1;;8708:12;8670:2;8766:17;8753:31;8804:18;8796:6;8793:30;8790:2;;;-1:-1;;8826:12;8790:2;8922:6;8911:9;8907:22;989:3;982:4;974:6;970:17;966:27;956:2;;-1:-1;;997:12;956:2;1044:6;1031:20;1017:34;;1066:85;1081:69;1143:6;1081:69;;1066:85;1179:21;;;1236:14;;;;1211:17;;;-1:-1;1316:238;1341:6;1338:1;1335:13;1316:238;;;1448:42;1486:3;8702:2;1424:3;1411:17;1215:6;1399:30;;1448:42;;;1436:55;;1505:14;;;;1533;;;;1363:1;1356:9;1316:238;;;-1:-1;8846:93;;8664:291;-1:-1;;;;;;;;8664:291;8962:613;;;;;9115:3;9103:9;9094:7;9090:23;9086:33;9083:2;;;-1:-1;;9122:12;9083:2;1648:6;1635:20;9174:63;;9274:2;9315:9;9311:22;7750:20;37853:4;39186:5;37842:16;39163:5;39160:33;39150:2;;-1:-1;;39197:12;39150:2;9077:498;;9282:61;;-1:-1;;;;9380:2;9419:22;;1635:20;;9488:2;9527:22;1635:20;;9077:498;9582:345;;9695:2;9683:9;9674:7;9670:23;9666:32;9663:2;;;-1:-1;;9701:12;9663:2;9759:17;9746:31;9797:18;9789:6;9786:30;9783:2;;;-1:-1;;9819:12;9783:2;9849:62;9903:7;9894:6;9883:9;9879:22;9849:62;;;9839:72;9657:270;-1:-1;;;;9657:270;9934:239;;10037:2;10025:9;10016:7;10012:23;10008:32;10005:2;;;-1:-1;;10043:12;10005:2;-1:-1;2661:20;;9999:174;-1:-1;9999:174;10534:385;;10667:2;10655:9;10646:7;10642:23;10638:32;10635:2;;;-1:-1;;10673:12;10635:2;10731:17;10718:31;10769:18;;10761:6;10758:30;10755:2;;;-1:-1;;10791:12;10755:2;10886:6;10875:9;10871:22;3780:4;3768:9;3763:3;3759:19;3755:30;3752:2;;;-1:-1;;3788:12;3752:2;3816:20;3780:4;3816:20;;;3807:29;;3937:22;7480:20;3899:15;3892:74;10667:2;4043:9;4039:18;4026:32;10769:18;4070:6;4067:30;4064:2;;;-1:-1;;4100:12;4064:2;4145:54;4195:3;4186:6;4175:9;4171:22;4145:54;;;10667:2;4131:5;4127:16;4120:80;;4288:2;4277:9;4273:18;4260:32;10769:18;4304:6;4301:30;4298:2;;;-1:-1;;4334:12;4298:2;4379:55;4430:3;4421:6;4410:9;4406:22;4379:55;;;4288:2;4361:16;;4354:81;-1:-1;4365:5;;10629:290;-1:-1;;;;;10629:290;10926:385;;11059:2;11047:9;11038:7;11034:23;11030:32;11027:2;;;-1:-1;;11065:12;11027:2;11123:17;11110:31;11161:18;;11153:6;11150:30;11147:2;;;-1:-1;;11183:12;11147:2;11278:6;11267:9;11263:22;4619:4;4607:9;4602:3;4598:19;4594:30;4591:2;;;-1:-1;;4627:12;4591:2;4655:20;4619:4;4655:20;;;4646:29;;4745:17;4732:31;11161:18;4775:6;4772:30;4769:2;;;-1:-1;;4805:12;4769:2;4849:68;4913:3;4904:6;4893:9;4889:22;4849:68;;;4832:15;4825:93;;11059:2;5003:9;4999:18;4986:32;11161:18;5030:6;5027:30;5024:2;;;-1:-1;;5060:12;5024:2;5105:55;5156:3;5147:6;5136:9;5132:22;5105:55;;;11059:2;5087:16;;5080:81;-1:-1;5091:5;;11021:290;-1:-1;;;;;11021:290;11318:373;;11445:2;11433:9;11424:7;11420:23;11416:32;11413:2;;;-1:-1;;11451:12;11413:2;11509:17;11496:31;11547:18;11539:6;11536:30;11533:2;;;-1:-1;;11569:12;11533:2;11599:76;11667:7;11658:6;11647:9;11643:22;11599:76;;11946:701;;;;12103:2;12091:9;12082:7;12078:23;12074:32;12071:2;;;-1:-1;;12109:12;12071:2;7493:6;7480:20;12161:63;;12289:2;12278:9;12274:18;12261:32;12313:18;;12305:6;12302:30;12299:2;;;-1:-1;;12335:12;12299:2;12365:62;12419:7;12410:6;12399:9;12395:22;12365:62;;;12355:72;;12492:2;12481:9;12477:18;12464:32;12450:46;;12313:18;12508:6;12505:30;12502:2;;;-1:-1;;12538:12;12502:2;;12568:63;12623:7;12614:6;12603:9;12599:22;12568:63;;;12558:73;;;12065:582;;;;;;12654:366;;;12775:2;12763:9;12754:7;12750:23;12746:32;12743:2;;;-1:-1;;12781:12;12743:2;-1:-1;;7480:20;;;12933:2;12972:22;;;7480:20;;-1:-1;12737:283;15816:343;;15958:5;35058:12;36144:6;36139:3;36132:19;16051:52;16096:6;36181:4;36176:3;36172:14;36181:4;16077:5;16073:16;16051:52;;;38470:2;38450:14;38466:7;38446:28;16115:39;;;;36181:4;16115:39;;15906:253;-1:-1;;15906:253;23361:1078;;23585:15;23579:22;23508:4;23621:13;23614:37;23666:67;23508:4;23503:3;23499:14;23714:12;23666:67;;;23823:4;;;37759:10;23823:4;23816:5;23812:16;23806:23;37748:22;23823:4;23885:3;23881:14;25867:36;23991:4;23984:5;23980:16;23974:23;24043:3;24037:4;24033:14;23991:4;24021:3;24017:14;24010:38;24063:109;13792:5;35058:12;36144:6;36139:3;36132:19;23823:4;36176:3;36172:14;13804:88;;23823:4;;13949:6;13945:17;36176:3;13936:27;;23823:4;14035:5;34734:14;-1:-1;14080:10;;14074:341;14099:6;14096:1;14093:13;14074:341;;;14151:20;36176:3;14155:4;14151:20;;14146:3;14139:33;13139:60;13195:3;14206:6;14200:13;13139:60;;;14121:1;14114:9;;;;;14394:14;;;;14220:82;-1:-1;35858:14;;14074:341;;;14078:14;24260:4;24253:5;24249:16;24243:23;24223:43;;24312:3;24306:4;24302:14;24260:4;24290:3;24286:14;24279:38;24332:69;24396:4;24382:12;24332:69;;;24423:11;23481:958;-1:-1;;;;;;;;;23481:958;26029:401;;16326:5;35058:12;16437:52;16482:6;16477:3;16470:4;16463:5;16459:16;16437:52;;;16501:16;;;;15608:37;;;-1:-1;16470:4;26393:12;;26182:248;-1:-1;26182:248;26437:213;37553:42;37542:54;;;;13526:37;;26555:2;26540:18;;26526:124;26657:437;;26863:2;;26852:9;26848:18;26863:2;26884:17;26877:47;26938:146;14779:5;35058:12;36144:6;36139:3;36132:19;26863:2;36176:3;36172:14;14791:112;;;36157:29;;26863:2;14960:6;14956:17;14951:3;14947:27;26863:2;15064:5;34734:14;-1:-1;15103:387;15128:6;15125:1;15122:13;15103:387;;;15190:9;15184:4;15180:20;15175:3;15168:33;13353:88;13437:3;15235:6;15229:13;13353:88;;;15469:14;;;;15249:110;-1:-1;35858:14;;;;15150:1;15143:9;15103:387;;27101:539;15608:37;;;37853:4;37842:16;;;;27460:2;27445:18;;25982:35;27543:2;27528:18;;15608:37;27626:2;27611:18;;15608:37;27299:3;27284:19;;27270:370;27647:691;;27877:2;27898:17;27891:47;27952:76;27877:2;27866:9;27862:18;28014:6;27952:76;;;28076:9;28070:4;28066:20;28061:2;28050:9;28046:18;28039:48;28101:76;28172:4;28163:6;28101:76;;;28225:9;28219:4;28215:20;28210:2;28199:9;28195:18;28188:48;28250:78;28323:4;28314:6;28250:78;;;28242:86;27848:490;-1:-1;;;;;;;27848:490;28345:293;;28479:2;28500:17;28493:47;28554:74;28479:2;28468:9;28464:18;28614:6;28554:74;;;28546:82;28450:188;-1:-1;;;28450:188;28645:710;28936:2;28950:47;;;18472:1;28921:18;;;36132:19;18507:66;36172:14;;;18487:87;18593:12;36181:4;29159:18;;29152:48;;;18102:1;18593:12;;;36132:19;18137:66;36172:14;;;18117:87;18223:12;;;28907:448;29362:407;29553:2;29567:47;;;18844:2;29538:18;;;36132:19;18880:66;36172:14;;;18860:87;18966:12;;;29524:245;29776:407;29967:2;29981:47;;;19217:2;29952:18;;;36132:19;19253:66;36172:14;;;19233:87;19339:12;;;29938:245;30190:381;;30368:2;30389:17;30382:47;20452:14;30357:9;20452:14;20534:15;20528:22;20461:4;30368:2;30357:9;30353:18;20563:37;19654:15;19648:22;15615:3;15608:37;30368:2;19809:5;19805:16;19799:23;19583:4;30368:2;19846:3;19842:14;19835:38;19888:67;19583:4;19578:3;19574:14;19936:12;19888:67;;;20039:4;20032:5;20028:16;20022:23;20002:43;;20091:3;20085:4;20081:14;20039:4;20069:3;20065:14;20058:38;20111:69;20175:4;20161:12;20111:69;;;20202:11;;;;;30368:2;20801:5;20797:16;20791:23;20850:14;;30357:9;20854:4;20850:14;;20039:4;30357:9;20834:14;20827:38;20880:67;20942:4;20928:12;20880:67;;;20039:4;21026:5;21022:16;21016:23;20996:43;;20850:14;30357:9;21079:4;21075:14;;19583:4;30357:9;21059:14;21052:38;21105:67;21167:4;21153:12;21105:67;;;21097:75;;;19583:4;21251:5;21247:16;21241:23;21221:43;;20850:14;30357:9;21304:4;21300:14;;20461:4;30357:9;21284:14;21277:38;;21330:69;21394:4;21380:12;21330:69;;;30435:126;30339:232;-1:-1;;;;;30339:232;30578:453;21865:22;;23182;15608:37;;30816:2;30801:18;;30787:244;31038:377;;31214:2;31235:17;31228:47;22382:15;22376:22;22303:4;31214:2;31203:9;31199:18;22411:37;22463:95;22294:14;31203:9;22294:14;22539:12;22463:95;;;31214:2;22643:5;22639:16;22633:23;22613:43;;22692:14;31203:9;22696:4;22692:14;;22303:4;31203:9;22676:14;22669:38;22722:69;22786:4;22772:12;22722:69;;31422:353;;31586:2;31607:17;31600:47;31661:104;31586:2;31575:9;31571:18;31751:6;31661:104;;31782:213;15608:37;;;31900:2;31885:18;;31871:124;32002:412;;15638:5;15615:3;15608:37;32168:2;32286;32275:9;32271:18;32264:48;32326:78;32168:2;32157:9;32153:18;32390:6;32326:78;;32421:256;32483:2;32477:9;32509:17;;;32584:18;32569:34;;32605:22;;;32566:62;32563:2;;;32641:1;;32631:12;32563:2;32483;32650:22;32461:216;;-1:-1;32461:216;32684:305;;32844:18;32836:6;32833:30;32830:2;;;-1:-1;;32866:12;32830:2;-1:-1;32911:4;32899:17;;;32964:15;;32767:222;38025:268;38090:1;38097:101;38111:6;38108:1;38105:13;38097:101;;;38178:11;;;38172:18;38159:11;;;38152:39;38133:2;38126:10;38097:101;;;38213:6;38210:1;38207:13;38204:2;;;38090:1;38269:6;38264:3;38260:16;38253:27;38204:2;;38074:219;;;;38487:117;37553:42;38574:5;37542:54;38549:5;38546:35;38536:2;;38595:1;;38585:12" } } }, @@ -813,12 +860,12 @@ } }, "sourceCodes": { - "AbiGenDummy.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma experimental ABIEncoderV2;\n\npragma solidity ^0.5.5;\n\n\ncontract AbiGenDummy\n{\n\n uint256 constant internal SOME_CONSTANT = 1234;\n string constant internal REVERT_REASON = \"REVERT_WITH_CONSTANT\";\n string constant internal REQUIRE_REASON = \"REQUIRE_WITH_CONSTANT\";\n\n function simplePureFunction ()\n public\n pure\n returns (uint256 result)\n {\n return 1;\n }\n\n function simplePureFunctionWithInput (uint256 x)\n public\n pure\n returns (uint256 sum)\n {\n return 1 + x;\n }\n\n function pureFunctionWithConstant ()\n public\n pure\n returns (uint256 someConstant)\n {\n return SOME_CONSTANT;\n }\n\n function simpleRevert ()\n public\n pure\n {\n revert(\"SIMPLE_REVERT\");\n }\n\n function revertWithConstant ()\n public\n pure\n {\n revert(REVERT_REASON);\n }\n\n function simpleRequire ()\n public\n pure\n {\n require(0 > 1, \"SIMPLE_REQUIRE\");\n }\n\n function requireWithConstant ()\n public\n pure\n {\n require(0 > 1, REQUIRE_REASON);\n }\n\n /// @dev test that devdocs will be generated and\n /// that multiline devdocs will look okay\n /// @param hash description of some hash. Let's make this line super long to demonstrate hanging indents for method params. It has to be more than one hundred twenty columns.\n /// @param v some v, recovery id\n /// @param r ECDSA r output\n /// @param s ECDSA s output\n /// @return the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.\n function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n public\n pure\n returns (address signerAddress)\n {\n bytes memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, hash));\n return ecrecover(prefixedHash, v, r, s);\n }\n\n // test: generated code should normalize address inputs to lowercase\n // add extra inputs to make sure it works with address in any position\n function withAddressInput(address x, uint256 a, uint256 b, address y, uint256 c)\n public\n pure\n returns (address z)\n {\n return x;\n }\n\n function acceptsBytes(bytes memory a) public pure {}\n\n /// @dev a method that accepts an array of bytes\n /// @param a the array of bytes being accepted\n function acceptsAnArrayOfBytes(bytes[] memory a) public pure {}\n\n struct Struct {\n bytes someBytes;\n uint32 anInteger;\n bytes[] aDynamicArrayOfBytes;\n string aString;\n }\n\n function structInput(Struct memory s) public pure {}\n\n /// @dev a method that returns a struct\n /// @return a Struct struct\n function structOutput() public pure returns(Struct memory s) {\n bytes[] memory byteArray = new bytes[](2);\n byteArray[0] = \"0x123\";\n byteArray[1] = \"0x321\";\n\n return Struct({\n someBytes: \"0x123\",\n anInteger: 5,\n aDynamicArrayOfBytes: byteArray,\n aString: \"abc\"\n });\n }\n\n function methodReturningArrayOfStructs() public pure returns(Struct[] memory) {}\n\n struct NestedStruct {\n Struct innerStruct;\n string description;\n }\n\n function nestedStructInput(NestedStruct memory n) public pure {}\n function nestedStructOutput() public pure returns(NestedStruct memory) {}\n\n struct StructNotDirectlyUsedAnywhere {\n uint256 aField;\n }\n\n struct NestedStructWithInnerStructNotUsedElsewhere {\n StructNotDirectlyUsedAnywhere innerStruct;\n }\n\n function methodUsingNestedStructWithInnerStructNotUsedElsewhere()\n public pure returns(NestedStructWithInnerStructNotUsedElsewhere memory)\n {}\n\n uint someState;\n function nonPureMethod() public returns(uint) { return someState += 1; }\n function nonPureMethodThatReturnsNothing() public { someState += 1; }\n\n function methodReturningMultipleValues()\n public pure returns (uint256, string memory)\n {\n return (1, \"hello\");\n }\n\n function overloadedMethod(int a) public pure {}\n function overloadedMethod(string memory a) public pure {}\n\n\n event Withdrawal(address indexed _owner, uint _value);\n\n function withdraw(uint wad) public {\n emit Withdrawal(msg.sender, wad);\n }\n\n event SimpleEvent(bytes someBytes, string someString);\n\n function emitSimpleEvent() public {\n emit SimpleEvent(\n hex'12345678',\n \"lorem\"\n );\n }\n\n // begin tests for `decodeTransactionData`, `decodeReturnData`\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexInput {\n uint256 foo;\n bytes bar;\n string car;\n }\n\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexOutput {\n ComplexInput input;\n bytes lorem;\n bytes ipsum;\n string dolor;\n }\n\n /// @dev Tests decoding when both input and output are empty.\n function noInputNoOutput()\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when input is empty and output is non-empty.\n function noInputSimpleOutput()\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when input is not empty but output is empty.\n function simpleInputNoOutput(uint256)\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when both input and output are non-empty.\n function simpleInputSimpleOutput(uint256)\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when the input and output are complex.\n function complexInputComplexOutput(ComplexInput memory complexInput)\n public\n pure\n returns (ComplexOutput memory)\n {\n return ComplexOutput({\n input: complexInput,\n lorem: hex'12345678',\n ipsum: hex'87654321',\n dolor: \"amet\"\n });\n }\n\n /// @dev Tests decoding when the input and output are complex and have more than one argument.\n function multiInputMultiOutput(\n uint256,\n bytes memory,\n string memory\n )\n public\n pure\n returns (\n bytes memory,\n bytes memory,\n string memory\n )\n {\n return (\n hex'12345678',\n hex'87654321',\n \"amet\"\n );\n }\n\n // end tests for `decodeTransactionData`, `decodeReturnData`\n}\n" + "AbiGenDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma experimental ABIEncoderV2;\n\npragma solidity ^0.5.5;\n\n\ncontract AbiGenDummy\n{\n\n uint256 constant internal SOME_CONSTANT = 1234;\n string constant internal REVERT_REASON = \"REVERT_WITH_CONSTANT\";\n string constant internal REQUIRE_REASON = \"REQUIRE_WITH_CONSTANT\";\n mapping (uint256 => uint256) public someMapping;\n\n function simplePureFunction ()\n public\n pure\n returns (uint256 result)\n {\n return 1;\n }\n\n function simplePureFunctionWithInput (uint256 x)\n public\n pure\n returns (uint256 sum)\n {\n return 1 + x;\n }\n\n function pureFunctionWithConstant ()\n public\n pure\n returns (uint256 someConstant)\n {\n return SOME_CONSTANT;\n }\n\n function simpleRevert ()\n public\n pure\n {\n revert(\"SIMPLE_REVERT\");\n }\n\n function revertWithConstant ()\n public\n pure\n {\n revert(REVERT_REASON);\n }\n\n function simpleRequire ()\n public\n pure\n {\n require(0 > 1, \"SIMPLE_REQUIRE\");\n }\n\n function requireWithConstant ()\n public\n pure\n {\n require(0 > 1, REQUIRE_REASON);\n }\n\n /// @dev test that devdocs will be generated and\n /// that multiline devdocs will look okay\n /// @param hash description of some hash. Let's make this line super long to demonstrate hanging indents for method params. It has to be more than one hundred twenty columns.\n /// @param v some v, recovery id\n /// @param r ECDSA r output\n /// @param s ECDSA s output\n /// @return the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.\n function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n public\n pure\n returns (address signerAddress)\n {\n bytes memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, hash));\n return ecrecover(prefixedHash, v, r, s);\n }\n\n // test: generated code should normalize address inputs to lowercase\n // add extra inputs to make sure it works with address in any position\n function withAddressInput(address x, uint256 a, uint256 b, address y, uint256 c)\n public\n pure\n returns (address z)\n {\n return x;\n }\n\n function acceptsBytes(bytes memory a) public pure {}\n\n /// @dev a method that accepts an array of bytes\n /// @param a the array of bytes being accepted\n function acceptsAnArrayOfBytes(bytes[] memory a) public pure {}\n\n struct Struct {\n bytes someBytes;\n uint32 anInteger;\n bytes[] aDynamicArrayOfBytes;\n string aString;\n }\n\n function structInput(Struct memory s) public pure {}\n\n /// @dev a method that returns a struct\n /// @return a Struct struct\n function structOutput() public pure returns(Struct memory s) {\n bytes[] memory byteArray = new bytes[](2);\n byteArray[0] = \"0x123\";\n byteArray[1] = \"0x321\";\n\n return Struct({\n someBytes: \"0x123\",\n anInteger: 5,\n aDynamicArrayOfBytes: byteArray,\n aString: \"abc\"\n });\n }\n\n function methodReturningArrayOfStructs() public pure returns(Struct[] memory) {}\n\n struct NestedStruct {\n Struct innerStruct;\n string description;\n }\n\n function nestedStructInput(NestedStruct memory n) public pure {}\n function nestedStructOutput() public pure returns(NestedStruct memory) {}\n\n struct StructNotDirectlyUsedAnywhere {\n uint256 aField;\n }\n\n struct NestedStructWithInnerStructNotUsedElsewhere {\n StructNotDirectlyUsedAnywhere innerStruct;\n }\n\n function methodUsingNestedStructWithInnerStructNotUsedElsewhere()\n public pure returns(NestedStructWithInnerStructNotUsedElsewhere memory)\n {}\n\n uint someState;\n function nonPureMethod() public returns(uint) { return someState += 1; }\n function nonPureMethodThatReturnsNothing() public { someState += 1; }\n\n function methodReturningMultipleValues()\n public pure returns (uint256, string memory)\n {\n return (1, \"hello\");\n }\n\n function overloadedMethod(int a) public pure {}\n function overloadedMethod(string memory a) public pure {}\n\n\n event Withdrawal(address indexed _owner, uint _value);\n\n function withdraw(uint wad) public {\n emit Withdrawal(msg.sender, wad);\n }\n\n event SimpleEvent(bytes someBytes, string someString);\n\n function emitSimpleEvent() public {\n emit SimpleEvent(\n hex'12345678',\n \"lorem\"\n );\n }\n\n function nonPureFunction (uint256 id, uint256 someValue)\n public\n returns (uint256 result)\n {\n someMapping[id] = someValue + 1;\n return someMapping[id];\n }\n\n // begin tests for `decodeTransactionData`, `decodeReturnData`\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexInput {\n uint256 foo;\n bytes bar;\n string car;\n }\n\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexOutput {\n ComplexInput input;\n bytes lorem;\n bytes ipsum;\n string dolor;\n }\n\n /// @dev Tests decoding when both input and output are empty.\n function noInputNoOutput()\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when input is empty and output is non-empty.\n function noInputSimpleOutput()\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when input is not empty but output is empty.\n function simpleInputNoOutput(uint256)\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when both input and output are non-empty.\n function simpleInputSimpleOutput(uint256)\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when the input and output are complex.\n function complexInputComplexOutput(ComplexInput memory complexInput)\n public\n pure\n returns (ComplexOutput memory)\n {\n return ComplexOutput({\n input: complexInput,\n lorem: hex'12345678',\n ipsum: hex'87654321',\n dolor: \"amet\"\n });\n }\n\n /// @dev Tests decoding when the input and output are complex and have more than one argument.\n function multiInputMultiOutput(\n uint256,\n bytes memory,\n string memory\n )\n public\n pure\n returns (\n bytes memory,\n bytes memory,\n string memory\n )\n {\n return (\n hex'12345678',\n hex'87654321',\n \"amet\"\n );\n }\n\n // end tests for `decodeTransactionData`, `decodeReturnData`\n}\n" }, - "sourceTreeHashHex": "0x99694ecb2e7ed146b4d0030335f82b2190ee0f4b2639514f3aebdd99ae2decf0", + "sourceTreeHashHex": "0x326738f7809f2f704e9d78167b15da864e2c3468e3a7edc6a8a5d89662d73b20", "compiler": { "name": "solc", - "version": "soljson-v0.5.11+commit.c082d0b4.js", + "version": "soljson-v0.5.12+commit.7709ece9.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json index 047fc3ea79..eb060bc079 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json @@ -9,14 +9,14 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b14322cd05aa1dcae66812e472d3ab85cced78118ea7f9a5098d073b2accc45964736f6c634300050a0032", - "opcodes": "PUSH1 0x55 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xb1 NUMBER 0x22 0xcd SDIV 0xaa SAR 0xca 0xe6 PUSH9 0x12E472D3AB85CCED78 GT DUP15 0xa7 0xf9 0xa5 MULMOD DUP14 SMOD EXTCODESIZE 0x2a 0xcc 0xc4 MSIZE PUSH5 0x736F6C6343 STOP SDIV EXP STOP ORIGIN ", + "object": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032", + "opcodes": "PUSH1 0x55 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY 0xc7 DIFFICULTY 0x2e PUSH21 0x86017ED5720D9DA5F4E361BEAC78B78C346709EBCA GASLIMIT PUSH31 0xEC00558064736F6C634300050C003200000000000000000000000000000000 ", "sourceMap": "606:385:1:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b14322cd05aa1dcae66812e472d3ab85cced78118ea7f9a5098d073b2accc45964736f6c634300050a0032", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xb1 NUMBER 0x22 0xcd SDIV 0xaa SAR 0xca 0xe6 PUSH9 0x12E472D3AB85CCED78 GT DUP15 0xa7 0xf9 0xa5 MULMOD DUP14 SMOD EXTCODESIZE 0x2a 0xcc 0xc4 MSIZE PUSH5 0x736F6C6343 STOP SDIV EXP STOP ORIGIN ", + "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY 0xc7 DIFFICULTY 0x2e PUSH21 0x86017ED5720D9DA5F4E361BEAC78B78C346709EBCA GASLIMIT PUSH31 0xEC00558064736F6C634300050C003200000000000000000000000000000000 ", "sourceMap": "606:385:1:-;;;;;;;;" } } @@ -29,10 +29,10 @@ "sourceCodes": { "LibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\n\nlibrary LibDummy {\n\n using LibDummy for uint256;\n uint256 constant internal SOME_CONSTANT = 1234;\n\n function addOne (uint256 x)\n internal\n pure\n returns (uint256 sum)\n {\n return x + 1;\n }\n\n function addConstant (uint256 x)\n internal\n pure\n returns (uint256 someConstant)\n {\n return x + SOME_CONSTANT;\n }\n}\n" }, - "sourceTreeHashHex": "0xe9654f3d694bd3513dddbcc0ccd7a75739bf63dc92b974e163f191122416fdb6", + "sourceTreeHashHex": "0xd7314c6b96d3195f1d6823802c5a01b0090fe630f4908495ba19d9c298b3ded1", "compiler": { "name": "solc", - "version": "soljson-v0.5.10+commit.5a6ea5b1.js", + "version": "soljson-v0.5.12+commit.7709ece9.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json index b020c5e896..d91fd00da2 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json @@ -7,6 +7,7 @@ "constant": true, "inputs": [ { + "internalType": "uint256", "name": "x", "type": "uint256" } @@ -14,6 +15,7 @@ "name": "publicAddConstant", "outputs": [ { + "internalType": "uint256", "name": "result", "type": "uint256" } @@ -26,6 +28,7 @@ "constant": true, "inputs": [ { + "internalType": "uint256", "name": "x", "type": "uint256" } @@ -33,6 +36,7 @@ "name": "publicAddOne", "outputs": [ { + "internalType": "uint256", "name": "result", "type": "uint256" } @@ -48,14 +52,14 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b5060d78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xD7 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xdd 0xb7 KECCAK256 0xd1 0x4b CALLVALUE PUSH10 0x4DAAEFEBCBD729AF6AE0 0x4f LOG2 0x23 0x24 DUP2 DUP2 0x2d 0xd8 REVERT 0xe6 RETURNDATASIZE PUSH11 0x4C32C164736F6C63430005 EXP STOP ORIGIN ", + "object": "0x608060405234801561001057600080fd5b5060d78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xD7 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xe2 PUSH27 0x1E15A4D00B0A4F69DEDD0DD86BD421688814D0CB18D3442EFB8E48 0xc0 PUSH28 0xE564736F6C634300050C003200000000000000000000000000000000 ", "sourceMap": "632:346:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:346:2;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xdd 0xb7 KECCAK256 0xd1 0x4b CALLVALUE PUSH10 0x4DAAEFEBCBD729AF6AE0 0x4f LOG2 0x23 0x24 DUP2 DUP2 0x2d 0xd8 REVERT 0xe6 RETURNDATASIZE PUSH11 0x4C32C164736F6C63430005 EXP STOP ORIGIN ", + "object": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xe2 PUSH27 0x1E15A4D00B0A4F69DEDD0DD86BD421688814D0CB18D3442EFB8E48 0xc0 PUSH28 0xE564736F6C634300050C003200000000000000000000000000000000 ", "sourceMap": "632:346:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:346:2;;;;;;;;;;;;;;;;;;;;;;;;833:143;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;833:143:2;;:::i;:::-;;;;;;;;;;;;;;;;694:133;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;694:133:2;;:::i;833:143::-;917:14;954:15;:1;:13;:15::i;:::-;947:22;833:143;-1:-1:-1;;833:143:2:o;694:133::-;773:14;810:10;:1;:8;:10::i;842:147:1:-;704:4;965:17;;842:147::o;715:121::-;828:1;824:5;;715:121::o" } } @@ -72,10 +76,10 @@ "TestLibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\nimport \"./LibDummy.sol\";\n\n\ncontract TestLibDummy {\n\n using LibDummy for uint256;\n\n function publicAddOne (uint256 x)\n public\n pure\n returns (uint256 result)\n {\n return x.addOne();\n }\n\n function publicAddConstant (uint256 x)\n public\n pure\n returns (uint256 result)\n {\n return x.addConstant();\n }\n}\n", "LibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\n\nlibrary LibDummy {\n\n using LibDummy for uint256;\n uint256 constant internal SOME_CONSTANT = 1234;\n\n function addOne (uint256 x)\n internal\n pure\n returns (uint256 sum)\n {\n return x + 1;\n }\n\n function addConstant (uint256 x)\n internal\n pure\n returns (uint256 someConstant)\n {\n return x + SOME_CONSTANT;\n }\n}\n" }, - "sourceTreeHashHex": "0xca99c7d7de9db975842de61e6ec01debdada66cf91d28fc3f2983de3011560dc", + "sourceTreeHashHex": "0xd7efa9dfeb2bbdec2bead8b892d1288c1398b34216d26c6a48bffb25c692bbc0", "compiler": { "name": "solc", - "version": "soljson-v0.5.10+commit.5a6ea5b1.js", + "version": "soljson-v0.5.12+commit.7709ece9.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol b/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol index ed867231f7..b0da9a192a 100644 --- a/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol +++ b/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol @@ -27,6 +27,7 @@ contract AbiGenDummy uint256 constant internal SOME_CONSTANT = 1234; string constant internal REVERT_REASON = "REVERT_WITH_CONSTANT"; string constant internal REQUIRE_REASON = "REQUIRE_WITH_CONSTANT"; + mapping (uint256 => uint256) public someMapping; function simplePureFunction () public @@ -188,6 +189,14 @@ contract AbiGenDummy ); } + function nonPureFunction (uint256 id, uint256 someValue) + public + returns (uint256 result) + { + someMapping[id] = someValue + 1; + return someMapping[id]; + } + // begin tests for `decodeTransactionData`, `decodeReturnData` /// @dev complex input is dynamic and more difficult to decode than simple input. struct ComplexInput { diff --git a/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py b/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py index e215b5f7cc..1f55f9e7f9 100644 --- a/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py +++ b/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py @@ -40,7 +40,7 @@ class AbiGenDummyValidator( # type: ignore """No-op input validator.""" -class Tuple0x246f9407(TypedDict): +class Tuple0xf95128ef(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -56,10 +56,14 @@ class Tuple0x246f9407(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - aField: int + foo: int + bar: bytes -class Tuple0x1b9da225(TypedDict): + car: str + + +class Tuple0xa057bf41(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -75,10 +79,16 @@ class Tuple0x1b9da225(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - innerStruct: Tuple0x246f9407 + input: Tuple0xf95128ef + lorem: bytes -class Tuple0xcf8ad995(TypedDict): + ipsum: bytes + + dolor: str + + +class Tuple0x246f9407(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -94,16 +104,10 @@ class Tuple0xcf8ad995(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - someBytes: bytes - - anInteger: int - - aDynamicArrayOfBytes: List[bytes] - - aString: str + aField: int -class Tuple0xc9bdd2d5(TypedDict): +class Tuple0x1b9da225(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -119,12 +123,10 @@ class Tuple0xc9bdd2d5(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - innerStruct: Tuple0xcf8ad995 - - description: str + innerStruct: Tuple0x246f9407 -class Tuple0xf95128ef(TypedDict): +class Tuple0xcf8ad995(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -140,14 +142,16 @@ class Tuple0xf95128ef(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - foo: int + someBytes: bytes - bar: bytes + anInteger: int - car: str + aDynamicArrayOfBytes: List[bytes] + aString: str -class Tuple0xa057bf41(TypedDict): + +class Tuple0xc9bdd2d5(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -163,53 +167,9 @@ class Tuple0xa057bf41(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - input: Tuple0xf95128ef - - lorem: bytes - - ipsum: bytes - - dolor: str - - -class SimpleRequireMethod(ContractMethod): - """Various interfaces to the simpleRequire method.""" - - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def call(self, tx_params: Optional[TxParams] = None) -> None: - """Execute underlying contract method via eth_call. - - :param tx_params: transaction parameters - - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) - - def send_transaction( - self, tx_params: Optional[TxParams] = None - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - :param tx_params: transaction parameters - - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + innerStruct: Tuple0xcf8ad995 - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: - """Estimate gas consumption of method call.""" - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + description: str class AcceptsAnArrayOfBytesMethod(ContractMethod): @@ -275,8 +235,8 @@ def estimate_gas( return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class SimpleInputSimpleOutputMethod(ContractMethod): - """Various interfaces to the simpleInputSimpleOutput method.""" +class AcceptsBytesMethod(ContractMethod): + """Various interfaces to the acceptsBytes method.""" def __init__( self, @@ -289,54 +249,47 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, index_0: int): - """Validate the inputs to the simpleInputSimpleOutput method.""" + def validate_and_normalize_inputs(self, a: bytes): + """Validate the inputs to the acceptsBytes method.""" self.validator.assert_valid( - method_name="simpleInputSimpleOutput", - parameter_name="index_0", - argument_value=index_0, + method_name="acceptsBytes", parameter_name="a", argument_value=a ) - # safeguard against fractional inputs - index_0 = int(index_0) - return index_0 + a = bytes.fromhex(a.decode("utf-8")) + return a - def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: + def call(self, a: bytes, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. - Tests decoding when both input and output are non-empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, index_0: int, tx_params: Optional[TxParams] = None + self, a: bytes, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when both input and output are non-empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) def estimate_gas( - self, index_0: int, tx_params: Optional[TxParams] = None + self, a: bytes, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (index_0) = self.validate_and_normalize_inputs(index_0) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class WithdrawMethod(ContractMethod): - """Various interfaces to the withdraw method.""" +class ComplexInputComplexOutputMethod(ContractMethod): + """Various interfaces to the complexInputComplexOutput method.""" def __init__( self, @@ -349,49 +302,64 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, wad: int): - """Validate the inputs to the withdraw method.""" + def validate_and_normalize_inputs(self, complex_input: Tuple0xf95128ef): + """Validate the inputs to the complexInputComplexOutput method.""" self.validator.assert_valid( - method_name="withdraw", parameter_name="wad", argument_value=wad + method_name="complexInputComplexOutput", + parameter_name="complexInput", + argument_value=complex_input, ) - # safeguard against fractional inputs - wad = int(wad) - return wad + return complex_input def call( - self, wad: int, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, + ) -> Tuple0xa057bf41: """Execute underlying contract method via eth_call. + Tests decoding when the input and output are complex. + :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ - (wad) = self.validate_and_normalize_inputs(wad) + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).call(tx_params.as_dict()) + return self.underlying_method(complex_input).call(tx_params.as_dict()) def send_transaction( - self, wad: int, tx_params: Optional[TxParams] = None + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when the input and output are complex. + :param tx_params: transaction parameters + """ - (wad) = self.validate_and_normalize_inputs(wad) + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).transact(tx_params.as_dict()) + return self.underlying_method(complex_input).transact( + tx_params.as_dict() + ) def estimate_gas( - self, wad: int, tx_params: Optional[TxParams] = None + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, ) -> int: """Estimate gas consumption of method call.""" - (wad) = self.validate_and_normalize_inputs(wad) + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).estimateGas(tx_params.as_dict()) + return self.underlying_method(complex_input).estimateGas( + tx_params.as_dict() + ) -class MultiInputMultiOutputMethod(ContractMethod): - """Various interfaces to the multiInputMultiOutput method.""" +class EcrecoverFnMethod(ContractMethod): + """Various interfaces to the ecrecoverFn method.""" def __init__( self, @@ -405,160 +373,59 @@ def __init__( self.underlying_method = contract_function def validate_and_normalize_inputs( - self, index_0: int, index_1: bytes, index_2: str + self, _hash: bytes, v: int, r: bytes, s: bytes ): - """Validate the inputs to the multiInputMultiOutput method.""" + """Validate the inputs to the ecrecoverFn method.""" self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_0", - argument_value=index_0, + method_name="ecrecoverFn", + parameter_name="hash", + argument_value=_hash, ) - # safeguard against fractional inputs - index_0 = int(index_0) self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_1", - argument_value=index_1, + method_name="ecrecoverFn", parameter_name="v", argument_value=v ) - index_1 = bytes.fromhex(index_1.decode("utf-8")) self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_2", - argument_value=index_2, + method_name="ecrecoverFn", parameter_name="r", argument_value=r ) - return (index_0, index_1, index_2) + self.validator.assert_valid( + method_name="ecrecoverFn", parameter_name="s", argument_value=s + ) + return (_hash, v, r, s) def call( self, - index_0: int, - index_1: bytes, - index_2: str, + _hash: bytes, + v: int, + r: bytes, + s: bytes, tx_params: Optional[TxParams] = None, - ) -> Tuple[bytes, bytes, str]: + ) -> str: """Execute underlying contract method via eth_call. - Tests decoding when the input and output are complex and have more than - one argument. + test that devdocs will be generated and that multiline devdocs will + look okay + :param hash: description of some hash. Let's make this line super long + to demonstrate hanging indents for method params. It has to be more + than one hundred twenty columns. + :param r: ECDSA r output + :param s: ECDSA s output + :param v: some v, recovery id :param tx_params: transaction parameters - + :returns: the signerAddress that created this signature. this line too + is super long in order to demonstrate the proper hanging + indentation in generated code. """ - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) + (_hash, v, r, s) = self.validate_and_normalize_inputs(_hash, v, r, s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).call( - tx_params.as_dict() - ) + return self.underlying_method(_hash, v, r, s).call(tx_params.as_dict()) def send_transaction( self, - index_0: int, - index_1: bytes, - index_2: str, - tx_params: Optional[TxParams] = None, - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - Tests decoding when the input and output are complex and have more than - one argument. - - :param tx_params: transaction parameters - - """ - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).transact( - tx_params.as_dict() - ) - - def estimate_gas( - self, - index_0: int, - index_1: bytes, - index_2: str, - tx_params: Optional[TxParams] = None, - ) -> int: - """Estimate gas consumption of method call.""" - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).estimateGas( - tx_params.as_dict() - ) - - -class EcrecoverFnMethod(ContractMethod): - """Various interfaces to the ecrecoverFn method.""" - - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def validate_and_normalize_inputs( - self, _hash: bytes, v: int, r: bytes, s: bytes - ): - """Validate the inputs to the ecrecoverFn method.""" - self.validator.assert_valid( - method_name="ecrecoverFn", - parameter_name="hash", - argument_value=_hash, - ) - self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="v", argument_value=v - ) - self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="r", argument_value=r - ) - self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="s", argument_value=s - ) - return (_hash, v, r, s) - - def call( - self, - _hash: bytes, - v: int, - r: bytes, - s: bytes, - tx_params: Optional[TxParams] = None, - ) -> str: - """Execute underlying contract method via eth_call. - - test that devdocs will be generated and that multiline devdocs will - look okay - - :param hash: description of some hash. Let's make this line super long - to demonstrate hanging indents for method params. It has to be more - than one hundred twenty columns. - :param r: ECDSA r output - :param s: ECDSA s output - :param v: some v, recovery id - :param tx_params: transaction parameters - :returns: the signerAddress that created this signature. this line too - is super long in order to demonstrate the proper hanging - indentation in generated code. - """ - (_hash, v, r, s) = self.validate_and_normalize_inputs(_hash, v, r, s) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(_hash, v, r, s).call(tx_params.as_dict()) - - def send_transaction( - self, - _hash: bytes, - v: int, - r: bytes, - s: bytes, + _hash: bytes, + v: int, + r: bytes, + s: bytes, tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. @@ -599,8 +466,8 @@ def estimate_gas( ) -class AcceptsBytesMethod(ContractMethod): - """Various interfaces to the acceptsBytes method.""" +class EmitSimpleEventMethod(ContractMethod): + """Various interfaces to the emitSimpleEvent method.""" def __init__( self, @@ -613,47 +480,35 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: bytes): - """Validate the inputs to the acceptsBytes method.""" - self.validator.assert_valid( - method_name="acceptsBytes", parameter_name="a", argument_value=a - ) - a = bytes.fromhex(a.decode("utf-8")) - return a - - def call(self, a: bytes, tx_params: Optional[TxParams] = None) -> None: + def call( + self, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, a: bytes, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters - """ - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, a: bytes, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NoInputSimpleOutputMethod(ContractMethod): - """Various interfaces to the noInputSimpleOutput method.""" +class MethodReturningArrayOfStructsMethod(ContractMethod): + """Various interfaces to the methodReturningArrayOfStructs method.""" def __init__( self, @@ -666,11 +521,11 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> int: + def call( + self, tx_params: Optional[TxParams] = None + ) -> List[Tuple0xcf8ad995]: """Execute underlying contract method via eth_call. - Tests decoding when input is empty and output is non-empty. - :param tx_params: transaction parameters """ @@ -682,8 +537,6 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when input is empty and output is non-empty. - :param tx_params: transaction parameters """ @@ -696,8 +549,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class RevertWithConstantMethod(ContractMethod): - """Various interfaces to the revertWithConstant method.""" +class MethodReturningMultipleValuesMethod(ContractMethod): + """Various interfaces to the methodReturningMultipleValues method.""" def __init__( self, @@ -710,7 +563,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple[int, str]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -736,8 +589,10 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimpleRevertMethod(ContractMethod): - """Various interfaces to the simpleRevert method.""" +class MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( + ContractMethod +): + """Various interfaces to the methodUsingNestedStructWithInnerStructNotUsedElsewhere method.""" def __init__( self, @@ -750,7 +605,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0x1b9da225: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -776,10 +631,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( - ContractMethod -): - """Various interfaces to the methodUsingNestedStructWithInnerStructNotUsedElsewhere method.""" +class MultiInputMultiOutputMethod(ContractMethod): + """Various interfaces to the multiInputMultiOutput method.""" def __init__( self, @@ -792,34 +645,95 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0x1b9da225: + def validate_and_normalize_inputs( + self, index_0: int, index_1: bytes, index_2: str + ): + """Validate the inputs to the multiInputMultiOutput method.""" + self.validator.assert_valid( + method_name="multiInputMultiOutput", + parameter_name="index_0", + argument_value=index_0, + ) + # safeguard against fractional inputs + index_0 = int(index_0) + self.validator.assert_valid( + method_name="multiInputMultiOutput", + parameter_name="index_1", + argument_value=index_1, + ) + index_1 = bytes.fromhex(index_1.decode("utf-8")) + self.validator.assert_valid( + method_name="multiInputMultiOutput", + parameter_name="index_2", + argument_value=index_2, + ) + return (index_0, index_1, index_2) + + def call( + self, + index_0: int, + index_1: bytes, + index_2: str, + tx_params: Optional[TxParams] = None, + ) -> Tuple[bytes, bytes, str]: """Execute underlying contract method via eth_call. + Tests decoding when the input and output are complex and have more than + one argument. + :param tx_params: transaction parameters """ + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(index_0, index_1, index_2).call( + tx_params.as_dict() + ) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, + index_0: int, + index_1: bytes, + index_2: str, + tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when the input and output are complex and have more than + one argument. + :param tx_params: transaction parameters """ + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(index_0, index_1, index_2).transact( + tx_params.as_dict() + ) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, + index_0: int, + index_1: bytes, + index_2: str, + tx_params: Optional[TxParams] = None, + ) -> int: """Estimate gas consumption of method call.""" + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(index_0, index_1, index_2).estimateGas( + tx_params.as_dict() + ) -class NestedStructOutputMethod(ContractMethod): - """Various interfaces to the nestedStructOutput method.""" +class NestedStructInputMethod(ContractMethod): + """Various interfaces to the nestedStructInput method.""" def __init__( self, @@ -832,34 +746,50 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xc9bdd2d5: - """Execute underlying contract method via eth_call. - - :param tx_params: transaction parameters + def validate_and_normalize_inputs(self, n: Tuple0xc9bdd2d5): + """Validate the inputs to the nestedStructInput method.""" + self.validator.assert_valid( + method_name="nestedStructInput", + parameter_name="n", + argument_value=n, + ) + return n + + def call( + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + ) -> None: + """Execute underlying contract method via eth_call. + + :param tx_params: transaction parameters """ + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(n).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(n).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(n).estimateGas(tx_params.as_dict()) -class RequireWithConstantMethod(ContractMethod): - """Various interfaces to the requireWithConstant method.""" +class NestedStructOutputMethod(ContractMethod): + """Various interfaces to the nestedStructOutput method.""" def __init__( self, @@ -872,7 +802,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xc9bdd2d5: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -898,8 +828,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class WithAddressInputMethod(ContractMethod): - """Various interfaces to the withAddressInput method.""" +class NoInputNoOutputMethod(ContractMethod): + """Various interfaces to the noInputNoOutput method.""" def __init__( self, @@ -912,102 +842,38 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs( - self, x: str, a: int, b: int, y: str, c: int - ): - """Validate the inputs to the withAddressInput method.""" - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="x", - argument_value=x, - ) - x = self.validate_and_checksum_address(x) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="a", - argument_value=a, - ) - # safeguard against fractional inputs - a = int(a) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="b", - argument_value=b, - ) - # safeguard against fractional inputs - b = int(b) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="y", - argument_value=y, - ) - y = self.validate_and_checksum_address(y) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="c", - argument_value=c, - ) - # safeguard against fractional inputs - c = int(c) - return (x, a, b, y, c) - - def call( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, - ) -> str: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. + Tests decoding when both input and output are empty. + :param tx_params: transaction parameters """ - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when both input and output are empty. + :param tx_params: transaction parameters """ - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).transact( - tx_params.as_dict() - ) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).estimateGas( - tx_params.as_dict() - ) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class StructInputMethod(ContractMethod): - """Various interfaces to the structInput method.""" +class NoInputSimpleOutputMethod(ContractMethod): + """Various interfaces to the noInputSimpleOutput method.""" def __init__( self, @@ -1020,48 +886,38 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, s: Tuple0xcf8ad995): - """Validate the inputs to the structInput method.""" - self.validator.assert_valid( - method_name="structInput", parameter_name="s", argument_value=s - ) - return s - - def call( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None - ) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. + Tests decoding when input is empty and output is non-empty. + :param tx_params: transaction parameters """ - (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when input is empty and output is non-empty. + :param tx_params: transaction parameters """ - (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NonPureMethodMethod(ContractMethod): - """Various interfaces to the nonPureMethod method.""" +class NonPureFunctionMethod(ContractMethod): + """Various interfaces to the nonPureFunction method.""" def __init__( self, @@ -1074,35 +930,64 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function + def validate_and_normalize_inputs(self, _id: int, some_value: int): + """Validate the inputs to the nonPureFunction method.""" + self.validator.assert_valid( + method_name="nonPureFunction", + parameter_name="id", + argument_value=_id, + ) + # safeguard against fractional inputs + _id = int(_id) + self.validator.assert_valid( + method_name="nonPureFunction", + parameter_name="someValue", + argument_value=some_value, + ) + # safeguard against fractional inputs + some_value = int(some_value) + return (_id, some_value) + def call( - self, tx_params: Optional[TxParams] = None + self, _id: int, some_value: int, tx_params: Optional[TxParams] = None ) -> Union[int, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters :returns: the return value of the underlying method. """ + (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(_id, some_value).call( + tx_params.as_dict() + ) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, _id: int, some_value: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ + (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(_id, some_value).transact( + tx_params.as_dict() + ) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, _id: int, some_value: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(_id, some_value).estimateGas( + tx_params.as_dict() + ) -class ComplexInputComplexOutputMethod(ContractMethod): - """Various interfaces to the complexInputComplexOutput method.""" +class NonPureMethodMethod(ContractMethod): + """Various interfaces to the nonPureMethod method.""" def __init__( self, @@ -1115,64 +1000,35 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, complex_input: Tuple0xf95128ef): - """Validate the inputs to the complexInputComplexOutput method.""" - self.validator.assert_valid( - method_name="complexInputComplexOutput", - parameter_name="complexInput", - argument_value=complex_input, - ) - return complex_input - def call( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, - ) -> Tuple0xa057bf41: + self, tx_params: Optional[TxParams] = None + ) -> Union[int, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. - Tests decoding when the input and output are complex. - :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ - (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when the input and output are complex. - :param tx_params: transaction parameters - """ - (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).transact( - tx_params.as_dict() - ) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).estimateGas( - tx_params.as_dict() - ) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NoInputNoOutputMethod(ContractMethod): - """Various interfaces to the noInputNoOutput method.""" +class NonPureMethodThatReturnsNothingMethod(ContractMethod): + """Various interfaces to the nonPureMethodThatReturnsNothing method.""" def __init__( self, @@ -1185,13 +1041,13 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def call( + self, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. - Tests decoding when both input and output are empty. - :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().call(tx_params.as_dict()) @@ -1201,10 +1057,7 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when both input and output are empty. - :param tx_params: transaction parameters - """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().transact(tx_params.as_dict()) @@ -1215,8 +1068,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimplePureFunctionWithInputMethod(ContractMethod): - """Various interfaces to the simplePureFunctionWithInput method.""" +class OverloadedMethod2Method(ContractMethod): + """Various interfaces to the overloadedMethod method.""" def __init__( self, @@ -1229,50 +1082,48 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, x: int): - """Validate the inputs to the simplePureFunctionWithInput method.""" + def validate_and_normalize_inputs(self, a: str): + """Validate the inputs to the overloadedMethod method.""" self.validator.assert_valid( - method_name="simplePureFunctionWithInput", - parameter_name="x", - argument_value=x, + method_name="overloadedMethod", + parameter_name="a", + argument_value=a, ) - # safeguard against fractional inputs - x = int(x) - return x + return a - def call(self, x: int, tx_params: Optional[TxParams] = None) -> int: + def call(self, a: str, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (x) = self.validate_and_normalize_inputs(x) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, x: int, tx_params: Optional[TxParams] = None + self, a: str, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (x) = self.validate_and_normalize_inputs(x) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) def estimate_gas( - self, x: int, tx_params: Optional[TxParams] = None + self, a: str, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (x) = self.validate_and_normalize_inputs(x) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class NonPureMethodThatReturnsNothingMethod(ContractMethod): - """Various interfaces to the nonPureMethodThatReturnsNothing method.""" +class OverloadedMethod1Method(ContractMethod): + """Various interfaces to the overloadedMethod method.""" def __init__( self, @@ -1285,35 +1136,48 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: + def validate_and_normalize_inputs(self, a: int): + """Validate the inputs to the overloadedMethod method.""" + self.validator.assert_valid( + method_name="overloadedMethod", + parameter_name="a", + argument_value=a, + ) + return a + + def call(self, a: int, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, a: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters + """ + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, a: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class SimplePureFunctionMethod(ContractMethod): - """Various interfaces to the simplePureFunction method.""" +class PureFunctionWithConstantMethod(ContractMethod): + """Various interfaces to the pureFunctionWithConstant method.""" def __init__( self, @@ -1352,8 +1216,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class NestedStructInputMethod(ContractMethod): - """Various interfaces to the nestedStructInput method.""" +class RequireWithConstantMethod(ContractMethod): + """Various interfaces to the requireWithConstant method.""" def __init__( self, @@ -1366,50 +1230,34 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, n: Tuple0xc9bdd2d5): - """Validate the inputs to the nestedStructInput method.""" - self.validator.assert_valid( - method_name="nestedStructInput", - parameter_name="n", - argument_value=n, - ) - return n - - def call( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None - ) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class MethodReturningMultipleValuesMethod(ContractMethod): - """Various interfaces to the methodReturningMultipleValues method.""" +class RevertWithConstantMethod(ContractMethod): + """Various interfaces to the revertWithConstant method.""" def __init__( self, @@ -1422,7 +1270,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple[int, str]: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -1448,8 +1296,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class MethodReturningArrayOfStructsMethod(ContractMethod): - """Various interfaces to the methodReturningArrayOfStructs method.""" +class SimpleInputNoOutputMethod(ContractMethod): + """Various interfaces to the simpleInputNoOutput method.""" def __init__( self, @@ -1462,36 +1310,54 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> List[Tuple0xcf8ad995]: + def validate_and_normalize_inputs(self, index_0: int): + """Validate the inputs to the simpleInputNoOutput method.""" + self.validator.assert_valid( + method_name="simpleInputNoOutput", + parameter_name="index_0", + argument_value=index_0, + ) + # safeguard against fractional inputs + index_0 = int(index_0) + return index_0 + + def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. + Tests decoding when input is not empty but output is empty. + :param tx_params: transaction parameters """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(index_0).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when input is not empty but output is empty. + :param tx_params: transaction parameters """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(index_0).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, index_0: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) -class EmitSimpleEventMethod(ContractMethod): - """Various interfaces to the emitSimpleEvent method.""" +class SimpleInputSimpleOutputMethod(ContractMethod): + """Various interfaces to the simpleInputSimpleOutput method.""" def __init__( self, @@ -1504,35 +1370,54 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: + def validate_and_normalize_inputs(self, index_0: int): + """Validate the inputs to the simpleInputSimpleOutput method.""" + self.validator.assert_valid( + method_name="simpleInputSimpleOutput", + parameter_name="index_0", + argument_value=index_0, + ) + # safeguard against fractional inputs + index_0 = int(index_0) + return index_0 + + def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. + Tests decoding when both input and output are non-empty. + :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(index_0).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when both input and output are non-empty. + :param tx_params: transaction parameters + """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(index_0).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, index_0: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) -class StructOutputMethod(ContractMethod): - """Various interfaces to the structOutput method.""" +class SimplePureFunctionMethod(ContractMethod): + """Various interfaces to the simplePureFunction method.""" def __init__( self, @@ -1545,13 +1430,11 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xcf8ad995: + def call(self, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. - a method that returns a struct - :param tx_params: transaction parameters - :returns: a Struct struct + """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().call(tx_params.as_dict()) @@ -1561,10 +1444,8 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - a method that returns a struct - :param tx_params: transaction parameters - :returns: a Struct struct + """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().transact(tx_params.as_dict()) @@ -1575,8 +1456,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class PureFunctionWithConstantMethod(ContractMethod): - """Various interfaces to the pureFunctionWithConstant method.""" +class SimplePureFunctionWithInputMethod(ContractMethod): + """Various interfaces to the simplePureFunctionWithInput method.""" def __init__( self, @@ -1589,34 +1470,50 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> int: + def validate_and_normalize_inputs(self, x: int): + """Validate the inputs to the simplePureFunctionWithInput method.""" + self.validator.assert_valid( + method_name="simplePureFunctionWithInput", + parameter_name="x", + argument_value=x, + ) + # safeguard against fractional inputs + x = int(x) + return x + + def call(self, x: int, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(x).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, x: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(x).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, x: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(x).estimateGas(tx_params.as_dict()) -class SimpleInputNoOutputMethod(ContractMethod): - """Various interfaces to the simpleInputNoOutput method.""" +class SimpleRequireMethod(ContractMethod): + """Various interfaces to the simpleRequire method.""" def __init__( self, @@ -1629,54 +1526,34 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, index_0: int): - """Validate the inputs to the simpleInputNoOutput method.""" - self.validator.assert_valid( - method_name="simpleInputNoOutput", - parameter_name="index_0", - argument_value=index_0, - ) - # safeguard against fractional inputs - index_0 = int(index_0) - return index_0 - - def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. - Tests decoding when input is not empty but output is empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, index_0: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when input is not empty but output is empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, index_0: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class OverloadedMethod2Method(ContractMethod): - """Various interfaces to the overloadedMethod method.""" +class SimpleRevertMethod(ContractMethod): + """Various interfaces to the simpleRevert method.""" def __init__( self, @@ -1689,48 +1566,90 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: str): - """Validate the inputs to the overloadedMethod method.""" + def call(self, tx_params: Optional[TxParams] = None) -> None: + """Execute underlying contract method via eth_call. + + :param tx_params: transaction parameters + + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().call(tx_params.as_dict()) + + def send_transaction( + self, tx_params: Optional[TxParams] = None + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + :param tx_params: transaction parameters + + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().transact(tx_params.as_dict()) + + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + """Estimate gas consumption of method call.""" + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().estimateGas(tx_params.as_dict()) + + +class SomeMappingMethod(ContractMethod): + """Various interfaces to the someMapping method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def validate_and_normalize_inputs(self, index_0: int): + """Validate the inputs to the someMapping method.""" self.validator.assert_valid( - method_name="overloadedMethod", - parameter_name="a", - argument_value=a, + method_name="someMapping", + parameter_name="index_0", + argument_value=index_0, ) - return a + # safeguard against fractional inputs + index_0 = int(index_0) + return index_0 - def call(self, a: str, tx_params: Optional[TxParams] = None) -> None: + def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method(index_0).call(tx_params.as_dict()) def send_transaction( - self, a: str, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method(index_0).transact(tx_params.as_dict()) def estimate_gas( - self, a: str, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) -class OverloadedMethod1Method(ContractMethod): - """Various interfaces to the overloadedMethod method.""" +class StructInputMethod(ContractMethod): + """Various interfaces to the structInput method.""" def __init__( self, @@ -1743,44 +1662,251 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: int): - """Validate the inputs to the overloadedMethod method.""" + def validate_and_normalize_inputs(self, s: Tuple0xcf8ad995): + """Validate the inputs to the structInput method.""" self.validator.assert_valid( - method_name="overloadedMethod", + method_name="structInput", parameter_name="s", argument_value=s + ) + return s + + def call( + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + ) -> None: + """Execute underlying contract method via eth_call. + + :param tx_params: transaction parameters + + """ + (s) = self.validate_and_normalize_inputs(s) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(s).call(tx_params.as_dict()) + + def send_transaction( + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + :param tx_params: transaction parameters + + """ + (s) = self.validate_and_normalize_inputs(s) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(s).transact(tx_params.as_dict()) + + def estimate_gas( + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + ) -> int: + """Estimate gas consumption of method call.""" + (s) = self.validate_and_normalize_inputs(s) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(s).estimateGas(tx_params.as_dict()) + + +class StructOutputMethod(ContractMethod): + """Various interfaces to the structOutput method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xcf8ad995: + """Execute underlying contract method via eth_call. + + a method that returns a struct + + :param tx_params: transaction parameters + :returns: a Struct struct + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().call(tx_params.as_dict()) + + def send_transaction( + self, tx_params: Optional[TxParams] = None + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + a method that returns a struct + + :param tx_params: transaction parameters + :returns: a Struct struct + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().transact(tx_params.as_dict()) + + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + """Estimate gas consumption of method call.""" + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().estimateGas(tx_params.as_dict()) + + +class WithAddressInputMethod(ContractMethod): + """Various interfaces to the withAddressInput method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def validate_and_normalize_inputs( + self, x: str, a: int, b: int, y: str, c: int + ): + """Validate the inputs to the withAddressInput method.""" + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="x", + argument_value=x, + ) + x = self.validate_and_checksum_address(x) + self.validator.assert_valid( + method_name="withAddressInput", parameter_name="a", argument_value=a, ) - return a + # safeguard against fractional inputs + a = int(a) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="b", + argument_value=b, + ) + # safeguard against fractional inputs + b = int(b) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="y", + argument_value=y, + ) + y = self.validate_and_checksum_address(y) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="c", + argument_value=c, + ) + # safeguard against fractional inputs + c = int(c) + return (x, a, b, y, c) - def call(self, a: int, tx_params: Optional[TxParams] = None) -> None: + def call( + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, + ) -> str: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).call(tx_params.as_dict()) def send_transaction( - self, a: int, tx_params: Optional[TxParams] = None + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).transact( + tx_params.as_dict() + ) def estimate_gas( - self, a: int, tx_params: Optional[TxParams] = None + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, ) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).estimateGas( + tx_params.as_dict() + ) + + +class WithdrawMethod(ContractMethod): + """Various interfaces to the withdraw method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def validate_and_normalize_inputs(self, wad: int): + """Validate the inputs to the withdraw method.""" + self.validator.assert_valid( + method_name="withdraw", parameter_name="wad", argument_value=wad + ) + # safeguard against fractional inputs + wad = int(wad) + return wad + + def call( + self, wad: int, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: + """Execute underlying contract method via eth_call. + + :param tx_params: transaction parameters + :returns: the return value of the underlying method. + """ + (wad) = self.validate_and_normalize_inputs(wad) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(wad).call(tx_params.as_dict()) + + def send_transaction( + self, wad: int, tx_params: Optional[TxParams] = None + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + :param tx_params: transaction parameters + """ + (wad) = self.validate_and_normalize_inputs(wad) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(wad).transact(tx_params.as_dict()) + + def estimate_gas( + self, wad: int, tx_params: Optional[TxParams] = None + ) -> int: + """Estimate gas consumption of method call.""" + (wad) = self.validate_and_normalize_inputs(wad) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(wad).estimateGas(tx_params.as_dict()) # pylint: disable=too-many-public-methods,too-many-instance-attributes @@ -1791,24 +1917,44 @@ class AbiGenDummy: which can be accomplished via `str.encode("utf_8")`:code:. """ - simple_require: SimpleRequireMethod + accepts_an_array_of_bytes: AcceptsAnArrayOfBytesMethod """Constructor-initialized instance of - :class:`SimpleRequireMethod`. + :class:`AcceptsAnArrayOfBytesMethod`. """ - accepts_an_array_of_bytes: AcceptsAnArrayOfBytesMethod + accepts_bytes: AcceptsBytesMethod + """Constructor-initialized instance of + :class:`AcceptsBytesMethod`. + """ + + complex_input_complex_output: ComplexInputComplexOutputMethod + """Constructor-initialized instance of + :class:`ComplexInputComplexOutputMethod`. + """ + + ecrecover_fn: EcrecoverFnMethod + """Constructor-initialized instance of + :class:`EcrecoverFnMethod`. + """ + + emit_simple_event: EmitSimpleEventMethod + """Constructor-initialized instance of + :class:`EmitSimpleEventMethod`. + """ + + method_returning_array_of_structs: MethodReturningArrayOfStructsMethod """Constructor-initialized instance of - :class:`AcceptsAnArrayOfBytesMethod`. + :class:`MethodReturningArrayOfStructsMethod`. """ - simple_input_simple_output: SimpleInputSimpleOutputMethod + method_returning_multiple_values: MethodReturningMultipleValuesMethod """Constructor-initialized instance of - :class:`SimpleInputSimpleOutputMethod`. + :class:`MethodReturningMultipleValuesMethod`. """ - withdraw: WithdrawMethod + method_using_nested_struct_with_inner_struct_not_used_elsewhere: MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod """Constructor-initialized instance of - :class:`WithdrawMethod`. + :class:`MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod`. """ multi_input_multi_output: MultiInputMultiOutputMethod @@ -1816,79 +1962,74 @@ class AbiGenDummy: :class:`MultiInputMultiOutputMethod`. """ - ecrecover_fn: EcrecoverFnMethod - """Constructor-initialized instance of - :class:`EcrecoverFnMethod`. - """ - - accepts_bytes: AcceptsBytesMethod + nested_struct_input: NestedStructInputMethod """Constructor-initialized instance of - :class:`AcceptsBytesMethod`. + :class:`NestedStructInputMethod`. """ - no_input_simple_output: NoInputSimpleOutputMethod + nested_struct_output: NestedStructOutputMethod """Constructor-initialized instance of - :class:`NoInputSimpleOutputMethod`. + :class:`NestedStructOutputMethod`. """ - revert_with_constant: RevertWithConstantMethod + no_input_no_output: NoInputNoOutputMethod """Constructor-initialized instance of - :class:`RevertWithConstantMethod`. + :class:`NoInputNoOutputMethod`. """ - simple_revert: SimpleRevertMethod + no_input_simple_output: NoInputSimpleOutputMethod """Constructor-initialized instance of - :class:`SimpleRevertMethod`. + :class:`NoInputSimpleOutputMethod`. """ - method_using_nested_struct_with_inner_struct_not_used_elsewhere: MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod + non_pure_function: NonPureFunctionMethod """Constructor-initialized instance of - :class:`MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod`. + :class:`NonPureFunctionMethod`. """ - nested_struct_output: NestedStructOutputMethod + non_pure_method: NonPureMethodMethod """Constructor-initialized instance of - :class:`NestedStructOutputMethod`. + :class:`NonPureMethodMethod`. """ - require_with_constant: RequireWithConstantMethod + non_pure_method_that_returns_nothing: NonPureMethodThatReturnsNothingMethod """Constructor-initialized instance of - :class:`RequireWithConstantMethod`. + :class:`NonPureMethodThatReturnsNothingMethod`. """ - with_address_input: WithAddressInputMethod + overloaded_method2: OverloadedMethod2Method """Constructor-initialized instance of - :class:`WithAddressInputMethod`. + :class:`OverloadedMethod2Method`. """ - struct_input: StructInputMethod + overloaded_method1: OverloadedMethod1Method """Constructor-initialized instance of - :class:`StructInputMethod`. + :class:`OverloadedMethod1Method`. """ - non_pure_method: NonPureMethodMethod + pure_function_with_constant: PureFunctionWithConstantMethod """Constructor-initialized instance of - :class:`NonPureMethodMethod`. + :class:`PureFunctionWithConstantMethod`. """ - complex_input_complex_output: ComplexInputComplexOutputMethod + require_with_constant: RequireWithConstantMethod """Constructor-initialized instance of - :class:`ComplexInputComplexOutputMethod`. + :class:`RequireWithConstantMethod`. """ - no_input_no_output: NoInputNoOutputMethod + revert_with_constant: RevertWithConstantMethod """Constructor-initialized instance of - :class:`NoInputNoOutputMethod`. + :class:`RevertWithConstantMethod`. """ - simple_pure_function_with_input: SimplePureFunctionWithInputMethod + simple_input_no_output: SimpleInputNoOutputMethod """Constructor-initialized instance of - :class:`SimplePureFunctionWithInputMethod`. + :class:`SimpleInputNoOutputMethod`. """ - non_pure_method_that_returns_nothing: NonPureMethodThatReturnsNothingMethod + simple_input_simple_output: SimpleInputSimpleOutputMethod """Constructor-initialized instance of - :class:`NonPureMethodThatReturnsNothingMethod`. + :class:`SimpleInputSimpleOutputMethod`. """ simple_pure_function: SimplePureFunctionMethod @@ -1896,49 +2037,44 @@ class AbiGenDummy: :class:`SimplePureFunctionMethod`. """ - nested_struct_input: NestedStructInputMethod - """Constructor-initialized instance of - :class:`NestedStructInputMethod`. - """ - - method_returning_multiple_values: MethodReturningMultipleValuesMethod + simple_pure_function_with_input: SimplePureFunctionWithInputMethod """Constructor-initialized instance of - :class:`MethodReturningMultipleValuesMethod`. + :class:`SimplePureFunctionWithInputMethod`. """ - method_returning_array_of_structs: MethodReturningArrayOfStructsMethod + simple_require: SimpleRequireMethod """Constructor-initialized instance of - :class:`MethodReturningArrayOfStructsMethod`. + :class:`SimpleRequireMethod`. """ - emit_simple_event: EmitSimpleEventMethod + simple_revert: SimpleRevertMethod """Constructor-initialized instance of - :class:`EmitSimpleEventMethod`. + :class:`SimpleRevertMethod`. """ - struct_output: StructOutputMethod + some_mapping: SomeMappingMethod """Constructor-initialized instance of - :class:`StructOutputMethod`. + :class:`SomeMappingMethod`. """ - pure_function_with_constant: PureFunctionWithConstantMethod + struct_input: StructInputMethod """Constructor-initialized instance of - :class:`PureFunctionWithConstantMethod`. + :class:`StructInputMethod`. """ - simple_input_no_output: SimpleInputNoOutputMethod + struct_output: StructOutputMethod """Constructor-initialized instance of - :class:`SimpleInputNoOutputMethod`. + :class:`StructOutputMethod`. """ - overloaded_method2: OverloadedMethod2Method + with_address_input: WithAddressInputMethod """Constructor-initialized instance of - :class:`OverloadedMethod2Method`. + :class:`WithAddressInputMethod`. """ - overloaded_method1: OverloadedMethod1Method + withdraw: WithdrawMethod """Constructor-initialized instance of - :class:`OverloadedMethod1Method`. + :class:`WithdrawMethod`. """ def __init__( @@ -1967,10 +2103,6 @@ def __init__( abi=AbiGenDummy.abi(), ).functions - self.simple_require = SimpleRequireMethod( - provider, contract_address, functions.simpleRequire, validator - ) - self.accepts_an_array_of_bytes = AcceptsAnArrayOfBytesMethod( provider, contract_address, @@ -1978,21 +2110,14 @@ def __init__( validator, ) - self.simple_input_simple_output = SimpleInputSimpleOutputMethod( - provider, - contract_address, - functions.simpleInputSimpleOutput, - validator, - ) - - self.withdraw = WithdrawMethod( - provider, contract_address, functions.withdraw, validator + self.accepts_bytes = AcceptsBytesMethod( + provider, contract_address, functions.acceptsBytes, validator ) - self.multi_input_multi_output = MultiInputMultiOutputMethod( + self.complex_input_complex_output = ComplexInputComplexOutputMethod( provider, contract_address, - functions.multiInputMultiOutput, + functions.complexInputComplexOutput, validator, ) @@ -2000,23 +2125,22 @@ def __init__( provider, contract_address, functions.ecrecoverFn, validator ) - self.accepts_bytes = AcceptsBytesMethod( - provider, contract_address, functions.acceptsBytes, validator + self.emit_simple_event = EmitSimpleEventMethod( + provider, contract_address, functions.emitSimpleEvent, validator ) - self.no_input_simple_output = NoInputSimpleOutputMethod( + self.method_returning_array_of_structs = MethodReturningArrayOfStructsMethod( provider, contract_address, - functions.noInputSimpleOutput, + functions.methodReturningArrayOfStructs, validator, ) - self.revert_with_constant = RevertWithConstantMethod( - provider, contract_address, functions.revertWithConstant, validator - ) - - self.simple_revert = SimpleRevertMethod( - provider, contract_address, functions.simpleRevert, validator + self.method_returning_multiple_values = MethodReturningMultipleValuesMethod( + provider, + contract_address, + functions.methodReturningMultipleValues, + validator, ) self.method_using_nested_struct_with_inner_struct_not_used_elsewhere = MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( @@ -2026,45 +2150,38 @@ def __init__( validator, ) - self.nested_struct_output = NestedStructOutputMethod( - provider, contract_address, functions.nestedStructOutput, validator - ) - - self.require_with_constant = RequireWithConstantMethod( + self.multi_input_multi_output = MultiInputMultiOutputMethod( provider, contract_address, - functions.requireWithConstant, + functions.multiInputMultiOutput, validator, ) - self.with_address_input = WithAddressInputMethod( - provider, contract_address, functions.withAddressInput, validator + self.nested_struct_input = NestedStructInputMethod( + provider, contract_address, functions.nestedStructInput, validator ) - self.struct_input = StructInputMethod( - provider, contract_address, functions.structInput, validator + self.nested_struct_output = NestedStructOutputMethod( + provider, contract_address, functions.nestedStructOutput, validator ) - self.non_pure_method = NonPureMethodMethod( - provider, contract_address, functions.nonPureMethod, validator + self.no_input_no_output = NoInputNoOutputMethod( + provider, contract_address, functions.noInputNoOutput, validator ) - self.complex_input_complex_output = ComplexInputComplexOutputMethod( + self.no_input_simple_output = NoInputSimpleOutputMethod( provider, contract_address, - functions.complexInputComplexOutput, + functions.noInputSimpleOutput, validator, ) - self.no_input_no_output = NoInputNoOutputMethod( - provider, contract_address, functions.noInputNoOutput, validator + self.non_pure_function = NonPureFunctionMethod( + provider, contract_address, functions.nonPureFunction, validator ) - self.simple_pure_function_with_input = SimplePureFunctionWithInputMethod( - provider, - contract_address, - functions.simplePureFunctionWithInput, - validator, + self.non_pure_method = NonPureMethodMethod( + provider, contract_address, functions.nonPureMethod, validator ) self.non_pure_method_that_returns_nothing = NonPureMethodThatReturnsNothingMethod( @@ -2074,64 +2191,91 @@ def __init__( validator, ) - self.simple_pure_function = SimplePureFunctionMethod( - provider, contract_address, functions.simplePureFunction, validator + self.overloaded_method2 = OverloadedMethod2Method( + provider, contract_address, functions.overloadedMethod, validator ) - self.nested_struct_input = NestedStructInputMethod( - provider, contract_address, functions.nestedStructInput, validator + self.overloaded_method1 = OverloadedMethod1Method( + provider, contract_address, functions.overloadedMethod, validator ) - self.method_returning_multiple_values = MethodReturningMultipleValuesMethod( + self.pure_function_with_constant = PureFunctionWithConstantMethod( provider, contract_address, - functions.methodReturningMultipleValues, + functions.pureFunctionWithConstant, validator, ) - self.method_returning_array_of_structs = MethodReturningArrayOfStructsMethod( + self.require_with_constant = RequireWithConstantMethod( provider, contract_address, - functions.methodReturningArrayOfStructs, + functions.requireWithConstant, validator, ) - self.emit_simple_event = EmitSimpleEventMethod( - provider, contract_address, functions.emitSimpleEvent, validator + self.revert_with_constant = RevertWithConstantMethod( + provider, contract_address, functions.revertWithConstant, validator ) - self.struct_output = StructOutputMethod( - provider, contract_address, functions.structOutput, validator + self.simple_input_no_output = SimpleInputNoOutputMethod( + provider, + contract_address, + functions.simpleInputNoOutput, + validator, ) - self.pure_function_with_constant = PureFunctionWithConstantMethod( + self.simple_input_simple_output = SimpleInputSimpleOutputMethod( provider, contract_address, - functions.pureFunctionWithConstant, + functions.simpleInputSimpleOutput, validator, ) - self.simple_input_no_output = SimpleInputNoOutputMethod( + self.simple_pure_function = SimplePureFunctionMethod( + provider, contract_address, functions.simplePureFunction, validator + ) + + self.simple_pure_function_with_input = SimplePureFunctionWithInputMethod( provider, contract_address, - functions.simpleInputNoOutput, + functions.simplePureFunctionWithInput, validator, ) - self.overloaded_method2 = OverloadedMethod2Method( - provider, contract_address, functions.overloadedMethod, validator + self.simple_require = SimpleRequireMethod( + provider, contract_address, functions.simpleRequire, validator ) - self.overloaded_method1 = OverloadedMethod1Method( - provider, contract_address, functions.overloadedMethod, validator + self.simple_revert = SimpleRevertMethod( + provider, contract_address, functions.simpleRevert, validator ) - def get_withdrawal_event( + self.some_mapping = SomeMappingMethod( + provider, contract_address, functions.someMapping, validator + ) + + self.struct_input = StructInputMethod( + provider, contract_address, functions.structInput, validator + ) + + self.struct_output = StructOutputMethod( + provider, contract_address, functions.structOutput, validator + ) + + self.with_address_input = WithAddressInputMethod( + provider, contract_address, functions.withAddressInput, validator + ) + + self.withdraw = WithdrawMethod( + provider, contract_address, functions.withdraw, validator + ) + + def get_simple_event_event( self, tx_hash: Union[HexBytes, bytes] ) -> Tuple[AttributeDict]: - """Get log entry for Withdrawal event. + """Get log entry for SimpleEvent event. - :param tx_hash: hash of transaction emitting Withdrawal event + :param tx_hash: hash of transaction emitting SimpleEvent event """ tx_receipt = self._web3_eth.getTransactionReceipt(tx_hash) return ( @@ -2139,16 +2283,16 @@ def get_withdrawal_event( address=to_checksum_address(self.contract_address), abi=AbiGenDummy.abi(), ) - .events.Withdrawal() + .events.SimpleEvent() .processReceipt(tx_receipt) ) - def get_simple_event_event( + def get_withdrawal_event( self, tx_hash: Union[HexBytes, bytes] ) -> Tuple[AttributeDict]: - """Get log entry for SimpleEvent event. + """Get log entry for Withdrawal event. - :param tx_hash: hash of transaction emitting SimpleEvent event + :param tx_hash: hash of transaction emitting Withdrawal event """ tx_receipt = self._web3_eth.getTransactionReceipt(tx_hash) return ( @@ -2156,7 +2300,7 @@ def get_simple_event_event( address=to_checksum_address(self.contract_address), abi=AbiGenDummy.abi(), ) - .events.SimpleEvent() + .events.Withdrawal() .processReceipt(tx_receipt) ) @@ -2164,7 +2308,7 @@ def get_simple_event_event( def abi(): """Return the ABI to the underlying contract.""" return json.loads( - '[{"constant":true,"inputs":[],"name":"simpleRequire","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes[]","name":"a","type":"bytes[]"}],"name":"acceptsAnArrayOfBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"},{"internalType":"bytes","name":"index_1","type":"bytes"},{"internalType":"string","name":"index_2","type":"string"}],"name":"multiInputMultiOutput","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ecrecoverFn","outputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"a","type":"bytes"}],"name":"acceptsBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"revertWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRevert","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodUsingNestedStructWithInnerStructNotUsedElsewhere","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"aField","type":"uint256"}],"internalType":"struct AbiGenDummy.StructNotDirectlyUsedAnywhere","name":"innerStruct","type":"tuple"}],"internalType":"struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nestedStructOutput","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"requireWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"x","type":"address"},{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"address","name":"y","type":"address"},{"internalType":"uint256","name":"c","type":"uint256"}],"name":"withAddressInput","outputs":[{"internalType":"address","name":"z","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"name":"structInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"complexInput","type":"tuple"}],"name":"complexInputComplexOutput","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"input","type":"tuple"},{"internalType":"bytes","name":"lorem","type":"bytes"},{"internalType":"bytes","name":"ipsum","type":"bytes"},{"internalType":"string","name":"dolor","type":"string"}],"internalType":"struct AbiGenDummy.ComplexOutput","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"simplePureFunctionWithInput","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethodThatReturnsNothing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"simplePureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"n","type":"tuple"}],"name":"nestedStructInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningMultipleValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningArrayOfStructs","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"emitSimpleEvent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"structOutput","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"pureFunctionWithConstant","outputs":[{"internalType":"uint256","name":"someConstant","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"a","type":"string"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"int256","name":"a","type":"int256"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"someBytes","type":"bytes"},{"indexed":false,"internalType":"string","name":"someString","type":"string"}],"name":"SimpleEvent","type":"event"}]' # noqa: E501 (line-too-long) + '[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"someBytes","type":"bytes"},{"indexed":false,"internalType":"string","name":"someString","type":"string"}],"name":"SimpleEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":true,"inputs":[{"internalType":"bytes[]","name":"a","type":"bytes[]"}],"name":"acceptsAnArrayOfBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"a","type":"bytes"}],"name":"acceptsBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"complexInput","type":"tuple"}],"name":"complexInputComplexOutput","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"input","type":"tuple"},{"internalType":"bytes","name":"lorem","type":"bytes"},{"internalType":"bytes","name":"ipsum","type":"bytes"},{"internalType":"string","name":"dolor","type":"string"}],"internalType":"struct AbiGenDummy.ComplexOutput","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ecrecoverFn","outputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"emitSimpleEvent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningArrayOfStructs","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningMultipleValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodUsingNestedStructWithInnerStructNotUsedElsewhere","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"aField","type":"uint256"}],"internalType":"struct AbiGenDummy.StructNotDirectlyUsedAnywhere","name":"innerStruct","type":"tuple"}],"internalType":"struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"},{"internalType":"bytes","name":"index_1","type":"bytes"},{"internalType":"string","name":"index_2","type":"string"}],"name":"multiInputMultiOutput","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"n","type":"tuple"}],"name":"nestedStructInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nestedStructOutput","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"someValue","type":"uint256"}],"name":"nonPureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethodThatReturnsNothing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"a","type":"string"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"int256","name":"a","type":"int256"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"pureFunctionWithConstant","outputs":[{"internalType":"uint256","name":"someConstant","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"requireWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"revertWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simplePureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"simplePureFunctionWithInput","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRequire","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRevert","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"someMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"name":"structInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"structOutput","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"x","type":"address"},{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"address","name":"y","type":"address"},{"internalType":"uint256","name":"c","type":"uint256"}],"name":"withAddressInput","outputs":[{"internalType":"address","name":"z","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]' # noqa: E501 (line-too-long) ) diff --git a/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py b/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py index ebdd8c6c6a..7bceee9a99 100644 --- a/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py +++ b/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py @@ -202,7 +202,7 @@ def __init__( def abi(): """Return the ABI to the underlying contract.""" return json.loads( - '[{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"publicAddConstant","outputs":[{"name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"publicAddOne","outputs":[{"name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}]' # noqa: E501 (line-too-long) + '[{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"publicAddConstant","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"publicAddOne","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}]' # noqa: E501 (line-too-long) ) diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index 5b149586fb..25553c165d 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -19,22 +19,17 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact } from '@0x/types'; +import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; // tslint:enable:no-unused-variable -export type AbiGenDummyEventArgs = AbiGenDummyWithdrawalEventArgs | AbiGenDummySimpleEventEventArgs; +export type AbiGenDummyEventArgs = AbiGenDummySimpleEventEventArgs | AbiGenDummyWithdrawalEventArgs; export enum AbiGenDummyEvents { - Withdrawal = 'Withdrawal', SimpleEvent = 'SimpleEvent', -} - -export interface AbiGenDummyWithdrawalEventArgs extends DecodedLogArgs { - _owner: string; - _value: BigNumber; + Withdrawal = 'Withdrawal', } export interface AbiGenDummySimpleEventEventArgs extends DecodedLogArgs { @@ -42,19 +37,29 @@ export interface AbiGenDummySimpleEventEventArgs extends DecodedLogArgs { someString: string; } +export interface AbiGenDummyWithdrawalEventArgs extends DecodedLogArgs { + _owner: string; + _value: BigNumber; +} + /* istanbul ignore next */ // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class AbiGenDummyContract extends BaseContract { public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040'; - public simpleRequire = { + '0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040'; + /** + * a method that accepts an array of bytes + */ + public acceptsAnArrayOfBytes = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. + * @param a the array of bytes being accepted */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(a: string[], callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isArray('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -64,7 +69,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleRequire()', []); + const encodedData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -76,7 +81,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -86,11 +91,13 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). + * @param a the array of bytes being accepted * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(a: string[]): string { + assert.isArray('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleRequire()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); return abiEncodedTransactionData; }, /** @@ -98,11 +105,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [string[]] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string[]]>(callData); return abiDecodedCallData; }, /** @@ -112,24 +119,20 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * a method that accepts an array of bytes - */ - public acceptsAnArrayOfBytes = { + public acceptsBytes = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. - * @param a the array of bytes being accepted */ - async callAsync(a: string[], callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isArray('a', a); + async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isString('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -139,7 +142,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); + const encodedData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -151,7 +154,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -161,13 +164,12 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). - * @param a the array of bytes being accepted * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string[]): string { - assert.isArray('a', a); + getABIEncodedTransactionData(a: string): string { + assert.isString('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); return abiEncodedTransactionData; }, /** @@ -175,11 +177,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string[]] { + getABIDecodedTransactionData(callData: string): [string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string[]]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); return abiDecodedCallData; }, /** @@ -189,27 +191,31 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; /** - * Tests decoding when both input and output are non-empty. + * Tests decoding when the input and output are complex. */ - public simpleInputSimpleOutput = { + public complexInputComplexOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( - index_0: BigNumber, + complexInput: { foo: BigNumber; bar: string; car: string }, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise { - assert.isBigNumber('index_0', index_0); + ): Promise<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -219,7 +225,9 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [index_0]); + const encodedData = self._strictEncodeArguments('complexInputComplexOutput((uint256,bytes,string))', [ + complexInput, + ]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -231,9 +239,14 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -243,12 +256,129 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); + getABIEncodedTransactionData(complexInput: { foo: BigNumber; bar: string; car: string }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [ - index_0, + const abiEncodedTransactionData = self._strictEncodeArguments( + 'complexInputComplexOutput((uint256,bytes,string))', + [complexInput], + ); + return abiEncodedTransactionData; + }, + /** + * Decode the ABI-encoded transaction data into its input arguments + * @param callData The ABI-encoded transaction data + * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. + */ + getABIDecodedTransactionData(callData: string): { foo: BigNumber; bar: string; car: string } { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + // tslint:disable boolean-naming + const abiDecodedCallData = abiEncoder.strictDecode<{ foo: BigNumber; bar: string; car: string }>(callData); + return abiDecodedCallData; + }, + /** + * Decode the ABI-encoded return data from a transaction + * @param returnData the data returned after transaction execution + * @returns An array representing the output results in order. Keynames of nested structs are preserved. + */ + getABIDecodedReturnData( + returnData: string, + ): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + // tslint:disable boolean-naming + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }>(returnData); + return abiDecodedReturnData; + }, + }; + /** + * test that devdocs will be generated and + * that multiline devdocs will look okay + */ + public ecrecoverFn = { + /** + * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an + * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas + * since they don't modify state. + * @param hash description of some hash. Let's make this line super long to + * demonstrate hanging indents for method params. It has to be more than + * one hundred twenty columns. + * @param v some v, recovery id + * @param r ECDSA r output + * @param s ECDSA s output + * @returns the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code. + */ + async callAsync( + hash: string, + v: number | BigNumber, + r: string, + s: string, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isString('hash', hash); + assert.isNumberOrBigNumber('v', v); + assert.isString('r', r); + assert.isString('s', s); + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (defaultBlock !== undefined) { + assert.isBlockParam('defaultBlock', defaultBlock); + } + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('ecrecoverFn(bytes32,uint8,bytes32,bytes32)', [ + hash, + v, + r, + s, ]); + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); + + let rawCallResult; + try { + rawCallResult = await self.evmExecAsync(encodedDataBytes); + } catch (err) { + BaseContract._throwIfThrownErrorIsRevertError(err); + throw err; + } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); + + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; + }, + /** + * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before + * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used + * to create a 0x transaction (see protocol spec for more details). + * @param hash description of some hash. Let's make this line super long to + * demonstrate hanging indents for method params. It has to be more than + * one hundred twenty columns. + * @param v some v, recovery id + * @param r ECDSA r output + * @param s ECDSA s output + * @returns The ABI encoded transaction data as a string + */ + getABIEncodedTransactionData(hash: string, v: number | BigNumber, r: string, s: string): string { + assert.isString('hash', hash); + assert.isNumberOrBigNumber('v', v); + assert.isString('r', r); + assert.isString('s', s); + const self = (this as any) as AbiGenDummyContract; + const abiEncodedTransactionData = self._strictEncodeArguments( + 'ecrecoverFn(bytes32,uint8,bytes32,bytes32)', + [hash, v, r, s], + ); return abiEncodedTransactionData; }, /** @@ -256,11 +386,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): BigNumber { + getABIDecodedTransactionData(callData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -268,25 +398,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public withdraw = { + public emitSimpleEvent = { /** * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write * Ethereum operation and will cost gas. * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - assert.isBigNumber('wad', wad); + async sendTransactionAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -310,14 +439,12 @@ export class AbiGenDummyContract extends BaseContract { * @returns A promise that resolves when the transaction is successful */ awaitTransactionSuccessAsync( - wad: BigNumber, txData?: Partial, pollingIntervalMs?: number, timeoutMs?: number, ): PromiseWithTransactionHash { - assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData); + const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { @@ -335,10 +462,9 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async estimateGasAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - assert.isBigNumber('wad', wad); + async estimateGasAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -354,9 +480,9 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - await (this as any).withdraw.callAsync(wad, txData); - const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData); + async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { + await (this as any).emitSimpleEvent.callAsync(txData); + const txHash = await (this as any).emitSimpleEvent.sendTransactionAsync(txData); return txHash; }, /** @@ -364,8 +490,7 @@ export class AbiGenDummyContract extends BaseContract { * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(wad: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isBigNumber('wad', wad); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -375,7 +500,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -395,7 +520,7 @@ export class AbiGenDummyContract extends BaseContract { throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -407,10 +532,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(wad: BigNumber): string { - assert.isBigNumber('wad', wad); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const abiEncodedTransactionData = self._strictEncodeArguments('emitSimpleEvent()', []); return abiEncodedTransactionData; }, /** @@ -418,11 +542,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -432,31 +556,22 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when the input and output are complex and have more than one argument. - */ - public multiInputMultiOutput = { + public methodReturningArrayOfStructs = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( - index_0: BigNumber, - index_1: string, - index_2: string, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise<[string, string, string]> { - assert.isBigNumber('index_0', index_0); - assert.isString('index_1', index_1); - assert.isString('index_2', index_2); + ): Promise> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -466,11 +581,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('multiInputMultiOutput(uint256,bytes,string)', [ - index_0, - index_1, - index_2, - ]); + const encodedData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -482,9 +593,11 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[string, string, string]>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue< + Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> + >(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -494,15 +607,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber, index_1: string, index_2: string): string { - assert.isBigNumber('index_0', index_0); - assert.isString('index_1', index_1); - assert.isString('index_2', index_2); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'multiInputMultiOutput(uint256,bytes,string)', - [index_0, index_1, index_2], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); return abiEncodedTransactionData; }, /** @@ -510,11 +617,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber, string, string] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string, string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -522,43 +629,25 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): [string, string, string] { + getABIDecodedReturnData( + returnData: string, + ): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string]>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< + Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> + >(returnData); return abiDecodedReturnData; }, }; - /** - * test that devdocs will be generated and - * that multiline devdocs will look okay - */ - public ecrecoverFn = { + public methodReturningMultipleValues = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. - * @param hash description of some hash. Let's make this line super long to - * demonstrate hanging indents for method params. It has to be more than - * one hundred twenty columns. - * @param v some v, recovery id - * @param r ECDSA r output - * @param s ECDSA s output - * @returns the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code. */ - async callAsync( - hash: string, - v: number | BigNumber, - r: string, - s: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isString('hash', hash); - assert.isNumberOrBigNumber('v', v); - assert.isString('r', r); - assert.isString('s', s); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise<[BigNumber, string]> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -568,12 +657,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('ecrecoverFn(bytes32,uint8,bytes32,bytes32)', [ - hash, - v, - r, - s, - ]); + const encodedData = self._strictEncodeArguments('methodReturningMultipleValues()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -585,9 +669,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -595,24 +679,11 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). - * @param hash description of some hash. Let's make this line super long to - * demonstrate hanging indents for method params. It has to be more than - * one hundred twenty columns. - * @param v some v, recovery id - * @param r ECDSA r output - * @param s ECDSA s output * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(hash: string, v: number | BigNumber, r: string, s: string): string { - assert.isString('hash', hash); - assert.isNumberOrBigNumber('v', v); - assert.isString('r', r); - assert.isString('s', s); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'ecrecoverFn(bytes32,uint8,bytes32,bytes32)', - [hash, v, r, s], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningMultipleValues()', []); return abiEncodedTransactionData; }, /** @@ -620,11 +691,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): string { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -632,22 +703,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): string { + getABIDecodedReturnData(returnData: string): [BigNumber, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(returnData); return abiDecodedReturnData; }, }; - public acceptsBytes = { + public methodUsingNestedStructWithInnerStructNotUsedElsewhere = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isString('a', a); + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ innerStruct: { aField: BigNumber } }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -657,7 +730,10 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); + const encodedData = self._strictEncodeArguments( + 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', + [], + ); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -669,9 +745,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -681,10 +757,12 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string): string { - assert.isString('a', a); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', + [], + ); return abiEncodedTransactionData; }, /** @@ -692,11 +770,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -704,24 +782,35 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): { innerStruct: { aField: BigNumber } } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>( + returnData, + ); return abiDecodedReturnData; }, }; /** - * Tests decoding when input is empty and output is non-empty. + * Tests decoding when the input and output are complex and have more than one argument. */ - public noInputSimpleOutput = { + public multiInputMultiOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + index_0: BigNumber, + index_1: string, + index_2: string, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<[string, string, string]> { + assert.isBigNumber('index_0', index_0); + assert.isString('index_1', index_1); + assert.isString('index_2', index_2); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -731,7 +820,11 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('noInputSimpleOutput()', []); + const encodedData = self._strictEncodeArguments('multiInputMultiOutput(uint256,bytes,string)', [ + index_0, + index_1, + index_2, + ]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -743,9 +836,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<[string, string, string]>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -755,9 +848,15 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(index_0: BigNumber, index_1: string, index_2: string): string { + assert.isBigNumber('index_0', index_0); + assert.isString('index_1', index_1); + assert.isString('index_2', index_2); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('noInputSimpleOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'multiInputMultiOutput(uint256,bytes,string)', + [index_0, index_1, index_2], + ); return abiEncodedTransactionData; }, /** @@ -765,11 +864,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [BigNumber, string, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string, string]>(callData); return abiDecodedCallData; }, /** @@ -777,21 +876,33 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): [string, string, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string]>(returnData); return abiDecodedReturnData; }, }; - public revertWithConstant = { + public nestedStructInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + n: { + innerStruct: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + }, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -801,7 +912,10 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('revertWithConstant()', []); + const encodedData = self._strictEncodeArguments( + 'nestedStructInput(((bytes,uint32,bytes[],string),string))', + [n], + ); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -813,7 +927,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -825,21 +939,51 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(n: { + innerStruct: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('revertWithConstant()', []); - return abiEncodedTransactionData; + const abiEncodedTransactionData = self._strictEncodeArguments( + 'nestedStructInput(((bytes,uint32,bytes[],string),string))', + [n], + ); + return abiEncodedTransactionData; }, /** * Decode the ABI-encoded transaction data into its input arguments * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData( + callData: string, + ): [ + { + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + } + ] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode< + [ + { + innerStruct: { + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + } + ] + >(callData); return abiDecodedCallData; }, /** @@ -849,19 +993,25 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public simpleRevert = { + public nestedStructOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -871,7 +1021,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleRevert()', []); + const encodedData = self._strictEncodeArguments('nestedStructOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -883,9 +1033,12 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -897,7 +1050,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleRevert()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nestedStructOutput()', []); return abiEncodedTransactionData; }, /** @@ -907,7 +1060,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -917,24 +1070,32 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData( + returnData: string, + ): { + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }>(returnData); return abiDecodedReturnData; }, }; - public methodUsingNestedStructWithInnerStructNotUsedElsewhere = { + /** + * Tests decoding when both input and output are empty. + */ + public noInputNoOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ innerStruct: { aField: BigNumber } }> { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -944,10 +1105,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', - [], - ); + const encodedData = self._strictEncodeArguments('noInputNoOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -959,9 +1117,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -973,10 +1131,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', - [], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('noInputNoOutput()', []); return abiEncodedTransactionData; }, /** @@ -986,7 +1141,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -996,29 +1151,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): { innerStruct: { aField: BigNumber } } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>( - returnData, - ); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nestedStructOutput = { + /** + * Tests decoding when input is empty and output is non-empty. + */ + public noInputSimpleOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }> { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1028,7 +1178,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nestedStructOutput()', []); + const encodedData = self._strictEncodeArguments('noInputSimpleOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1040,12 +1190,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1057,7 +1204,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nestedStructOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('noInputSimpleOutput()', []); return abiEncodedTransactionData; }, /** @@ -1067,7 +1214,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1077,29 +1224,126 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): { - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - } { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public requireWithConstant = { + public nonPureFunction = { + /** + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async sendTransactionAsync( + id: BigNumber, + someValue: BigNumber, + txData?: Partial | undefined, + ): Promise { + assert.isBigNumber('id', id); + assert.isBigNumber('someValue', someValue); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + /** + * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. + * If the transaction was mined, but reverted, an error is thrown. + * @param txData Additional data for transaction + * @param pollingIntervalMs Interval at which to poll for success + * @returns A promise that resolves when the transaction is successful + */ + awaitTransactionSuccessAsync( + id: BigNumber, + someValue: BigNumber, + txData?: Partial, + pollingIntervalMs?: number, + timeoutMs?: number, + ): PromiseWithTransactionHash { + assert.isBigNumber('id', id); + assert.isBigNumber('someValue', someValue); + const self = (this as any) as AbiGenDummyContract; + const txHashPromise = self.nonPureFunction.sendTransactionAsync(id, someValue, txData); + return new PromiseWithTransactionHash( + txHashPromise, + (async (): Promise => { + // When the transaction hash resolves, wait for it to be mined. + return self._web3Wrapper.awaitTransactionSuccessAsync( + await txHashPromise, + pollingIntervalMs, + timeoutMs, + ); + })(), + ); + }, + /** + * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async estimateGasAsync( + id: BigNumber, + someValue: BigNumber, + txData?: Partial | undefined, + ): Promise { + assert.isBigNumber('id', id); + assert.isBigNumber('someValue', someValue); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, + async validateAndSendTransactionAsync( + id: BigNumber, + someValue: BigNumber, + txData?: Partial | undefined, + ): Promise { + await (this as any).nonPureFunction.callAsync(id, someValue, txData); + const txHash = await (this as any).nonPureFunction.sendTransactionAsync(id, someValue, txData); + return txHash; + }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + id: BigNumber, + someValue: BigNumber, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isBigNumber('id', id); + assert.isBigNumber('someValue', someValue); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1109,21 +1353,29 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('requireWithConstant()', []); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - + const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1133,9 +1385,14 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(id: BigNumber, someValue: BigNumber): string { + assert.isBigNumber('id', id); + assert.isBigNumber('someValue', someValue); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('requireWithConstant()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [ + id, + someValue, + ]); return abiEncodedTransactionData; }, /** @@ -1143,11 +1400,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1155,119 +1412,99 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public withAddressInput = { + public nonPureMethod = { /** - * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an - * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param txData Additional data for transaction + * @returns The hash of the transaction */ - async callAsync( - x: string, - a: BigNumber, - b: BigNumber, - y: string, - c: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isString('x', x); - assert.isBigNumber('a', a); - assert.isBigNumber('b', b); - assert.isString('y', y); - assert.isBigNumber('c', c); - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (defaultBlock !== undefined) { - assert.isBlockParam('defaultBlock', defaultBlock); - } + async sendTransactionAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'withAddressInput(address,uint256,uint256,address,uint256)', - [x.toLowerCase(), a, b, y.toLowerCase(), c], + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), ); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - - let rawCallResult; - try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); - } catch (err) { - BaseContract._throwIfThrownErrorIsRevertError(err); - throw err; + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; }, /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string + * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. + * If the transaction was mined, but reverted, an error is thrown. + * @param txData Additional data for transaction + * @param pollingIntervalMs Interval at which to poll for success + * @returns A promise that resolves when the transaction is successful */ - getABIEncodedTransactionData(x: string, a: BigNumber, b: BigNumber, y: string, c: BigNumber): string { - assert.isString('x', x); - assert.isBigNumber('a', a); - assert.isBigNumber('b', b); - assert.isString('y', y); - assert.isBigNumber('c', c); + awaitTransactionSuccessAsync( + txData?: Partial, + pollingIntervalMs?: number, + timeoutMs?: number, + ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'withAddressInput(address,uint256,uint256,address,uint256)', - [x.toLowerCase(), a, b, y.toLowerCase(), c], + const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData); + return new PromiseWithTransactionHash( + txHashPromise, + (async (): Promise => { + // When the transaction hash resolves, wait for it to be mined. + return self._web3Wrapper.awaitTransactionSuccessAsync( + await txHashPromise, + pollingIntervalMs, + timeoutMs, + ); + })(), ); - return abiEncodedTransactionData; }, /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. + * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. + * @param txData Additional data for transaction + * @returns The hash of the transaction */ - getABIDecodedTransactionData(callData: string): string { + async estimateGasAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; + async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { + await (this as any).nonPureMethod.callAsync(txData); + const txHash = await (this as any).nonPureMethod.sendTransactionAsync(txData); + return txHash; }, - }; - public structInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - s: { someBytes: string; anInteger: number | BigNumber; aDynamicArrayOfBytes: string[]; aString: string }, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1277,21 +1514,29 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('structInput((bytes,uint32,bytes[],string))', [s]); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1301,17 +1546,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(s: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }): string { + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'structInput((bytes,uint32,bytes[],string))', - [s], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethod()', []); return abiEncodedTransactionData; }, /** @@ -1319,15 +1556,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData( - callData: string, - ): [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] - >(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1335,15 +1568,15 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nonPureMethod = { + public nonPureMethodThatReturnsNothing = { /** * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write * Ethereum operation and will cost gas. @@ -1352,7 +1585,7 @@ export class AbiGenDummyContract extends BaseContract { */ async sendTransactionAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1381,7 +1614,7 @@ export class AbiGenDummyContract extends BaseContract { timeoutMs?: number, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData); + const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { @@ -1401,7 +1634,7 @@ export class AbiGenDummyContract extends BaseContract { */ async estimateGasAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1418,8 +1651,8 @@ export class AbiGenDummyContract extends BaseContract { return gas; }, async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).nonPureMethod.callAsync(txData); - const txHash = await (this as any).nonPureMethod.sendTransactionAsync(txData); + await (this as any).nonPureMethodThatReturnsNothing.callAsync(txData); + const txHash = await (this as any).nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); return txHash; }, /** @@ -1427,7 +1660,7 @@ export class AbiGenDummyContract extends BaseContract { * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1437,7 +1670,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1457,9 +1690,9 @@ export class AbiGenDummyContract extends BaseContract { throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1471,7 +1704,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethod()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); return abiEncodedTransactionData; }, /** @@ -1481,7 +1714,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1491,33 +1724,22 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when the input and output are complex. - */ - public complexInputComplexOutput = { + public overloadedMethod2 = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - complexInput: { foo: BigNumber; bar: string; car: string }, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }> { + async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isString('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1527,9 +1749,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('complexInputComplexOutput((uint256,bytes,string))', [ - complexInput, - ]); + const encodedData = self._strictEncodeArguments('overloadedMethod(string)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1541,14 +1761,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1558,12 +1773,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(complexInput: { foo: BigNumber; bar: string; car: string }): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'complexInputComplexOutput((uint256,bytes,string))', - [complexInput], - ); + getABIEncodedTransactionData(a: string): string { + assert.isString('a', a); + const self = (this as any) as AbiGenDummyContract; + const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(string)', [a]); return abiEncodedTransactionData; }, /** @@ -1571,11 +1784,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): { foo: BigNumber; bar: string; car: string } { + getABIDecodedTransactionData(callData: string): [string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ foo: BigNumber; bar: string; car: string }>(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); return abiDecodedCallData; }, /** @@ -1583,31 +1796,22 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when both input and output are empty. - */ - public noInputNoOutput = { + public overloadedMethod1 = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(a: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isBigNumber('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1617,7 +1821,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('noInputNoOutput()', []); + const encodedData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1629,7 +1833,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1641,9 +1845,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(a: BigNumber): string { + assert.isBigNumber('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('noInputNoOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); return abiEncodedTransactionData; }, /** @@ -1651,11 +1856,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [BigNumber] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); return abiDecodedCallData; }, /** @@ -1665,20 +1870,19 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public simplePureFunctionWithInput = { + public pureFunctionWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(x: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isBigNumber('x', x); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1688,7 +1892,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); + const encodedData = self._strictEncodeArguments('pureFunctionWithConstant()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1700,7 +1904,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1712,10 +1916,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(x: BigNumber): string { - assert.isBigNumber('x', x); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); + const abiEncodedTransactionData = self._strictEncodeArguments('pureFunctionWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -1723,11 +1926,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): BigNumber { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1737,91 +1940,13 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nonPureMethodThatReturnsNothing = { - /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - /** - * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. - * If the transaction was mined, but reverted, an error is thrown. - * @param txData Additional data for transaction - * @param pollingIntervalMs Interval at which to poll for success - * @returns A promise that resolves when the transaction is successful - */ - awaitTransactionSuccessAsync( - txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, - ): PromiseWithTransactionHash { - const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); - return new PromiseWithTransactionHash( - txHashPromise, - (async (): Promise => { - // When the transaction hash resolves, wait for it to be mined. - return self._web3Wrapper.awaitTransactionSuccessAsync( - await txHashPromise, - pollingIntervalMs, - timeoutMs, - ); - })(), - ); - }, - /** - * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async estimateGasAsync(txData?: Partial | undefined): Promise { - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).nonPureMethodThatReturnsNothing.callAsync(txData); - const txHash = await (this as any).nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); - return txHash; - }, + public requireWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1837,27 +1962,19 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; + const encodedData = self._strictEncodeArguments('requireWithConstant()', []); + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); + let rawCallResult; try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + rawCallResult = await self.evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1871,7 +1988,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('requireWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -1881,7 +1998,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1893,19 +2010,19 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public simplePureFunction = { + public revertWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1915,7 +2032,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simplePureFunction()', []); + const encodedData = self._strictEncodeArguments('revertWithConstant()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1927,9 +2044,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1941,7 +2058,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunction()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('revertWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -1951,7 +2068,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1961,33 +2078,29 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nestedStructInput = { + /** + * Tests decoding when input is not empty but output is empty. + */ + public simpleInputNoOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( - n: { - innerStruct: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - }, + index_0: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam, ): Promise { + assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1997,10 +2110,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'nestedStructInput(((bytes,uint32,bytes[],string),string))', - [n], - ); + const encodedData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2012,7 +2122,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -2024,20 +2134,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(n: { - innerStruct: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - }): string { + getABIEncodedTransactionData(index_0: BigNumber): string { + assert.isBigNumber('index_0', index_0); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'nestedStructInput(((bytes,uint32,bytes[],string),string))', - [n], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); return abiEncodedTransactionData; }, /** @@ -2045,30 +2145,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData( - callData: string, - ): [ - { - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - } - ] { + getABIDecodedTransactionData(callData: string): [BigNumber] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - { - innerStruct: { - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - } - ] - >(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); return abiDecodedCallData; }, /** @@ -2078,19 +2159,27 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public methodReturningMultipleValues = { + /** + * Tests decoding when both input and output are non-empty. + */ + public simpleInputSimpleOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise<[BigNumber, string]> { + async callAsync( + index_0: BigNumber, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2100,7 +2189,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('methodReturningMultipleValues()', []); + const encodedData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [index_0]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2112,9 +2201,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2124,9 +2213,12 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(index_0: BigNumber): string { + assert.isBigNumber('index_0', index_0); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningMultipleValues()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [ + index_0, + ]); return abiEncodedTransactionData; }, /** @@ -2134,11 +2226,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2146,24 +2238,21 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): [BigNumber, string] { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public methodReturningArrayOfStructs = { + public simplePureFunction = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise> { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2173,7 +2262,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); + const encodedData = self._strictEncodeArguments('simplePureFunction()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2185,11 +2274,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue< - Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> - >(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2201,7 +2288,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunction()', []); return abiEncodedTransactionData; }, /** @@ -2211,7 +2298,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2221,103 +2308,22 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> - >(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public emitSimpleEvent = { - /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - /** - * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. - * If the transaction was mined, but reverted, an error is thrown. - * @param txData Additional data for transaction - * @param pollingIntervalMs Interval at which to poll for success - * @returns A promise that resolves when the transaction is successful - */ - awaitTransactionSuccessAsync( - txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, - ): PromiseWithTransactionHash { - const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData); - return new PromiseWithTransactionHash( - txHashPromise, - (async (): Promise => { - // When the transaction hash resolves, wait for it to be mined. - return self._web3Wrapper.awaitTransactionSuccessAsync( - await txHashPromise, - pollingIntervalMs, - timeoutMs, - ); - })(), - ); - }, - /** - * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async estimateGasAsync(txData?: Partial | undefined): Promise { - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).emitSimpleEvent.callAsync(txData); - const txHash = await (this as any).emitSimpleEvent.sendTransactionAsync(txData); - return txHash; - }, + public simplePureFunctionWithInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(x: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isBigNumber('x', x); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2327,29 +2333,21 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; + const encodedData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); + let rawCallResult; try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + rawCallResult = await self.evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2359,9 +2357,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(x: BigNumber): string { + assert.isBigNumber('x', x); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('emitSimpleEvent()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); return abiEncodedTransactionData; }, /** @@ -2369,11 +2368,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2381,28 +2380,21 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * a method that returns a struct - */ - public structOutput = { + public simpleRequire = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. - * @returns a Struct struct */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2412,7 +2404,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('structOutput()', []); + const encodedData = self._strictEncodeArguments('simpleRequire()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2424,14 +2416,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2443,7 +2430,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('structOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleRequire()', []); return abiEncodedTransactionData; }, /** @@ -2453,7 +2440,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2463,28 +2450,21 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public pureFunctionWithConstant = { + public simpleRevert = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2494,7 +2474,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('pureFunctionWithConstant()', []); + const encodedData = self._strictEncodeArguments('simpleRevert()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2506,9 +2486,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2520,7 +2500,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('pureFunctionWithConstant()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleRevert()', []); return abiEncodedTransactionData; }, /** @@ -2530,7 +2510,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2540,18 +2520,15 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when input is not empty but output is empty. - */ - public simpleInputNoOutput = { + public someMapping = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2561,7 +2538,7 @@ export class AbiGenDummyContract extends BaseContract { index_0: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise { + ): Promise { assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, @@ -2572,7 +2549,90 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); + const encodedData = self._strictEncodeArguments('someMapping(uint256)', [index_0]); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; + let rawCallResult; + try { + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + } catch (err) { + BaseContract._throwIfThrownErrorIsRevertError(err); + throw err; + } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); + const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; + }, + /** + * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before + * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used + * to create a 0x transaction (see protocol spec for more details). + * @returns The ABI encoded transaction data as a string + */ + getABIEncodedTransactionData(index_0: BigNumber): string { + assert.isBigNumber('index_0', index_0); + const self = (this as any) as AbiGenDummyContract; + const abiEncodedTransactionData = self._strictEncodeArguments('someMapping(uint256)', [index_0]); + return abiEncodedTransactionData; + }, + /** + * Decode the ABI-encoded transaction data into its input arguments + * @param callData The ABI-encoded transaction data + * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. + */ + getABIDecodedTransactionData(callData: string): BigNumber { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); + // tslint:disable boolean-naming + const abiDecodedCallData = abiEncoder.strictDecode(callData); + return abiDecodedCallData; + }, + /** + * Decode the ABI-encoded return data from a transaction + * @param returnData the data returned after transaction execution + * @returns An array representing the output results in order. Keynames of nested structs are preserved. + */ + getABIDecodedReturnData(returnData: string): BigNumber { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); + // tslint:disable boolean-naming + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + return abiDecodedReturnData; + }, + }; + public structInput = { + /** + * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an + * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas + * since they don't modify state. + */ + async callAsync( + s: { someBytes: string; anInteger: number | BigNumber; aDynamicArrayOfBytes: string[]; aString: string }, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (defaultBlock !== undefined) { + assert.isBlockParam('defaultBlock', defaultBlock); + } + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('structInput((bytes,uint32,bytes[],string))', [s]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2584,7 +2644,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -2596,10 +2656,17 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); + getABIEncodedTransactionData(s: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'structInput((bytes,uint32,bytes[],string))', + [s], + ); return abiEncodedTransactionData; }, /** @@ -2607,11 +2674,15 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber] { + getABIDecodedTransactionData( + callData: string, + ): [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode< + [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] + >(callData); return abiDecodedCallData; }, /** @@ -2621,20 +2692,26 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public overloadedMethod2 = { + /** + * a method that returns a struct + */ + public structOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. + * @returns a Struct struct */ - async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isString('a', a); + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2644,7 +2721,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('overloadedMethod(string)', [a]); + const encodedData = self._strictEncodeArguments('structOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2656,9 +2733,14 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2668,10 +2750,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string): string { - assert.isString('a', a); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(string)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments('structOutput()', []); return abiEncodedTransactionData; }, /** @@ -2679,11 +2760,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2691,22 +2772,41 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData( + returnData: string, + ): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }>(returnData); return abiDecodedReturnData; }, }; - public overloadedMethod1 = { + public withAddressInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(a: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + x: string, + a: BigNumber, + b: BigNumber, + y: string, + c: BigNumber, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isString('x', x); assert.isBigNumber('a', a); + assert.isBigNumber('b', b); + assert.isString('y', y); + assert.isBigNumber('c', c); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2716,7 +2816,10 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); + const encodedData = self._strictEncodeArguments( + 'withAddressInput(address,uint256,uint256,address,uint256)', + [x.toLowerCase(), a, b, y.toLowerCase(), c], + ); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2728,9 +2831,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2740,10 +2843,17 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: BigNumber): string { + getABIEncodedTransactionData(x: string, a: BigNumber, b: BigNumber, y: string, c: BigNumber): string { + assert.isString('x', x); assert.isBigNumber('a', a); + assert.isBigNumber('b', b); + assert.isString('y', y); + assert.isBigNumber('c', c); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'withAddressInput(address,uint256,uint256,address,uint256)', + [x.toLowerCase(), a, b, y.toLowerCase(), c], + ); return abiEncodedTransactionData; }, /** @@ -2751,11 +2861,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber] { + getABIDecodedTransactionData(callData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2763,41 +2873,203 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - private readonly _subscriptionManager: SubscriptionManager; - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - supportedProvider: SupportedProvider, - txDefaults: Partial, - logDecodeDependencies: { [contractName: string]: ContractArtifact | SimpleContractArtifact }, - ): Promise { - assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (artifact.compilerOutput === undefined) { - throw new Error('Compiler output not found in the artifact file'); - } - const provider = providerUtils.standardizeOrThrow(supportedProvider); - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - const logDecodeDependenciesAbiOnly: { [contractName: string]: ContractAbi } = {}; - if (Object.keys(logDecodeDependencies) !== undefined) { - for (const key of Object.keys(logDecodeDependencies)) { - logDecodeDependenciesAbiOnly[key] = logDecodeDependencies[key].compilerOutput.abi; + public withdraw = { + /** + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async sendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + assert.isBigNumber('wad', wad); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - } - return AbiGenDummyContract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly); - } - public static async deployAsync( + + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + /** + * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. + * If the transaction was mined, but reverted, an error is thrown. + * @param txData Additional data for transaction + * @param pollingIntervalMs Interval at which to poll for success + * @returns A promise that resolves when the transaction is successful + */ + awaitTransactionSuccessAsync( + wad: BigNumber, + txData?: Partial, + pollingIntervalMs?: number, + timeoutMs?: number, + ): PromiseWithTransactionHash { + assert.isBigNumber('wad', wad); + const self = (this as any) as AbiGenDummyContract; + const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData); + return new PromiseWithTransactionHash( + txHashPromise, + (async (): Promise => { + // When the transaction hash resolves, wait for it to be mined. + return self._web3Wrapper.awaitTransactionSuccessAsync( + await txHashPromise, + pollingIntervalMs, + timeoutMs, + ); + })(), + ); + }, + /** + * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async estimateGasAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + assert.isBigNumber('wad', wad); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, + async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + await (this as any).withdraw.callAsync(wad, txData); + const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData); + return txHash; + }, + /** + * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an + * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas + * since they don't modify state. + */ + async callAsync(wad: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isBigNumber('wad', wad); + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (defaultBlock !== undefined) { + assert.isBlockParam('defaultBlock', defaultBlock); + } + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; + let rawCallResult; + try { + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + } catch (err) { + BaseContract._throwIfThrownErrorIsRevertError(err); + throw err; + } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; + }, + /** + * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before + * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used + * to create a 0x transaction (see protocol spec for more details). + * @returns The ABI encoded transaction data as a string + */ + getABIEncodedTransactionData(wad: BigNumber): string { + assert.isBigNumber('wad', wad); + const self = (this as any) as AbiGenDummyContract; + const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + return abiEncodedTransactionData; + }, + /** + * Decode the ABI-encoded transaction data into its input arguments + * @param callData The ABI-encoded transaction data + * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. + */ + getABIDecodedTransactionData(callData: string): [BigNumber] { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + // tslint:disable boolean-naming + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + return abiDecodedCallData; + }, + /** + * Decode the ABI-encoded return data from a transaction + * @param returnData the data returned after transaction execution + * @returns An array representing the output results in order. Keynames of nested structs are preserved. + */ + getABIDecodedReturnData(returnData: string): void { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + // tslint:disable boolean-naming + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + return abiDecodedReturnData; + }, + }; + private readonly _subscriptionManager: SubscriptionManager; + public static async deployFrom0xArtifactAsync( + artifact: ContractArtifact | SimpleContractArtifact, + supportedProvider: SupportedProvider, + txDefaults: Partial, + logDecodeDependencies: { [contractName: string]: ContractArtifact | SimpleContractArtifact }, + ): Promise { + assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (artifact.compilerOutput === undefined) { + throw new Error('Compiler output not found in the artifact file'); + } + const provider = providerUtils.standardizeOrThrow(supportedProvider); + const bytecode = artifact.compilerOutput.evm.bytecode.object; + const abi = artifact.compilerOutput.abi; + const logDecodeDependenciesAbiOnly: { [contractName: string]: ContractAbi } = {}; + if (Object.keys(logDecodeDependencies) !== undefined) { + for (const key of Object.keys(logDecodeDependencies)) { + logDecodeDependenciesAbiOnly[key] = logDecodeDependencies[key].compilerOutput.abi; + } + } + return AbiGenDummyContract.deployAsync(bytecode, abi, provider, txDefaults, logDecodeDependenciesAbiOnly); + } + public static async deployAsync( bytecode: string, abi: ContractAbi, supportedProvider: SupportedProvider, @@ -2842,90 +3114,128 @@ export class AbiGenDummyContract extends BaseContract { public static ABI(): ContractAbi { const abi = [ { - constant: true, - inputs: [], - name: 'simpleRequire', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, + anonymous: false, inputs: [ { - name: 'a', - type: 'bytes[]', + name: 'someBytes', + type: 'bytes', + indexed: false, + }, + { + name: 'someString', + type: 'string', + indexed: false, }, ], - name: 'acceptsAnArrayOfBytes', + name: 'SimpleEvent', outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', + type: 'event', }, { - constant: true, + anonymous: false, inputs: [ { - name: 'index_0', + name: '_owner', + type: 'address', + indexed: true, + }, + { + name: '_value', type: 'uint256', + indexed: false, }, ], - name: 'simpleInputSimpleOutput', - outputs: [ + name: 'Withdrawal', + outputs: [], + type: 'event', + }, + { + constant: true, + inputs: [ { - name: '', - type: 'uint256', + name: 'a', + type: 'bytes[]', }, ], + name: 'acceptsAnArrayOfBytes', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - constant: false, + constant: true, inputs: [ { - name: 'wad', - type: 'uint256', + name: 'a', + type: 'bytes', }, ], - name: 'withdraw', + name: 'acceptsBytes', outputs: [], payable: false, - stateMutability: 'nonpayable', + stateMutability: 'pure', type: 'function', }, { constant: true, inputs: [ { - name: 'index_0', - type: 'uint256', - }, - { - name: 'index_1', - type: 'bytes', - }, - { - name: 'index_2', - type: 'string', + name: 'complexInput', + type: 'tuple', + components: [ + { + name: 'foo', + type: 'uint256', + }, + { + name: 'bar', + type: 'bytes', + }, + { + name: 'car', + type: 'string', + }, + ], }, ], - name: 'multiInputMultiOutput', + name: 'complexInputComplexOutput', outputs: [ { name: '', - type: 'bytes', - }, - { - name: '', - type: 'bytes', - }, - { - name: '', - type: 'string', + type: 'tuple', + components: [ + { + name: 'input', + type: 'tuple', + components: [ + { + name: 'foo', + type: 'uint256', + }, + { + name: 'bar', + type: 'bytes', + }, + { + name: 'car', + type: 'string', + }, + ], + }, + { + name: 'lorem', + type: 'bytes', + }, + { + name: 'ipsum', + type: 'bytes', + }, + { + name: 'dolor', + type: 'string', + }, + ], }, ], payable: false, @@ -2963,16 +3273,43 @@ export class AbiGenDummyContract extends BaseContract { stateMutability: 'pure', type: 'function', }, + { + constant: false, + inputs: [], + name: 'emitSimpleEvent', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, { constant: true, - inputs: [ + inputs: [], + name: 'methodReturningArrayOfStructs', + outputs: [ { - name: 'a', - type: 'bytes', + name: '', + type: 'tuple[]', + components: [ + { + name: 'someBytes', + type: 'bytes', + }, + { + name: 'anInteger', + type: 'uint32', + }, + { + name: 'aDynamicArrayOfBytes', + type: 'bytes[]', + }, + { + name: 'aString', + type: 'string', + }, + ], }, ], - name: 'acceptsBytes', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -2980,12 +3317,16 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'noInputSimpleOutput', + name: 'methodReturningMultipleValues', outputs: [ { name: '', type: 'uint256', }, + { + name: '', + type: 'string', + }, ], payable: false, stateMutability: 'pure', @@ -2994,28 +3335,69 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'revertWithConstant', - outputs: [], + name: 'methodUsingNestedStructWithInnerStructNotUsedElsewhere', + outputs: [ + { + name: '', + type: 'tuple', + components: [ + { + name: 'innerStruct', + type: 'tuple', + components: [ + { + name: 'aField', + type: 'uint256', + }, + ], + }, + ], + }, + ], payable: false, stateMutability: 'pure', type: 'function', }, { constant: true, - inputs: [], - name: 'simpleRevert', - outputs: [], + inputs: [ + { + name: 'index_0', + type: 'uint256', + }, + { + name: 'index_1', + type: 'bytes', + }, + { + name: 'index_2', + type: 'string', + }, + ], + name: 'multiInputMultiOutput', + outputs: [ + { + name: '', + type: 'bytes', + }, + { + name: '', + type: 'bytes', + }, + { + name: '', + type: 'string', + }, + ], payable: false, stateMutability: 'pure', type: 'function', }, { constant: true, - inputs: [], - name: 'methodUsingNestedStructWithInnerStructNotUsedElsewhere', - outputs: [ + inputs: [ { - name: '', + name: 'n', type: 'tuple', components: [ { @@ -3023,14 +3405,32 @@ export class AbiGenDummyContract extends BaseContract { type: 'tuple', components: [ { - name: 'aField', - type: 'uint256', + name: 'someBytes', + type: 'bytes', + }, + { + name: 'anInteger', + type: 'uint32', + }, + { + name: 'aDynamicArrayOfBytes', + type: 'bytes[]', + }, + { + name: 'aString', + type: 'string', }, ], }, + { + name: 'description', + type: 'string', + }, ], }, ], + name: 'nestedStructInput', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3080,7 +3480,7 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'requireWithConstant', + name: 'noInputNoOutput', outputs: [], payable: false, stateMutability: 'pure', @@ -3088,35 +3488,74 @@ export class AbiGenDummyContract extends BaseContract { }, { constant: true, - inputs: [ + inputs: [], + name: 'noInputSimpleOutput', + outputs: [ { - name: 'x', - type: 'address', + name: '', + type: 'uint256', }, + ], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: false, + inputs: [ { - name: 'a', + name: 'id', type: 'uint256', }, { - name: 'b', + name: 'someValue', type: 'uint256', }, + ], + name: 'nonPureFunction', + outputs: [ { - name: 'y', - type: 'address', + name: 'result', + type: 'uint256', }, + ], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [], + name: 'nonPureMethod', + outputs: [ { - name: 'c', + name: '', type: 'uint256', }, ], - name: 'withAddressInput', - outputs: [ + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: false, + inputs: [], + name: 'nonPureMethodThatReturnsNothing', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: 'z', - type: 'address', + name: 'a', + type: 'string', }, ], + name: 'overloadedMethod', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3125,107 +3564,75 @@ export class AbiGenDummyContract extends BaseContract { constant: true, inputs: [ { - name: 's', - type: 'tuple', - components: [ - { - name: 'someBytes', - type: 'bytes', - }, - { - name: 'anInteger', - type: 'uint32', - }, - { - name: 'aDynamicArrayOfBytes', - type: 'bytes[]', - }, - { - name: 'aString', - type: 'string', - }, - ], + name: 'a', + type: 'int256', }, ], - name: 'structInput', + name: 'overloadedMethod', + outputs: [], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'pureFunctionWithConstant', + outputs: [ + { + name: 'someConstant', + type: 'uint256', + }, + ], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'requireWithConstant', outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - constant: false, + constant: true, inputs: [], - name: 'nonPureMethod', - outputs: [ + name: 'revertWithConstant', + outputs: [], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: '', + name: 'index_0', type: 'uint256', }, ], + name: 'simpleInputNoOutput', + outputs: [], payable: false, - stateMutability: 'nonpayable', + stateMutability: 'pure', type: 'function', }, { constant: true, inputs: [ { - name: 'complexInput', - type: 'tuple', - components: [ - { - name: 'foo', - type: 'uint256', - }, - { - name: 'bar', - type: 'bytes', - }, - { - name: 'car', - type: 'string', - }, - ], + name: 'index_0', + type: 'uint256', }, ], - name: 'complexInputComplexOutput', + name: 'simpleInputSimpleOutput', outputs: [ { name: '', - type: 'tuple', - components: [ - { - name: 'input', - type: 'tuple', - components: [ - { - name: 'foo', - type: 'uint256', - }, - { - name: 'bar', - type: 'bytes', - }, - { - name: 'car', - type: 'string', - }, - ], - }, - { - name: 'lorem', - type: 'bytes', - }, - { - name: 'ipsum', - type: 'bytes', - }, - { - name: 'dolor', - type: 'string', - }, - ], + type: 'uint256', }, ], payable: false, @@ -3235,8 +3642,13 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'noInputNoOutput', - outputs: [], + name: 'simplePureFunction', + outputs: [ + { + name: 'result', + type: 'uint256', + }, + ], payable: false, stateMutability: 'pure', type: 'function', @@ -3261,24 +3673,19 @@ export class AbiGenDummyContract extends BaseContract { type: 'function', }, { - constant: false, + constant: true, inputs: [], - name: 'nonPureMethodThatReturnsNothing', + name: 'simpleRequire', outputs: [], payable: false, - stateMutability: 'nonpayable', + stateMutability: 'pure', type: 'function', }, { constant: true, inputs: [], - name: 'simplePureFunction', - outputs: [ - { - name: 'result', - type: 'uint256', - }, - ], + name: 'simpleRevert', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3287,70 +3694,27 @@ export class AbiGenDummyContract extends BaseContract { constant: true, inputs: [ { - name: 'n', - type: 'tuple', - components: [ - { - name: 'innerStruct', - type: 'tuple', - components: [ - { - name: 'someBytes', - type: 'bytes', - }, - { - name: 'anInteger', - type: 'uint32', - }, - { - name: 'aDynamicArrayOfBytes', - type: 'bytes[]', - }, - { - name: 'aString', - type: 'string', - }, - ], - }, - { - name: 'description', - type: 'string', - }, - ], + name: 'index_0', + type: 'uint256', }, ], - name: 'nestedStructInput', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'methodReturningMultipleValues', + name: 'someMapping', outputs: [ { name: '', type: 'uint256', }, - { - name: '', - type: 'string', - }, ], payable: false, - stateMutability: 'pure', + stateMutability: 'view', type: 'function', }, { constant: true, - inputs: [], - name: 'methodReturningArrayOfStructs', - outputs: [ + inputs: [ { - name: '', - type: 'tuple[]', + name: 's', + type: 'tuple', components: [ { name: 'someBytes', @@ -3371,17 +3735,10 @@ export class AbiGenDummyContract extends BaseContract { ], }, ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'emitSimpleEvent', + name: 'structInput', outputs: [], payable: false, - stateMutability: 'nonpayable', + stateMutability: 'pure', type: 'function', }, { @@ -3418,95 +3775,52 @@ export class AbiGenDummyContract extends BaseContract { }, { constant: true, - inputs: [], - name: 'pureFunctionWithConstant', - outputs: [ + inputs: [ { - name: 'someConstant', + name: 'x', + type: 'address', + }, + { + name: 'a', type: 'uint256', }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ { - name: 'index_0', + name: 'b', type: 'uint256', }, - ], - name: 'simpleInputNoOutput', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ { - name: 'a', - type: 'string', + name: 'y', + type: 'address', + }, + { + name: 'c', + type: 'uint256', }, ], - name: 'overloadedMethod', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ + name: 'withAddressInput', + outputs: [ { - name: 'a', - type: 'int256', + name: 'z', + type: 'address', }, ], - name: 'overloadedMethod', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - anonymous: false, + constant: false, inputs: [ { - name: '_owner', - type: 'address', - indexed: true, - }, - { - name: '_value', + name: 'wad', type: 'uint256', - indexed: false, - }, - ], - name: 'Withdrawal', - outputs: [], - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - name: 'someBytes', - type: 'bytes', - indexed: false, - }, - { - name: 'someString', - type: 'string', - indexed: false, }, ], - name: 'SimpleEvent', + name: 'withdraw', outputs: [], - type: 'event', + payable: false, + stateMutability: 'nonpayable', + type: 'function', }, ] as ContractAbi; return abi; diff --git a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts index 2d71295e25..8c81fb2d3e 100644 --- a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts @@ -29,7 +29,7 @@ import * as ethers from 'ethers'; // tslint:disable-next-line:class-name export class LibDummyContract extends BaseContract { public static deployedBytecode = - '0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b14322cd05aa1dcae66812e472d3ab85cced78118ea7f9a5098d073b2accc45964736f6c634300050a0032'; + '0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032'; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, supportedProvider: SupportedProvider, diff --git a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts index 275781c69c..613f23638c 100644 --- a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts @@ -29,7 +29,7 @@ import * as ethers from 'ethers'; // tslint:disable-next-line:class-name export class TestLibDummyContract extends BaseContract { public static deployedBytecode = - '0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032'; + '0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032'; public publicAddConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an From 7aa4b4e18cc921287e08e367f0f6375d6ea277fc Mon Sep 17 00:00:00 2001 From: xianny Date: Fri, 4 Oct 2019 11:45:18 -0700 Subject: [PATCH 2/8] make evmExecAsync protected; ignore deployedBytecode in doc comment --- .../generated-wrappers/asset_proxy_owner.ts | 3 + .../src/generated-wrappers/coordinator.ts | 7 ++- .../coordinator_registry.ts | 3 + .../src/generated-wrappers/dev_utils.ts | 51 +++++++++-------- .../generated-wrappers/dummy_erc20_token.ts | 3 + .../generated-wrappers/dummy_erc721_token.ts | 3 + .../src/generated-wrappers/dutch_auction.ts | 3 + .../src/generated-wrappers/erc1155_proxy.ts | 5 +- .../src/generated-wrappers/erc20_proxy.ts | 5 +- .../src/generated-wrappers/erc20_token.ts | 3 + .../src/generated-wrappers/erc721_proxy.ts | 5 +- .../src/generated-wrappers/erc721_token.ts | 3 + .../generated-wrappers/eth_balance_checker.ts | 3 + .../src/generated-wrappers/exchange.ts | 3 + .../src/generated-wrappers/forwarder.ts | 3 + .../src/generated-wrappers/i_asset_proxy.ts | 5 +- .../src/generated-wrappers/i_validator.ts | 3 + .../src/generated-wrappers/i_wallet.ts | 3 + .../generated-wrappers/multi_asset_proxy.ts | 5 +- .../src/generated-wrappers/order_validator.ts | 3 + .../generated-wrappers/static_call_proxy.ts | 5 +- .../src/generated-wrappers/weth9.ts | 3 + .../src/generated-wrappers/zrx_token.ts | 3 + .../templates/TypeScript/contract.handlebars | 3 + .../partials/method_call_pure.handlebars | 2 +- .../output/typescript/abi_gen_dummy.ts | 55 ++++++++++--------- .../test-cli/output/typescript/lib_dummy.ts | 3 + .../output/typescript/test_lib_dummy.ts | 7 ++- packages/base-contract/src/index.ts | 2 +- 29 files changed, 143 insertions(+), 62 deletions(-) diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index 61f7d6b72a..067e16a051 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -113,6 +113,9 @@ export interface AssetProxyOwnerTimeLockChangeEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class AssetProxyOwnerContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x6080604052600436106101a15760003560e01c80639ace38c2116100e1578063c01a8c841161008a578063d74f8edd11610064578063d74f8edd146104ff578063dc8452cd14610514578063e20056e614610529578063ee22610b14610549576101a1565b8063c01a8c841461049f578063c6427474146104bf578063d38f2d82146104df576101a1565b8063b5dc40c3116100bb578063b5dc40c31461044a578063b77bf6001461046a578063ba51a6df1461047f576101a1565b80639ace38c2146103cb578063a0e67e2b146103fb578063a8abe69a1461041d576101a1565b8063547415251161014e578063784547a711610128578063784547a71461033d5780637ad28c511461035d5780637f05c8b61461037d5780638b51d13f146103ab576101a1565b806354741525146102dd5780637065cb48146102fd578063751ad5601461031d576101a1565b80632f54bf6e1161017f5780632f54bf6e1461026e5780633411c81c1461029b57806337bd78a0146102bb576101a1565b8063025e7c27146101f8578063173825d91461022e57806320ea8d861461024e575b34156101f6573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040516101ed9190612b44565b60405180910390a25b005b34801561020457600080fd5b50610218610213366004612580565b610569565b6040516102259190612616565b60405180910390f35b34801561023a57600080fd5b506101f6610249366004612303565b61059d565b34801561025a57600080fd5b506101f6610269366004612580565b61084c565b34801561027a57600080fd5b5061028e610289366004612303565b6109a7565b6040516102259190612745565b3480156102a757600080fd5b5061028e6102b6366004612598565b6109bc565b3480156102c757600080fd5b506102d06109dc565b6040516102259190612b44565b3480156102e957600080fd5b506102d06102f83660046124c0565b6109e2565b34801561030957600080fd5b506101f6610318366004612303565b610a4e565b34801561032957600080fd5b506101f66103383660046124f4565b610c73565b34801561034957600080fd5b5061028e610358366004612580565b610cbe565b34801561036957600080fd5b506101f6610378366004612580565b610d52565b34801561038957600080fd5b5061039d610398366004612563565b610dcb565b604051610225929190612750565b3480156103b757600080fd5b506102d06103c6366004612580565b610e04565b3480156103d757600080fd5b506103eb6103e6366004612580565b610e80565b6040516102259493929190612637565b34801561040757600080fd5b50610410610f69565b60405161022591906126b4565b34801561042957600080fd5b5061043d6104383660046125bc565b610fd9565b604051610225919061270d565b34801561045657600080fd5b50610410610465366004612580565b611104565b34801561047657600080fd5b506102d06112bc565b34801561048b57600080fd5b506101f661049a366004612580565b6112c2565b3480156104ab57600080fd5b506101f66104ba366004612580565b61139e565b3480156104cb57600080fd5b506102d06104da366004612357565b611568565b3480156104eb57600080fd5b506102d06104fa366004612580565b611587565b34801561050b57600080fd5b506102d0611599565b34801561052057600080fd5b506102d061159e565b34801561053557600080fd5b506101f661054436600461231f565b6115a4565b34801561055557600080fd5b506101f6610564366004612580565b61182e565b6003818154811061057657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3330146105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff16610640576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018110156107bc578273ffffffffffffffffffffffffffffffffffffffff16600382815481106106dc57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156107b457600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061073457fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918390811061076757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107bc565b60010161068c565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906107ee9082612100565b50600354600454111561080757600354610807906112c2565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff16610895576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b60008281526001602090815260408083203380855292529091205483919060ff166108ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612955565b600084815260208190526040902060030154849060ff161561093a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612ad6565b600085815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b600554811015610a4757838015610a0f575060008181526020819052604090206003015460ff16155b80610a335750828015610a33575060008181526020819052604090206003015460ff165b15610a3f576001820191505b6001016109e6565b5092915050565b333014610a87576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610ae9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612879565b8173ffffffffffffffffffffffffffffffffffffffff8116610b37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061280b565b60038054905060010160045460328211158015610b545750818111155b8015610b5f57508015155b8015610b6a57508115155b610ba0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612b0d565b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b333014610cac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b610cb884848484611b79565b50505050565b600080805b600354811015610d4a5760008481526001602052604081206003805491929184908110610cec57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610d2d576001820191505b600454821415610d4257600192505050610d4d565b600101610cc3565b50505b919050565b333014610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60068190556040517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b437790610dc0908390612b44565b60405180910390a150565b600860209081526000928352604080842090915290825290205460ff81169061010090046fffffffffffffffffffffffffffffffff1682565b6000805b600354811015610e7a5760008381526001602052604081206003805491929184908110610e3157fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610e72576001820191505b600101610e08565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff90931695909491929190830182828015610f565780601f10610f2b57610100808354040283529160200191610f56565b820191906000526020600020905b815481529060010190602001808311610f3957829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610fce57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610fa3575b505050505090505b90565b606080600554604051908082528060200260200182016040528015611008578160200160208202803883390190505b5090506000805b60055481101561108957858015611038575060008181526020819052604090206003015460ff16155b8061105c575084801561105c575060008181526020819052604090206003015460ff165b15611081578083838151811061106e57fe5b6020026020010181815250506001820191505b60010161100f565b8787036040519080825280602002602001820160405280156110b5578160200160208202803883390190505b5093508790505b868110156110f9578281815181106110d057fe5b602002602001015184898303815181106110e657fe5b60209081029190910101526001016110bc565b505050949350505050565b606080600380549050604051908082528060200260200182016040528015611136578160200160208202803883390190505b5090506000805b60035481101561122d576000858152600160205260408120600380549192918490811061116657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561122557600381815481106111ad57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383815181106111e457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b60010161113d565b81604051908082528060200260200182016040528015611257578160200160208202803883390190505b509350600090505b818110156112b45782818151811061127357fe5b602002602001015184828151811061128757fe5b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260010161125f565b505050919050565b60055481565b3330146112fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60035481603282118015906113105750818111155b801561131b57508015155b801561132657508115155b61135c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612b0d565b60048390556040517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a90611391908590612b44565b60405180910390a1505050565b3360008181526002602052604090205460ff166113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff16611444576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061291e565b60008381526001602090815260408083203380855292529091205484919060ff161561149c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906128b0565b846114a681610cbe565b156114dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a9f565b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a361155186610cbe565b15611560576115608642611cb1565b505050505050565b6000611575848484611d00565b90506115808161139e565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b3330146115dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff1661163e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16156116a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612879565b60005b60035481101561175c578473ffffffffffffffffffffffffffffffffffffffff16600382815481106116d157fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561175457836003828154811061170757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061175c565b6001016116a3565b5073ffffffffffffffffffffffffffffffffffffffff80851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b600081815260208190526040902060030154819060ff161561187c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612ad6565b8161188681610cbe565b6118bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906128e7565b6000838152602081815260409182902060038101805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116811790915560028083018054865161010094821615949094027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f81018590048502830185019095528482529193606093849384939290918301828280156119a85780601f1061197d576101008083540402835291602001916119a8565b820191906000526020600020905b81548152906001019060200180831161198b57829003601f168201915b50505050508060200190516119c091908101906123ec565b9250925092506000835190508251811480156119dc5750815181145b611a12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061298c565b600088815260076020526040812054905b828114611b4257611a5b82878381518110611a3a57fe5b6020026020010151878481518110611a4e57fe5b6020026020010151611e5e565b6000858281518110611a6957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16858381518110611a9357fe5b6020026020010151888481518110611aa757fe5b6020026020010151604051611abc91906125fa565b60006040518083038185875af1925050503d8060008114611af9576040519150601f19603f3d011682016040523d82523d6000602084013e611afe565b606091505b5050905080611b39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129c3565b50600101611a23565b5060405189907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2505050505050505050565b600084611b87576000611b89565b815b9050611b93612129565b5060408051808201825286151581526fffffffffffffffffffffffffffffffff80841660208084019182527fffffffff00000000000000000000000000000000000000000000000000000000891660009081526008825285812073ffffffffffffffffffffffffffffffffffffffff8a168252909152849020835181549251909316610100027fffffffffffffffffffffffffffffff00000000000000000000000000000000ff9315157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909316929092179290921617905590517f694405724de467488eda192d814f39ffe7f6503fe0b1eefd4ea332f9c611c5ec90611ca190879087908a908790612772565b60405180910390a1505050505050565b600082815260076020526040908190208290555182907f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d90611cf4908490612b44565b60405180910390a25050565b60008373ffffffffffffffffffffffffffffffffffffffff8116611d50576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061280b565b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff00000000000000000000000000000000000000001694169390931783555160018301559251805194965091939092611de8926002850192910190612140565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000611e70838263ffffffff611fbd16565b9050611e7a612129565b507fffffffff000000000000000000000000000000000000000000000000000000008116600090815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845282529182902082518084019093525460ff811615801584526101009091046fffffffffffffffffffffffffffffffff1691830191909152611f69576020810151611f2b9086906fffffffffffffffffffffffffffffffff1663ffffffff61201816565b421015611f64576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a31565b611fb6565b600654611f7d90869063ffffffff61201816565b421015611fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612842565b5050505050565b60008160040183511015611fe357611fe3611fde6003855185600401612034565b6120d9565b5060208183018101519101907fffffffff00000000000000000000000000000000000000000000000000000000165b92915050565b60008282018381101561158057611580611fde600086866120e1565b6060632800659560e01b848484604051602401612053939291906127fd565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b606063e946c1bb60e01b848484604051602401612053939291906127db565b815481835581811115612124576000838152602090206121249181019083016121be565b505050565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061218157805160ff19168380011785556121ae565b828001600101855582156121ae579182015b828111156121ae578251825591602001919060010190612193565b506121ba9291506121be565b5090565b610fd691905b808211156121ba57600081556001016121c4565b600082601f8301126121e8578081fd5b81516121fb6121f682612b74565b612b4d565b81815291506020808301908481018184028601820187101561221c57600080fd5b60005b8481101561224457815161223281612c02565b8452928201929082019060010161221f565b505050505092915050565b600082601f83011261225f578081fd5b815161226d6121f682612b74565b81815291506020808301908481018184028601820187101561228e57600080fd5b60005b8481101561224457815184529282019290820190600101612291565b8035801515811461201257600080fd5b600082601f8301126122cd578081fd5b81516122db6121f682612b94565b91508082528360208285010111156122f257600080fd5b610a47816020840160208601612bd6565b600060208284031215612314578081fd5b813561158081612c02565b60008060408385031215612331578081fd5b823561233c81612c02565b9150602083013561234c81612c02565b809150509250929050565b60008060006060848603121561236b578081fd5b833561237681612c02565b925060208401359150604084013567ffffffffffffffff811115612398578182fd5b80850186601f8201126123a9578283fd5b803591506123b96121f683612b94565b8281528760208484010111156123cd578384fd5b8260208301602083013783602084830101528093505050509250925092565b600080600060608486031215612400578283fd5b835167ffffffffffffffff80821115612417578485fd5b81860187601f820112612428578586fd5b805192506124386121f684612b74565b83815260208082019190838101895b878110156124705761245e8d8484518901016122bd565b85529382019390820190600101612447565b50508901519097509350505080821115612488578384fd5b612494878388016121d8565b935060408601519150808211156124a9578283fd5b506124b68682870161224f565b9150509250925092565b600080604083850312156124d2578182fd5b6124dc84846122ad565b91506124eb84602085016122ad565b90509250929050565b60008060008060808587031215612509578081fd5b843561251481612c27565b9350602085013561252481612c35565b9250604085013561253481612c02565b915060608501356fffffffffffffffffffffffffffffffff81168114612558578182fd5b939692955090935050565b60008060408385031215612575578182fd5b823561233c81612c35565b600060208284031215612591578081fd5b5035919050565b600080604083850312156125aa578182fd5b82359150602083013561234c81612c02565b600080600080608085870312156125d1578182fd5b843593506020850135925060408501356125ea81612c27565b9150606085013561255881612c27565b6000825161260c818460208701612bd6565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff861682528460208301526080604083015283518060808401526126788160a0850160208801612bd6565b921515606083015250601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160160a0019392505050565b602080825282518282018190526000918401906040840190835b8181101561270257835173ffffffffffffffffffffffffffffffffffffffff168352602093840193909201916001016126ce565b509095945050505050565b602080825282518282018190526000918401906040840190835b81811015612702578351835260209384019390920191600101612727565b901515815260200190565b91151582526fffffffffffffffffffffffffffffffff16602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000094909416845273ffffffffffffffffffffffffffffffffffffffff929092166020840152151560408301526fffffffffffffffffffffffffffffffff16606082015260800190565b60608101600485106127e957fe5b938152602081019290925260409091015290565b60608101600885106127e957fe5b6020808252600c908201527f4e554c4c5f414444524553530000000000000000000000000000000000000000604082015260600190565b6020808252601c908201527f44454641554c545f54494d455f4c4f434b5f494e434f4d504c45544500000000604082015260600190565b6020808252600c908201527f4f574e45525f4558495354530000000000000000000000000000000000000000604082015260600190565b60208082526014908201527f54585f414c52454144595f434f4e4649524d4544000000000000000000000000604082015260600190565b60208082526016908201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604082015260600190565b6020808252600f908201527f54585f444f45534e545f45584953540000000000000000000000000000000000604082015260600190565b60208082526010908201527f54585f4e4f545f434f4e4649524d454400000000000000000000000000000000604082015260600190565b60208082526016908201527f455155414c5f4c454e475448535f524551554952454400000000000000000000604082015260600190565b60208082526010908201527f4641494c45445f455845435554494f4e00000000000000000000000000000000604082015260600190565b60208082526012908201527f4f574e45525f444f45534e545f45584953540000000000000000000000000000604082015260600190565b6020808252601b908201527f435553544f4d5f54494d455f4c4f434b5f494e434f4d504c4554450000000000604082015260600190565b60208082526017908201527f4f4e4c595f43414c4c41424c455f42595f57414c4c4554000000000000000000604082015260600190565b60208082526012908201527f54585f46554c4c595f434f4e4649524d45440000000000000000000000000000604082015260600190565b60208082526013908201527f54585f414c52454144595f455845435554454400000000000000000000000000604082015260600190565b60208082526014908201527f494e56414c49445f524551554952454d454e5453000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612b6c57600080fd5b604052919050565b600067ffffffffffffffff821115612b8a578081fd5b5060209081020190565b600067ffffffffffffffff821115612baa578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612bf1578181015183820152602001612bd9565b83811115610cb85750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114612c2457600080fd5b50565b8015158114612c2457600080fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612c2457600080fdfea365627a7a723158200ac5186607cd3ec8212bb7bd34d7047a94bed6fb931222d7ea453055d00701cd6c6578706572696d656e74616cf564736f6c634300050c0040'; public MAX_OWNER_COUNT = { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 86ce6a2e74..e6bbd3c525 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class CoordinatorContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Recovers the address of a signer given a hash and signature. @@ -62,7 +65,7 @@ export class CoordinatorContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -658,7 +661,7 @@ export class CoordinatorContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 2c8205fd32..3172cd24f9 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -40,6 +40,9 @@ export interface CoordinatorRegistryCoordinatorEndpointSetEventArgs extends Deco // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class CoordinatorRegistryContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Called by a Coordinator operator to set the endpoint of their Coordinator. diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index d357696bfb..7257fd0c4e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class DevUtilsContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b506004361061025c5760003560e01c80639a7e752611610145578063cafd3a07116100bd578063d3d862d11161008c578063e4e6e7da11610071578063e4e6e7da1461063a578063e77286eb1461065b578063ee4f5a941461067d5761025c565b8063d3d862d114610605578063e25cabf7146106185761025c565b8063cafd3a071461059e578063d001c5dc146105bf578063d186037f146105d2578063d3637905146105e55761025c565b8063a6627e9f11610114578063b43cffe1116100f9578063b43cffe114610548578063bbb2dcf61461055b578063bc03f9641461057d5761025c565b8063a6627e9f14610512578063acaedc74146105255761025c565b80639a7e7526146104985780639eadc835146104bb578063a0901e51146104df578063a5cd62ba146104f25761025c565b8063459be5e2116101d85780636f83188e116101a75780637b66ad341161018c5780637b66ad34146104515780637d727512146104725780638f4ce479146104855761025c565b80636f83188e1461040d5780637914b2ec146104305761025c565b8063459be5e21461038a5780634dfdac20146103ab578063590aa875146103cb57806365129042146103eb5761025c565b80632322cf761161022f578063327d305411610214578063327d30541461033257806332aae3ad146103455780633db6dc61146103675761025c565b80632322cf76146102f0578063314853ff146103105761025c565b806302d0aec31461026157806304a5618a1461028b5780630d7b7d76146102ad578063165979e1146102ce575b600080fd5b61027461026f3660046149dd565b61069f565b6040516102829291906152e4565b60405180910390f35b61029e6102993660046149dd565b6106fb565b60405161028293929190615387565b6102c06102bb366004614565565b6107a9565b604051610282929190615292565b6102e16102dc3660046149dd565b6107cb565b604051610282939291906154c2565b6103036102fe366004614565565b610828565b6040516102829190615731565b61032361031e3660046149dd565b610850565b604051610282939291906152b9565b6102c06103403660046149dd565b610897565b6103586103533660046149dd565b6108d9565b60405161028293929190615438565b61037a6103753660046149dd565b61092c565b6040516102829493929190615258565b61039d6103983660046149dd565b610976565b6040516102829291906154ab565b6103be6103b936600461448c565b6109cc565b60405161028291906151f2565b6103de6103d936600461435d565b610a4f565b60405161028291906153e7565b6103fe6103f93660046149dd565b610ad3565b60405161028293929190614fdf565b61042061041b3660046149dd565b610b0d565b6040516102829493929190615535565b61044361043e3660046149dd565b61164e565b604051610282929190615301565b61046461045f3660046149dd565b611686565b604051610282929190614fc5565b610303610480366004614565565b6116be565b6104436104933660046149dd565b611dd3565b6104ab6104a63660046149dd565b611e63565b60405161028294939291906154f1565b6104ce6104c93660046149dd565b611ec4565b604051610282959493929190615324565b6103be6104ed3660046145d4565b611f6f565b61050561050036600461463a565b611fe8565b60405161028291906150f9565b6103de6105203660046145a9565b6120ac565b6105386105333660046149dd565b612133565b6040516102829493929190615055565b6103de6105563660046144da565b61216f565b61056e6105693660046149dd565b6121fc565b604051610282939291906153b2565b61059061058b3660046149dd565b6122a9565b6040516102829291906152a0565b6105b16105ac3660046149dd565b6122e2565b604051610282929190615528565b6103be6105cd36600461448c565b612330565b6103036105e0366004614565565b61239e565b6105f86105f3366004614a94565b6129e1565b60405161028291906154dd565b6103de6106133660046147e2565b612f7e565b61062b6106263660046146be565b612fb6565b60405161028293929190615146565b61064d61064836600461448c565b6130ee565b604051610282929190615233565b61066e610669366004614aec565b613107565b604051610282939291906156d5565b61069061068b3660046149dd565b613341565b60405161028293929190615481565b6000806106b3836106ae61337e565b6133a2565b60006106cc60048551866133fc9092919063ffffffff16565b8060200190516106df9190810190614990565b909350905060ff811660068111156106f357fe5b915050915091565b6000808061070f848263ffffffff61343f16565b92506001600160e01b031983167f02571792000000000000000000000000000000000000000000000000000000001461077d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107749061569e565b60405180910390fd5b61078e84601063ffffffff61347316565b91506107a184602463ffffffff6134a616565b929491935050565b6000806107b684846116be565b91506107c2848461239e565b90509250929050565b60008060006107dc846106ae6134b2565b60006107f560048651876133fc9092919063ffffffff16565b8060200190516108089190810190614d20565b9094509250905060ff8116600281111561081e57fe5b9350509193909250565b600080600061083785856107a9565b9150915061084582826134d6565b925050505b92915050565b6000606080610861846106ae6134ec565b835161087790859060049063ffffffff6133fc16565b80602001905161088a9190810190614930565b9196909550909350915050565b6000806108a6836106ae613510565b82516108bc90849060049063ffffffff6133fc16565b8060200190516108cf91908101906148d2565b9094909350915050565b60008060606108ea846106ae613534565b600061090360048651876133fc9092919063ffffffff16565b8060200190516109169190810190614cd4565b9094509250905060ff8116600181111561081e57fe5b60008060608061093e856106ae613558565b845161095490869060049063ffffffff6133fc16565b806020019051610967919081019061488e565b92989197509550909350915050565b600080610985836106ae61357c565b600061099e60048551866133fc9092919063ffffffff16565b8060200190516109b19190810190614c07565b9250905060ff811660038111156109c457fe5b925050915091565b6060600082519050806040519080825280602002602001820160405280156109fe578160200160208202803883390190505b50915060005b818114610a4757610a2885858381518110610a1b57fe5b602002602001015161239e565b838281518110610a3457fe5b6020908102919091010152600101610a04565b505092915050565b6040516060907ff47261b00000000000000000000000000000000000000000000000000000000090610a85908490602401614fb1565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091529050919050565b6000806000610ae4846106ae6135a0565b8351610afa90859060049063ffffffff6133fc16565b80602001905161088a91908101906143b2565b60608080806000610b24868263ffffffff61343f16565b90506001600160e01b031981167fdedfc1f1000000000000000000000000000000000000000000000000000000001415610b95576040518060400160405280601181526020017f626174636843616e63656c4f72646572730000000000000000000000000000008152509450611124565b6001600160e01b031981167f9694a402000000000000000000000000000000000000000000000000000000001415610c04576040518060400160405280600f81526020017f626174636846696c6c4f726465727300000000000000000000000000000000008152509450611124565b6001600160e01b031981167f8ea8dfe4000000000000000000000000000000000000000000000000000000001415610c73576040518060400160405280601681526020017f626174636846696c6c4f72646572734e6f5468726f77000000000000000000008152509450611124565b6001600160e01b031981167fbeee2e14000000000000000000000000000000000000000000000000000000001415610ce2576040518060400160405280601581526020017f626174636846696c6c4f724b696c6c4f726465727300000000000000000000008152509450611124565b6001600160e01b031981167f2da62987000000000000000000000000000000000000000000000000000000001415610d51576040518060400160405280600b81526020017f63616e63656c4f726465720000000000000000000000000000000000000000008152509450611124565b6001600160e01b031981167f9b44d556000000000000000000000000000000000000000000000000000000001415610dc0576040518060400160405280600981526020017f66696c6c4f7264657200000000000000000000000000000000000000000000008152509450611124565b6001600160e01b031981167fe14b58c4000000000000000000000000000000000000000000000000000000001415610e2f576040518060400160405280600f81526020017f66696c6c4f724b696c6c4f7264657200000000000000000000000000000000008152509450611124565b6001600160e01b031981167f78d29ac1000000000000000000000000000000000000000000000000000000001415610e9e576040518060400160405280601681526020017f6d61726b65744275794f72646572734e6f5468726f77000000000000000000008152509450611124565b6001600160e01b031981167f369da099000000000000000000000000000000000000000000000000000000001415610f0d576040518060400160405280601781526020017f6d61726b657453656c6c4f72646572734e6f5468726f770000000000000000008152509450611124565b6001600160e01b031981167f8bc8efb3000000000000000000000000000000000000000000000000000000001415610f7c576040518060400160405280601981526020017f6d61726b65744275794f726465727346696c6c4f724b696c6c000000000000008152509450611124565b6001600160e01b031981167fa6c3bf33000000000000000000000000000000000000000000000000000000001415610feb576040518060400160405280601a81526020017f6d61726b657453656c6c4f726465727346696c6c4f724b696c6c0000000000008152509450611124565b6001600160e01b031981167f88ec79fb00000000000000000000000000000000000000000000000000000000141561105a576040518060400160405280600b81526020017f6d617463684f72646572730000000000000000000000000000000000000000008152509450611124565b6001600160e01b031981167f4f9559b10000000000000000000000000000000000000000000000000000000014806110bb57506001600160e01b031981167f2280c91000000000000000000000000000000000000000000000000000000000145b156110f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077490615630565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610774906155f9565b6001600160e01b031981167fdedfc1f10000000000000000000000000000000000000000000000000000000014156111c957855161116c90879060049063ffffffff6135c416565b80602001905161117f9190810190614607565b604080516000808252602082019092529195505b50604080516000808252602082019092529194506111c1565b60608152602001906001900390816111ac5790505b509150611646565b6001600160e01b031981167fbeee2e1400000000000000000000000000000000000000000000000000000000148061122a57506001600160e01b031981167f9694a40200000000000000000000000000000000000000000000000000000000145b8061125e57506001600160e01b031981167f8ea8dfe400000000000000000000000000000000000000000000000000000000145b156112785761126c86613644565b91955093509150611646565b6001600160e01b031981167f2da629870000000000000000000000000000000000000000000000000000000014156113605760408051600180825281830190925290816020015b6112c7613c90565b8152602001906001900390816112bf57505086519094506112f290879060049063ffffffff6135c416565b8060200190516113059190810190614a61565b8460008151811061131257fe5b602002602001018190525060006040519080825280602002602001820160405280156111935781602001602082028038833901905050604080516000808252602082019092529194506111c1565b6001600160e01b031981167fe14b58c40000000000000000000000000000000000000000000000000000000014806113c157506001600160e01b031981167f9b44d55600000000000000000000000000000000000000000000000000000000145b156113cf5761126c86613673565b6001600160e01b031981167f78d29ac100000000000000000000000000000000000000000000000000000000148061143057506001600160e01b031981167f369da09900000000000000000000000000000000000000000000000000000000145b8061146457506001600160e01b031981167f8bc8efb300000000000000000000000000000000000000000000000000000000145b8061149857506001600160e01b031981167fa6c3bf3300000000000000000000000000000000000000000000000000000000145b156114a65761126c8661376d565b6001600160e01b031981167f88ec79fb000000000000000000000000000000000000000000000000000000001415611646576114e0613c90565b6114e8613c90565b60608061150260048b518c6135c49092919063ffffffff16565b8060200190516115159190810190614b43565b604080516002808252606082019092529498509296509094509250816020015b61153d613c90565b815260200190600190039081611535579050509750838860008151811061156057fe5b6020026020010181905250828860018151811061157957fe5b602090810291909101015260408051600280825260608201909252908160200160208202803883390190505096508360a00151876000815181106115b957fe5b6020026020010181815250508260a00151876001815181106115d757fe5b60209081029190910101526040805160028082526060820190925290816020015b60608152602001906001900390816115f8579050509550818660008151811061161d57fe5b6020026020010181905250808660018151811061163657fe5b6020026020010181905250505050505b509193509193565b60008061165d836106ae6137e1565b825161167390849060049063ffffffff6133fc16565b8060200190516108cf91908101906149b4565b600080611695836106ae613805565b82516116ab90849060049063ffffffff6133fc16565b8060200190516108cf9190810190614379565b6000806116d1838263ffffffff61343f16565b90506001600160e01b031981167ff47261b000000000000000000000000000000000000000000000000000000000141561184657600061171884601063ffffffff61347316565b6040519091506060907f70a082310000000000000000000000000000000000000000000000000000000090611751908890602401614fb1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060836001600160a01b0316836040516117cc9190614f95565b600060405180830381855afa9150503d8060008114611807576040519150601f19603f3d011682016040523d82523d6000602084013e61180c565b606091505b509150915081801561181f575080516020145b61182a57600061183b565b61183b81600063ffffffff6134a616565b955050505050611dcc565b6001600160e01b031981167f025717920000000000000000000000000000000000000000000000000000000014156119e157600080611884856106fb565b6040519194509250606091507f6352211e00000000000000000000000000000000000000000000000000000000906118c0908490602401615731565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060846001600160a01b03168360405161193b9190614f95565b600060405180830381855afa9150503d8060008114611976576040519150601f19603f3d011682016040523d82523d6000602084013e61197b565b606091505b50915091506000828015611990575081516020145b61199b5760006119ac565b6119ac82600c63ffffffff61347316565b9050896001600160a01b0316816001600160a01b0316146119ce5760006119d1565b60015b60ff169750505050505050611dcc565b6001600160e01b031981167fa7cb5fb7000000000000000000000000000000000000000000000000000000001415611bc4576000606080611a2186611ec4565b5081519296509094509250905060005b818114611bba5783516060907efdd58e00000000000000000000000000000000000000000000000000000000908b90879085908110611a6c57fe5b6020026020010151604051602401611a85929190615089565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060876001600160a01b031683604051611b009190614f95565b600060405180830381855afa9150503d8060008114611b3b576040519150601f19603f3d011682016040523d82523d6000602084013e611b40565b606091505b50915091506000828015611b55575081516020145b611b60576000611b71565b611b7182600063ffffffff6134a616565b90506000878681518110611b8157fe5b60200260200101518281611b9157fe5b0490508b811080611ba057508b155b15611ba957809b505b505060019093019250611a31915050565b5050505050611dcc565b6001600160e01b031981167fc339d10a000000000000000000000000000000000000000000000000000000001415611d15576040516060907fa85e59e40000000000000000000000000000000000000000000000000000000090611c33908690600090819081906024016153fa565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b03199094169390931790925260045491519092506000916001600160a01b031690611c9a908490614f95565b600060405180830381855afa9150503d8060008114611cd5576040519150601f19603f3d011682016040523d82523d6000602084013e611cda565b606091505b5050905080611cea576000611d0c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b93505050611dcc565b6001600160e01b031981167f94cfcdd7000000000000000000000000000000000000000000000000000000001415611dcc57606080611d53856121fc565b80519194509250905060005b818114611dc7576000611d8589858481518110611d7857fe5b60200260200101516116be565b90506000858381518110611d9557fe5b60200260200101518281611da557fe5b04905087811080611db4575087155b15611dbd578097505b5050600101611d5f565b505050505b5092915050565b600080611de6838263ffffffff61343f16565b91506001600160e01b031982167ff47261b00000000000000000000000000000000000000000000000000000000014611e4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107749061569e565b611e5c83601063ffffffff61347316565b9050915091565b60008060006060611e76856106ae613829565b6000611e8f60048751886133fc9092919063ffffffff16565b806020019051611ea29190810190614c76565b91965094509250905060ff81166006811115611eba57fe5b9450509193509193565b60008060608080611edb868563ffffffff61343f16565b94506001600160e01b031985167fa7cb5fb70000000000000000000000000000000000000000000000000000000014611f40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107749061569e565b505050506024828101516044840151606485015160848601519496929591820184019490820184019391010190565b6060808251604051908082528060200260200182016040528015611f9d578160200160208202803883390190505b50905060005b83518114611dcc57838181518110611fb757fe5b60200260200101516001600160a01b031631828281518110611fd557fe5b6020908102919091010152600101611fa3565b60606000845190508060405190808252806020026020018201604052801561201a578160200160208202803883390190505b50915060005b8181146120a25761206b86828151811061203657fe5b602002602001015186838151811061204a57fe5b602002602001015186848151811061205e57fe5b60200260200101516129e1565b83828151811061207757fe5b6020026020010190600481111561208a57fe5b9081600481111561209757fe5b905250600101612020565b50505b9392505050565b6040516060907f0257179200000000000000000000000000000000000000000000000000000000906120e49085908590602401615089565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152905092915050565b60006060806060612146856106ae61384d565b845161215c90869060049063ffffffff6133fc16565b80602001905161096791908101906143f4565b6040516060907fa7cb5fb700000000000000000000000000000000000000000000000000000000906121ab908790879087908790602401615003565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091529050949350505050565b6000606080612211848463ffffffff61343f16565b92506001600160e01b031983167f94cfcdd70000000000000000000000000000000000000000000000000000000014612276576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107749061569e565b835161228c90859060049063ffffffff6135c416565b80602001905161229f9190810190614817565b9395909450915050565b600060606122b9836106ae613871565b82516122cf90849060049063ffffffff6133fc16565b8060200190516108cf91908101906148f5565b6000806122f1836106ae613895565b600061230a60048551866133fc9092919063ffffffff16565b80602001905161231d9190810190614c07565b9250905060ff811660018111156109c457fe5b606060008251905080604051908082528060200260200182016040528015612362578160200160208202803883390190505b50915060005b818114610a475761237f85858381518110611d7857fe5b83828151811061238b57fe5b6020908102919091010152600101612368565b6000806123b1838263ffffffff61343f16565b90506001600160e01b031981167f94cfcdd7000000000000000000000000000000000000000000000000000000001415612463576060806123f1856121fc565b80519194509250905060005b81811461245857600061241689858481518110610a1b57fe5b9050600085838151811061242657fe5b6020026020010151828161243657fe5b04905087811080612445575087155b1561244e578097505b50506001016123fd565b5061084a9350505050565b6001600160e01b031981167ff47261b00000000000000000000000000000000000000000000000000000000014156124ee5760006124a884601063ffffffff61347316565b6001546040519192506060917fdd62ed3e00000000000000000000000000000000000000000000000000000000916117519189916001600160a01b031690602401614fc5565b6001600160e01b031981167f025717920000000000000000000000000000000000000000000000000000000014156127de5760008061252c856106fb565b600254604051929550909350606092507fe985e9c50000000000000000000000000000000000000000000000000000000091612578918a916001600160a01b0390911690602401614fc5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060846001600160a01b0316836040516125f39190614f95565b600060405180830381855afa9150503d806000811461262e576040519150601f19603f3d011682016040523d82523d6000602084013e612633565b606091505b509150915081158061264757508051602014155b80612663575061265e81600063ffffffff6134a616565b600114155b156127b1576040516060907f081812fc000000000000000000000000000000000000000000000000000000009061269e908790602401615731565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050856001600160a01b0316816040516127159190614f95565b600060405180830381855afa9150503d8060008114612750576040519150601f19603f3d011682016040523d82523d6000602084013e612755565b606091505b509093509150828015612769575081516020145b801561279857506002546001600160a01b031661278d83600c63ffffffff61347316565b6001600160a01b0316145b6127a35760006127a6565b60015b60ff16975050611bba565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff96505050505050611dcc565b6001600160e01b031981167fa7cb5fb700000000000000000000000000000000000000000000000000000000141561298657600061281b84611ec4565b5050600354604051929450606093507fe985e9c50000000000000000000000000000000000000000000000000000000092612865925089916001600160a01b031690602401614fc5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006060836001600160a01b0316836040516128e09190614f95565b600060405180830381855afa9150503d806000811461291b576040519150601f19603f3d011682016040523d82523d6000602084013e612920565b606091505b5091509150818015612933575080516020145b801561294f575061294b81600063ffffffff6134a616565b6001145b61295a57600061183b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff955050505050611dcc565b6001600160e01b031981167fc339d10a000000000000000000000000000000000000000000000000000000001415611dcc57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b60006129eb613d23565b612a7c8584600560009054906101000a90046001600160a01b03166001600160a01b0316631ce4c78b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3e57600080fd5b505afa158015612a52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250612a769190810190614bef565b3a6138b9565b60408051600480825260a0820190925291925060609190816020015b6060815260200190600190039081612a9857505060408051600480825260a082019092529192506060919060208201608080388339505060408051600480825260a08201909252929350606092915060208201608080388339505060408051600480825260a0820190925292935060609291506020820160808038833901905050905088610160015184600081518110612b2e57fe5b60200260200101819052508783600081518110612b4757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050886000015182600081518110612b7957fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508681600081518110612ba757fe5b60200260200101818152505088610140015184600181518110612bc657fe5b6020026020010181905250886000015183600181518110612be357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508782600181518110612c1157fe5b60200260200101906001600160a01b031690816001600160a01b031681525050846000015181600181518110612c4357fe5b602002602001018181525050886101a0015184600281518110612c6257fe5b60200260200101819052508783600281518110612c7b57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050886040015182600281518110612cad57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050846060015181600281518110612cdf57fe5b60200260200101818152505088610180015184600381518110612cfe57fe5b6020026020010181905250886000015183600381518110612d1b57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050886040015182600381518110612d4d57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050846040015181600381518110612d7f57fe5b60209081029190910101526040516060907fb04fbddd0000000000000000000000000000000000000000000000000000000090612dc69087908790879087906024016150a2565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b03199094169390931790925260055491519092506060916001600160a01b031690612e2d908490614f95565b6000604051808303816000865af19150503d8060008114612e6a576040519150601f19603f3d011682016040523d82523d6000602084013e612e6f565b606091505b50915060009050612e86828263ffffffff61343f16565b9050612e90613534565b6001600160e01b031982811691161415612ed2576000612eaf836108d9565b5091505060ff81166004811115612ec257fe5b99505050505050505050506120a5565b612eda6134ec565b6001600160e01b031982811691161415612f0d576000612ef983610850565b509091505060ff81166004811115612ec257fe5b815160208301207ff43f26ea5a94b478394a975e856464913dc1a8a1ca70939d974aa7c238aa0ce01415612f4c576004985050505050505050506120a5565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610774906155c2565b6040516060907f94cfcdd700000000000000000000000000000000000000000000000000000000906120e49085908590602401615205565b606080606060008551905080604051908082528060200260200182016040528015612ffb57816020015b612fe8613d52565b815260200190600190039081612fe05790505b50935080604051908082528060200260200182016040528015613028578160200160208202803883390190505b50925080604051908082528060200260200182016040528015613055578160200160208202803883390190505b50915060005b8181146130e55761309287828151811061307157fe5b602002602001015187838151811061308557fe5b6020026020010151613107565b87518890859081106130a057fe5b602002602001018785815181106130b357fe5b602002602001018786815181106130c657fe5b931515602094850291909101909301929092529190525260010161305b565b50509250925092565b6060806130fb8484612330565b91506107c284846109cc565b61310f613d52565b600080546040517f9d3fa4b900000000000000000000000000000000000000000000000000000000815282916001600160a01b031690639d3fa4b9906131599088906004016156f9565b60606040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506131a99190810190614a10565b85516000546040517fa12dcc6f00000000000000000000000000000000000000000000000000000000815292955090916001600160a01b039091169063a12dcc6f906131fb908990899060040161570c565b60206040518083038186803b15801561321357600080fd5b505afa158015613227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061324b919081019061486e565b9150600061325e82886101400151610828565b60a088015160c08901516101808a01516101408b01519394509192909160009161328d9163ffffffff61393016565b156132ba576132b3846132ad848d6080015161395590919063ffffffff16565b85613971565b9050613313565b816132ce576132b3848b6080015185613971565b60006132df868c6101800151610828565b905060006132f2868d6080015187613971565b90506000613301838688613971565b905061330d82826134d6565b93505050505b61333361332d89604001518561399b90919063ffffffff16565b826134d6565b965050505050509250925092565b6000806000613352846106ae6139ba565b600061336b60048651876133fc9092919063ffffffff16565b8060200190516108089190810190614c34565b7ffdb6ca8d0000000000000000000000000000000000000000000000000000000090565b60006133af83600061343f565b90506001600160e01b0319808216908316146133f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077490615667565b505050565b60608183111561341a5761341a613415600085856139de565b613a4d565b83518211156134335761343361341560018487516139de565b50819003910190815290565b600081600401835110156134605761346061341560038551856004016139de565b5001602001516001600160e01b03191690565b600081601401835110156134945761349461341560048551856014016139de565b5001601401516001600160a01b031690565b60006120a58383613a55565b7f18e4b1410000000000000000000000000000000000000000000000000000000090565b60008183106134e557816120a5565b5090919050565b7f4678472b0000000000000000000000000000000000000000000000000000000090565b7fb6555d6f0000000000000000000000000000000000000000000000000000000090565b7f488219a60000000000000000000000000000000000000000000000000000000090565b7f1b8388f70000000000000000000000000000000000000000000000000000000090565b7fe94a7ed00000000000000000000000000000000000000000000000000000000090565b7f4ad312750000000000000000000000000000000000000000000000000000000090565b6060818311156135dd576135dd613415600085856139de565b83518211156135f6576135f661341560018487516139de565b8282036040519080825280601f01601f191660200182016040528015613623576020820181803883390190505b5090506120a561363282613a7f565b8461363c87613a7f565b018351613a85565b606080606061366060048551866135c49092919063ffffffff16565b80602001905161088a9190810190614715565b60408051600180825281830190925260609182918291816020015b613696613c90565b81526020019060019003908161368e5750506040805160018082528183019092529194506020808301908038833901905050604080516001808252818301909252919350816020015b60608152602001906001900390816136df575050845190915061370c90859060049063ffffffff6135c416565b80602001905161371f9190810190614b9c565b8560008151811061372c57fe5b602002602001018560008151811061374057fe5b602002602001018560008151811061375457fe5b6020908102919091010192909252919052529193909250565b6040805160018082528183019092526060918291829160208083019080388339505085519193506137a99186915060049063ffffffff6135c416565b8060200190516137bc919081019061478f565b845185906000906137c957fe5b60209081029190910101919091529095929450925050565b7f11c7b7200000000000000000000000000000000000000000000000000000000090565b7fa15c0d060000000000000000000000000000000000000000000000000000000090565b7f7e5a23180000000000000000000000000000000000000000000000000000000090565b7f5bd0428d0000000000000000000000000000000000000000000000000000000090565b7f20d11f610000000000000000000000000000000000000000000000000000000090565b7ff59851840000000000000000000000000000000000000000000000000000000090565b6138c1613d23565b6020810184905260a085015160808601516138dd918691613b2a565b815260a085015160c08601516138f4918691613b2a565b604082015260a085015160e086015161390e918691613b2a565b6060820152613923828463ffffffff613b5e16565b6080820152949350505050565b6000815183511480156120a55750508051602091820120825192909101919091201490565b6000828201838110156120a5576120a561341560008686613b8b565b600061399383613987868563ffffffff613b5e16565b9063ffffffff613baa16565b949350505050565b6000828211156139b4576139b461341560028585613b8b565b50900390565b7fe53c76c80000000000000000000000000000000000000000000000000000000090565b6060632800659560e01b8484846040516024016139fd939291906154cf565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b03199093169290921790915290509392505050565b805160208201fd5b60008160200183511015613a7657613a7661341560058551856020016139de565b50016020015190565b60200190565b6020811015613aaf576001816020036101000a0380198351168185511680821786525050506133f7565b82821415613abc576133f7565b82821115613af65760208103905080820181840181515b82851015613aee578451865260209586019590940193613ad3565b9052506133f7565b60208103905080820181840183515b81861215613b215782518252601f199283019290910190613b05565b85525050505050565b6000613b37848484613bd4565b15613b4a57613b4a613415858585613c3a565b61399383613987868563ffffffff613b5e16565b600082613b6d5750600061084a565b82820282848281613b7a57fe5b04146120a5576120a5613415600186865b606063e946c1bb60e01b8484846040516024016139fd93929190615460565b600081613bc057613bc061341560038585613b8b565b6000828481613bcb57fe5b04949350505050565b600082613be657613be6613415613c59565b811580613bf1575083155b15613bfe575060006120a5565b60008380613c0857fe5b8584099050613c1d858463ffffffff613b5e16565b613c2f826103e863ffffffff613b5e16565b101595945050505050565b606063339f3de260e01b8484846040516024016139fd9392919061573a565b60408051808201909152600481527fa791837c00000000000000000000000000000000000000000000000000000000602082015290565b604051806101c0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b803561084a81615816565b805161084a81615816565b600082601f830112613d98578081fd5b8135613dab613da682615777565b615750565b818152915060208083019084810181840286018201871015613dcc57600080fd5b60005b84811015611dc7578135613de281615816565b84529282019290820190600101613dcf565b600082601f830112613e04578081fd5b8151613e12613da682615777565b8181529150602080830190840160005b83811015613e4f57613e3a8760208451890101614074565b83526020928301929190910190600101613e22565b5050505092915050565b600082601f830112613e69578081fd5b8135613e77613da682615777565b8181529150602080830190840160005b83811015613e4f57613e9f8760208435890101614026565b83526020928301929190910190600101613e87565b600082601f830112613ec4578081fd5b8151613ed2613da682615777565b8181529150602080830190840160005b83811015613e4f57613efa8760208451890101614209565b83526020928301929190910190600101613ee2565b600082601f830112613f1f578081fd5b8135613f2d613da682615777565b8181529150602080830190840160005b83811015613e4f57613f5587602084358901016140ba565b83526020928301929190910190600101613f3d565b600082601f830112613f7a578081fd5b8151613f88613da682615777565b818152915060208083019084810181840286018201871015613fa957600080fd5b60005b84811015611dc757815184529282019290820190600101613fac565b600082601f830112613fd8578081fd5b8135613fe6613da682615777565b81815291506020808301908481018184028601820187101561400757600080fd5b60005b84811015611dc75781358452928201929082019060010161400a565b600082601f830112614036578081fd5b8135614044613da682615797565b915080825283602082850101111561405b57600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614084578081fd5b8151614092613da682615797565b91508082528360208285010111156140a957600080fd5b611dcc8160208401602086016157bb565b60006101c08083850312156140cd578182fd5b6140d681615750565b9150506140e38383613d72565b81526140f28360208401613d72565b60208201526141048360408401613d72565b60408201526141168360608401613d72565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff8082111561417857600080fd5b61418486838701614026565b838501526101609250828501359150808211156141a057600080fd5b6141ac86838701614026565b838501526101809250828501359150808211156141c857600080fd5b6141d486838701614026565b838501526101a09250828501359150808211156141f057600080fd5b506141fd85828601614026565b82840152505092915050565b60006101c080838503121561421c578182fd5b61422581615750565b9150506142328383613d7d565b81526142418360208401613d7d565b60208201526142538360408401613d7d565b60408201526142658360608401613d7d565b60608201526080820151608082015260a082015160a082015260c082015160c082015260e082015160e08201526101008083015181830152506101208083015181830152506101408083015167ffffffffffffffff808211156142c757600080fd5b6142d386838701614074565b838501526101609250828501519150808211156142ef57600080fd5b6142fb86838701614074565b8385015261018092508285015191508082111561431757600080fd5b61432386838701614074565b838501526101a092508285015191508082111561433f57600080fd5b506141fd85828601614074565b805160ff8116811461084a57600080fd5b60006020828403121561436e578081fd5b81356120a581615816565b6000806040838503121561438b578081fd5b825161439681615816565b60208401519092506143a781615816565b809150509250929050565b6000806000606084860312156143c6578081fd5b83516143d181615816565b60208501519093506143e281615816565b80925050604084015190509250925092565b60008060008060808587031215614409578182fd5b845161441481615816565b602086015190945067ffffffffffffffff80821115614431578384fd5b61443d88838901614074565b94506040870151915080821115614452578384fd5b61445e88838901614074565b93506060870151915080821115614473578283fd5b5061448087828801614074565b91505092959194509250565b6000806040838503121561449e578182fd5b82356144a981615816565b9150602083013567ffffffffffffffff8111156144c4578182fd5b6144d085828601613e59565b9150509250929050565b600080600080608085870312156144ef578182fd5b84356144fa81615816565b9350602085013567ffffffffffffffff80821115614516578384fd5b61452288838901613fc8565b94506040870135915080821115614537578384fd5b61454388838901613fc8565b93506060870135915080821115614558578283fd5b5061448087828801614026565b60008060408385031215614577578182fd5b823561458281615816565b9150602083013567ffffffffffffffff81111561459d578182fd5b6144d085828601614026565b600080604083850312156145bb578182fd5b82356145c681615816565b946020939093013593505050565b6000602082840312156145e5578081fd5b813567ffffffffffffffff8111156145fb578182fd5b61399384828501613d88565b600060208284031215614618578081fd5b815167ffffffffffffffff81111561462e578182fd5b61399384828501613eb4565b60008060006060848603121561464e578081fd5b833567ffffffffffffffff80821115614665578283fd5b61467187838801613f0f565b94506020860135915080821115614686578283fd5b61469287838801613d88565b935060408601359150808211156146a7578283fd5b506146b486828701613fc8565b9150509250925092565b600080604083850312156146d0578182fd5b823567ffffffffffffffff808211156146e7578384fd5b6146f386838701613f0f565b93506020850135915080821115614708578283fd5b506144d085828601613e59565b600080600060608486031215614729578081fd5b835167ffffffffffffffff80821115614740578283fd5b61474c87838801613eb4565b94506020860151915080821115614761578283fd5b61476d87838801613f6a565b93506040860151915080821115614782578283fd5b506146b486828701613df4565b6000806000606084860312156147a3578081fd5b835167ffffffffffffffff808211156147ba578283fd5b6147c687838801613eb4565b9450602086015193506040860151915080821115614782578283fd5b600080604083850312156147f4578182fd5b823567ffffffffffffffff8082111561480b578384fd5b6146f386838701613fc8565b60008060408385031215614829578182fd5b825167ffffffffffffffff80821115614840578384fd5b61484c86838701613f6a565b93506020850151915080821115614861578283fd5b506144d085828601613df4565b60006020828403121561487f578081fd5b815180151581146120a5578182fd5b600080600080608085870312156148a3578182fd5b8451935060208501516148b581615816565b604086015190935067ffffffffffffffff80821115614452578384fd5b600080604083850312156148e4578182fd5b505080516020909101519092909150565b60008060408385031215614907578182fd5b82519150602083015167ffffffffffffffff811115614924578182fd5b6144d085828601614074565b600080600060608486031215614944578081fd5b83519250602084015167ffffffffffffffff80821115614962578283fd5b61496e87838801614074565b93506040860151915080821115614983578283fd5b506146b486828701614074565b600080604083850312156149a2578182fd5b8251915060208301516143a78161582b565b600080604083850312156149c6578182fd5b82516001600160e01b031981168114614396578283fd5b6000602082840312156149ee578081fd5b813567ffffffffffffffff811115614a04578182fd5b61399384828501614026565b60006060828403128015614a22578182fd5b8015614a2c578182fd5b50614a376060615750565b8251614a428161582b565b8152602083810151908201526040928301519281019290925250919050565b600060208284031215614a72578081fd5b815167ffffffffffffffff811115614a88578182fd5b61399384828501614209565b600080600060608486031215614aa8578081fd5b833567ffffffffffffffff811115614abe578182fd5b614aca868287016140ba565b9350506020840135614adb81615816565b929592945050506040919091013590565b60008060408385031215614afe578182fd5b823567ffffffffffffffff80821115614b15578384fd5b614b21868387016140ba565b93506020850135915080821115614b36578283fd5b506144d085828601614026565b60008060008060808587031215614b58578182fd5b845167ffffffffffffffff80821115614b6f578384fd5b614b7b88838901614209565b95506020870151915080821115614b90578384fd5b61443d88838901614209565b600080600060608486031215614bb0578081fd5b835167ffffffffffffffff80821115614bc7578283fd5b614bd387838801614209565b9450602086015193506040860151915080821115614983578283fd5b600060208284031215614c00578081fd5b5051919050565b60008060408385031215614c19578182fd5b8251614c248161582b565b6020939093015192949293505050565b600080600060608486031215614c48578081fd5b8351614c538161582b565b602085015160408601519194509250614c6b81615816565b809150509250925092565b60008060008060808587031215614c8b578182fd5b614c95868661434c565b9350602085015192506040850151614cac81615816565b606086015190925067ffffffffffffffff811115614cc8578182fd5b61448087828801614074565b600080600060608486031215614ce8578081fd5b614cf2858561434c565b925060208401519150604084015167ffffffffffffffff811115614d14578182fd5b6146b486828701614074565b600080600060608486031215614d34578081fd5b614d3e858561434c565b925060208401519150604084015190509250925092565b1515815260200190565b6000614d6b8383614e78565b505060600190565b6001600160a01b03169052565b6000815180845260208401935060208301825b82811015614dba5781516001600160a01b0316865260209586019590910190600101614d93565b5093949350505050565b600081518084526020840180819550602083028101915060208501845b84811015614e0f578284038852614df9848351614e4c565b6020988901989094509190910190600101614de1565b50919695505050505050565b6000815180845260208401935060208301825b82811015614dba578151865260209586019590910190600101614e2e565b60008151808452614e648160208601602086016157bb565b601f01601f19169290920160200192915050565b805160ff16825260208082015190830152604090810151910152565b60006101c0614ea4848451614d73565b6020830151614eb66020860182614d73565b506040830151614ec96040860182614d73565b506060830151614edc6060860182614d73565b506080830151608085015260a083015160a085015260c083015160c085015260e083015160e0850152610100808401518186015250610120808401518186015250610140808401518282870152614f3583870182614e4c565b91505061016091508184015185820383870152614f528282614e4c565b925050506101808084015185830382870152614f6e8382614e4c565b9150506101a091508184015185820383870152614f8b8282614e4c565b9695505050505050565b60008251614fa78184602087016157bb565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b0386168252608060208301526150256080830186614e1b565b82810360408401526150378186614e1b565b83810360608501526150498186614e4c565b98975050505050505050565b60006001600160a01b0386168252608060208301526150776080830186614e4c565b82810360408401526150378186614e4c565b6001600160a01b03929092168252602082015260400190565b6000608082526150b56080830187614dc4565b82810360208401526150c78187614d80565b83810360408501526150d98187614d80565b91505082810360608401526150ee8185614e1b565b979650505050505050565b602080825282518282018190526000918401906040840190835b8181101561513b5783516005811061512757fe5b835260209384019390920191600101615113565b509095945050505050565b6000606082016060835280865161515d8184615731565b9150602088019250835b8181101561518b5761517a838551614d5f565b602094909401939250600101615167565b5050838103602085015261519f8187614e1b565b91505082810360408401528084516151b78184615731565b9150602086019250835b818110156151e5576151d4838551614d55565b6020949094019392506001016151c1565b5090979650505050505050565b6000602082526120a56020830184614e1b565b6000604082526152186040830185614e1b565b828103602084015261522a8185614dc4565b95945050505050565b6000604082526152466040830185614e1b565b828103602084015261522a8185614e1b565b60008582526001600160a01b0385166020830152608060408301526152806080830185614e4c565b82810360608401526150ee8185614e4c565b918252602082015260400190565b6000838252604060208301526139936040830184614e4c565b6000848252606060208301526152d26060830185614e4c565b8281036040840152614f8b8185614e4c565b828152604081016152f48361580c565b8260208301529392505050565b6001600160e01b03199290921682526001600160a01b0316602082015260400190565b60006001600160e01b0319871682526001600160a01b038616602083015260a0604083015261535660a0830186614e1b565b82810360608401526153688186614e1b565b838103608085015261537a8186614e4c565b9998505050505050505050565b6001600160e01b03199390931683526001600160a01b03919091166020830152604082015260600190565b60006001600160e01b031985168252606060208301526153d56060830185614e1b565b8281036040840152614f8b8185614dc4565b6000602082526120a56020830184614e4c565b60006080825261540d6080830187614e4c565b6001600160a01b03958616602084015293909416604082015260ff9190911660609091015292915050565b6000615443856157eb565b8482528360208301526060604083015261522a6060830184614e4c565b6060810161546d856157f8565b938152602081019290925260409091015290565b6060810161548e85615802565b93815260208101929092526001600160a01b031660409091015290565b604081016154b8846157f8565b9281526020015290565b6060810161546d85615802565b606081016008851061546d57fe5b60208101600583106154eb57fe5b91905290565b60006154fc8661580c565b8582528460208301526001600160a01b038416604083015260806060830152614f8b6080830184614e4c565b604081016154b8846157eb565b6000608082526155486080830187614e4c565b602083820381850152818751808452828401915082838202850101838a01865b8381101561559657601f19878403018552615584838351614e94565b94860194925090850190600101615568565b505086810360408801526155aa818a614e1b565b94505050505082810360608401526150ee8185614dc4565b60208082526013908201527f554e4b4e4f574e5f52455455524e5f4441544100000000000000000000000000604082015260600190565b60208082526019908201527f554e4b4e4f574e5f46554e4354494f4e5f53454c4543544f5200000000000000604082015260600190565b6020808252600d908201527f554e494d504c454d454e54454400000000000000000000000000000000000000604082015260600190565b6020808252600c908201527f4241445f53454c4543544f520000000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f57524f4e475f50524f58595f4944000000000000000000000000000000000000604082015260600190565b60a081016156e38286614e78565b8360608301528215156080830152949350505050565b6000602082526120a56020830184614e94565b60006040825261571f6040830185614e94565b828103602084015261522a8185614e4c565b90815260200190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff8111828210171561576f57600080fd5b604052919050565b600067ffffffffffffffff82111561578d578081fd5b5060209081020190565b600067ffffffffffffffff8211156157ad578081fd5b50601f01601f191660200190565b60005b838110156157d65781810151838201526020016157be565b838111156157e5576000848401525b50505050565b600281106157f557fe5b50565b600481106157f557fe5b600381106157f557fe5b600781106157f557fe5b6001600160a01b03811681146157f557600080fd5b60ff811681146157f557600080fdfea365627a7a723158200ea049525ebc74d73f3bf7858c601bd21168267b0dfb4abbdb7787cfd7233a2c6c6578706572696d656e74616cf564736f6c634300050c0040'; /** @@ -61,7 +64,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -106,7 +109,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -151,7 +154,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -196,7 +199,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -242,7 +245,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -289,7 +292,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -335,7 +338,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -380,7 +383,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -425,7 +428,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -470,7 +473,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -515,7 +518,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -560,7 +563,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -605,7 +608,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -650,7 +653,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -695,7 +698,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -742,7 +745,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -787,7 +790,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -832,7 +835,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -877,7 +880,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -945,7 +948,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1026,7 +1029,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1074,7 +1077,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1126,7 +1129,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1178,7 +1181,7 @@ export class DevUtilsContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index ef938361a1..e954be219e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -48,6 +48,9 @@ export interface DummyERC20TokenTransferEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class DummyERC20TokenContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806395d89b411161008c578063dd62ed3e11610066578063dd62ed3e146102e2578063e30443bc1461031d578063f2fde38b14610356578063fa9b701814610389576100ea565b806395d89b4114610282578063a0712d681461028a578063a9059cbb146102a9576100ea565b806323b872dd116100c857806323b872dd146101d3578063313ce5671461021657806370a082311461021e5780638da5cb5b14610251576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101b9575b600080fd5b6100f7610391565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a56004803603604081101561018257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561043d565b604080519115158252519081900360200190f35b6101c16104b0565b60408051918252519081900360200190f35b6101a5600480360360608110156101e957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104b6565b6101c1610772565b6101c16004803603602081101561023457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610778565b6102596107a0565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100f76107bc565b6102a7600480360360208110156102a057600080fd5b5035610835565b005b6101a5600480360360408110156102bf57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108bb565b6101c1600480360360408110156102f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610a4a565b6102a76004803603604081101561033357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a82565b6102a76004803603602081101561036c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b18565b6101c1610b95565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b820191906000526020600020905b81548152906001019060200180831161041857829003601f168201915b505050505081565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035490565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600260209081526040808320338452825280832054938352600190915281205490919083111561056357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b828110156105d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020526040902054838101101561066857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156107025773ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60065481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b69021e19e0c9bab24000008111156108ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56414c55455f544f4f5f4c415247450000000000000000000000000000000000604482015290519081900360640190fd5b6108b83382610ba3565b50565b3360009081526001602052604081205482111561093957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205482810110156109cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b3360008181526001602090815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b610a8a610c5c565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205480821015610ad557610acd600354610ac88385610ca5565b610ca5565b600355610aee565b610aea600354610ae58484610ca5565b610cc4565b6003555b5073ffffffffffffffffffffffffffffffffffffffff909116600090815260016020526040902055565b610b20610c5c565b73ffffffffffffffffffffffffffffffffffffffff8116610b5057610b4b610b46610ce7565b610d1e565b6108b8565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905550565b69021e19e0c9bab240000081565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054610bd4908290610cc4565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902055600354610c079082610cc4565b60035560408051828152905173ffffffffffffffffffffffffffffffffffffffff8416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ca357600054610ca390610b4690339073ffffffffffffffffffffffffffffffffffffffff16610d26565b565b600082821115610cbe57610cbe610b4660028585610db2565b50900390565b600082820183811015610ce057610ce0610b4660008686610db2565b9392505050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b805160208201fd5b6040805173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044808301919091528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1de45ad10000000000000000000000000000000000000000000000000000000017905292915050565b606063e946c1bb60e01b84848460405160240180846003811115610dd257fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050939250505056fea265627a7a7231582089c03e503c77db7069bea8a94ec1c47ee5201d8bdb53857e70a882a1130e1ac364736f6c634300050c0032'; public MAX_MINT_AMOUNT = { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index c25fe1bf64..ebca30f196 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -58,6 +58,9 @@ export interface DummyERC721TokenTransferEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class DummyERC721TokenContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a22cb46511610066578063a22cb46514610362578063b88d4fde1461039d578063e985e9c51461043a578063f2fde38b14610489576100f5565b806370a08231146102d45780638da5cb5b1461031957806395d89b41146103215780639dc29fac14610329576100f5565b806323b872dd116100d357806323b872dd146101f857806340c10f191461023b57806342842e0e146102745780636352211e146102b7576100f5565b806306fdde03146100fa578063081812fc14610177578063095ea7b3146101bd575b600080fd5b6101026104bc565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101946004803603602081101561018d57600080fd5b5035610568565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101f6600480360360408110156101d357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610590565b005b6101f66004803603606081101561020e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356106b2565b6101f66004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a20565b6101f66004803603606081101561028a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610a2e565b610194600480360360208110156102cd57600080fd5b5035610bc8565b610307600480360360208110156102ea57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c5f565b60408051918252519081900360200190f35b610194610d0c565b610102610d28565b6101f66004803603604081101561033f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610da1565b6101f66004803603604081101561037857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515610db3565b6101f6600480360360808110156103b357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013590911691604082013591908101906080810160608201356401000000008111156103fb57600080fd5b82018360208201111561040d57600080fd5b8035906020019184600183028401116401000000008311171561042f57600080fd5b509092509050610e4c565b6104756004803603604081101561045057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611017565b604080519115158252519081900360200190f35b6101f66004803603602081101561049f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611052565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156105605780601f1061053557610100808354040283529160200191610560565b820191906000526020600020905b81548152906001019060200180831161054357829003601f168201915b505050505081565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061059b82610bc8565b90503373ffffffffffffffffffffffffffffffffffffffff821614806105c657506105c68133611017565b61063157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b73ffffffffffffffffffffffffffffffffffffffff821661073457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b600061073f82610bc8565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146107db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b3360006107e784610568565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148061082857506108288383611017565b8061085e57508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6108c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561091a57600084815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600084815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8b8116919091179091558a168452600390915290912054610984916110ce565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526003602052604080822093909355908716815220546109c19060016110ed565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260036020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b610a2a8282611110565b5050565b610a398383836106b2565b813b8015610bc257604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590526080606483015260006084830181905292519086169163150b7a029160c480830192602092919082900301818787803b158015610ace57600080fd5b505af1158015610ae2573d6000803e3d6000fd5b505050506040513d6020811015610af857600080fd5b505160405190915080602f61166c8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610bc057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b50505050565b60008181526001602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610c5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610ce357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6006805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156105605780601f1061053557610100808354040283529160200191610560565b610da96112e3565b610a2a828261132c565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610e578585856106b2565b833b801561100f576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff89811660248501526044840188905260806064850190815260848501879052600094918a169363150b7a029390928c928b928b928b929060a401848480828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b158015610f1b57600080fd5b505af1158015610f2f573d6000803e3d6000fd5b505050506040513d6020811015610f4557600080fd5b505160405190915080602f61166c8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461100d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260046020908152604080832093909416825291909152205460ff1690565b61105a6112e3565b73ffffffffffffffffffffffffffffffffffffffff811661108a57611085611080611501565b611538565b6110cb565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b6000828211156110e7576110e761108060028585611540565b50900390565b6000828201838110156111095761110961108060008686611540565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff821661119257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b60008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff16801561122457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4552433732315f4f574e45525f414c52454144595f4558495354530000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8916908117909155845260039091529091205461128a916110ed565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600360205260408082209390935591518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461132a5760005461132a9061108090339073ffffffffffffffffffffffffffffffffffffffff166115df565b565b73ffffffffffffffffffffffffffffffffffffffff82166113ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732315f5a45524f5f4f574e45525f4144445245535300000000000000604482015290519081900360640190fd5b60008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff908116908316811461144557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905573ffffffffffffffffffffffffffffffffffffffff871684526003909152909120546114a7916110ce565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260036020526040808220939093559151849291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b805160208201fd5b606063e946c1bb60e01b8484846040516024018084600381111561156057fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044808301919091528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1de45ad1000000000000000000000000000000000000000000000000000000001790529291505056fe6f6e455243373231526563656976656428616464726573732c616464726573732c75696e743235362c627974657329a265627a7a723158207bb3c4b1d40aa051fbb8e4f8230bb310013e75ca9fa97c528018b4c4aba3b92564736f6c634300050c0032'; /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index d32901a91e..84490f53af 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class DutchAuctionContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Calculates the Auction Details for the given order diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index 3816ce9f4d..d29f0b2203 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -48,6 +48,9 @@ export interface ERC1155ProxyAuthorizedAddressRemovedEventArgs extends DecodedLo // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ERC1155ProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100be5760003560e01c8063a85e59e411610076578063b91816111161005b578063b918161114610285578063d39de6e9146102cc578063f2fde38b14610324576100be565b8063a85e59e4146101b2578063ae25532e14610248576100be565b806370712939116100a7578063707129391461013e5780638da5cb5b146101715780639ad2674414610179576100be565b806342f1181e146100c3578063494503d4146100f8575b600080fd5b6100f6600480360360208110156100d957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610357565b005b6101156004803603602081101561010e57600080fd5b5035610543565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100f66004803603602081101561015457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610577565b61011561086a565b6100f66004803603604081101561018f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610886565b6100f6600480360360808110156101c857600080fd5b8101906020810181356401000000008111156101e357600080fd5b8201836020820111156101f557600080fd5b8035906020019184600183028401116401000000008311171561021757600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610c37565b610250611138565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6102b86004803603602081101561029b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611159565b604080519115158252519081900360200190f35b6102d461116e565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103105781810151838201526020016102f8565b505050509050019250505060405180910390f35b6100f66004803603602081101561033a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111dd565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103dd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff161561047257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b6002818154811061055057fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661069157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600254811015610823578173ffffffffffffffffffffffffffffffffffffffff166002828154811061070b57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561081b57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061076357fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061079657fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906108159082611407565b50610823565b6001016106dd565b50604051339073ffffffffffffffffffffffffffffffffffffffff8316907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461090c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff166109a057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6002548110610a1057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1660028281548110610a3457fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610ac257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610b3d57fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610b7057fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610bef9082611407565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b3360009081526001602052604090205460ff16610cb557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f53454e4445525f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b60006060806060610d0b60048a8a90508b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949392505063ffffffff6112c3169050565b8060200190516080811015610d1f57600080fd5b815160208301805160405192949293830192919084640100000000821115610d4657600080fd5b908301906020820185811115610d5b57600080fd5b8251866020820283011164010000000082111715610d7857600080fd5b82525081516020918201928201910280838360005b83811015610da5578181015183820152602001610d8d565b5050505090500160405260200180516040519392919084640100000000821115610dce57600080fd5b908301906020820185811115610de357600080fd5b8251866020820283011164010000000082111715610e0057600080fd5b82525081516020918201928201910280838360005b83811015610e2d578181015183820152602001610e15565b5050505090500160405260200180516040519392919084640100000000821115610e5657600080fd5b908301906020820185811115610e6b57600080fd5b8251640100000000811182820188101715610e8557600080fd5b82525081516020918201929091019080838360005b83811015610eb2578181015183820152602001610e9a565b50505050905090810190601f168015610edf5780820380516001836020036101000a031916815260200191505b506040525050509350935093509350600082519050606081604051908082528060200260200182016040528015610f20578160200160208202803883390190505b50905060005b828114610f6957610f4a858281518110610f3c57fe5b602002602001015189611306565b828281518110610f5657fe5b6020908102919091010152600101610f26565b508573ffffffffffffffffffffffffffffffffffffffff16632eb2c2d68a8a8885886040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561104657818101518382015260200161102e565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561108557818101518382015260200161106d565b50505050905001848103825285818151815260200191508051906020019080838360005b838110156110c15781810151838201526020016110a9565b50505050905090810190601f1680156110ee5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561111357600080fd5b505af1158015611127573d6000803e3d6000fd5b505050505050505050505050505050565b6000604051808061144f603091396030019050604051809103902090505b90565b60016020526000908152604090205460ff1681565b606060028054806020026020016040519081016040528092919081815260200182805480156111d357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116111a8575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff16331461126357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116156112c057600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b6060818311156112e1576112e16112dc60008585611340565b6113df565b83518211156112fa576112fa6112dc6001848751611340565b50819003910190815290565b6000826113155750600061133a565b8282028284828161132257fe5b0414611337576113376112dc600186866113e7565b90505b92915050565b6060632800659560e01b8484846040516024018084600781111561136057fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fd5b606063e946c1bb60e01b8484846040516024018084600381111561136057fe5b81548183558181111561142b5760008381526020902061142b918101908301611430565b505050565b61115691905b8082111561144a5760008155600101611436565b509056fe4552433131353541737365747328616464726573732c75696e743235365b5d2c75696e743235365b5d2c627974657329a265627a7a72315820be5e6597d38133fd52aac17250498790f106d5d4d0e4ab30d0e854a2db1e2ffe64736f6c634300050c0032'; /** @@ -366,7 +369,7 @@ export class ERC1155ProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index 81b5885dcf..0802320bc4 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -48,6 +48,9 @@ export interface ERC20ProxyAuthorizedAddressRemovedEventArgs extends DecodedLogA // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ERC20ProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639ad2674411610076578063b91816111161005b578063b918161114610374578063d39de6e9146103bb578063f2fde38b14610413576100a3565b80639ad26744146102fe578063ae25532e14610337576100a3565b806342f1181e14610248578063494503d41461027d57806370712939146102c35780638da5cb5b146102f6575b7fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e40000000000000000000000000000000000000000000000000000000081141561024257604080513381526001602082015290812054610177577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b50602860043501357f23b872dd0000000000000000000000000000000000000000000000000000000060005260606024600437602060006064600080855af1600080511160203d14163d15178116905080156101cf57005b50507f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f5452414e534645525f4641494c454400000000000000000000000000604052600060605260646000fd5b50600080fd5b61027b6004803603602081101561025e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610446565b005b61029a6004803603602081101561029357600080fd5b5035610632565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61027b600480360360208110156102d957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610666565b61029a610959565b61027b6004803603604081101561031457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610975565b61033f610d26565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6103a76004803603602081101561038a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610d5c565b604080519115158252519081900360200190f35b6103c3610d71565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103ff5781810151838201526020016103e7565b505050509050019250505060405180910390f35b61027b6004803603602081101561042957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610de0565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104cc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff161561056157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b6002818154811061063f57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106ec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661078057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600254811015610912578173ffffffffffffffffffffffffffffffffffffffff16600282815481106107fa57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561090a57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061085257fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff909216918390811061088557fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906109049082610ec6565b50610912565b6001016107cc565b50604051339073ffffffffffffffffffffffffffffffffffffffff8316907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff16610a8f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6002548110610aff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1660028281548110610b2357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610bb157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610c2c57fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610c5f57fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610cde9082610ec6565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f4552433230546f6b656e28616464726573732900000000000000000000000000815290519081900360130190205b90565b60016020526000908152604090205460ff1681565b60606002805480602002602001604051908101604052809291908181526020018280548015610dd657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dab575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e6657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811615610ec357600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b815481835581811115610eea57600083815260209020610eea918101908301610eef565b505050565b610d5991905b80821115610f095760008155600101610ef5565b509056fea265627a7a72315820cb3312567959522bd12ea03b9812cab2bace85fe5f172b3ae8014b3eacc85fa864736f6c634300050b0032'; /** @@ -656,7 +659,7 @@ export class ERC20ProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index f8bef75384..0a8e735dfa 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -48,6 +48,9 @@ export interface ERC20TokenApprovalEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ERC20TokenContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610121578063a9059cbb14610154578063dd62ed3e1461018d57610072565b8063095ea7b31461007757806318160ddd146100c457806323b872dd146100de575b600080fd5b6100b06004803603604081101561008d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356101c8565b604080519115158252519081900360200190f35b6100cc61023b565b60408051918252519081900360200190f35b6100b0600480360360608110156100f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610241565b6100cc6004803603602081101561013757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661049d565b6100b06004803603604081101561016a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356104c5565b6100cc600480360360408110156101a357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610652565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260408120548211156102d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832033845290915290205482111561037457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054828101101561040a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80841660008181526020818152604080832080548801905593881680835284832080548890039055600182528483203384528252918490208054879003905583518681529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561054357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156105d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b336000818152602081815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526001602090815260408083209390941682529190915220549056fea265627a7a723158205713efa92f66e67a8d01b80af8500df66bd6e9862dcf791e587181109d8ab0c464736f6c634300050b0032'; /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index 6011d7ef8b..e3a1c3ad56 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -48,6 +48,9 @@ export interface ERC721ProxyAuthorizedAddressRemovedEventArgs extends DecodedLog // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ERC721ProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639ad2674411610076578063b91816111161005b578063b9181611146103ea578063d39de6e914610431578063f2fde38b14610489576100a3565b80639ad2674414610374578063ae25532e146103ad576100a3565b806342f1181e146102be578063494503d4146102f357806370712939146103395780638da5cb5b1461036c575b7fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e4000000000000000000000000000000000000000000000000000000008114156102b857604080513381526001602082015290812054610177577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b50600160643503156101f4577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0e494e56414c49445f414d4f554e540000000000000000000000000000604052600060605260646000fd5b7f23b872dd000000000000000000000000000000000000000000000000000000006000526040602460043760043560206048820160443760288101356000806064600080855af1915050801561024657005b507f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f5452414e534645525f4641494c454400000000000000000000000000604052600060605260646000fd5b50600080fd5b6102f1600480360360208110156102d457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166104bc565b005b6103106004803603602081101561030957600080fd5b50356106a8565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102f16004803603602081101561034f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166106dc565b6103106109cf565b6102f16004803603604081101561038a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356109eb565b6103b5610d9c565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b61041d6004803603602081101561040057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610dd2565b604080519115158252519081900360200190f35b610439610de7565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561047557818101518382015260200161045d565b505050509050019250505060405180910390f35b6102f16004803603602081101561049f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610e56565b60005473ffffffffffffffffffffffffffffffffffffffff16331461054257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff16156105d757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560028054928301815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b600281815481106106b557fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461076257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff166107f657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260016020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600254811015610988578173ffffffffffffffffffffffffffffffffffffffff166002828154811061087057fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561098057600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081106108c857fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff90921691839081106108fb57fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061097a9082610f3c565b50610988565b600101610842565b50604051339073ffffffffffffffffffffffffffffffffffffffff8316907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205460ff16610b0557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6002548110610b7557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1660028281548110610b9957fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614610c2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610ca257fe5b6000918252602090912001546002805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610cd557fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610d549082610f3c565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f455243373231546f6b656e28616464726573732c75696e7432353629000000008152905190819003601c0190205b90565b60016020526000908152604090205460ff1681565b60606002805480602002602001604051908101604052809291908181526020018280548015610e4c57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e21575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff163314610edc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811615610f3957600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b815481835581811115610f6057600083815260209020610f60918101908301610f65565b505050565b610dcf91905b80821115610f7f5760008155600101610f6b565b509056fea265627a7a723158201e53a891f6df3931041b820f71387e9eecd97f7ea0d346c54fab37668bd022ec64736f6c634300050b0032'; /** @@ -656,7 +659,7 @@ export class ERC721ProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index 49bfe06439..7747cb11d6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -58,6 +58,9 @@ export interface ERC721TokenTransferEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ERC721TokenContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80636352211e11610076578063a22cb4651161005b578063a22cb46514610211578063b88d4fde1461024c578063e985e9c5146102e9576100a3565b80636352211e146101af57806370a08231146101cc576100a3565b8063081812fc146100a8578063095ea7b3146100ee57806323b872dd1461012957806342842e0e1461016c575b600080fd5b6100c5600480360360208110156100be57600080fd5b5035610338565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101276004803603604081101561010457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610360565b005b6101276004803603606081101561013f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610482565b6101276004803603606081101561018257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356107ef565b6100c5600480360360208110156101c557600080fd5b5035610989565b6101ff600480360360208110156101e257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a20565b60408051918252519081900360200190f35b6101276004803603604081101561022757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515610acd565b6101276004803603608081101561026257600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013590911691604082013591908101906080810160608201356401000000008111156102aa57600080fd5b8201836020820111156102bc57600080fd5b803590602001918460018302840111640100000000831117156102de57600080fd5b509092509050610b66565b610324600480360360408110156102ff57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610d31565b604080519115158252519081900360200190f35b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061036b82610989565b90503373ffffffffffffffffffffffffffffffffffffffff8216148061039657506103968133610d31565b61040157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526001602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b73ffffffffffffffffffffffffffffffffffffffff821661050457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b600061050f82610989565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146105ab57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b3360006105b784610338565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105f857506105f88383610d31565b8061062e57508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61069957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116156106ea57600084815260016020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b60008481526020818152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a811691909117909155891683526002909152902054610753906001610d6c565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260205260408082209390935590871681522054610790906001610d90565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260026020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b6107fa838383610482565b813b801561098357604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590526080606483015260006084830181905292519086169163150b7a029160c480830192602092919082900301818787803b15801561088f57600080fd5b505af11580156108a3573d6000803e3d6000fd5b505050506040513d60208110156108b957600080fd5b505160405190915080602f610e5b8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461098157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b50505050565b60008181526020819052604081205473ffffffffffffffffffffffffffffffffffffffff1680610a1a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610aa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610b71858585610482565b833b8015610d29576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff89811660248501526044840188905260806064850190815260848501879052600094918a169363150b7a029390928c928b928b928b929060a401848480828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d6020811015610c5f57600080fd5b505160405190915080602f610e5b8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610d2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205460ff1690565b600082821115610d8a57610d8a610d8560028585610db3565b610e52565b50900390565b600082820183811015610dac57610dac610d8560008686610db3565b9392505050565b606063e946c1bb60e01b84848460405160240180846003811115610dd357fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fdfe6f6e455243373231526563656976656428616464726573732c616464726573732c75696e743235362c627974657329a265627a7a723158204bc74831490bca4fbe1805808d58d6b0e12f618a37565e744e91d8dc73dc18b164736f6c634300050c0032'; /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts index 5ffcb51c88..74ffebf9ba 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class EthBalanceCheckerContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a0901e5114610030575b600080fd5b6100d36004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184602083028401116401000000008311171561009557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610123945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561010f5781810151838201526020016100f7565b505050509050019250505060405180910390f35b6060808251604051908082528060200260200182016040528015610151578160200160208202803883390190505b50905060005b835181146101a95783818151811061016b57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff163182828151811061019657fe5b6020908102919091010152600101610157565b509291505056fea265627a7a7231582094309783f0b63086d85d9cb4f6e5be253699056ac1580a863367c5076ecb5c1864736f6c634300050b0032'; /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 22db9efa04..4f818c3032 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -107,6 +107,9 @@ export interface ExchangeTransactionExecutionEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ExchangeContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x6080604052600436106102d15760003560e01c80638da5cb5b11610179578063beee2e14116100d6578063dd885e2d1161008a578063eea086ba11610064578063eea086ba14610715578063f2fde38b1461072a578063fc74896d1461074a576102d1565b8063dd885e2d146106cd578063dedfc1f1146106ef578063e14b58c414610702576102d1565b8063c26cfecd116100bb578063c26cfecd14610678578063c585bb931461068d578063d9bfa73e146106ad576102d1565b8063beee2e1414610645578063c0fa16cc14610658576102d1565b80639d3fa4b91161012d578063a6c3bf3311610112578063a6c3bf33146105ff578063b04fbddd14610612578063b718e29214610632576102d1565b80639d3fa4b9146105b2578063a12dcc6f146105df576102d1565b80639331c7421161015e5780639331c7421461056c5780639694a4021461058c5780639b44d5561461059f576102d1565b80638da5cb5b146105375780638ea8dfe41461054c576102d1565b80636a1a80fd116102325780638171c407116101e657806388ec79fb116101c057806388ec79fb146104e45780638bc8efb3146105045780638d45cd2314610517576102d1565b80638171c4071461048f57806382c174d0146104af578063850a1501146104cf576102d1565b806377fcce681161021757806377fcce681461044957806378d29ac11461045c5780637b8e35141461046f576102d1565b80636a1a80fd146104165780636fcf3e9e14610436576102d1565b80632da629871161028957806346c02d7a1161026e57806346c02d7a146103c35780634f9559b1146103d657806360704108146103e9576102d1565b80632da629871461038e578063369da099146103a3576102d1565b80632280c910116102ba5780632280c9101461032e578063288cdc911461034e5780632ac126221461036e576102d1565b80630228e168146102d65780631ce4c78b1461030c575b600080fd5b3480156102e257600080fd5b506102f66102f1366004614e64565b61076a565b60405161030391906154c4565b60405180910390f35b34801561031857600080fd5b5061032161077f565b60405161030391906154cf565b61034161033c366004615108565b610785565b60405161030391906156a0565b34801561035a57600080fd5b50610321610369366004614e64565b6107c7565b34801561037a57600080fd5b506102f6610389366004614e64565b6107d9565b6103a161039c366004614f82565b6107ee565b005b6103b66103b1366004614d60565b610812565b60405161030391906159c2565b6103a16103d1366004614e64565b610939565b6103a16103e4366004614e64565b6109ac565b3480156103f557600080fd5b50610409610404366004614eed565b610ab9565b604051610303919061535b565b610429610424366004614c40565b610b07565b604051610303919061594b565b610429610444366004614c40565b610b3f565b6103a1610457366004614b2a565b610b5d565b6103b661046a366004614d60565b610c20565b34801561047b57600080fd5b506102f661048a366004614af6565b610d70565b34801561049b57600080fd5b506102f66104aa366004614ea0565b610d90565b3480156104bb57600080fd5b506102f66104ca366004614e7c565b610def565b3480156104db57600080fd5b50610409610e0f565b6104f76104f236600461500c565b610e2b565b60405161030391906159d0565b6103b6610512366004614d60565b610e49565b34801561052357600080fd5b506102f6610532366004615108565b610e7d565b34801561054357600080fd5b50610409610ea2565b61055f61055a366004614cdc565b610ebe565b60405161030391906154b1565b34801561057857600080fd5b506103a1610587366004614e64565b610fe9565b61055f61059a366004614cdc565b611031565b6103b66105ad3660046150a8565b6110f8565b3480156105be57600080fd5b506105d26105cd366004614f82565b61111d565b6040516103039190615a12565b3480156105eb57600080fd5b506102f66105fa366004614fb5565b611201565b6103b661060d366004614d60565b611226565b34801561061e57600080fd5b506103a161062d366004614b65565b61125a565b6104f761064036600461500c565b611306565b61055f610653366004614cdc565b611324565b34801561066457600080fd5b506103a1610673366004614adb565b6113d9565b34801561068457600080fd5b5061032161147c565b34801561069957600080fd5b506103a16106a8366004614adb565b611482565b3480156106b957600080fd5b506103216106c8366004614af6565b611616565b3480156106d957600080fd5b506106e2611633565b604051610303919061562b565b6103a16106fd366004614c0d565b611657565b6103b66107103660046150a8565b611699565b34801561072157600080fd5b506104096116b4565b34801561073657600080fd5b506103a1610745366004614adb565b6116d0565b61075d610758366004614db3565b611748565b6040516103039190615433565b60056020526000908152604090205460ff1681565b60035481565b606061078f61187b565b156107a55761079e838361189d565b90506107c1565b6107ad6119b7565b6107b7838361189d565b90506107c16119f9565b92915050565b60096020526000908152604090205481565b600a6020526000908152604090205460ff1681565b6107f6611a2b565b6107ff81611a9a565b610807611ad7565b61080f611aeb565b50565b61081a614561565b61082261187b565b156108b857835160005b8181146108b157600061084c846020015187611b1590919063ffffffff16565b9050610856614561565b61088788848151811061086557fe5b60200260200101518388868151811061087a57fe5b6020026020010151611b34565b90506108938582611c75565b9450868560200151106108a75750506108b1565b505060010161082c565b5050610932565b6108c06119b7565b835160005b8181146109285760006108e5846020015187611b1590919063ffffffff16565b90506108ef614561565b6108fe88848151811061086557fe5b905061090a8582611c75565b94508685602001511061091e575050610928565b50506001016108c5565b50506109326119f9565b9392505050565b610941611a2b565b600061094b611d10565b600083815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff90941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550610807611ad7565b6109b4611a2b565b60006109be611d10565b9050600073ffffffffffffffffffffffffffffffffffffffff821633146109e557336109e8565b60005b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b60209081526040808320938516835292905220549091506001840190808211610a3d57610a3d610a38858584611d42565b611de7565b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610aa59086906154cf565b60405180910390a350505050610807611ad7565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b610b0f614590565b610b17611a2b565b610b25858585856001611def565b9050610b2f611ad7565b610b37611aeb565b949350505050565b610b47614590565b610b4f611a2b565b610b25858585856000611def565b610b65611a2b565b6000610b6f611d10565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba89190610c039086906154c4565b60405180910390a350610c14611ad7565b610c1c611aeb565b5050565b610c28614561565b610c3061187b565b15610cee57835160005b8181146108b1578251600090610c5790879063ffffffff611b1516565b90506000610c94888481518110610c6a57fe5b602002602001015160a00151898581518110610c8257fe5b6020026020010151608001518461215c565b9050610c9e614561565b610cc2898581518110610cad57fe5b60200260200101518389878151811061087a57fe5b9050610cce8682611c75565b955087866000015110610ce3575050506108b1565b505050600101610c3a565b610cf66119b7565b835160005b818114610928578251600090610d1890879063ffffffff611b1516565b90506000610d2b888481518110610c6a57fe5b9050610d35614561565b610d44898581518110610cad57fe5b9050610d508682611c75565b955087866000015110610d6557505050610928565b505050600101610cfb565b600860209081526000928352604080842090915290825290205460ff1681565b600080610d9e85858561217e565b90506005816008811115610dae57fe5b1480610dc557506007816008811115610dc357fe5b145b15610dda57610dda610a3860058787876121fd565b610de6818686866122a5565b95945050505050565b600760209081526000928352604080842090915290825290205460ff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b610e336145b8565b610e3b611a2b565b610b25858585856000612515565b610e51614561565b610e5c848484610c20565b9050828160000151101561093257610932610a386000858460000151612602565b600080610e956001548561262190919063ffffffff16565b9050610b37848285612635565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6060610ec861187b565b15610f6b578351604080518281526020808402820101909152818015610f0857816020015b610ef5614561565b815260200190600190039081610eed5790505b50915060005b8181146108b157610f4c868281518110610f2457fe5b6020026020010151868381518110610f3857fe5b602002602001015186848151811061087a57fe5b838281518110610f5857fe5b6020908102919091010152600101610f0e565b610f736119b7565b8351604080518281526020808402820101909152818015610fae57816020015b610f9b614561565b815260200190600190039081610f935790505b50915060005b81811461092857610fca868281518110610f2457fe5b838281518110610fd657fe5b6020908102919091010152600101610fb4565b610ff16126bb565b7f3a3e76d7a75e198aef1f53137e4f2a8a2ec74e2e9526db8404d08ccc9f1e621d60035482604051611024929190615543565b60405180910390a1600355565b606061103b611a2b565b835160408051828152602080840282010190915281801561107657816020015b611063614561565b81526020019060019003908161105b5790505b50915060005b8181146110e6576110c786828151811061109257fe5b60200260200101518683815181106110a657fe5b60200260200101518684815181106110ba57fe5b6020026020010151612702565b8382815181106110d357fe5b602090810291909101015260010161107c565b50506110f0611ad7565b610932611aeb565b611100614561565b611108611a2b565b611113848484612702565b90506110f0611ad7565b6111256145ec565b61112e826127a4565b60408301526020820152608082015161114e5760015b60ff168152610b02565b60a082015161115e576002611144565b8160a00151816040015110611174576005611144565b8161010001514210611187576004611144565b6020808201516000908152600a909152604090205460ff16156111ab576006611144565b610120820151825173ffffffffffffffffffffffffffffffffffffffff9081166000908152600b6020908152604080832060608801519094168352929052205411156111f8576006611144565b60038152919050565b600080611219600154856127d590919063ffffffff16565b9050610b378482856127e4565b61122e614561565b611239848484610812565b9050828160200151101561093257610932610a386001858460200151612602565b835160005b8181146112ca576112c28160001b87838151811061127957fe5b602002602001015187848151811061128d57fe5b60200260200101518785815181106112a157fe5b60200260200101518786815181106112b557fe5b6020026020010151612839565b60010161125f565b506040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fd90615914565b60405180910390fd5b61130e6145b8565b611316611a2b565b610b25858585856001612515565b606061132e611a2b565b835160408051828152602080840282010190915281801561136957816020015b611356614561565b81526020019060019003908161134e5790505b50915060005b8181146110e6576113ba86828151811061138557fe5b602002602001015186838151811061139957fe5b60200260200101518684815181106113ad57fe5b60200260200101516129f3565b8382815181106113c657fe5b602090810291909101015260010161136f565b6113e16126bb565b6004546040517fe1a5430ebec577336427f40f15822f1f36c5e3509ff209d6db9e6c9e6941cb0b9161142d9173ffffffffffffffffffffffffffffffffffffffff90911690849061537c565b60405180910390a1600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015481565b61148a6126bb565b60008173ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114d257600080fd5b505afa1580156114e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061150a9190810190614f09565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16801561156857611568610a388383612a26565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600260205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c03194906116099084908690615658565b60405180910390a1505050565b600b60209081526000928352604080842090915290825290205481565b7f20c13b0b0000000000000000000000000000000000000000000000000000000081565b61165f611a2b565b805160005b81811461168f5761168783828151811061167a57fe5b6020026020010151611a9a565b600101611664565b5050610807611ad7565b6116a1614561565b6116a9611a2b565b6111138484846129f3565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b6116d86126bb565b73ffffffffffffffffffffffffffffffffffffffff8116611703576116fe610a38612ac8565b61080f565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905550565b606061175261187b565b156117f457825160408051828152602080840282010190915260609082801561178f57816020015b606081526020019060019003908161177a5790505b50905060005b8281146117eb576117cc8682815181106117ab57fe5b60200260200101518683815181106117bf57fe5b602002602001015161189d565b8282815181106117d857fe5b6020908102919091010152600101611795565b509150506107c1565b6117fc6119b7565b825160408051828152602080840282010190915260609082801561183457816020015b606081526020019060019003908161181f5790505b50905060005b82811461186f576118508682815181106117ab57fe5b82828151811061185c57fe5b602090810291909101015260010161183a565b509150506107c16119f9565b6000547501000000000000000000000000000000000000000000900460ff1690565b606060006118b66001548561262190919063ffffffff16565b90506118c3848483612aff565b60608401516118d28180612bd3565b60008281526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015190516060913091611920919061530e565b600060405180830381855af49150503d806000811461195b576040519150601f19603f3d011682016040523d82523d6000602084013e611960565b606091505b50915091508161197757611977610a388583612c36565b611982836000612bd3565b60405184907fa4a7329f1dd821363067e07d359e347b4af9b1efe4b6cccf13240228af3c800d90600090a29695505050505050565b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055565b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055611a29612c53565b565b60005474010000000000000000000000000000000000000000900460ff1615611a5957611a59610a38612c88565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b611aa26145ec565b611aab8261111d565b9050611ab78282612cbf565b805160ff16600314611ac9575061080f565b610c1c828260200151612d6e565b611adf61187b565b611a2957611a29612c53565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b600082821115611b2e57611b2e610a3860028585612e17565b50900390565b611b3c614561565b6040516060907f9b44d5560000000000000000000000000000000000000000000000000000000090611b7690879087908790602401615a58565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060603073ffffffffffffffffffffffffffffffffffffffff1683604051611bfe919061530e565b600060405180830381855af49150503d8060008114611c39576040519150601f19603f3d011682016040523d82523d6000602084013e611c3e565b606091505b50915091508115611c6b57805160a014611c5457fe5b80806020019051611c689190810190614f25565b93505b5050509392505050565b611c7d614561565b81518351611c909163ffffffff612e3616565b815260208083015190840151611cab9163ffffffff612e3616565b602082015260408083015190840151611cc99163ffffffff612e3616565b604082015260608083015190840151611ce79163ffffffff612e3616565b606082015260808083015190840151611d059163ffffffff612e3616565b608082015292915050565b60065460009073ffffffffffffffffffffffffffffffffffffffff16818115611d395781611d3b565b335b9250505090565b6060634ad3127560e01b848484604051602401611d61939291906153a3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b611df7614590565b8551611e0a57611e0a610a386000612e52565b8451611e1d57611e1d610a386001612e52565b8351865114611e3357611e33610a386002612e52565b8251855114611e4957611e49610a386003612e52565b8551604051908082528060200260200182016040528015611e8457816020015b611e71614561565b815260200190600190039081611e695790505b5081528451604080518281526020808402820101909152908015611ec257816020015b611eaf614561565b815260200190600190039081611ea75790505b506020820152600080611ed361460c565b88600081518110611ee057fe5b60200260200101519050611ef261460c565b88600081518110611eff57fe5b602002602001015190506000611f14836127a4565b9150506000611f22836127a4565b915050611f2d614561565b611f35614561565b611f3d6145b8565b611f7087878f8c81518110611f4e57fe5b60200260200101518f8c81518110611f6257fe5b60200260200101518f612515565b805160200151909150611f8a90869063ffffffff612e3616565b9450611fa781602001516020015185612e3690919063ffffffff16565b9350611fb7838260000151611c75565b9250611fc7828260200151611c75565b9150611fe481604001518b60400151612e3690919063ffffffff16565b60408b0152606080820151908b01516120029163ffffffff612e3616565b60608b015260a087015185106120ad578951805160018b019a859291811061202657fe5b60200260200101819052506040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525092508e5189141561208a57818a60200151898151811061207957fe5b60200260200101819052505061214b565b8e898151811061209657fe5b602002602001015196506120a9876127a4565b9550505b8560a00151841061214557818a6020015189806001019a50815181106120cf57fe5b60200260200101819052506040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525091508d5188141561212257828a600001518a8151811061207957fe5b8d888151811061212e57fe5b60200260200101519550612141866127a4565b9450505b50611f35565b505050505050505095945050505050565b6000610b3783612172868563ffffffff612ef116565b9063ffffffff612f2216565b600061218b848484612f4c565b905073ffffffffffffffffffffffffffffffffffffffff83166121b8576121b8610a3860068686866121fd565b600881818111156121c557fe5b60ff16106121dd576121dd610a3860038686866121fd565b60008160088111156121eb57fe5b141561093257610932610a3860048686865b6060637e5a231860e01b8585858560405160240161221e94939291906158b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050949350505050565b600060018560088111156122b557fe5b14156122dc5781516001146122d4576122d4610a3860028686866121fd565b506000610b37565b60028560088111156122ea57fe5b14156123e357815160421461230957612309610a3860028686866121fd565b60008260008151811061231857fe5b016020015160f81c9050600061233584600163ffffffff612f8b16565b9050600061234a85602163ffffffff612f8b16565b9050600060018885858560405160008152602001604052604051612371949392919061560d565b6020604051602081039080840390855afa158015612393573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8981169116149550610b37945050505050565b60038560088111156123f157fe5b141561249e57815160421461241057612410610a3860028686866121fd565b60008260008151811061241f57fe5b016020015160f81c9050600061243c84600163ffffffff612f8b16565b9050600061245185602163ffffffff612f8b16565b90506000600188604051602001612468919061532a565b6040516020818303038152906040528051906020012085858560405160008152602001604052604051612371949392919061560d565b60048560088111156124ac57fe5b14156124c4576124bd848484612fb5565b9050610b37565b60068560088111156124d257fe5b146124d957fe5b50600083815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915290205460ff16949350505050565b61251d6145b8565b61016080870151610140808801919091528701519086015261253d6145ec565b6125468761111d565b90506125506145ec565b6125598761111d565b90506000612565611d10565b90506125738984838a6131ab565b61257f888383896131ab565b6125938989856020015185602001516132e1565b6125ac8989856040015185604001516003543a8b61332c565b93506125c78982856020015186604001518860000151613481565b6125e08882846020015185604001518860200151613481565b6125f6836020015183602001518b8b858961355f565b50505095945050505050565b60606318e4b14160e01b848484604051602401611d619392919061589e565b60006109328261263085613706565b61378e565b60608301516000908161264985838661217e565b9050600581600881111561265957fe5b141561267b5761267461266c87876137c8565b868487613800565b92506126b2565b600781600881111561268957fe5b14156126a35761267461269c87876137c8565b83866138b4565b6126af818684876122a5565b92505b50509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a2957600054611a2990610a3890339073ffffffffffffffffffffffffffffffffffffffff166138c3565b61270a614561565b6127126145ec565b61271b8561111d565b90506000612727611d10565b9050612735868383876131ab565b600061275283604001518860a00151611b1590919063ffffffff16565b9050600061276087836138e0565b905061277088826003543a6138f6565b945060008460200151905061278c89858388604001518a613481565b612798818a868961396d565b50505050509392505050565b6000806127bc600154846127d590919063ffffffff16565b6000818152600960205260409020549092509050915091565b60006109328261263085613a04565b8251600090816127f585838661217e565b9050600581600881111561280557fe5b14156128185761267461266c8787613adb565b600781600881111561282657fe5b14156126a35761267461269c8787613adb565b80156129ec57600384511161285757612857610a3860008787613b13565b6000612869858263ffffffff613b3216565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16806128c8576128c8610a3860018989613b13565b6040516060907fa85e59e400000000000000000000000000000000000000000000000000000000906129049089908990899089906024016156b3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608373ffffffffffffffffffffffffffffffffffffffff168360405161298c919061530e565b6000604051808303816000865af19150503d80600081146129c9576040519150601f19603f3d011682016040523d82523d6000602084013e6129ce565b606091505b5091509150816129e6576129e6610a388b8b84613b7e565b50505050505b5050505050565b6129fb614561565b612a06848484612702565b90508281602001511461093257610932610a386002858460200151612602565b60606311c7b72060e01b8383604051602401612a43929190615658565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b82602001514210612b1857612b18610a38600183613b9d565b60408301513a8114612b3257612b32610a38833a84613bba565b60065473ffffffffffffffffffffffffffffffffffffffff168015612b5e57612b5e610a388483613bd9565b60008381526005602052604090205460ff1615612b8357612b83610a38600085613b9d565b606085015173ffffffffffffffffffffffffffffffffffffffff81163314801590612bb65750612bb4868587612635565b155b15612bcb57612bcb610a3860018684896121fd565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff82163314610c1c576006805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790555050565b60606320d11f6160e01b8383604051602401612a43929190615551565b3031801561080f57604051339082156108fc029083906000818181858888f19350505050158015610c1c573d6000803e3d6000fd5b60408051808201909152600481527f0c3b823f00000000000000000000000000000000000000000000000000000000602082015290565b606082015173ffffffffffffffffffffffffffffffffffffffff1615612d1357606082015173ffffffffffffffffffffffffffffffffffffffff163314612d1357612d13610a386002836020015133613bf6565b6000612d1d611d10565b90508073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614612d6957612d69610a386000846020015184613bf6565b505050565b6000818152600a60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927f02c310a9a43963ff31a754a4099cc435ed498049687539d72d7818d9b093415c92612e0b92909190339061571b565b60405180910390a45050565b606063e946c1bb60e01b848484604051602401611d6193929190615846565b60008282018381101561093257610932610a3860008686612e17565b606063d4092f4f60e01b82604051602401612e6d9190615833565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b600082612f00575060006107c1565b82820282848281612f0d57fe5b041461093257610932610a3860018686612e17565b600081612f3857612f38610a3860038585612e17565b6000828481612f4357fe5b04949350505050565b6000815160001415612f6857612f68610a3860028686866121fd565b81600183510381518110612f7857fe5b016020015160f81c6008811115610b3757fe5b60008160200183511015612fac57612fac610a386005855185602001613c15565b50016020015190565b8051600090612fec837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830163ffffffff613c3416565b6040516060907f1626ba7e00000000000000000000000000000000000000000000000000000000906130249088908790602401615551565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290506130b3848363ffffffff613c3416565b600060608673ffffffffffffffffffffffffffffffffffffffff16836040516130dc919061530e565b600060405180830381855afa9150503d8060008114613117576040519150601f19603f3d011682016040523d82523d6000602084013e61311c565b606091505b509150915081801561312f575080516020145b15613191577fb06713810000000000000000000000000000000000000000000000000000000061316682600063ffffffff613b3216565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614945050505050610932565b6131a0610a3889898985613c38565b505050509392505050565b825160ff166003146131da576131da610a388460200151856000015160ff1660068111156131d557fe5b613c59565b606084015173ffffffffffffffffffffffffffffffffffffffff161561322e57606084015173ffffffffffffffffffffffffffffffffffffffff16331461322e5761322e610a386002856020015133613bf6565b602084015173ffffffffffffffffffffffffffffffffffffffff1615613298578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff161461329857613298610a386001856020015185613bf6565b8351604084015115806132b557506132b584602001518284613c76565b156129ec576132c9858560200151846127e4565b6129ec576129ec610a386000866020015184866121fd565b60a080840151908501516132fa9163ffffffff612ef116565b608080850151908601516133139163ffffffff612ef116565b101561332657613326610a388383613cc9565b50505050565b6133346145b8565b60a088015160009061334c908863ffffffff611b1516565b905060006133638a608001518b60a0015184613ce6565b9050600061337e888b60a00151611b1590919063ffffffff16565b905060006133958b608001518c60a0015184613ce6565b905085156133b2576133ab8c8c85878587613d1a565b94506133c3565b6133c08c8c85878587613dec565b94505b84515160808d015160c08e01516133db929190613ce6565b85516040015284516020015160a08d015160e08e01516133fc929190613ce6565b85516060015260208501515160808c015160c08d015161341d929190613ce6565b856020015160400181815250506134458560200151602001518c60a001518d60e00151613ce6565b6020860151606001526000613460888a63ffffffff612ef116565b86516080908101829052602088015101525050505050979650505050505050565b602081015161349790839063ffffffff612e3616565b600960008581526020019081526020016000208190555082856040015173ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff167f6869791f0a34781b29882982cc39e882768cf2c96995c2a110c577c53bc932d58861014001518961016001518a61018001518b6101a001518b338a600001518b602001518c604001518d606001518e608001516040516135509b9a99989796959493929190615767565b60405180910390a45050505050565b8351835160408087015190860151610140870151855160200151613588918b9186908890612839565b6135a28a8961014001518686896020015160200151612839565b6135bc898861018001518584896020015160400151612839565b6135d68a8961018001518685896000015160400151612839565b6135ec8a89610140015186898960400151612839565b6136028988610140015185898960600151612839565b600061361a8b8b88600001516080015188888c613e85565b905080613637578551600060809182018190526020880151909101525b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561368757506101a080890151908a01516136879163ffffffff613ee216565b156136c5576136c08b8a6101a0015189866136bb8b60200151606001518c6000015160600151612e3690919063ffffffff16565b612839565b6136f9565b6136df8a896101a0015189858a6020015160600151612839565b6136f98b8a6101a0015189868a6000015160600151612839565b5050505050505050505050565b608081810151825160208085015160408087015160609788015186519685019690962082517fec69816980a3a3ca4554410e60253953e9ff375ba4536a98adfa15cc71541508815294850195909552908301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff9091169183019190915260a082015260c0902090565b6040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b6040516060907fde047db40000000000000000000000000000000000000000000000000000000090612a439085908590602401615a83565b8051600090601581101561381e5761381e610a3860028787876121fd565b6000613852847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb840163ffffffff613f0716565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526008602090815260408083209385168352929052205490915060ff1661389c5761389c610a388683613f47565b6138a98188866015613f64565b979650505050505050565b6000610b378385846001613f64565b6060631de45ad160e01b8383604051602401612a4392919061537c565b60008183106138ef5781610932565b5090919050565b6138fe614561565b6020810184905260a0850151608086015161391a918691613ce6565b815260a085015160c0860151613931918691613ce6565b604082015260a085015160e086015161394b918691613ce6565b6060820152613960828463ffffffff612ef116565b6080820152949350505050565b613987848461016001518486600001518560200151612839565b6139a1848461014001518560000151858560000151612839565b6139bb84846101a001518486604001518560600151612839565b6139d984846101800151856000015186604001518560400151612839565b60006139ef85836080015186600001518661413b565b9050806129ec57600060808301525050505050565b6101408101516101608201516101808301516101a08401516000937ff80322eb8376aafb64eadf8f0d7623f22130fd9491a221e902b713cb984a753493909290916020871015613a5057fe5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087018051610140890180516101608b0180516101808d0180516101a08f0180519d89528c5160209d8e012087528b519b8d019b909b2084528951998c01999099208152875197909a019690962088526101e085209390945290529190529252919091529050919050565b6040516060907f3efe50c80000000000000000000000000000000000000000000000000000000090612a439085908590602401615a36565b606063488219a660e01b848484604051602401611d619392919061580b565b60008160040183511015613b5357613b53610a386003855185600401613c15565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b6060634678472b60e01b848484604051602401611d619392919061556a565b606063f598518460e01b8383604051602401612a439291906158fd565b606063a26dac0960e01b848484604051602401611d61939291906155f7565b606063dec4aedf60e01b8383604051602401612a439291906154d8565b606063e53c76c860e01b848484604051602401611d6193929190615867565b6060632800659560e01b848484604051602401611d61939291906158ab565b9052565b6060631b8388f760e01b8585858560405160240161221e94939291906154fc565b606063fdb6ca8d60e01b8383604051602401612a43929190615595565b600080613c84858585612f4c565b90506004816008811115613c9457fe5b1480613cab57506005816008811115613ca957fe5b145b80610de657506007816008811115613cbf57fe5b1495945050505050565b606063b6555d6f60e01b8383604051602401612a43929190615543565b6000613cf3848484614181565b15613d0657613d06610a388585856141e7565b610b3783612172868563ffffffff612ef116565b613d226145b8565b81851184841184861115613d4257613d3b898686614206565b9250613d91565b86841115613d825782518790528251602001869052608088015160a0890151613d6c919089613ce6565b6020808501805192909252905101879052613d91565b613d8e87878787614243565b92505b8115613db7576020808401510151835151613db19163ffffffff611b1516565b60408401525b8015613ddf5782516020908101519084015151613dd99163ffffffff611b1516565b60608401525b50505b9695505050505050565b613df46145b8565b82841115613e0e57613e07878484614206565b9050613e5c565b82841015613e4d5780518590528051602090810185905281015184905260a08601516080870151613e4091908661426e565b6020808301510152613e5c565b613e5985858585614243565b90505b6020808201510151815151613e769163ffffffff611b1516565b60408201529695505050505050565b60045460009073ffffffffffffffffffffffffffffffffffffffff168015613ed85730316000613eb98a84848b8b8a6142c2565b9050613ecb89848385038b8a8a6142c2565b5060019350505050613de2565b6000915050613de2565b6000815183511480156109325750508051602091820120825192909101919091201490565b60008160140183511015613f2857613f28610a386004855185601401613c15565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b606063a15c0d0660e01b8383604051602401612a4392919061537c565b8151600090613f7b8484830363ffffffff613c3416565b6040516060907f20c13b0b0000000000000000000000000000000000000000000000000000000090613fb390889088906024016156f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050614042858363ffffffff613c3416565b600060608873ffffffffffffffffffffffffffffffffffffffff168360405161406b919061530e565b600060405180830381855afa9150503d80600081146140a6576040519150601f19603f3d011682016040523d82523d6000602084013e6140ab565b606091505b50915091508180156140be575080516020145b15614120577f20c13b0b000000000000000000000000000000000000000000000000000000006140f582600063ffffffff613b3216565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614945050505050610b37565b61412f610a388a8a8a856143fa565b50505050949350505050565b60045460009073ffffffffffffffffffffffffffffffffffffffff1680156141775761416c868230318888886142c2565b506001915050610b37565b6000915050610b37565b60008261419357614193610a3861441b565b81158061419e575083155b156141ab57506000610932565b600083806141b557fe5b85840990506141ca858463ffffffff612ef116565b6141dc826103e863ffffffff612ef116565b101595945050505050565b606063339f3de260e01b848484604051602401611d61939291906155f7565b61420e6145b8565b60208082018051859052518101839052815101839052608084015160a0850151614239919085613ce6565b8151529392505050565b61424b6145b8565b805194909452835160209081019390935282840180519290925290519091015290565b600061427b848484614452565b1561428e5761428e610a388585856141e7565b610b37836121726142a682600163ffffffff611b1516565b6142b6888763ffffffff612ef116565b9063ffffffff612e3616565b60008385106142ce5750825b6040516060907fa3b4a3270000000000000000000000000000000000000000000000000000000090614308908690869089906024016153a3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608873ffffffffffffffffffffffffffffffffffffffff168484604051614391919061530e565b60006040518083038185875af1925050503d80600081146143ce576040519150601f19603f3d011682016040523d82523d6000602084013e6143d3565b606091505b5091509150816143ed576143ed610a388b898989866144b6565b5050509695505050505050565b6060635bd0428d60e01b8585858560405160240161221e94939291906153d4565b60408051808201909152600481527fa791837c00000000000000000000000000000000000000000000000000000000602082015290565b60008261446457614464610a3861441b565b81158061446f575083155b1561447c57506000610932565b6000838061448657fe5b85840990508361449c818363ffffffff611b1516565b816144a357fe5b0690506141ca858463ffffffff612ef116565b60606387cb1e7560e01b86868686866040516024016144d99594939291906155b2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905095945050505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b6040518060800160405280606081526020016060815260200160008152602001600081525090565b60405180608001604052806145cb614561565b81526020016145d8614561565b815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b604051806101c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b803573ffffffffffffffffffffffffffffffffffffffff811681146107c157600080fd5b600082601f830112614707578081fd5b813561471a61471582615b14565b615aed565b81815291506020808301908481018184028601820187101561473b57600080fd5b60005b848110156147625761475088836146d3565b8452928201929082019060010161473e565b505050505092915050565b600082601f83011261477d578081fd5b813561478b61471582615b14565b8181529150602080830190840160005b838110156147c8576147b3876020843589010161488b565b8352602092830192919091019060010161479b565b5050505092915050565b600082601f8301126147e2578081fd5b81356147f061471582615b14565b8181529150602080830190840160005b838110156147c8576148188760208435890101614912565b83526020928301929190910190600101614800565b600082601f83011261483d578081fd5b813561484b61471582615b14565b81815291506020808301908481018184028601820187101561486c57600080fd5b60005b848110156147625781358452928201929082019060010161486f565b600082601f83011261489b578081fd5b813567ffffffffffffffff8111156148b1578182fd5b6148e260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601615aed565b91508082528360208285010111156148f957600080fd5b8060208401602084013760009082016020015292915050565b60006101c0808385031215614925578182fd5b61492e81615aed565b91505061493b83836146d3565b815261494a83602084016146d3565b602082015261495c83604084016146d3565b604082015261496e83606084016146d3565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff808211156149d057600080fd5b6149dc8683870161488b565b838501526101609250828501359150808211156149f857600080fd5b614a048683870161488b565b83850152610180925082850135915080821115614a2057600080fd5b614a2c8683870161488b565b838501526101a0925082850135915080821115614a4857600080fd5b50614a558582860161488b565b82840152505092915050565b600060a08284031215614a72578081fd5b614a7c60a0615aed565b90508135815260208201356020820152604082013560408201526060820135614aa481615b88565b6060820152608082013567ffffffffffffffff811115614ac357600080fd5b614acf8482850161488b565b60808301525092915050565b600060208284031215614aec578081fd5b61093283836146d3565b60008060408385031215614b08578081fd5b614b1284846146d3565b9150614b2184602085016146d3565b90509250929050565b60008060408385031215614b3c578182fd5b614b4684846146d3565b915060208301358015158114614b5a578182fd5b809150509250929050565b60008060008060808587031215614b7a578182fd5b843567ffffffffffffffff80821115614b91578384fd5b614b9d8883890161476d565b95506020870135915080821115614bb2578384fd5b614bbe888389016146f7565b94506040870135915080821115614bd3578384fd5b614bdf888389016146f7565b93506060870135915080821115614bf4578283fd5b50614c018782880161482d565b91505092959194509250565b600060208284031215614c1e578081fd5b813567ffffffffffffffff811115614c34578182fd5b610b37848285016147d2565b60008060008060808587031215614c55578182fd5b843567ffffffffffffffff80821115614c6c578384fd5b614c78888389016147d2565b95506020870135915080821115614c8d578384fd5b614c99888389016147d2565b94506040870135915080821115614cae578384fd5b614cba8883890161476d565b93506060870135915080821115614ccf578283fd5b50614c018782880161476d565b600080600060608486031215614cf0578081fd5b833567ffffffffffffffff80821115614d07578283fd5b614d13878388016147d2565b94506020860135915080821115614d28578283fd5b614d348783880161482d565b93506040860135915080821115614d49578283fd5b50614d568682870161476d565b9150509250925092565b600080600060608486031215614d74578081fd5b833567ffffffffffffffff80821115614d8b578283fd5b614d97878388016147d2565b9450602086013593506040860135915080821115614d49578283fd5b60008060408385031215614dc5578182fd5b823567ffffffffffffffff80821115614ddc578384fd5b81850186601f820112614ded578485fd5b80359250614dfd61471584615b14565b83815260208082019190838101885b87811015614e3557614e238c848435890101614a61565b85529382019390820190600101614e0c565b50919750880135945050505080821115614e4d578283fd5b50614e5a8582860161476d565b9150509250929050565b600060208284031215614e75578081fd5b5035919050565b60008060408385031215614e8e578182fd5b823591506020830135614b5a81615b88565b600080600060608486031215614eb4578081fd5b833592506020840135614ec681615b88565b9150604084013567ffffffffffffffff811115614ee1578182fd5b614d568682870161488b565b600060208284031215614efe578081fd5b813561093281615baa565b600060208284031215614f1a578081fd5b815161093281615baa565b600060a0828403128015614f37578182fd5b8015614f41578182fd5b50614f4c60a0615aed565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600060208284031215614f93578081fd5b813567ffffffffffffffff811115614fa9578182fd5b610b3784828501614912565b60008060408385031215614fc7578182fd5b823567ffffffffffffffff80821115614fde578384fd5b614fea86838701614912565b93506020850135915080821115614fff578283fd5b50614e5a8582860161488b565b60008060008060808587031215615021578182fd5b843567ffffffffffffffff80821115615038578384fd5b61504488838901614912565b95506020870135915080821115615059578384fd5b61506588838901614912565b9450604087013591508082111561507a578384fd5b6150868883890161488b565b9350606087013591508082111561509b578283fd5b50614c018782880161488b565b6000806000606084860312156150bc578081fd5b833567ffffffffffffffff808211156150d3578283fd5b6150df87838801614912565b94506020860135935060408601359150808211156150fb578283fd5b50614d568682870161488b565b6000806040838503121561511a578182fd5b823567ffffffffffffffff80821115615131578384fd5b614fea86838701614a61565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208401935060208301825b828110156151935761517d8683516151e7565b60a095909501946020919091019060010161516a565b5093949350505050565b600081518084526151b5816020860160208601615b34565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60006101c061522784845161513d565b6020830151615239602086018261513d565b50604083015161524c604086018261513d565b50606083015161525f606086018261513d565b506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152506101208084015181860152506101408084015182828701526152b88387018261519d565b915050610160915081840151858203838701526152d5828261519d565b9250505061018080840151858303828701526152f1838261519d565b9150506101a091508184015185820383870152613de2828261519d565b60008251615320818460208701615b34565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600073ffffffffffffffffffffffffffffffffffffffff8616825260806020830152615403608083018661519d565b8281036040840152615415818661519d565b8381036060850152615427818661519d565b98975050505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156154a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261549285835161519d565b94509285019290850190600101615458565b5092979650505050505050565b6000602082526109326020830184615157565b901515815260200190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600085825273ffffffffffffffffffffffffffffffffffffffff8516602083015260806040830152615531608083018561519d565b82810360608401526138a9818561519d565b918252602082015260400190565b600083825260406020830152610b37604083018461519d565b600084825260606020830152615583606083018561519d565b8281036040840152613de2818561519d565b828152604081016155a583615b7e565b8260208301529392505050565b600086825285602083015273ffffffffffffffffffffffffffffffffffffffff808616604084015280851660608401525060a060808301526138a960a083018461519d565b9283526020830191909152604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060208252610932602083018461519d565b6000608082526156c6608083018761519d565b73ffffffffffffffffffffffffffffffffffffffff95861660208401529390941660408201526060015292915050565b600060408252615709604083018561519d565b8281036020840152610de6818561519d565b60006060825261572e606083018661519d565b8281036020840152615740818661519d565b91505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b600061016080835261577b8184018f61519d565b838103602085015261578d818f61519d565b91505082810360408401526157a2818d61519d565b83810360608501526157b4818d61519d565b73ffffffffffffffffffffffffffffffffffffffff9b8c16608086015299909a1660a0840152505060c081019590955260e08501939093526101008401919091526101208301526101409091015295945050505050565b600061581685615b60565b84825283602083015260606040830152610de6606083018461519d565b6020810161584083615b6a565b91905290565b6060810161585385615b6a565b938152602081019290925260409091015290565b6060810161587485615b74565b938152602081019290925273ffffffffffffffffffffffffffffffffffffffff1660409091015290565b6060810161585385615b74565b606081016008851061585357fe5b60006158c486615b7e565b85825284602083015273ffffffffffffffffffffffffffffffffffffffff8416604083015260806060830152613de2608083018461519d565b6040810161590a84615b60565b9281526020015290565b60208082526014908201527f5452414e53464552535f5355434345535346554c000000000000000000000000604082015260600190565b60006020825282516080602084015261596760a0840182615157565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08482030160408501526159a28183615157565b604086015160608601526060860151608086015280935050505092915050565b60a081016107c182846151e7565b6000610180820190506159e48284516151e7565b60208301516159f660a08401826151e7565b5060408301516101408301526060909201516101609091015290565b815160ff168152602080830151908201526040918201519181019190915260600190565b600060408252615a496040830185615217565b90508260208301529392505050565b600060608252615a6b6060830186615217565b8460208401528281036040840152613de2818561519d565b60006040825283516040830152602084015160608301526040840151608083015273ffffffffffffffffffffffffffffffffffffffff60608501511660a0830152608084015160a060c0840152615add60e084018261519d565b9150508260208301529392505050565b60405181810167ffffffffffffffff81118282101715615b0c57600080fd5b604052919050565b600067ffffffffffffffff821115615b2a578081fd5b5060209081020190565b60005b83811015615b4f578181015183820152602001615b37565b838111156133265750506000910152565b6002811061080f57fe5b6004811061080f57fe5b6003811061080f57fe5b6007811061080f57fe5b73ffffffffffffffffffffffffffffffffffffffff8116811461080f57600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461080f57600080fd5b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a090209056fea365627a7a723158206fc97c5a1d6fde6b2ada9eb4429966e52d7e2da39180893c04bf55c840b346a16c6578706572696d656e74616cf564736f6c634300050c0040'; public EIP1271_MAGIC_VALUE = { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 6773bdc1eb..56bd3d0305 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ForwarderContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x6080604052600436106100655760003560e01c8063942d33c011610043578063942d33c014610102578063ae93b97a14610124578063f2fde38b1461013757610065565b8063442026ed14610097578063630f1e6c146100b75780638da5cb5b146100d7575b60025473ffffffffffffffffffffffffffffffffffffffff1633146100955761009561009033610157565b6101f6565b005b3480156100a357600080fd5b506100956100b2366004611bc6565b6101fe565b3480156100c357600080fd5b506100956100d2366004611c06565b6104a8565b3480156100e357600080fd5b506100ec6104f1565b6040516100f99190611dc0565b60405180910390f35b610115610110366004611b1d565b61050d565b6040516100f993929190612047565b610115610132366004611aa0565b610542565b34801561014357600080fd5b50610095610152366004611a68565b61059d565b60606308b1869860e01b826040516024016101729190611dc0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b600061024a600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff610614169050565b905060405161025890611d97565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156104a35760015460405160009173ffffffffffffffffffffffffffffffffffffffff16906360704108906102d490611d97565b6040519081900381207fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16825261031291600401611e5f565b60206040518083038186803b15801561032a57600080fd5b505afa15801561033e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103629190810190611a84565b905073ffffffffffffffffffffffffffffffffffffffff811661038a5761038a61009061066a565b60006103d6601086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff6106c4169050565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063095ea7b39061044d9085907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90600401611de1565b602060405180830381600087803b15801561046757600080fd5b505af115801561047b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061049f9190810190611ba6565b5050505b505050565b6104b0610704565b6104a383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085925061074d915050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080600061051a610838565b6105258888886108cd565b90935091506105358386866109f0565b9050955095509592505050565b600080600061054f610838565b6000610573670de0b6b3a764000061056d888263ffffffff610b8f16565b34610bb2565b9050610580888289610bdc565b90945092506105908487876109f0565b9150509450945094915050565b6105a5610704565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576105cb610090610d9f565b610611565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60008160040183511015610635576106356100906003855185600401610dd6565b5060208183018101519101907fffffffff00000000000000000000000000000000000000000000000000000000165b92915050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff3b96b8d0000000000000000000000000000000000000000000000000000000017905290565b600081601401835110156106e5576106e56100906004855185601401610dd6565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331461074b5760005461074b9061009090339073ffffffffffffffffffffffffffffffffffffffff16610e7b565b565b600061075f838263ffffffff61061416565b905060405161076d90611d97565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156107c9576107c48383610f1d565b6104a3565b6040516107d590611d45565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561082c576107c48383611085565b6104a361009082611152565b346108485761084861009061116d565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156108b257600080fd5b505af11580156108c6573d6000803e3d6000fd5b5050505050565b82516000908190815b8181146109d1578681815181106108e957fe5b6020026020010151608001516000148061091a575086818151811061090a57fe5b602002602001015160a001516000145b15610924576109c9565b6000610936878563ffffffff6111c716565b905060008061096c8a858151811061094a57fe5b602002602001015189868151811061095e57fe5b6020026020010151856111e6565b915091506109928a858151811061097f57fe5b602002602001015161014001518261074d565b6109a2878363ffffffff610b8f16565b96506109b4868263ffffffff610b8f16565b95508886106109c5575050506109d1565b5050505b6001016108d6565b50848210156109e7576109e76100908684611339565b50935093915050565b600066b1a2bc2ec50000831115610a0d57610a0d61009084611356565b34841115610a2257610a226100908534611371565b6000610a34348663ffffffff6111c716565b9050610a4984670de0b6b3a764000087610bb2565b915080821115610a6057610a60610090838361138e565b8015610b87576002546040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90610abc908490600401612030565b600060405180830381600087803b158015610ad657600080fd5b505af1158015610aea573d6000803e3d6000fd5b505050506000821115610b3c5760405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19350505050158015610b3a573d6000803e3d6000fd5b505b6000610b4e828463ffffffff6111c716565b90508015610b8557604051339082156108fc029083906000818181858888f19350505050158015610b83573d6000803e3d6000fd5b505b505b509392505050565b600082820183811015610bab57610bab610090600086866113ab565b9392505050565b6000610bd483610bc8868563ffffffff6113ca16565b9063ffffffff6113fb16565b949350505050565b6000806000855190506000610c97600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ce4c78b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5257600080fd5b505afa158015610c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c8a9190810190611cad565b3a9063ffffffff6113ca16565b905060005b828114610d9457878181518110610caf57fe5b60200260200101516080015160001480610ce05750878181518110610cd057fe5b602002602001015160a001516000145b15610cea57610d8c565b6000610d0c83610d008a8963ffffffff6111c716565b9063ffffffff6111c716565b9050600080610d428b8581518110610d2057fe5b60200260200101518a8681518110610d3457fe5b602002602001015185611425565b91509150610d558b858151811061097f57fe5b610d65888363ffffffff610b8f16565b9750610d77878263ffffffff610b8f16565b9650898810610d8857505050610d94565b5050505b600101610c9c565b505050935093915050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b6060632800659560e01b848484604051602401610df593929190611ec1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060631de45ad160e01b8383604051602401610e98929190611e07565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b6000610f3083601063ffffffff6106c416565b9050600060608273ffffffffffffffffffffffffffffffffffffffff16604051610f5990611d6e565b60405180910390203386604051602401610f74929190611de1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610ffd9190611d29565b6000604051808303816000865af19150503d806000811461103a576040519150601f19603f3d011682016040523d82523d6000602084013e61103f565b606091505b50915091508161105557611055610090826114ea565b3d15611074576000915060203d14156110745760206000803e60005191505b816108c6576108c6610090826114ea565b806001146110995761109961009082611505565b60006110ac83601063ffffffff6106c416565b905060006110c184602463ffffffff61152016565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8316906323b872dd9061111a90309033908690600401611e2e565b600060405180830381600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b5050505050505050565b6060637996a27160e01b826040516024016101729190611e5f565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8c0e562b0000000000000000000000000000000000000000000000000000000017905290565b6000828211156111e0576111e0610090600285856113ab565b50900390565b6000808460e001516000148061121257506101608501516101a08601516112129163ffffffff61152c16565b1561128057600061122c8660a00151876080015186611552565b905061123661172e565b61124187838861157c565b9050611272816080015161126683606001518460200151610b8f90919063ffffffff16565b9063ffffffff610b8f16565b905190935091506113319050565b6101408501516101a086015161129b9163ffffffff61152c16565b156113205760006112cb8660a001516112c58860e0015189608001516111c790919063ffffffff16565b86611552565b90506112d561172e565b6112e087838861157c565b90506112fd81608001518260200151610b8f90919063ffffffff16565b60608201518251919550611317919063ffffffff6111c716565b92505050611331565b611331610090866101a001516116e9565b935093915050565b60606391353a0c60e01b8383604051602401610e98929190612039565b6060631174fb8060e01b826040516024016101729190612030565b606063cdcbed5d60e01b8383604051602401610e98929190612039565b606063ecf40fd960e01b8383604051602401610e98929190612039565b606063e946c1bb60e01b848484604051602401610df593929190611e9f565b6000826113d957506000610664565b828202828482816113e657fe5b0414610bab57610bab610090600186866113ab565b60008161141157611411610090600385856113ab565b600082848161141c57fe5b04949350505050565b6000808460e001516000148061145157506101408501516101a08601516114519163ffffffff61152c16565b156114a85761145e61172e565b61146986858761157c565b905061148681608001518260200151610b8f90919063ffffffff16565b606082015182519194506114a0919063ffffffff6111c716565b915050611331565b6101608501516101a08601516114c39163ffffffff61152c16565b156113205760a085015160e086015160009161122c916112c590829063ffffffff610b8f16565b6060635e7eb60f60e01b826040516024016101729190611e8c565b606063baffa47460e01b826040516024016101729190612030565b6000610bab8383611704565b600081518351148015610bab575081805190602001208380519060200120149392505050565b6000610bd483610bc861156c82600163ffffffff6111c716565b611266888763ffffffff6113ca16565b61158461172e565b6040516060907f9b44d55600000000000000000000000000000000000000000000000000000000906115be90879087908790602401611ecf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600154915190925073ffffffffffffffffffffffffffffffffffffffff90911690600090606090839061166f908690611d29565b6000604051808303816000865af19150503d80600081146116ac576040519150601f19603f3d011682016040523d82523d6000602084013e6116b1565b606091505b509150915081156116de57805160a0146116c757fe5b808060200190516116db9190810190611c50565b94505b505050509392505050565b60606331360af160e01b826040516024016101729190611e8c565b60008160200183511015611725576117256100906005855185602001610dd6565b50016020015190565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8035610664816120d4565b600082601f830112611778578081fd5b813561178b61178682612084565b61205d565b8181529150602080830190840160005b838110156117c8576117b387602084358901016119e1565b8352602092830192919091019060010161179b565b5050505092915050565b600082601f8301126117e2578081fd5b81356117f061178682612084565b818152915060208083019084810160005b8481101561198f57813587016101c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c0301121561184157600080fd5b61184a8161205d565b6118568b87850161175d565b81526118658b6040850161175d565b868201526118768b6060850161175d565b60408201526118888b6080850161175d565b606082015260a0830135608082015260c083013560a082015260e083013560c08201526101008084013560e0830152610120808501358284015261014091508185013581840152506101608085013567ffffffffffffffff808211156118ed57600080fd5b6118fb8f8b848a01016119e1565b8486015261018093508387013591508082111561191757600080fd5b6119258f8b848a01016119e1565b838601526101a092508287013591508082111561194157600080fd5b61194f8f8b848a01016119e1565b848601528587013593508084111561196657600080fd5b50506119768d89848801016119e1565b9083015250865250509282019290820190600101611801565b505050505092915050565b60008083601f8401126119ab578182fd5b50813567ffffffffffffffff8111156119c2578182fd5b6020830191508360208285010111156119da57600080fd5b9250929050565b600082601f8301126119f1578081fd5b813567ffffffffffffffff811115611a07578182fd5b611a3860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161205d565b9150808252836020828501011115611a4f57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611a79578081fd5b8135610bab816120d4565b600060208284031215611a95578081fd5b8151610bab816120d4565b60008060008060808587031215611ab5578283fd5b843567ffffffffffffffff80821115611acc578485fd5b611ad8888389016117d2565b95506020870135915080821115611aed578485fd5b50611afa87828801611768565b935050604085013591506060850135611b12816120d4565b939692955090935050565b600080600080600060a08688031215611b34578081fd5b853567ffffffffffffffff80821115611b4b578283fd5b611b5789838a016117d2565b9650602088013595506040880135915080821115611b73578283fd5b50611b8088828901611768565b935050606086013591506080860135611b98816120d4565b809150509295509295909350565b600060208284031215611bb7578081fd5b81518015158114610bab578182fd5b60008060208385031215611bd8578182fd5b823567ffffffffffffffff811115611bee578283fd5b611bfa8582860161199a565b90969095509350505050565b600080600060408486031215611c1a578283fd5b833567ffffffffffffffff811115611c30578384fd5b611c3c8682870161199a565b909790965060209590950135949350505050565b600060a0828403128015611c62578182fd5b8015611c6c578182fd5b50611c7760a061205d565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600060208284031215611cbe578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611cf78160208601602086016120a4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611d3b8184602087016120a4565b9190910192915050565b7f455243373231546f6b656e28616464726573732c75696e7432353629000000008152601c0190565b7f7472616e7366657228616464726573732c75696e743235362900000000000000815260190190565b7f4552433230546f6b656e28616464726573732900000000000000000000000000815260130190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b600060208252610bab6020830184611cdf565b6060810160048510611ead57fe5b938152602081019290925260409091015290565b6060810160088510611ead57fe5b600060608252611ee3606083018651611cc5565b6020850151611ef56080840182611cc5565b506040850151611f0860a0840182611cc5565b506060850151611f1b60c0840182611cc5565b50608085015160e083015260a0850151610100818185015260c08701519150610120828186015260e0880151925061014083818701528289015193506101609250838387015281890151935061018091508382870152808901519350506101c06101a08181880152611f91610220880186611cdf565b848b015195507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa09450848882030183890152611fcd8187611cdf565b925050828a0151945083878303016101e0880152611feb8286611cdf565b9250808a015194505050818582030161020086015261200a8184611cdf565b91505085602085015283810360408501526120258186611cdf565b979650505050505050565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff8111828210171561207c57600080fd5b604052919050565b600067ffffffffffffffff82111561209a578081fd5b5060209081020190565b60005b838110156120bf5781810151838201526020016120a7565b838111156120ce576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461061157600080fdfea365627a7a72315820afeb88c9cc19090963cb885eb76d709ca1a151f8f73996031898e2b50578a89b6c6578706572696d656e74616cf564736f6c634300050c0040'; /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index 7dd8259d06..c7c3e578a6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class IAssetProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Transfers assets. Either succeeds or throws. @@ -282,7 +285,7 @@ export class IAssetProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index 8e1a6f255e..28897de5c3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class IValidatorContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Verifies that a signature is valid. diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 232d59fab6..5964ab4a5e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class IWalletContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; /** * Validates a hash with the `Wallet` signature type. diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index aeb29c0cd7..60343961ec 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -55,6 +55,9 @@ export interface MultiAssetProxyAssetProxyRegisteredEventArgs extends DecodedLog // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class MultiAssetProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639ad2674411610081578063c585bb931161005b578063c585bb9314610789578063d39de6e9146107bc578063f2fde38b14610814576100d4565b80639ad26744146106cc578063ae25532e14610705578063b918161114610742576100d4565b806360704108116100b2578063607041081461065257806370712939146106915780638da5cb5b146106c4576100d4565b80633fd3c9971461059857806342f1181e14610600578063494503d414610635575b7fffffffff00000000000000000000000000000000000000000000000000000000600035167fa85e59e400000000000000000000000000000000000000000000000000000000811415610592573360005260026020526040600020546101a5577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1553454e4445525f4e4f545f415554484f52495a454400000000000000604052600060605260646000fd5b600480350180356020600482030660448210171561022e577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c19494e56414c49445f41535345545f444154415f4c454e475448000000604052600060605260646000fd5b602081018201368111156102ad577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c16494e56414c49445f41535345545f444154415f454e44000000000000604052600060605260646000fd5b5050602481013560448201356044820183016020810335925060448201840160208103358085031561034a577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f4c454e4754485f4d49534d4154434800000000000000000000000000604052600060605260646000fd5b5060646000803760806004526000936064359060200285805b82811015610587578086013584810281868204148615176103ef577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1055494e543235365f4f564552464c4f57000000000000000000000000604052600060605260646000fd5b60649081528287013589018b01604481019250018135600481101561049e577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1e4c454e4754485f475245415445525f5448414e5f335f5245515549526040527f454400000000000000000000000000000000000000000000000000000000000060605260646000fd5b7fffffffff000000000000000000000000000000000000000000000000000000008235168b8103156104df57809b508b608452600160a45260406084205495505b5084610556577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1a41535345545f50524f58595f444f45535f4e4f545f45584953540000604052600060605260646000fd5b60208101836084376000808260a401600080895af1925050508061057e573d6000803e3d6000fd5b50602001610363565b505050505050505050005b50600080fd5b6105d7600480360360208110156105ae57600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610847565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6106336004803603602081101561061657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661086f565b005b6105d76004803603602081101561064b57600080fd5b5035610a5b565b6105d76004803603602081101561066857600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610a8f565b610633600480360360208110156106a757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ad9565b6105d7610dcc565b610633600480360360408110156106e257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610de8565b61070d611199565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6107756004803603602081101561075857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111cf565b604080519115158252519081900360200190f35b6106336004803603602081101561079f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111e4565b6107c4611446565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156108005781810151838201526020016107e8565b505050509050019250505060405180910390f35b6106336004803603602081101561082a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166114b5565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108f557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff161561098a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f5441524745545f414c52454144595f415554484f52495a454400000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055513392917f3147867c59d17e8fa9d522465651d44aae0a9e38f902f3475b97e58072f0ed4c91a350565b60038181548110610a6857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b5f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff16610bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b600354811015610d85578173ffffffffffffffffffffffffffffffffffffffff1660038281548110610c6d57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161415610d7d57600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110610cc557fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610cf857fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190610d77908261159b565b50610d85565b600101610c3f565b50604051339073ffffffffffffffffffffffffffffffffffffffff8316907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e6e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526002602052604090205460ff16610f0257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5441524745545f4e4f545f415554484f52495a45440000000000000000000000604482015290519081900360640190fd5b6003548110610f7257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e4445585f4f55545f4f465f424f554e445300000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff1660038281548110610f9657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff161461102457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f415554484f52495a45445f414444524553535f4d49534d415443480000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061109f57fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff90921691839081106110d257fe5b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190611151908261159b565b50604051339073ffffffffffffffffffffffffffffffffffffffff8416907f1f32c1b084e2de0713b8fb16bd46bb9df710a3dbeae2f3ca93af46e016dcc6b090600090a35050565b604080517f4d756c746941737365742875696e743235365b5d2c62797465735b5d290000008152905190819003601d0190205b90565b60026020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff16331461126a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b60008173ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d60208110156112dc57600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000811660009081526001602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16801561139657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f41535345545f50524f58595f414c52454144595f455849535453000000000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526001602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff881690811790915582519384529083015280517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c031949281900390910190a1505050565b606060038054806020026020016040519081016040528092919081815260200182805480156114ab57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611480575b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff16331461153b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561159857600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b8154818355818111156115bf576000838152602090206115bf9181019083016115c4565b505050565b6111cc91905b808211156115de57600081556001016115ca565b509056fea265627a7a72315820ff218c9e47c47135d1028b03281d63826ba3569217fc501ee67c0661fa98fc5164736f6c634300050b0032'; public assetProxies = { @@ -760,7 +763,7 @@ export class MultiAssetProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index b3e1146913..0c421b1502 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class OrderValidatorContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode: string | undefined; public getOrderAndTraderInfo = { /** diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts index 417529758a..485ecfed1f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class StaticCallProxyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063a85e59e41461003b578063ae25532e146100d3575b600080fd5b6100d16004803603608081101561005157600080fd5b81019060208101813564010000000081111561006c57600080fd5b82018360208201111561007e57600080fd5b803590602001918460018302840111640100000000831117156100a057600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610110565b005b6100db6103a5565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6000606060006101656004898990508a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092949392505063ffffffff6103c5169050565b806020019051606081101561017957600080fd5b8151602083018051604051929492938301929190846401000000008211156101a057600080fd5b9083019060208201858111156101b557600080fd5b82516401000000008111828201881017156101cf57600080fd5b82525081516020918201929091019080838360005b838110156101fc5781810151838201526020016101e4565b50505050905090810190601f1680156102295780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190505050925092509250600060608473ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b602083106102ac57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161026f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461030c576040519150601f19603f3d011682016040523d82523d6000602084013e610311565b606091505b50915091508161032357805160208201fd5b8051602082012083811461039857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f554e45585045435445445f5354415449435f43414c4c5f524553554c54000000604482015290519081900360640190fd5b5050505050505050505050565b600060405180806104b06021913960210190506040518091039020905090565b6060818311156103e3576103e36103de60008585610408565b6104a7565b83518211156103fc576103fc6103de6001848751610408565b50819003910190815290565b6060632800659560e01b8484846040516024018084600781111561042857fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fdfe53746174696343616c6c28616464726573732c62797465732c6279746573333229a265627a7a72315820c55cf13cfcaaf322238d786911313ce7d45854692241ae9b56709bdbfed4f54c64736f6c634300050b0032'; /** @@ -122,7 +125,7 @@ export class StaticCallProxyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 9f66206793..82bf8f55c6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -64,6 +64,9 @@ export interface WETH9WithdrawalEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class WETH9Contract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x6080604052600436106100925760003560e01c63ffffffff16806306fdde031461009c578063095ea7b31461012657806318160ddd1461016b57806323b872dd146101925780632e1a7d4d146101c9578063313ce567146101e157806370a082311461020c57806395d89b411461023a578063a9059cbb1461024f578063d0e30db014610092578063dd62ed3e14610280575b61009a6102b4565b005b3480156100a857600080fd5b506100b1610303565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100eb5781810151838201526020016100d3565b50505050905090810190601f1680156101185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013257600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff600435166024356103af565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610180610422565b60408051918252519081900360200190f35b34801561019e57600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610427565b3480156101d557600080fd5b5061009a6004356105c7565b3480156101ed57600080fd5b506101f661065c565b6040805160ff9092168252519081900360200190f35b34801561021857600080fd5b5061018073ffffffffffffffffffffffffffffffffffffffff60043516610665565b34801561024657600080fd5b506100b1610677565b34801561025b57600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff600435166024356106ef565b34801561028c57600080fd5b5061018073ffffffffffffffffffffffffffffffffffffffff60043581169060243516610703565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103a75780601f1061037c576101008083540402835291602001916103a7565b820191906000526020600020905b81548152906001019060200180831161038a57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b303190565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205482111561045957600080fd5b73ffffffffffffffffffffffffffffffffffffffff841633148015906104cf575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105495773ffffffffffffffffffffffffffffffffffffffff8416600090815260046020908152604080832033845290915290205482111561051157600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b336000908152600360205260409020548111156105e357600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610622573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103a75780601f1061037c576101008083540402835291602001916103a7565b60006106fc338484610427565b9392505050565b6004602090815260009283526040808420909152908252902054815600a165627a7a723058201ebe888a6b56dd871f599adbe0f19ec3c29c28aec0685788dfac9b37a99fc9d20029'; public name = { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 980af3290e..8dcc5f06be 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -48,6 +48,9 @@ export interface ZRXTokenApprovalEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class ZRXTokenContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820d984298155c708a8164f1cbf83c7275bcc6851dd082c0404013c1f4463b238fa0029'; public name = { diff --git a/packages/abi-gen/templates/TypeScript/contract.handlebars b/packages/abi-gen/templates/TypeScript/contract.handlebars index e984f59117..17582a55ae 100644 --- a/packages/abi-gen/templates/TypeScript/contract.handlebars +++ b/packages/abi-gen/templates/TypeScript/contract.handlebars @@ -48,6 +48,9 @@ export enum {{contractName}}Events { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class {{contractName}}Contract extends BaseContract { + /** + * @ignore + */ {{#ifEquals this.deployedBytecode undefined~}} public static deployedBytecode: string | undefined; {{else~}} diff --git a/packages/abi-gen/templates/TypeScript/partials/method_call_pure.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_call_pure.handlebars index 3b7e1ab82c..2ec68190f9 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_call_pure.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_call_pure.handlebars @@ -29,7 +29,7 @@ async callAsync( let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index 25553c165d..45c1497f3c 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -46,6 +46,9 @@ export interface AbiGenDummyWithdrawalEventArgs extends DecodedLogArgs { // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class AbiGenDummyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040'; /** @@ -74,7 +77,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -147,7 +150,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -232,7 +235,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -344,7 +347,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -586,7 +589,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -662,7 +665,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -738,7 +741,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -829,7 +832,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -920,7 +923,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1026,7 +1029,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1110,7 +1113,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1183,7 +1186,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1754,7 +1757,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1826,7 +1829,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1897,7 +1900,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -1967,7 +1970,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2037,7 +2040,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2115,7 +2118,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2194,7 +2197,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2267,7 +2270,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2338,7 +2341,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2409,7 +2412,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2479,7 +2482,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2637,7 +2640,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2726,7 +2729,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -2824,7 +2827,7 @@ export class AbiGenDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts index 8c81fb2d3e..c5969989f1 100644 --- a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class LibDummyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032'; public static async deployFrom0xArtifactAsync( diff --git a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts index 613f23638c..459e91de87 100644 --- a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts @@ -28,6 +28,9 @@ import * as ethers from 'ethers'; // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name export class TestLibDummyContract extends BaseContract { + /** + * @ignore + */ public static deployedBytecode = '0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032'; public publicAddConstant = { @@ -52,7 +55,7 @@ export class TestLibDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; @@ -124,7 +127,7 @@ export class TestLibDummyContract extends BaseContract { let rawCallResult; try { - rawCallResult = await self.evmExecAsync(encodedDataBytes); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 2dc978569f..74b9f22c52 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -184,7 +184,7 @@ export class BaseContract { } return rawEncoded; } - public async evmExecAsync(input: Buffer): Promise { + protected async _evmExecAsync(input: Buffer): Promise { const addressBuf = Buffer.from(this.address.substr(2), 'hex'); // should only run once, the first time it is called if (this._evmIfExists === undefined) { From 9e6767c2b3e32ab1d44bbb2996c7bda3829ca9f5 Mon Sep 17 00:00:00 2001 From: xianny Date: Fri, 4 Oct 2019 15:47:31 -0700 Subject: [PATCH 3/8] remove validateAndSendTransactionAsync --- contracts/asset-proxy/test/authorizable.ts | 26 +- contracts/asset-proxy/test/erc1155_proxy.ts | 18 +- contracts/asset-proxy/test/proxies.ts | 36 +- .../asset-proxy/test/utils/erc20_wrapper.ts | 8 +- .../asset-proxy/test/utils/erc721_wrapper.ts | 10 +- .../erc1155/test/utils/erc1155_wrapper.ts | 4 +- contracts/exchange/src/wrapper_interfaces.ts | 13 +- contracts/exchange/test/match_orders.ts | 20 +- .../utils/fill_order_combinatorial_utils.ts | 20 +- contracts/utils/test/authorizable.ts | 24 +- contracts/utils/test/ownable.ts | 8 +- packages/0x.js/src/index.ts | 1 + .../generated-wrappers/asset_proxy_owner.ts | 267 ++--- .../src/generated-wrappers/coordinator.ts | 48 +- .../coordinator_registry.ts | 29 +- .../src/generated-wrappers/dev_utils.ts | 108 +- .../generated-wrappers/dummy_erc20_token.ts | 145 +-- .../generated-wrappers/dummy_erc721_token.ts | 193 ++- .../src/generated-wrappers/dutch_auction.ts | 93 +- .../src/generated-wrappers/erc1155_proxy.ts | 124 +- .../src/generated-wrappers/erc20_proxy.ts | 100 +- .../src/generated-wrappers/erc20_token.ts | 71 +- .../src/generated-wrappers/erc721_proxy.ts | 100 +- .../src/generated-wrappers/erc721_token.ts | 123 +- .../generated-wrappers/eth_balance_checker.ts | 2 +- .../src/generated-wrappers/exchange.ts | 1065 +++++------------ .../src/generated-wrappers/forwarder.ts | 188 +-- .../src/generated-wrappers/i_asset_proxy.ts | 26 +- .../src/generated-wrappers/i_validator.ts | 2 +- .../src/generated-wrappers/i_wallet.ts | 2 +- .../generated-wrappers/multi_asset_proxy.ts | 127 +- .../src/generated-wrappers/order_validator.ts | 2 +- .../generated-wrappers/static_call_proxy.ts | 2 +- .../src/generated-wrappers/weth9.ts | 130 +- .../src/generated-wrappers/zrx_token.ts | 71 +- .../templates/TypeScript/contract.handlebars | 2 +- .../TypeScript/partials/method_tx.handlebars | 39 +- .../output/typescript/abi_gen_dummy.ts | 118 +- .../test-cli/output/typescript/lib_dummy.ts | 2 +- .../output/typescript/test_lib_dummy.ts | 2 +- .../test/abi_gen_dummy_test.ts | 8 - packages/asset-buyer/src/asset_buyer.ts | 2 +- .../exchange_swap_quote_consumer.ts | 4 +- .../forwarder_swap_quote_consumer.ts | 4 +- packages/contract-wrappers/src/index.ts | 1 + packages/contract-wrappers/src/types.ts | 2 + packages/types/src/index.ts | 10 + 47 files changed, 1281 insertions(+), 2119 deletions(-) diff --git a/contracts/asset-proxy/test/authorizable.ts b/contracts/asset-proxy/test/authorizable.ts index 37b8cbaee1..85e1201933 100644 --- a/contracts/asset-proxy/test/authorizable.ts +++ b/contracts/asset-proxy/test/authorizable.ts @@ -63,7 +63,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.true(); @@ -73,7 +73,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); return expectTransactionFailedAsync( authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), @@ -87,7 +87,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await expectTransactionFailedAsync( authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner }), @@ -99,12 +99,12 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); @@ -125,7 +125,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(0); await expectTransactionFailedAsync( @@ -140,7 +140,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(1); return expectTransactionFailedAsync( @@ -167,12 +167,12 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address1, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address2, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const address1Index = new BigNumber(0); return expectTransactionFailedAsync( @@ -187,14 +187,14 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(0); await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync( address, index, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); @@ -208,7 +208,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const afterAdd = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterAdd).to.have.length(1); @@ -216,7 +216,7 @@ describe('Authorizable', () => { await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const afterRemove = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterRemove).to.have.length(0); diff --git a/contracts/asset-proxy/test/erc1155_proxy.ts b/contracts/asset-proxy/test/erc1155_proxy.ts index 64783ba085..f5484574c1 100644 --- a/contracts/asset-proxy/test/erc1155_proxy.ts +++ b/contracts/asset-proxy/test/erc1155_proxy.ts @@ -75,12 +75,12 @@ describe('ERC1155Proxy', () => { await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( authorized, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( erc1155Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // deploy & configure ERC1155 tokens and receiver [erc1155Wrapper] = await erc1155ProxyWrapper.deployDummyContractsAsync(); @@ -702,7 +702,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // mint balance for spender @@ -713,7 +713,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } ///// Step 2/5 ///// @@ -811,7 +811,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // mint balance for spender @@ -822,7 +822,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } ///// Step 2/5 ///// @@ -943,7 +943,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // mint balance for spender @@ -954,7 +954,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } ///// Step 2/5 ///// @@ -1672,7 +1672,7 @@ describe('ERC1155Proxy', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // setup test parameters const tokenHolders = [spender, receiverContract]; diff --git a/contracts/asset-proxy/test/proxies.ts b/contracts/asset-proxy/test/proxies.ts index 2d7d01aa9f..7a885742c8 100644 --- a/contracts/asset-proxy/test/proxies.ts +++ b/contracts/asset-proxy/test/proxies.ts @@ -108,24 +108,24 @@ describe('Asset Transfer Proxies', () => { await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( authorized, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Configure ERC721Proxy await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( authorized, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Configure ERC115Proxy @@ -134,34 +134,34 @@ describe('Asset Transfer Proxies', () => { await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( authorized, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Configure MultiAssetProxy await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync( authorized, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc20Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc721Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc1155Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Deploy and configure ERC20 tokens @@ -198,13 +198,13 @@ describe('Asset Transfer Proxies', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await noReturnErc20Token.approve.awaitTransactionSuccessAsync( erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multipleReturnErc20Token.setBalance.awaitTransactionSuccessAsync( fromAddress, @@ -212,13 +212,13 @@ describe('Asset Transfer Proxies', () => { { from: owner, }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multipleReturnErc20Token.approve.awaitTransactionSuccessAsync( erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Deploy and configure ERC721 tokens and receiver @@ -411,7 +411,7 @@ describe('Asset Transfer Proxies', () => { erc20Proxy.address, allowance, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const erc20Balances = await erc20Wrapper.getBalancesAsync(); // Perform a transfer; expect this to fail. @@ -443,7 +443,7 @@ describe('Asset Transfer Proxies', () => { erc20Proxy.address, allowance, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const initialFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress); const initialToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress); @@ -684,14 +684,14 @@ describe('Asset Transfer Proxies', () => { erc721Proxy.address, false, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Remove token transfer approval for fromAddress. await erc721TokenA.approve.awaitTransactionSuccessAsync( constants.NULL_ADDRESS, erc721AFromTokenId, { from: fromAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Perform a transfer; expect this to fail. const amount = new BigNumber(1); diff --git a/contracts/asset-proxy/test/utils/erc20_wrapper.ts b/contracts/asset-proxy/test/utils/erc20_wrapper.ts index 8fdd210b24..6f3ee95bbe 100644 --- a/contracts/asset-proxy/test/utils/erc20_wrapper.ts +++ b/contracts/asset-proxy/test/utils/erc20_wrapper.ts @@ -70,13 +70,13 @@ export class ERC20Wrapper { tokenOwnerAddress, constants.INITIAL_ERC20_BALANCE, { from: this._contractOwnerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await dummyTokenContract.approve.awaitTransactionSuccessAsync( (this._proxyContract as ERC20ProxyContract).address, constants.INITIAL_ERC20_ALLOWANCE, { from: tokenOwnerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } } @@ -92,7 +92,7 @@ export class ERC20Wrapper { userAddress, amount, { from: this._contractOwnerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async getProxyAllowanceAsync(userAddress: string, assetData: string): Promise { @@ -108,7 +108,7 @@ export class ERC20Wrapper { proxyAddress, amount, { from: userAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async getBalancesAsync(): Promise { diff --git a/contracts/asset-proxy/test/utils/erc721_wrapper.ts b/contracts/asset-proxy/test/utils/erc721_wrapper.ts index 3ff03f3d19..91fd2b6832 100644 --- a/contracts/asset-proxy/test/utils/erc721_wrapper.ts +++ b/contracts/asset-proxy/test/utils/erc721_wrapper.ts @@ -97,7 +97,7 @@ export class ERC721Wrapper { proxyAddress, isApproved, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise { @@ -107,7 +107,7 @@ export class ERC721Wrapper { to, tokenId, { from: tokenOwner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async transferFromAsync( @@ -122,7 +122,7 @@ export class ERC721Wrapper { userAddress, tokenId, { from: currentOwner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async mintAsync(tokenAddress: string, tokenId: BigNumber, userAddress: string): Promise { @@ -131,7 +131,7 @@ export class ERC721Wrapper { userAddress, tokenId, { from: this._contractOwnerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async burnAsync(tokenAddress: string, tokenId: BigNumber, owner: string): Promise { @@ -140,7 +140,7 @@ export class ERC721Wrapper { owner, tokenId, { from: this._contractOwnerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise { diff --git a/contracts/erc1155/test/utils/erc1155_wrapper.ts b/contracts/erc1155/test/utils/erc1155_wrapper.ts index 5f2ea1483f..edb2fb0c07 100644 --- a/contracts/erc1155/test/utils/erc1155_wrapper.ts +++ b/contracts/erc1155/test/utils/erc1155_wrapper.ts @@ -100,7 +100,7 @@ export class Erc1155Wrapper { beneficiaries, tokenAmountsAsArray, { from: this._contractOwner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async mintNonFungibleTokensAsync(beneficiaries: string[]): Promise<[BigNumber, BigNumber[]]> { @@ -118,7 +118,7 @@ export class Erc1155Wrapper { token, beneficiaries, { from: this._contractOwner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const encodedNftIds: BigNumber[] = []; const nftIdBegin = 1; diff --git a/contracts/exchange/src/wrapper_interfaces.ts b/contracts/exchange/src/wrapper_interfaces.ts index 11acfb6624..b096970fe2 100644 --- a/contracts/exchange/src/wrapper_interfaces.ts +++ b/contracts/exchange/src/wrapper_interfaces.ts @@ -1,4 +1,5 @@ import { PromiseWithTransactionHash } from '@0x/base-contract'; +import { TxOpts } from '@0x/types'; import { BlockParam, CallData, TransactionReceiptWithDecodedLogs, TxData } from 'ethereum-types'; // Generated Wrapper Interfaces @@ -7,8 +8,7 @@ export interface AssetProxyDispatcher { awaitTransactionSuccessAsync: ( assetProxy: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + txOpts?: TxOpts, ) => PromiseWithTransactionHash; }; getAssetProxy: { @@ -21,16 +21,14 @@ export interface Authorizable extends Ownable { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + txOpts?: TxOpts, ) => PromiseWithTransactionHash; }; removeAuthorizedAddress: { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + txOpts?: TxOpts, ) => PromiseWithTransactionHash; }; authorized: { @@ -43,8 +41,7 @@ export interface Ownable { awaitTransactionSuccessAsync: ( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + txOpts?: TxOpts, ) => PromiseWithTransactionHash; }; owner: { diff --git a/contracts/exchange/test/match_orders.ts b/contracts/exchange/test/match_orders.ts index 3c74932c8c..89c69c5154 100644 --- a/contracts/exchange/test/match_orders.ts +++ b/contracts/exchange/test/match_orders.ts @@ -144,52 +144,52 @@ describe('matchOrders', () => { await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchange.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchange.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchange.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxyContract.addAuthorizedAddress.awaitTransactionSuccessAsync( exchange.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxyContract.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxyContract.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxyContract.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( erc20Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( erc721Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( erc1155Proxy.address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Set default addresses diff --git a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts index 89cf4e801e..258a1b6188 100644 --- a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts +++ b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts @@ -126,61 +126,61 @@ export async function fillOrderCombinatorialUtilsFactoryAsync( await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchangeContract.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchangeContract.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchangeContract.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync( exchangeContract.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( multiAssetProxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc20Proxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc721Proxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( erc1155Proxy.address, { from: ownerAddress }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const orderFactory = new OrderFactoryFromScenario( diff --git a/contracts/utils/test/authorizable.ts b/contracts/utils/test/authorizable.ts index df70f84e19..4c89cc7d6c 100644 --- a/contracts/utils/test/authorizable.ts +++ b/contracts/utils/test/authorizable.ts @@ -66,7 +66,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const expectedError = new AuthorizableRevertErrors.TargetAlreadyAuthorizedError(address); const tx = authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }); @@ -79,7 +79,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner); const tx = authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner }); @@ -90,12 +90,12 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); @@ -113,7 +113,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(0); const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner); @@ -127,7 +127,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(1); const expectedError = new AuthorizableRevertErrors.IndexOutOfBoundsError(index, index); @@ -152,12 +152,12 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address1, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address2, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const address1Index = new BigNumber(0); const expectedError = new AuthorizableRevertErrors.AuthorizedAddressMismatchError(address1, address2); @@ -171,14 +171,14 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const index = new BigNumber(0); await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync( address, index, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); @@ -192,7 +192,7 @@ describe('Authorizable', () => { await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const afterAdd = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterAdd).to.have.length(1); @@ -200,7 +200,7 @@ describe('Authorizable', () => { await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( address, { from: owner }, - constants.AWAIT_TRANSACTION_MINED_MS, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); const afterRemove = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterRemove).to.have.length(0); diff --git a/contracts/utils/test/ownable.ts b/contracts/utils/test/ownable.ts index 4b67312718..f3453e7772 100644 --- a/contracts/utils/test/ownable.ts +++ b/contracts/utils/test/ownable.ts @@ -49,7 +49,13 @@ describe('Ownable', () => { }); it('should transfer ownership if the specified new owner is not the zero address', async () => { - expect(ownable.transferOwnership.sendTransactionAsync(nonOwner, { from: owner })).to.be.fulfilled(''); + expect( + ownable.transferOwnership.awaitTransactionSuccessAsync( + nonOwner, + { from: owner }, + { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, + ), + ).to.be.fulfilled(''); const updatedOwner = await ownable.owner.callAsync(); expect(updatedOwner).to.be.eq(nonOwner); }); diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 5f857bb0fa..66814e364e 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -83,6 +83,7 @@ export { SimpleEvmOutput, SimpleEvmBytecodeOutput, EIP712DomainWithDefaultSchema, + TxOpts, EventCallback, IndexedFilterValues, DecodedLogEvent, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index 067e16a051..2fd17292e4 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -172,7 +172,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(owner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + owner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('addOwner(address)', [owner.toLowerCase()]); @@ -188,6 +192,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.addOwner.callAsync(owner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -202,20 +210,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.addOwner.sendTransactionAsync(owner.toLowerCase(), txData); + const txHashPromise = self.addOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -245,11 +252,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(owner: string, txData?: Partial | undefined): Promise { - await (this as any).addOwner.callAsync(owner, txData); - const txHash = await (this as any).addOwner.sendTransactionAsync(owner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -318,7 +320,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(_required: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + _required: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required]); @@ -334,6 +340,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.changeRequirement.callAsync(_required, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -348,20 +358,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _required: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.changeRequirement.sendTransactionAsync(_required, txData); + const txHashPromise = self.changeRequirement.sendTransactionAsync(_required, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -391,14 +400,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _required: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).changeRequirement.callAsync(_required, txData); - const txHash = await (this as any).changeRequirement.sendTransactionAsync(_required, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -475,6 +476,7 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( _secondsTimeLocked: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; @@ -491,6 +493,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.changeTimeLock.callAsync(_secondsTimeLocked, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -506,20 +512,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _secondsTimeLocked: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.changeTimeLock.sendTransactionAsync(_secondsTimeLocked, txData); + const txHashPromise = self.changeTimeLock.sendTransactionAsync(_secondsTimeLocked, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -550,14 +555,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _secondsTimeLocked: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).changeTimeLock.callAsync(_secondsTimeLocked, txData); - const txHash = await (this as any).changeTimeLock.sendTransactionAsync(_secondsTimeLocked, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -634,7 +631,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(transactionId: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + transactionId: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId]); @@ -650,6 +651,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.confirmTransaction.callAsync(transactionId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -664,20 +669,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.confirmTransaction.sendTransactionAsync(transactionId, txData); + const txHashPromise = self.confirmTransaction.sendTransactionAsync(transactionId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -707,14 +711,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transactionId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).confirmTransaction.callAsync(transactionId, txData); - const txHash = await (this as any).confirmTransaction.sendTransactionAsync(transactionId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -893,7 +889,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(transactionId: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + transactionId: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId]); @@ -909,6 +909,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.executeTransaction.callAsync(transactionId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -923,20 +927,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.executeTransaction.sendTransactionAsync(transactionId, txData); + const txHashPromise = self.executeTransaction.sendTransactionAsync(transactionId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -966,14 +969,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transactionId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).executeTransaction.callAsync(transactionId, txData); - const txHash = await (this as any).executeTransaction.sendTransactionAsync(transactionId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1536,6 +1531,7 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); @@ -1560,6 +1556,16 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.registerFunctionCall.callAsync( + hasCustomTimeLock, + functionSelector, + destination, + newSecondsTimeLocked, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1581,8 +1587,7 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); @@ -1595,6 +1600,7 @@ export class AssetProxyOwnerContract extends BaseContract { destination.toLowerCase(), newSecondsTimeLocked, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1602,8 +1608,8 @@ export class AssetProxyOwnerContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1651,29 +1657,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - hasCustomTimeLock: boolean, - functionSelector: string, - destination: string, - newSecondsTimeLocked: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).registerFunctionCall.callAsync( - hasCustomTimeLock, - functionSelector, - destination, - newSecondsTimeLocked, - txData, - ); - const txHash = await (this as any).registerFunctionCall.sendTransactionAsync( - hasCustomTimeLock, - functionSelector, - destination, - newSecondsTimeLocked, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1776,7 +1759,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(owner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + owner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner.toLowerCase()]); @@ -1792,6 +1779,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeOwner.callAsync(owner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1806,20 +1797,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.removeOwner.sendTransactionAsync(owner.toLowerCase(), txData); + const txHashPromise = self.removeOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1849,11 +1839,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(owner: string, txData?: Partial | undefined): Promise { - await (this as any).removeOwner.callAsync(owner, txData); - const txHash = await (this as any).removeOwner.sendTransactionAsync(owner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1929,6 +1914,7 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('owner', owner); assert.isString('newOwner', newOwner); @@ -1949,6 +1935,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.replaceOwner.callAsync(owner, newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1965,8 +1955,7 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); assert.isString('newOwner', newOwner); @@ -1975,6 +1964,7 @@ export class AssetProxyOwnerContract extends BaseContract { owner.toLowerCase(), newOwner.toLowerCase(), txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1982,8 +1972,8 @@ export class AssetProxyOwnerContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2018,15 +2008,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - owner: string, - newOwner: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).replaceOwner.callAsync(owner, newOwner, txData); - const txHash = await (this as any).replaceOwner.sendTransactionAsync(owner, newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2153,7 +2134,11 @@ export class AssetProxyOwnerContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(transactionId: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + transactionId: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId]); @@ -2169,6 +2154,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.revokeConfirmation.callAsync(transactionId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2183,20 +2172,19 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; - const txHashPromise = self.revokeConfirmation.sendTransactionAsync(transactionId, txData); + const txHashPromise = self.revokeConfirmation.sendTransactionAsync(transactionId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2226,14 +2214,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transactionId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).revokeConfirmation.callAsync(transactionId, txData); - const txHash = await (this as any).revokeConfirmation.sendTransactionAsync(transactionId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2358,6 +2338,7 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('destination', destination); assert.isBigNumber('value', value); @@ -2380,6 +2361,10 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.submitTransaction.callAsync(destination, value, data, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2398,8 +2383,7 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('destination', destination); assert.isBigNumber('value', value); @@ -2410,6 +2394,7 @@ export class AssetProxyOwnerContract extends BaseContract { value, data, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -2417,8 +2402,8 @@ export class AssetProxyOwnerContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2461,16 +2446,6 @@ export class AssetProxyOwnerContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - destination: string, - value: BigNumber, - data: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).submitTransaction.callAsync(destination, value, data, txData); - const txHash = await (this as any).submitTransaction.sendTransactionAsync(destination, value, data, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index e6bbd3c525..9f0ef5d578 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -220,6 +220,7 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); @@ -248,6 +249,17 @@ export class CoordinatorContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.executeTransaction.callAsync( + transaction, + txOrigin, + transactionSignature, + approvalExpirationTimeSeconds, + approvalSignatures, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -274,8 +286,7 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); @@ -289,6 +300,7 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds, approvalSignatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -296,8 +308,8 @@ export class CoordinatorContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -354,32 +366,6 @@ export class CoordinatorContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transaction: { salt: BigNumber; signerAddress: string; data: string }, - txOrigin: string, - transactionSignature: string, - approvalExpirationTimeSeconds: BigNumber[], - approvalSignatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).executeTransaction.callAsync( - transaction, - txOrigin, - transactionSignature, - approvalExpirationTimeSeconds, - approvalSignatures, - txData, - ); - const txHash = await (this as any).executeTransaction.sendTransactionAsync( - transaction, - txOrigin, - transactionSignature, - approvalExpirationTimeSeconds, - approvalSignatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 3172cd24f9..ccb84940c7 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -55,7 +55,11 @@ export class CoordinatorRegistryContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(coordinatorEndpoint: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + coordinatorEndpoint: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint]); @@ -71,6 +75,10 @@ export class CoordinatorRegistryContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -85,20 +93,19 @@ export class CoordinatorRegistryContract extends BaseContract { awaitTransactionSuccessAsync( coordinatorEndpoint: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; - const txHashPromise = self.setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData); + const txHashPromise = self.setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -128,14 +135,6 @@ export class CoordinatorRegistryContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - coordinatorEndpoint: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txData); - const txHash = await (this as any).setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index 7257fd0c4e..66ec47e9bf 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -1813,6 +1813,7 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -1833,6 +1834,15 @@ export class DevUtilsContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.getSimulatedOrderTransferResults.callAsync( + order, + takerAddress, + takerAssetFillAmount, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1867,8 +1877,7 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -1878,6 +1887,7 @@ export class DevUtilsContract extends BaseContract { takerAddress.toLowerCase(), takerAssetFillAmount, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1885,8 +1895,8 @@ export class DevUtilsContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1943,41 +1953,6 @@ export class DevUtilsContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - takerAddress: string, - takerAssetFillAmount: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).getSimulatedOrderTransferResults.callAsync( - order, - takerAddress, - takerAssetFillAmount, - txData, - ); - const txHash = await (this as any).getSimulatedOrderTransferResults.sendTransactionAsync( - order, - takerAddress, - takerAssetFillAmount, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2127,6 +2102,7 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); @@ -2148,6 +2124,15 @@ export class DevUtilsContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.getSimulatedOrdersTransferResults.callAsync( + orders, + takerAddresses, + takerAssetFillAmounts, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2183,8 +2168,7 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); @@ -2195,6 +2179,7 @@ export class DevUtilsContract extends BaseContract { takerAddresses, takerAssetFillAmounts, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -2202,8 +2187,8 @@ export class DevUtilsContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2262,41 +2247,6 @@ export class DevUtilsContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAddresses: string[], - takerAssetFillAmounts: BigNumber[], - txData?: Partial | undefined, - ): Promise { - await (this as any).getSimulatedOrdersTransferResults.callAsync( - orders, - takerAddresses, - takerAssetFillAmounts, - txData, - ); - const txHash = await (this as any).getSimulatedOrdersTransferResults.sendTransactionAsync( - orders, - takerAddresses, - takerAssetFillAmounts, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index e954be219e..6a1c1cf6a8 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -168,6 +168,7 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -188,6 +189,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(_spender, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -204,21 +209,20 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; - const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData); + const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -257,15 +261,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _spender: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(_spender, _value, txData); - const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -446,7 +441,11 @@ export class DummyERC20TokenContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(_value: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + _value: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('mint(uint256)', [_value]); @@ -462,6 +461,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.mint.callAsync(_value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -476,20 +479,19 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; - const txHashPromise = self.mint.sendTransactionAsync(_value, txData); + const txHashPromise = self.mint.sendTransactionAsync(_value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -519,14 +521,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).mint.callAsync(_value, txData); - const txHash = await (this as any).mint.sendTransactionAsync(_value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -686,6 +680,7 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_target', _target); assert.isBigNumber('_value', _value); @@ -706,6 +701,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setBalance.callAsync(_target, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -722,21 +721,20 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_target', _target); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; - const txHashPromise = self.setBalance.sendTransactionAsync(_target.toLowerCase(), _value, txData); + const txHashPromise = self.setBalance.sendTransactionAsync(_target.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -775,15 +773,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _target: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).setBalance.callAsync(_target, _value, txData); - const txHash = await (this as any).setBalance.sendTransactionAsync(_target, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -962,6 +951,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -979,6 +969,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transfer.callAsync(_to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -995,21 +989,20 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; - const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData); + const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1041,15 +1034,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transfer.callAsync(_to, _value, txData); - const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1138,6 +1122,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1160,6 +1145,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(_from, _to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1178,8 +1167,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1190,6 +1178,7 @@ export class DummyERC20TokenContract extends BaseContract { _to.toLowerCase(), _value, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1197,8 +1186,8 @@ export class DummyERC20TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1241,16 +1230,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(_from, _to, _value, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1338,7 +1317,11 @@ export class DummyERC20TokenContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1354,6 +1337,10 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1367,20 +1354,19 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1409,11 +1395,6 @@ export class DummyERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index ebca30f196..43c3e94c3d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -81,6 +81,7 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -101,6 +102,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(_approved, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -117,21 +122,20 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; - const txHashPromise = self.approve.sendTransactionAsync(_approved.toLowerCase(), _tokenId, txData); + const txHashPromise = self.approve.sendTransactionAsync(_approved.toLowerCase(), _tokenId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -170,15 +174,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _approved: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(_approved, _tokenId, txData); - const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -322,6 +317,7 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); @@ -339,6 +335,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.burn.callAsync(_owner, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -355,21 +355,20 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; - const txHashPromise = self.burn.sendTransactionAsync(_owner.toLowerCase(), _tokenId, txData); + const txHashPromise = self.burn.sendTransactionAsync(_owner.toLowerCase(), _tokenId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -405,15 +404,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _owner: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).burn.callAsync(_owner, _tokenId, txData); - const txHash = await (this as any).burn.sendTransactionAsync(_owner, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -609,6 +599,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -626,6 +617,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.mint.callAsync(_to, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -642,21 +637,20 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; - const txHashPromise = self.mint.sendTransactionAsync(_to.toLowerCase(), _tokenId, txData); + const txHashPromise = self.mint.sendTransactionAsync(_to.toLowerCase(), _tokenId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -692,15 +686,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _to: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).mint.callAsync(_to, _tokenId, txData); - const txHash = await (this as any).mint.sendTransactionAsync(_to, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -929,6 +914,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -951,6 +937,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -969,8 +959,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -981,6 +970,7 @@ export class DummyERC721TokenContract extends BaseContract { _to.toLowerCase(), _tokenId, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -988,8 +978,8 @@ export class DummyERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1032,16 +1022,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); - const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1147,6 +1127,7 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1171,6 +1152,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1191,8 +1176,7 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1205,6 +1189,7 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId, _data, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1212,8 +1197,8 @@ export class DummyERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1260,23 +1245,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); - const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync( - _from, - _to, - _tokenId, - _data, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1378,6 +1346,7 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1398,6 +1367,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setApprovalForAll.callAsync(_operator, _approved, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1414,8 +1387,7 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1424,6 +1396,7 @@ export class DummyERC721TokenContract extends BaseContract { _operator.toLowerCase(), _approved, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1431,8 +1404,8 @@ export class DummyERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1471,15 +1444,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _operator: string, - _approved: boolean, - txData?: Partial | undefined, - ): Promise { - await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData); - const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1616,6 +1580,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1638,6 +1603,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(_from, _to, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1656,8 +1625,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1668,6 +1636,7 @@ export class DummyERC721TokenContract extends BaseContract { _to.toLowerCase(), _tokenId, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1675,8 +1644,8 @@ export class DummyERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1719,16 +1688,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1815,7 +1774,11 @@ export class DummyERC721TokenContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1831,6 +1794,10 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1844,20 +1811,19 @@ export class DummyERC721TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1886,11 +1852,6 @@ export class DummyERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index 84490f53af..49837c0abe 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -59,6 +59,7 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { const self = (this as any) as DutchAuctionContract; const encodedData = self._strictEncodeArguments( @@ -77,6 +78,10 @@ export class DutchAuctionContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.getAuctionDetails.callAsync(order, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -104,19 +109,18 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as DutchAuctionContract; - const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData); + const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -164,27 +168,6 @@ export class DutchAuctionContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - txData?: Partial | undefined, - ): Promise { - await (this as any).getAuctionDetails.callAsync(order, txData); - const txHash = await (this as any).getAuctionDetails.sendTransactionAsync(order, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -355,6 +338,7 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); @@ -375,6 +359,10 @@ export class DutchAuctionContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -423,8 +411,7 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); @@ -435,6 +422,7 @@ export class DutchAuctionContract extends BaseContract { buySignature, sellSignature, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -442,8 +430,8 @@ export class DutchAuctionContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -514,49 +502,6 @@ export class DutchAuctionContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - buyOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - sellOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - }, - buySignature: string, - sellSignature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txData); - const txHash = await (this as any).matchOrders.sendTransactionAsync( - buyOrder, - sellOrder, - buySignature, - sellSignature, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index d29f0b2203..9f601af4fd 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -64,7 +64,11 @@ export class ERC1155ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -80,6 +84,10 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.addAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -94,20 +102,19 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; - const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -137,11 +144,6 @@ export class ERC1155ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).addAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -437,7 +439,11 @@ export class ERC1155ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -453,6 +459,10 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -467,20 +477,19 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; - const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -510,11 +519,6 @@ export class ERC1155ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).removeAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -590,6 +594,7 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('target', target); assert.isBigNumber('index', index); @@ -610,6 +615,10 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -626,8 +635,7 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -636,6 +644,7 @@ export class ERC1155ProxyContract extends BaseContract { target.toLowerCase(), index, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -643,8 +652,8 @@ export class ERC1155ProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -683,19 +692,6 @@ export class ERC1155ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - target: string, - index: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData); - const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync( - target, - index, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -790,6 +786,7 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('assetData', assetData); assert.isString('from', from); @@ -814,6 +811,10 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(assetData, from, to, amount, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -836,8 +837,7 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); @@ -850,6 +850,7 @@ export class ERC1155ProxyContract extends BaseContract { to.toLowerCase(), amount, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -857,8 +858,8 @@ export class ERC1155ProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -907,17 +908,6 @@ export class ERC1155ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetData: string, - from: string, - to: string, - amount: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1013,7 +1003,11 @@ export class ERC1155ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1029,6 +1023,10 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1042,20 +1040,19 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1084,11 +1081,6 @@ export class ERC1155ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index 0802320bc4..b6c68eed54 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -64,7 +64,11 @@ export class ERC20ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -80,6 +84,10 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.addAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -94,20 +102,19 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; - const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -137,11 +144,6 @@ export class ERC20ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).addAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -260,7 +262,11 @@ export class ERC20ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -276,6 +282,10 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -290,20 +300,19 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; - const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -333,11 +342,6 @@ export class ERC20ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).removeAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -456,6 +460,7 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('target', target); assert.isBigNumber('index', index); @@ -476,6 +481,10 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -492,8 +501,7 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -502,6 +510,7 @@ export class ERC20ProxyContract extends BaseContract { target.toLowerCase(), index, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -509,8 +518,8 @@ export class ERC20ProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -549,19 +558,6 @@ export class ERC20ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - target: string, - index: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData); - const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync( - target, - index, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -775,7 +771,11 @@ export class ERC20ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -791,6 +791,10 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -804,20 +808,19 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -846,11 +849,6 @@ export class ERC20ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index 0a8e735dfa..58aab0f9ca 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -69,6 +69,7 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -89,6 +90,10 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(_spender, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -105,21 +110,20 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; - const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData); + const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -158,15 +162,6 @@ export class ERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _spender: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(_spender, _value, txData); - const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -305,6 +300,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -327,6 +323,10 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(_from, _to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -345,8 +345,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -357,6 +356,7 @@ export class ERC20TokenContract extends BaseContract { _to.toLowerCase(), _value, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -364,8 +364,8 @@ export class ERC20TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -408,16 +408,6 @@ export class ERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(_from, _to, _value, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -567,6 +557,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -584,6 +575,10 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transfer.callAsync(_to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -600,21 +595,20 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; - const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData); + const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -646,15 +640,6 @@ export class ERC20TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transfer.callAsync(_to, _value, txData); - const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index e3a1c3ad56..1197754684 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -64,7 +64,11 @@ export class ERC721ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -80,6 +84,10 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.addAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -94,20 +102,19 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; - const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -137,11 +144,6 @@ export class ERC721ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).addAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -260,7 +262,11 @@ export class ERC721ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -276,6 +282,10 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -290,20 +300,19 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; - const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -333,11 +342,6 @@ export class ERC721ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).removeAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -456,6 +460,7 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('target', target); assert.isBigNumber('index', index); @@ -476,6 +481,10 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -492,8 +501,7 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -502,6 +510,7 @@ export class ERC721ProxyContract extends BaseContract { target.toLowerCase(), index, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -509,8 +518,8 @@ export class ERC721ProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -549,19 +558,6 @@ export class ERC721ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - target: string, - index: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData); - const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync( - target, - index, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -775,7 +771,11 @@ export class ERC721ProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -791,6 +791,10 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -804,20 +808,19 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -846,11 +849,6 @@ export class ERC721ProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index 7747cb11d6..5a64919432 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -81,6 +81,7 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -101,6 +102,10 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(_approved, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -117,21 +122,20 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as ERC721TokenContract; - const txHashPromise = self.approve.sendTransactionAsync(_approved.toLowerCase(), _tokenId, txData); + const txHashPromise = self.approve.sendTransactionAsync(_approved.toLowerCase(), _tokenId, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -170,15 +174,6 @@ export class ERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _approved: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(_approved, _tokenId, txData); - const txHash = await (this as any).approve.sendTransactionAsync(_approved, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -487,6 +482,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -509,6 +505,10 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -527,8 +527,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -539,6 +538,7 @@ export class ERC721TokenContract extends BaseContract { _to.toLowerCase(), _tokenId, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -546,8 +546,8 @@ export class ERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -590,16 +590,6 @@ export class ERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); - const txHash = await (this as any).safeTransferFrom1.sendTransactionAsync(_from, _to, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -705,6 +695,7 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -729,6 +720,10 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -749,8 +744,7 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -763,6 +757,7 @@ export class ERC721TokenContract extends BaseContract { _tokenId, _data, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -770,8 +765,8 @@ export class ERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -818,23 +813,6 @@ export class ERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - _data: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); - const txHash = await (this as any).safeTransferFrom2.sendTransactionAsync( - _from, - _to, - _tokenId, - _data, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -936,6 +914,7 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -956,6 +935,10 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setApprovalForAll.callAsync(_operator, _approved, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -972,8 +955,7 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -982,6 +964,7 @@ export class ERC721TokenContract extends BaseContract { _operator.toLowerCase(), _approved, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -989,8 +972,8 @@ export class ERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1029,15 +1012,6 @@ export class ERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _operator: string, - _approved: boolean, - txData?: Partial | undefined, - ): Promise { - await (this as any).setApprovalForAll.callAsync(_operator, _approved, txData); - const txHash = await (this as any).setApprovalForAll.sendTransactionAsync(_operator, _approved, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1131,6 +1105,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1153,6 +1128,10 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(_from, _to, _tokenId, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1171,8 +1150,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1183,6 +1161,7 @@ export class ERC721TokenContract extends BaseContract { _to.toLowerCase(), _tokenId, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1190,8 +1169,8 @@ export class ERC721TokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1234,16 +1213,6 @@ export class ERC721TokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _tokenId: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(_from, _to, _tokenId, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _tokenId, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts index 74ffebf9ba..731ec437f4 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 4f818c3032..4e0bd42d5a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -280,6 +280,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; @@ -299,6 +300,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchCancelOrders.callAsync(orders, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -328,20 +333,19 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; - const txHashPromise = self.batchCancelOrders.sendTransactionAsync(orders, txData); + const txHashPromise = self.batchCancelOrders.sendTransactionAsync(orders, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -392,29 +396,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - txData?: Partial | undefined, - ): Promise { - await (this as any).batchCancelOrders.callAsync(orders, txData); - const txHash = await (this as any).batchCancelOrders.sendTransactionAsync(orders, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -539,6 +520,7 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); @@ -559,6 +541,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchExecuteTransactions.callAsync(transactions, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -582,21 +568,25 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; - const txHashPromise = self.batchExecuteTransactions.sendTransactionAsync(transactions, signatures, txData); + const txHashPromise = self.batchExecuteTransactions.sendTransactionAsync( + transactions, + signatures, + txData, + opts, + ); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -642,25 +632,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transactions: Array<{ - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }>, - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchExecuteTransactions.callAsync(transactions, signatures, txData); - const txHash = await (this as any).batchExecuteTransactions.sendTransactionAsync( - transactions, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -787,6 +758,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -808,6 +780,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchFillOrKillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -842,8 +818,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -854,6 +829,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -861,8 +837,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -920,36 +896,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchFillOrKillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); - const txHash = await (this as any).batchFillOrKillOrders.sendTransactionAsync( - orders, - takerAssetFillAmounts, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1116,6 +1062,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1137,6 +1084,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchFillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1171,8 +1122,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1183,6 +1133,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1190,8 +1141,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1249,36 +1200,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchFillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); - const txHash = await (this as any).batchFillOrders.sendTransactionAsync( - orders, - takerAssetFillAmounts, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1445,6 +1366,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1466,6 +1388,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchFillOrdersNoThrow.callAsync(orders, takerAssetFillAmounts, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1500,8 +1426,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1512,6 +1437,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1519,8 +1445,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1578,36 +1504,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAssetFillAmounts: BigNumber[], - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchFillOrdersNoThrow.callAsync(orders, takerAssetFillAmounts, signatures, txData); - const txHash = await (this as any).batchFillOrdersNoThrow.sendTransactionAsync( - orders, - takerAssetFillAmounts, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1794,6 +1690,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -1816,6 +1713,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchMatchOrders.callAsync(leftOrders, rightOrders, leftSignatures, rightSignatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1868,8 +1769,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -1882,6 +1782,7 @@ export class ExchangeContract extends BaseContract { leftSignatures, rightSignatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -1889,8 +1790,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1967,59 +1868,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - leftOrders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - rightOrders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - leftSignatures: string[], - rightSignatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchMatchOrders.callAsync( - leftOrders, - rightOrders, - leftSignatures, - rightSignatures, - txData, - ); - const txHash = await (this as any).batchMatchOrders.sendTransactionAsync( - leftOrders, - rightOrders, - leftSignatures, - rightSignatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2263,6 +2111,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2285,6 +2134,16 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.batchMatchOrdersWithMaximalFill.callAsync( + leftOrders, + rightOrders, + leftSignatures, + rightSignatures, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2337,8 +2196,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2351,6 +2209,7 @@ export class ExchangeContract extends BaseContract { leftSignatures, rightSignatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -2358,8 +2217,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2436,59 +2295,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - leftOrders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - rightOrders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - leftSignatures: string[], - rightSignatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).batchMatchOrdersWithMaximalFill.callAsync( - leftOrders, - rightOrders, - leftSignatures, - rightSignatures, - txData, - ); - const txHash = await (this as any).batchMatchOrdersWithMaximalFill.sendTransactionAsync( - leftOrders, - rightOrders, - leftSignatures, - rightSignatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2706,6 +2512,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( @@ -2724,6 +2531,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.cancelOrder.callAsync(order, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2753,19 +2564,18 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as ExchangeContract; - const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData); + const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2815,29 +2625,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - txData?: Partial | undefined, - ): Promise { - await (this as any).cancelOrder.callAsync(order, txData); - const txHash = await (this as any).cancelOrder.sendTransactionAsync(order, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2948,7 +2735,11 @@ export class ExchangeContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(targetOrderEpoch: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + targetOrderEpoch: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch]); @@ -2964,6 +2755,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.cancelOrdersUpTo.callAsync(targetOrderEpoch, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2979,20 +2774,19 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( targetOrderEpoch: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; - const txHashPromise = self.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, txData); + const txHashPromise = self.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -3023,14 +2817,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - targetOrderEpoch: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).cancelOrdersUpTo.callAsync(targetOrderEpoch, txData); - const txHash = await (this as any).cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -3209,6 +2995,7 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3228,6 +3015,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.executeTransaction.callAsync(transaction, signature, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -3250,20 +3041,19 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('signature', signature); const self = (this as any) as ExchangeContract; - const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction, signature, txData); + const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction, signature, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -3307,21 +3097,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - transaction: { - salt: BigNumber; - expirationTimeSeconds: BigNumber; - gasPrice: BigNumber; - signerAddress: string; - data: string; - }, - signature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).executeTransaction.callAsync(transaction, signature, txData); - const txHash = await (this as any).executeTransaction.sendTransactionAsync(transaction, signature, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -3443,6 +3218,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -3463,6 +3239,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.fillOrKillOrder.callAsync(order, takerAssetFillAmount, signature, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -3496,8 +3276,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -3507,6 +3286,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount, signature, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -3514,8 +3294,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -3571,36 +3351,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - takerAssetFillAmount: BigNumber, - signature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).fillOrKillOrder.callAsync(order, takerAssetFillAmount, signature, txData); - const txHash = await (this as any).fillOrKillOrder.sendTransactionAsync( - order, - takerAssetFillAmount, - signature, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -3757,6 +3507,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -3777,6 +3528,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.fillOrder.callAsync(order, takerAssetFillAmount, signature, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -3810,21 +3565,26 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; - const txHashPromise = self.fillOrder.sendTransactionAsync(order, takerAssetFillAmount, signature, txData); + const txHashPromise = self.fillOrder.sendTransactionAsync( + order, + takerAssetFillAmount, + signature, + txData, + opts, + ); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -3880,36 +3640,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - order: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - takerAssetFillAmount: BigNumber, - signature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).fillOrder.callAsync(order, takerAssetFillAmount, signature, txData); - const txHash = await (this as any).fillOrder.sendTransactionAsync( - order, - takerAssetFillAmount, - signature, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -4449,6 +4179,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4470,6 +4201,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketBuyOrdersFillOrKill.callAsync(orders, makerAssetFillAmount, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -4503,8 +4238,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4515,6 +4249,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -4522,8 +4257,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -4580,36 +4315,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).marketBuyOrdersFillOrKill.callAsync(orders, makerAssetFillAmount, signatures, txData); - const txHash = await (this as any).marketBuyOrdersFillOrKill.sendTransactionAsync( - orders, - makerAssetFillAmount, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -4771,6 +4476,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4792,6 +4498,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketBuyOrdersNoThrow.callAsync(orders, makerAssetFillAmount, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -4825,8 +4535,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4837,6 +4546,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -4844,8 +4554,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -4880,57 +4590,27 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, ): Promise { assert.isArray('orders', orders); - assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); - assert.isArray('signatures', signatures); - const self = (this as any) as ExchangeContract; - const encodedData = self._strictEncodeArguments( - 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', - [orders, makerAssetFillAmount, signatures], - ); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - makerAssetFillAmount: BigNumber, - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).marketBuyOrdersNoThrow.callAsync(orders, makerAssetFillAmount, signatures, txData); - const txHash = await (this as any).marketBuyOrdersNoThrow.sendTransactionAsync( - orders, - makerAssetFillAmount, - signatures, - txData, + assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); + assert.isArray('signatures', signatures); + const self = (this as any) as ExchangeContract; + const encodedData = self._strictEncodeArguments( + 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],uint256,bytes[])', + [orders, makerAssetFillAmount, signatures], ); - return txHash; + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -5092,6 +4772,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5113,6 +4794,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketSellOrdersFillOrKill.callAsync(orders, takerAssetFillAmount, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -5146,8 +4831,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5158,6 +4842,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -5165,8 +4850,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -5223,36 +4908,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).marketSellOrdersFillOrKill.callAsync(orders, takerAssetFillAmount, signatures, txData); - const txHash = await (this as any).marketSellOrdersFillOrKill.sendTransactionAsync( - orders, - takerAssetFillAmount, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -5414,6 +5069,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5435,6 +5091,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketSellOrdersNoThrow.callAsync(orders, takerAssetFillAmount, signatures, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -5468,8 +5128,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5480,6 +5139,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount, signatures, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -5487,8 +5147,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -5545,36 +5205,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - takerAssetFillAmount: BigNumber, - signatures: string[], - txData?: Partial | undefined, - ): Promise { - await (this as any).marketSellOrdersNoThrow.callAsync(orders, takerAssetFillAmount, signatures, txData); - const txHash = await (this as any).marketSellOrdersNoThrow.sendTransactionAsync( - orders, - takerAssetFillAmount, - signatures, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -5754,6 +5384,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -5774,6 +5405,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.matchOrders.callAsync(leftOrder, rightOrder, leftSignature, rightSignature, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -5824,8 +5459,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -5836,6 +5470,7 @@ export class ExchangeContract extends BaseContract { leftSignature, rightSignature, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -5843,8 +5478,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -5917,53 +5552,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - leftOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - rightOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - leftSignature: string, - rightSignature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).matchOrders.callAsync(leftOrder, rightOrder, leftSignature, rightSignature, txData); - const txHash = await (this as any).matchOrders.sendTransactionAsync( - leftOrder, - rightOrder, - leftSignature, - rightSignature, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -6197,6 +5785,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -6217,6 +5806,16 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.matchOrdersWithMaximalFill.callAsync( + leftOrder, + rightOrder, + leftSignature, + rightSignature, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -6267,8 +5866,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -6279,6 +5877,7 @@ export class ExchangeContract extends BaseContract { leftSignature, rightSignature, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -6286,8 +5885,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -6360,59 +5959,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - leftOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - rightOrder: { - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }, - leftSignature: string, - rightSignature: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).matchOrdersWithMaximalFill.callAsync( - leftOrder, - rightOrder, - leftSignature, - rightSignature, - txData, - ); - const txHash = await (this as any).matchOrdersWithMaximalFill.sendTransactionAsync( - leftOrder, - rightOrder, - leftSignature, - rightSignature, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -6701,7 +6247,11 @@ export class ExchangeContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(hash: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + hash: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('hash', hash); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('preSign(bytes32)', [hash]); @@ -6717,6 +6267,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.preSign.callAsync(hash, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -6731,20 +6285,19 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( hash: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('hash', hash); const self = (this as any) as ExchangeContract; - const txHashPromise = self.preSign.sendTransactionAsync(hash, txData); + const txHashPromise = self.preSign.sendTransactionAsync(hash, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -6774,11 +6327,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(hash: string, txData?: Partial | undefined): Promise { - await (this as any).preSign.callAsync(hash, txData); - const txHash = await (this as any).preSign.sendTransactionAsync(hash, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -6987,7 +6535,11 @@ export class ExchangeContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(assetProxy: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + assetProxy: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -7003,6 +6555,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.registerAssetProxy.callAsync(assetProxy, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -7017,20 +6573,19 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; - const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData); + const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -7060,14 +6615,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetProxy: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).registerAssetProxy.callAsync(assetProxy, txData); - const txHash = await (this as any).registerAssetProxy.sendTransactionAsync(assetProxy, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -7146,6 +6693,7 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( updatedProtocolFeeCollector: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; @@ -7164,6 +6712,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setProtocolFeeCollectorAddress.callAsync(updatedProtocolFeeCollector, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -7179,14 +6731,14 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeCollector: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeCollectorAddress.sendTransactionAsync( updatedProtocolFeeCollector.toLowerCase(), txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -7194,8 +6746,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -7231,17 +6783,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - updatedProtocolFeeCollector: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).setProtocolFeeCollectorAddress.callAsync(updatedProtocolFeeCollector, txData); - const txHash = await (this as any).setProtocolFeeCollectorAddress.sendTransactionAsync( - updatedProtocolFeeCollector, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -7323,6 +6864,7 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; @@ -7341,6 +6883,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setProtocolFeeMultiplier.callAsync(updatedProtocolFeeMultiplier, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -7355,14 +6901,14 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeMultiplier.sendTransactionAsync( updatedProtocolFeeMultiplier, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -7370,8 +6916,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -7406,17 +6952,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - updatedProtocolFeeMultiplier: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).setProtocolFeeMultiplier.callAsync(updatedProtocolFeeMultiplier, txData); - const txHash = await (this as any).setProtocolFeeMultiplier.sendTransactionAsync( - updatedProtocolFeeMultiplier, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -7499,6 +7034,7 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); @@ -7519,6 +7055,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.setSignatureValidatorApproval.callAsync(validatorAddress, approval, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -7535,8 +7075,7 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); @@ -7545,6 +7084,7 @@ export class ExchangeContract extends BaseContract { validatorAddress.toLowerCase(), approval, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -7552,8 +7092,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -7592,19 +7132,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - validatorAddress: string, - approval: boolean, - txData?: Partial | undefined, - ): Promise { - await (this as any).setSignatureValidatorApproval.callAsync(validatorAddress, approval, txData); - const txHash = await (this as any).setSignatureValidatorApproval.sendTransactionAsync( - validatorAddress, - approval, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -7701,6 +7228,7 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); @@ -7723,6 +7251,16 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.simulateDispatchTransferFromCalls.callAsync( + assetData, + fromAddresses, + toAddresses, + amounts, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -7747,8 +7285,7 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); @@ -7761,6 +7298,7 @@ export class ExchangeContract extends BaseContract { toAddresses, amounts, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -7768,8 +7306,8 @@ export class ExchangeContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -7818,29 +7356,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetData: string[], - fromAddresses: string[], - toAddresses: string[], - amounts: BigNumber[], - txData?: Partial | undefined, - ): Promise { - await (this as any).simulateDispatchTransferFromCalls.callAsync( - assetData, - fromAddresses, - toAddresses, - amounts, - txData, - ); - const txHash = await (this as any).simulateDispatchTransferFromCalls.sendTransactionAsync( - assetData, - fromAddresses, - toAddresses, - amounts, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -7994,7 +7509,11 @@ export class ExchangeContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -8010,6 +7529,10 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -8023,20 +7546,19 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -8065,11 +7587,6 @@ export class ExchangeContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 56bd3d0305..55ead667a2 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -48,7 +48,11 @@ export class ForwarderContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(assetData: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + assetData: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('approveMakerAssetProxy(bytes)', [assetData]); @@ -64,6 +68,10 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approveMakerAssetProxy.callAsync(assetData, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -78,20 +86,19 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( assetData: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; - const txHashPromise = self.approveMakerAssetProxy.sendTransactionAsync(assetData, txData); + const txHashPromise = self.approveMakerAssetProxy.sendTransactionAsync(assetData, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -121,14 +128,6 @@ export class ForwarderContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetData: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).approveMakerAssetProxy.callAsync(assetData, txData); - const txHash = await (this as any).approveMakerAssetProxy.sendTransactionAsync(assetData, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -228,6 +227,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); @@ -251,6 +251,17 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketBuyOrdersWithEth.callAsync( + orders, + makerAssetBuyAmount, + signatures, + feePercentage, + feeRecipient, + txData, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -290,8 +301,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); @@ -306,6 +316,7 @@ export class ForwarderContract extends BaseContract { feePercentage, feeRecipient.toLowerCase(), txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -313,8 +324,8 @@ export class ForwarderContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -379,47 +390,6 @@ export class ForwarderContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - makerAssetBuyAmount: BigNumber, - signatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).marketBuyOrdersWithEth.callAsync( - orders, - makerAssetBuyAmount, - signatures, - feePercentage, - feeRecipient, - txData, - ); - const txHash = await (this as any).marketBuyOrdersWithEth.sendTransactionAsync( - orders, - makerAssetBuyAmount, - signatures, - feePercentage, - feeRecipient, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -588,6 +558,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isArray('orders', orders); assert.isArray('signatures', signatures); @@ -610,6 +581,10 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.marketSellOrdersWithEth.callAsync(orders, signatures, feePercentage, feeRecipient, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -647,8 +622,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('signatures', signatures); @@ -661,6 +635,7 @@ export class ForwarderContract extends BaseContract { feePercentage, feeRecipient.toLowerCase(), txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -668,8 +643,8 @@ export class ForwarderContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -731,44 +706,6 @@ export class ForwarderContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - orders: Array<{ - makerAddress: string; - takerAddress: string; - feeRecipientAddress: string; - senderAddress: string; - makerAssetAmount: BigNumber; - takerAssetAmount: BigNumber; - makerFee: BigNumber; - takerFee: BigNumber; - expirationTimeSeconds: BigNumber; - salt: BigNumber; - makerAssetData: string; - takerAssetData: string; - makerFeeAssetData: string; - takerFeeAssetData: string; - }>, - signatures: string[], - feePercentage: BigNumber, - feeRecipient: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).marketSellOrdersWithEth.callAsync( - orders, - signatures, - feePercentage, - feeRecipient, - txData, - ); - const txHash = await (this as any).marketSellOrdersWithEth.sendTransactionAsync( - orders, - signatures, - feePercentage, - feeRecipient, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -943,7 +880,11 @@ export class ForwarderContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -959,6 +900,10 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -972,20 +917,19 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1014,11 +958,6 @@ export class ForwarderContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1094,6 +1033,7 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); @@ -1111,6 +1051,10 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.withdrawAsset.callAsync(assetData, amount, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1127,21 +1071,20 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); const self = (this as any) as ForwarderContract; - const txHashPromise = self.withdrawAsset.sendTransactionAsync(assetData, amount, txData); + const txHashPromise = self.withdrawAsset.sendTransactionAsync(assetData, amount, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1177,15 +1120,6 @@ export class ForwarderContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetData: string, - amount: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).withdrawAsset.callAsync(assetData, amount, txData); - const txHash = await (this as any).withdrawAsset.sendTransactionAsync(assetData, amount, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index c7c3e578a6..d844e04f3e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -52,6 +52,7 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('assetData', assetData); assert.isString('from', from); @@ -76,6 +77,10 @@ export class IAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(assetData, from, to, amount, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -96,8 +101,7 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); @@ -110,6 +114,7 @@ export class IAssetProxyContract extends BaseContract { to.toLowerCase(), amount, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -117,8 +122,8 @@ export class IAssetProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -165,17 +170,6 @@ export class IAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetData: string, - from: string, - to: string, - amount: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(assetData, from, to, amount, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(assetData, from, to, amount, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index 28897de5c3..c52398fcec 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 5964ab4a5e..22d1c9e94a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index 60343961ec..3e6afe6c91 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -115,7 +115,11 @@ export class MultiAssetProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -131,6 +135,10 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.addAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -145,20 +153,19 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; - const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -188,11 +195,6 @@ export class MultiAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).addAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).addAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -364,7 +366,11 @@ export class MultiAssetProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(target: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + target: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -380,6 +386,10 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddress.callAsync(target, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -394,20 +404,19 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; - const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData); + const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -437,11 +446,6 @@ export class MultiAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(target: string, txData?: Partial | undefined): Promise { - await (this as any).removeAuthorizedAddress.callAsync(target, txData); - const txHash = await (this as any).removeAuthorizedAddress.sendTransactionAsync(target, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -560,6 +564,7 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('target', target); assert.isBigNumber('index', index); @@ -580,6 +585,10 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -596,8 +605,7 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -606,6 +614,7 @@ export class MultiAssetProxyContract extends BaseContract { target.toLowerCase(), index, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -613,8 +622,8 @@ export class MultiAssetProxyContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -653,19 +662,6 @@ export class MultiAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - target: string, - index: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).removeAuthorizedAddressAtIndex.callAsync(target, index, txData); - const txHash = await (this as any).removeAuthorizedAddressAtIndex.sendTransactionAsync( - target, - index, - txData, - ); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -837,7 +833,11 @@ export class MultiAssetProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(assetProxy: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + assetProxy: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -853,6 +853,10 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.registerAssetProxy.callAsync(assetProxy, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -867,20 +871,19 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; - const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData); + const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -910,14 +913,6 @@ export class MultiAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - assetProxy: string, - txData?: Partial | undefined, - ): Promise { - await (this as any).registerAssetProxy.callAsync(assetProxy, txData); - const txHash = await (this as any).registerAssetProxy.sendTransactionAsync(assetProxy, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1035,7 +1030,11 @@ export class MultiAssetProxyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + newOwner: string, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1051,6 +1050,10 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferOwnership.callAsync(newOwner, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1064,20 +1067,19 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; - const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData); + const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1106,11 +1108,6 @@ export class MultiAssetProxyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(newOwner: string, txData?: Partial | undefined): Promise { - await (this as any).transferOwnership.callAsync(newOwner, txData); - const txHash = await (this as any).transferOwnership.sendTransactionAsync(newOwner, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index 0c421b1502..57f68822b9 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts index 485ecfed1f..27da63136f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 82bf8f55c6..5d1563c424 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -119,7 +119,12 @@ export class WETH9Contract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(guy: string, wad: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + guy: string, + wad: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -136,6 +141,10 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(guy, wad, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -150,21 +159,20 @@ export class WETH9Contract extends BaseContract { guy: string, wad: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; - const txHashPromise = self.approve.sendTransactionAsync(guy.toLowerCase(), wad, txData); + const txHashPromise = self.approve.sendTransactionAsync(guy.toLowerCase(), wad, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -194,15 +202,6 @@ export class WETH9Contract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - guy: string, - wad: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(guy, wad, txData); - const txHash = await (this as any).approve.sendTransactionAsync(guy, wad, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -323,6 +322,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('src', src); assert.isString('dst', dst); @@ -345,6 +345,10 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(src, dst, wad, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -360,8 +364,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('src', src); assert.isString('dst', dst); @@ -372,6 +375,7 @@ export class WETH9Contract extends BaseContract { dst.toLowerCase(), wad, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -379,8 +383,8 @@ export class WETH9Contract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -420,16 +424,6 @@ export class WETH9Contract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - src: string, - dst: string, - wad: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(src, dst, wad, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(src, dst, wad, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -510,7 +504,11 @@ export class WETH9Contract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + wad: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); @@ -526,6 +524,10 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.withdraw.callAsync(wad, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -539,20 +541,19 @@ export class WETH9Contract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; - const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData); + const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -581,11 +582,6 @@ export class WETH9Contract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - await (this as any).withdraw.callAsync(wad, txData); - const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -782,7 +778,12 @@ export class WETH9Contract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(dst: string, wad: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + dst: string, + wad: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -799,6 +800,10 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transfer.callAsync(dst, wad, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -813,21 +818,20 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; - const txHashPromise = self.transfer.sendTransactionAsync(dst.toLowerCase(), wad, txData); + const txHashPromise = self.transfer.sendTransactionAsync(dst.toLowerCase(), wad, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -857,15 +861,6 @@ export class WETH9Contract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - dst: string, - wad: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transfer.callAsync(dst, wad, txData); - const txHash = await (this as any).transfer.sendTransactionAsync(dst, wad, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -938,7 +933,10 @@ export class WETH9Contract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { + async sendTransactionAsync( + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('deposit()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -953,6 +951,10 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.deposit.callAsync(txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -965,19 +967,18 @@ export class WETH9Contract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as WETH9Contract; - const txHashPromise = self.deposit.sendTransactionAsync(txData); + const txHashPromise = self.deposit.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1005,11 +1006,6 @@ export class WETH9Contract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).deposit.callAsync(txData); - const txHash = await (this as any).deposit.sendTransactionAsync(txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 8dcc5f06be..b8280b015d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -107,6 +107,7 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -127,6 +128,10 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.approve.callAsync(_spender, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -141,21 +146,20 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; - const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData); + const txHashPromise = self.approve.sendTransactionAsync(_spender.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -192,15 +196,6 @@ export class ZRXTokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _spender: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).approve.callAsync(_spender, _value, txData); - const txHash = await (this as any).approve.sendTransactionAsync(_spender, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -330,6 +325,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_from', _from); assert.isString('_to', _to); @@ -352,6 +348,10 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transferFrom.callAsync(_from, _to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -370,8 +370,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -382,6 +381,7 @@ export class ZRXTokenContract extends BaseContract { _to.toLowerCase(), _value, txData, + opts, ); return new PromiseWithTransactionHash( txHashPromise, @@ -389,8 +389,8 @@ export class ZRXTokenContract extends BaseContract { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -433,16 +433,6 @@ export class ZRXTokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _from: string, - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transferFrom.callAsync(_from, _to, _value, txData); - const txHash = await (this as any).transferFrom.sendTransactionAsync(_from, _to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -668,6 +658,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -685,6 +676,10 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.transfer.callAsync(_to, _value, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -699,21 +694,20 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; - const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData); + const txHashPromise = self.transfer.sendTransactionAsync(_to.toLowerCase(), _value, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -743,15 +737,6 @@ export class ZRXTokenContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - _to: string, - _value: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).transfer.callAsync(_to, _value, txData); - const txHash = await (this as any).transfer.sendTransactionAsync(_to, _value, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen/templates/TypeScript/contract.handlebars b/packages/abi-gen/templates/TypeScript/contract.handlebars index 17582a55ae..8913d14cb2 100644 --- a/packages/abi-gen/templates/TypeScript/contract.handlebars +++ b/packages/abi-gen/templates/TypeScript/contract.handlebars @@ -20,7 +20,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars index d4bbdc9d75..01b38ef45f 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars @@ -8,6 +8,7 @@ async sendTransactionAsync( {{> typed_params inputs=inputs}} txData?: Partial | undefined, +opts: TxOpts = { shouldValidate: true }, ): Promise { {{#each inputs}} {{#assertionType name type}}{{/assertionType}} @@ -26,6 +27,15 @@ txData?: Partial | undefined, txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.{{languageSpecificName}}.callAsync( + {{#each inputs~}} + {{name}}, + {{/each~}} + txDataWithDefaults, + ); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -40,17 +50,16 @@ txData?: Partial | undefined, awaitTransactionSuccessAsync( {{> typed_params inputs=inputs}} txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { {{#each inputs}} {{#assertionType name type}}{{/assertionType}} {{/each}} const self = this as any as {{contractName}}Contract; {{#if inputs}} - const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync({{> normalized_params input=inputs}}, txData); + const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync({{> normalized_params input=inputs}}, txData, opts); {{else}} - const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync(txData); + const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync(txData, opts); {{/if}} return new PromiseWithTransactionHash( txHashPromise, @@ -58,8 +67,8 @@ awaitTransactionSuccessAsync( // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -94,21 +103,3 @@ async estimateGasAsync( const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, -async validateAndSendTransactionAsync( - {{> typed_params inputs=inputs}} - txData?: Partial | undefined, - ): Promise { - await (this as any).{{languageSpecificName}}.callAsync( - {{#each inputs~}} - {{name}}, - {{/each~}} - txData, - ); - const txHash = await (this as any).{{languageSpecificName}}.sendTransactionAsync( - {{#each inputs~}} - {{name}}, - {{/each~}} - txData, - ); - return txHash; -}, diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index 45c1497f3c..78c7a8814d 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -416,7 +416,10 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { + async sendTransactionAsync( + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -431,6 +434,10 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.emitSimpleEvent.callAsync(txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -443,19 +450,18 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData); + const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -483,11 +489,6 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).emitSimpleEvent.callAsync(txData); - const txHash = await (this as any).emitSimpleEvent.sendTransactionAsync(txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1246,6 +1247,7 @@ export class AbiGenDummyContract extends BaseContract { id: BigNumber, someValue: BigNumber, txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, ): Promise { assert.isBigNumber('id', id); assert.isBigNumber('someValue', someValue); @@ -1263,6 +1265,10 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.nonPureFunction.callAsync(id, someValue, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1277,21 +1283,20 @@ export class AbiGenDummyContract extends BaseContract { id: BigNumber, someValue: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('id', id); assert.isBigNumber('someValue', someValue); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureFunction.sendTransactionAsync(id, someValue, txData); + const txHashPromise = self.nonPureFunction.sendTransactionAsync(id, someValue, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1325,15 +1330,6 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync( - id: BigNumber, - someValue: BigNumber, - txData?: Partial | undefined, - ): Promise { - await (this as any).nonPureFunction.callAsync(id, someValue, txData); - const txHash = await (this as any).nonPureFunction.sendTransactionAsync(id, someValue, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1430,7 +1426,10 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { + async sendTransactionAsync( + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('nonPureMethod()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -1445,6 +1444,10 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.nonPureMethod.callAsync(txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1457,19 +1460,18 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData); + const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1497,11 +1499,6 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).nonPureMethod.callAsync(txData); - const txHash = await (this as any).nonPureMethod.sendTransactionAsync(txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1586,7 +1583,10 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(txData?: Partial | undefined): Promise { + async sendTransactionAsync( + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -1601,6 +1601,10 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.nonPureMethodThatReturnsNothing.callAsync(txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -1613,19 +1617,18 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); + const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -1653,11 +1656,6 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(txData?: Partial | undefined): Promise { - await (this as any).nonPureMethodThatReturnsNothing.callAsync(txData); - const txHash = await (this as any).nonPureMethodThatReturnsNothing.sendTransactionAsync(txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2891,7 +2889,11 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async sendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + async sendTransactionAsync( + wad: BigNumber, + txData?: Partial | undefined, + opts: TxOpts = { shouldValidate: true }, + ): Promise { assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); @@ -2907,6 +2909,10 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } + if (opts.shouldValidate) { + await self.withdraw.callAsync(wad, txData); + } + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); return txHash; }, @@ -2920,20 +2926,19 @@ export class AbiGenDummyContract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - pollingIntervalMs?: number, - timeoutMs?: number, + opts: TxOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData); + const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { // When the transaction hash resolves, wait for it to be mined. return self._web3Wrapper.awaitTransactionSuccessAsync( await txHashPromise, - pollingIntervalMs, - timeoutMs, + opts.pollingIntervalMs, + opts.timeoutMs, ); })(), ); @@ -2962,11 +2967,6 @@ export class AbiGenDummyContract extends BaseContract { const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); return gas; }, - async validateAndSendTransactionAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - await (this as any).withdraw.callAsync(wad, txData); - const txHash = await (this as any).withdraw.sendTransactionAsync(wad, txData); - return txHash; - }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas diff --git a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts index c5969989f1..7be2642d3b 100644 --- a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts index 459e91de87..a6125918c7 100644 --- a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { SimpleContractArtifact, EventCallback, IndexedFilterValues } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts index 80a4281061..382f247b15 100644 --- a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts +++ b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts @@ -138,14 +138,6 @@ describe('AbiGenDummy Contract', () => { }); }); - describe('validate and send transaction', () => { - it('should call validateAndSendTransactionAsync', async () => { - const txHash = await abiGenDummy.nonPureMethod.validateAndSendTransactionAsync(); - const hexRegex = /^0x[a-fA-F0-9]+$/; - expect(txHash.match(hexRegex)).to.deep.equal([txHash]); - }); - }); - describe('event subscription', () => { const indexFilterValues = {}; const emptyCallback = () => {}; // tslint:disable-line:no-empty diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts index 3dc0b96ea1..fd30833756 100644 --- a/packages/asset-buyer/src/asset_buyer.ts +++ b/packages/asset-buyer/src/asset_buyer.ts @@ -267,7 +267,7 @@ export class AssetBuyer { // if no ethAmount is provided, default to the worst ethAmount from buyQuote const value = ethAmount || worstCaseQuoteInfo.totalEthAmount; - const txHash = await this._contractWrappers.forwarder.marketBuyOrdersWithEth.validateAndSendTransactionAsync( + const txHash = await this._contractWrappers.forwarder.marketBuyOrdersWithEth.sendTransactionAsync( orders, assetBuyAmount, orders.map(o => o.signature), diff --git a/packages/asset-swapper/src/quote_consumers/exchange_swap_quote_consumer.ts b/packages/asset-swapper/src/quote_consumers/exchange_swap_quote_consumer.ts index 981513fcf3..a81c2a2cc5 100644 --- a/packages/asset-swapper/src/quote_consumers/exchange_swap_quote_consumer.ts +++ b/packages/asset-swapper/src/quote_consumers/exchange_swap_quote_consumer.ts @@ -144,7 +144,7 @@ export class ExchangeSwapQuoteConsumer implements SwapQuoteConsumerBase o.signature), @@ -156,7 +156,7 @@ export class ExchangeSwapQuoteConsumer implements SwapQuoteConsumerBase o.signature), diff --git a/packages/asset-swapper/src/quote_consumers/forwarder_swap_quote_consumer.ts b/packages/asset-swapper/src/quote_consumers/forwarder_swap_quote_consumer.ts index f90f30fd0c..f4553572df 100644 --- a/packages/asset-swapper/src/quote_consumers/forwarder_swap_quote_consumer.ts +++ b/packages/asset-swapper/src/quote_consumers/forwarder_swap_quote_consumer.ts @@ -197,7 +197,7 @@ export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumerBase o.signature), @@ -211,7 +211,7 @@ export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumerBase o.signature), formattedFeePercentage, diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 9da6d1ace8..8698bc403d 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -154,6 +154,7 @@ export { SignedZeroExTransaction, SimpleEvmOutput, SimpleEvmBytecodeOutput, + TxOpts, EIP712DomainWithDefaultSchema, EventCallback, DecodedLogEvent, diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index 048e08981d..5ac052858c 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -40,6 +40,7 @@ export interface ContractWrappersConfig { blockPollingIntervalMs?: number; } +// TODO(xianny): remove after refactoring coordinator wrapper /** * gasPrice: Gas price in Wei to use for a transaction * gasLimit: The amount of gas to send with a transaction (in Gwei) @@ -51,6 +52,7 @@ export interface TransactionOpts { nonce?: number; } +// TODO(xianny): remove after refactoring coordinator wrapper /** * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default=true. diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 64fa91da2f..e3610676f8 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -670,6 +670,16 @@ export interface Type { tupleElements?: Type[]; } +/** + * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before + * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default=true. + */ +export interface TxOpts { + shouldValidate?: boolean; + pollingIntervalMs?: number; + timeoutMs?: number; +} + export interface ElementType { name: string; typeDocType: TypeDocTypes; From bafae3f9e09c96bd0b89047665c139cd1bcce96e Mon Sep 17 00:00:00 2001 From: xianny Date: Mon, 7 Oct 2019 09:44:16 -0700 Subject: [PATCH 4/8] update changelogs --- packages/abi-gen-wrappers/CHANGELOG.json | 21 +++++++++++++++++++++ packages/base-contract/CHANGELOG.json | 9 +++++++++ packages/types/CHANGELOG.json | 9 +++++++++ 3 files changed, 39 insertions(+) diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index d1fb15b3c8..e58a45f47a 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,25 @@ [ + { + "version": "5.4.0-beta.1", + "changes": [ + { + "note": "Remove debug functions `getABIDecodedTransactionData` and `getABIDecodedReturnData`", + "pr": 2243 + }, + { + "note": "Remove `getABIEncodedTransactionData` for constant functions (pure and view)", + "pr": 2243 + }, + { + "note": "Introduce TxOpts object for `sendTransactionAsync` and `awaitTransactionSuccessAsync`. Replaces `timeoutMs` and `pollingIntervalMs` arguments for `awaitTransactionSuccessAsync`", + "pr": 2243 + }, + { + "note": "Remove `validateAndSendTransactionAsync`. Replaced with `shouldValidate` key in TxOpts. Defaults to true", + "pr": 2243 + } + ] + }, { "version": "5.4.0-beta.0", "changes": [ diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index 1e11866ef6..f404e717ae 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "5.5.0-beta.1", + "changes": [ + { + "note": "Make `evmExecAsync` protected and rename to `_evmExecAsync`", + "pr": 2243 + } + ] + }, { "version": "5.5.0-beta.0", "changes": [ diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index b6aca3e427..c4282c0aa4 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "2.5.0-beta.1", + "changes": [ + { + "note": "Add `TxOpts` type for contract wrappers", + "pr": 2243 + } + ] + }, { "version": "2.5.0-beta.0", "changes": [ From 0383ebd0b618d8a6fc160813805d87e7d48d1a81 Mon Sep 17 00:00:00 2001 From: xianny Date: Tue, 8 Oct 2019 13:35:44 -0700 Subject: [PATCH 5/8] Tweaks to address review: * revert artifacts to get rid of ordering diffs * trim deployedBytecode so it's undefined unless a contract has pure functions * rename TxOpts -> SendTransactionOpts * create sendTransactionOptsSchema in json-schemas * fix dependencies in @0x/abi-gen-wrappers --- contracts/exchange/src/wrapper_interfaces.ts | 10 +- packages/0x.js/src/index.ts | 2 +- packages/abi-gen-wrappers/package.json | 17 +- .../generated-wrappers/asset_proxy_owner.ts | 85 +- .../src/generated-wrappers/coordinator.ts | 12 +- .../coordinator_registry.ts | 10 +- .../src/generated-wrappers/dev_utils.ts | 20 +- .../generated-wrappers/dummy_erc20_token.ts | 53 +- .../generated-wrappers/dummy_erc721_token.ts | 69 +- .../src/generated-wrappers/dutch_auction.ts | 22 +- .../src/generated-wrappers/erc1155_proxy.ts | 42 +- .../src/generated-wrappers/erc20_proxy.ts | 34 +- .../src/generated-wrappers/erc20_token.ts | 29 +- .../src/generated-wrappers/erc721_proxy.ts | 34 +- .../src/generated-wrappers/erc721_token.ts | 45 +- .../generated-wrappers/eth_balance_checker.ts | 5 +- .../src/generated-wrappers/exchange.ts | 259 +- .../src/generated-wrappers/forwarder.ts | 51 +- .../src/generated-wrappers/i_asset_proxy.ts | 10 +- .../src/generated-wrappers/i_validator.ts | 2 +- .../src/generated-wrappers/i_wallet.ts | 2 +- .../generated-wrappers/multi_asset_proxy.ts | 42 +- .../src/generated-wrappers/order_validator.ts | 2 +- .../generated-wrappers/static_call_proxy.ts | 2 +- .../src/generated-wrappers/weth9.ts | 45 +- .../src/generated-wrappers/zrx_token.ts | 29 +- packages/abi-gen/package.json | 3 + packages/abi-gen/src/index.ts | 8 +- .../templates/TypeScript/contract.handlebars | 2 +- .../TypeScript/partials/method_tx.handlebars | 6 +- .../fixtures/artifacts/AbiGenDummy.json | 749 +++-- .../test-cli/fixtures/artifacts/LibDummy.json | 12 +- .../fixtures/artifacts/TestLibDummy.json | 16 +- .../fixtures/contracts/AbiGenDummy.sol | 9 - .../output/python/abi_gen_dummy/__init__.py | 1648 +++++------ .../output/python/test_lib_dummy/__init__.py | 2 +- .../output/typescript/abi_gen_dummy.ts | 2595 ++++++++--------- .../test-cli/output/typescript/lib_dummy.ts | 5 +- .../output/typescript/test_lib_dummy.ts | 4 +- .../test/abi_gen_dummy_test.ts | 7 + packages/contract-wrappers/src/index.ts | 2 +- .../schemas/send_transaction_opts_schema.json | 15 + packages/json-schemas/src/schemas.ts | 2 + packages/json-schemas/tsconfig.json | 1 + packages/types/src/index.ts | 6 +- 45 files changed, 2900 insertions(+), 3125 deletions(-) create mode 100644 packages/json-schemas/schemas/send_transaction_opts_schema.json diff --git a/contracts/exchange/src/wrapper_interfaces.ts b/contracts/exchange/src/wrapper_interfaces.ts index b096970fe2..27d05bfdd5 100644 --- a/contracts/exchange/src/wrapper_interfaces.ts +++ b/contracts/exchange/src/wrapper_interfaces.ts @@ -1,5 +1,5 @@ import { PromiseWithTransactionHash } from '@0x/base-contract'; -import { TxOpts } from '@0x/types'; +import { SendTransactionOpts } from '@0x/types'; import { BlockParam, CallData, TransactionReceiptWithDecodedLogs, TxData } from 'ethereum-types'; // Generated Wrapper Interfaces @@ -8,7 +8,7 @@ export interface AssetProxyDispatcher { awaitTransactionSuccessAsync: ( assetProxy: string, txData?: Partial, - txOpts?: TxOpts, + txOpts?: SendTransactionOpts, ) => PromiseWithTransactionHash; }; getAssetProxy: { @@ -21,14 +21,14 @@ export interface Authorizable extends Ownable { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - txOpts?: TxOpts, + txOpts?: SendTransactionOpts, ) => PromiseWithTransactionHash; }; removeAuthorizedAddress: { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - txOpts?: TxOpts, + txOpts?: SendTransactionOpts, ) => PromiseWithTransactionHash; }; authorized: { @@ -41,7 +41,7 @@ export interface Ownable { awaitTransactionSuccessAsync: ( newOwner: string, txData?: Partial, - txOpts?: TxOpts, + txOpts?: SendTransactionOpts, ) => PromiseWithTransactionHash; }; owner: { diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 66814e364e..92e4a02152 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -83,7 +83,7 @@ export { SimpleEvmOutput, SimpleEvmBytecodeOutput, EIP712DomainWithDefaultSchema, - TxOpts, + SendTransactionOpts, EventCallback, IndexedFilterValues, DecodedLogEvent, diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 48925f10e3..74d41fee72 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -34,21 +34,20 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { "@0x/abi-gen": "^4.3.0-beta.0", - "@0x/assert": "^2.2.0-beta.0", - "@0x/json-schemas": "^4.1.0-beta.0", + "@0x/contract-artifacts": "^2.3.0-beta.0", "@0x/tslint-config": "^3.0.1", - "@0x/types": "^2.5.0-beta.0", - "@0x/utils": "^4.6.0-beta.0", - "@0x/web3-wrapper": "^6.1.0-beta.0", - "ethereum-types": "^2.2.0-beta.0", - "ethers": "~4.0.4", - "lodash": "^4.17.11", "shx": "^0.2.2" }, "dependencies": { + "@0x/assert": "^2.2.0-beta.0", "@0x/base-contract": "^5.5.0-beta.0", "@0x/contract-addresses": "^3.3.0-beta.0", - "@0x/contract-artifacts": "^2.3.0-beta.0" + "@0x/json-schemas": "^4.1.0-beta.0", + "@0x/types": "^2.5.0-beta.0", + "@0x/utils": "^4.6.0-beta.0", + "@0x/web3-wrapper": "^6.1.0-beta.0", + "ethereum-types": "^2.2.0-beta.0", + "ethers": "~4.0.4" }, "publishConfig": { "access": "public" diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index 2fd17292e4..f7a84b2953 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -116,8 +116,7 @@ export class AssetProxyOwnerContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x6080604052600436106101a15760003560e01c80639ace38c2116100e1578063c01a8c841161008a578063d74f8edd11610064578063d74f8edd146104ff578063dc8452cd14610514578063e20056e614610529578063ee22610b14610549576101a1565b8063c01a8c841461049f578063c6427474146104bf578063d38f2d82146104df576101a1565b8063b5dc40c3116100bb578063b5dc40c31461044a578063b77bf6001461046a578063ba51a6df1461047f576101a1565b80639ace38c2146103cb578063a0e67e2b146103fb578063a8abe69a1461041d576101a1565b8063547415251161014e578063784547a711610128578063784547a71461033d5780637ad28c511461035d5780637f05c8b61461037d5780638b51d13f146103ab576101a1565b806354741525146102dd5780637065cb48146102fd578063751ad5601461031d576101a1565b80632f54bf6e1161017f5780632f54bf6e1461026e5780633411c81c1461029b57806337bd78a0146102bb576101a1565b8063025e7c27146101f8578063173825d91461022e57806320ea8d861461024e575b34156101f6573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040516101ed9190612b44565b60405180910390a25b005b34801561020457600080fd5b50610218610213366004612580565b610569565b6040516102259190612616565b60405180910390f35b34801561023a57600080fd5b506101f6610249366004612303565b61059d565b34801561025a57600080fd5b506101f6610269366004612580565b61084c565b34801561027a57600080fd5b5061028e610289366004612303565b6109a7565b6040516102259190612745565b3480156102a757600080fd5b5061028e6102b6366004612598565b6109bc565b3480156102c757600080fd5b506102d06109dc565b6040516102259190612b44565b3480156102e957600080fd5b506102d06102f83660046124c0565b6109e2565b34801561030957600080fd5b506101f6610318366004612303565b610a4e565b34801561032957600080fd5b506101f66103383660046124f4565b610c73565b34801561034957600080fd5b5061028e610358366004612580565b610cbe565b34801561036957600080fd5b506101f6610378366004612580565b610d52565b34801561038957600080fd5b5061039d610398366004612563565b610dcb565b604051610225929190612750565b3480156103b757600080fd5b506102d06103c6366004612580565b610e04565b3480156103d757600080fd5b506103eb6103e6366004612580565b610e80565b6040516102259493929190612637565b34801561040757600080fd5b50610410610f69565b60405161022591906126b4565b34801561042957600080fd5b5061043d6104383660046125bc565b610fd9565b604051610225919061270d565b34801561045657600080fd5b50610410610465366004612580565b611104565b34801561047657600080fd5b506102d06112bc565b34801561048b57600080fd5b506101f661049a366004612580565b6112c2565b3480156104ab57600080fd5b506101f66104ba366004612580565b61139e565b3480156104cb57600080fd5b506102d06104da366004612357565b611568565b3480156104eb57600080fd5b506102d06104fa366004612580565b611587565b34801561050b57600080fd5b506102d0611599565b34801561052057600080fd5b506102d061159e565b34801561053557600080fd5b506101f661054436600461231f565b6115a4565b34801561055557600080fd5b506101f6610564366004612580565b61182e565b6003818154811061057657fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3330146105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff16610640576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018110156107bc578273ffffffffffffffffffffffffffffffffffffffff16600382815481106106dc57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156107b457600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061073457fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918390811061076757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506107bc565b60010161068c565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906107ee9082612100565b50600354600454111561080757600354610807906112c2565b60405173ffffffffffffffffffffffffffffffffffffffff8316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff16610895576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b60008281526001602090815260408083203380855292529091205483919060ff166108ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612955565b600084815260208190526040902060030154849060ff161561093a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612ad6565b600085815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b600554811015610a4757838015610a0f575060008181526020819052604090206003015460ff16155b80610a335750828015610a33575060008181526020819052604090206003015460ff165b15610a3f576001820191505b6001016109e6565b5092915050565b333014610a87576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610ae9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612879565b8173ffffffffffffffffffffffffffffffffffffffff8116610b37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061280b565b60038054905060010160045460328211158015610b545750818111155b8015610b5f57508015155b8015610b6a57508115155b610ba0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612b0d565b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b333014610cac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b610cb884848484611b79565b50505050565b600080805b600354811015610d4a5760008481526001602052604081206003805491929184908110610cec57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610d2d576001820191505b600454821415610d4257600192505050610d4d565b600101610cc3565b50505b919050565b333014610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60068190556040517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b437790610dc0908390612b44565b60405180910390a150565b600860209081526000928352604080842090915290825290205460ff81169061010090046fffffffffffffffffffffffffffffffff1682565b6000805b600354811015610e7a5760008381526001602052604081206003805491929184908110610e3157fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff1615610e72576001820191505b600101610e08565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff90931695909491929190830182828015610f565780601f10610f2b57610100808354040283529160200191610f56565b820191906000526020600020905b815481529060010190602001808311610f3957829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610fce57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610fa3575b505050505090505b90565b606080600554604051908082528060200260200182016040528015611008578160200160208202803883390190505b5090506000805b60055481101561108957858015611038575060008181526020819052604090206003015460ff16155b8061105c575084801561105c575060008181526020819052604090206003015460ff165b15611081578083838151811061106e57fe5b6020026020010181815250506001820191505b60010161100f565b8787036040519080825280602002602001820160405280156110b5578160200160208202803883390190505b5093508790505b868110156110f9578281815181106110d057fe5b602002602001015184898303815181106110e657fe5b60209081029190910101526001016110bc565b505050949350505050565b606080600380549050604051908082528060200260200182016040528015611136578160200160208202803883390190505b5090506000805b60035481101561122d576000858152600160205260408120600380549192918490811061116657fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561122557600381815481106111ad57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383815181106111e457fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b60010161113d565b81604051908082528060200260200182016040528015611257578160200160208202803883390190505b509350600090505b818110156112b45782818151811061127357fe5b602002602001015184828151811061128757fe5b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260010161125f565b505050919050565b60055481565b3330146112fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b60035481603282118015906113105750818111155b801561131b57508015155b801561132657508115155b61135c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612b0d565b60048390556040517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a90611391908590612b44565b60405180910390a1505050565b3360008181526002602052604090205460ff166113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff16611444576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061291e565b60008381526001602090815260408083203380855292529091205484919060ff161561149c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906128b0565b846114a681610cbe565b156114dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a9f565b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a361155186610cbe565b15611560576115608642611cb1565b505050505050565b6000611575848484611d00565b90506115808161139e565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b3330146115dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a68565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff1661163e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129fa565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16156116a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612879565b60005b60035481101561175c578473ffffffffffffffffffffffffffffffffffffffff16600382815481106116d157fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561175457836003828154811061170757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061175c565b6001016116a3565b5073ffffffffffffffffffffffffffffffffffffffff80851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b600081815260208190526040902060030154819060ff161561187c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612ad6565b8161188681610cbe565b6118bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906128e7565b6000838152602081815260409182902060038101805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116811790915560028083018054865161010094821615949094027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f81018590048502830185019095528482529193606093849384939290918301828280156119a85780601f1061197d576101008083540402835291602001916119a8565b820191906000526020600020905b81548152906001019060200180831161198b57829003601f168201915b50505050508060200190516119c091908101906123ec565b9250925092506000835190508251811480156119dc5750815181145b611a12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061298c565b600088815260076020526040812054905b828114611b4257611a5b82878381518110611a3a57fe5b6020026020010151878481518110611a4e57fe5b6020026020010151611e5e565b6000858281518110611a6957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16858381518110611a9357fe5b6020026020010151888481518110611aa757fe5b6020026020010151604051611abc91906125fa565b60006040518083038185875af1925050503d8060008114611af9576040519150601f19603f3d011682016040523d82523d6000602084013e611afe565b606091505b5050905080611b39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d6906129c3565b50600101611a23565b5060405189907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2505050505050505050565b600084611b87576000611b89565b815b9050611b93612129565b5060408051808201825286151581526fffffffffffffffffffffffffffffffff80841660208084019182527fffffffff00000000000000000000000000000000000000000000000000000000891660009081526008825285812073ffffffffffffffffffffffffffffffffffffffff8a168252909152849020835181549251909316610100027fffffffffffffffffffffffffffffff00000000000000000000000000000000ff9315157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909316929092179290921617905590517f694405724de467488eda192d814f39ffe7f6503fe0b1eefd4ea332f9c611c5ec90611ca190879087908a908790612772565b60405180910390a1505050505050565b600082815260076020526040908190208290555182907f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d90611cf4908490612b44565b60405180910390a25050565b60008373ffffffffffffffffffffffffffffffffffffffff8116611d50576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061280b565b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff00000000000000000000000000000000000000001694169390931783555160018301559251805194965091939092611de8926002850192910190612140565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000611e70838263ffffffff611fbd16565b9050611e7a612129565b507fffffffff000000000000000000000000000000000000000000000000000000008116600090815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845282529182902082518084019093525460ff811615801584526101009091046fffffffffffffffffffffffffffffffff1691830191909152611f69576020810151611f2b9086906fffffffffffffffffffffffffffffffff1663ffffffff61201816565b421015611f64576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612a31565b611fb6565b600654611f7d90869063ffffffff61201816565b421015611fb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612842565b5050505050565b60008160040183511015611fe357611fe3611fde6003855185600401612034565b6120d9565b5060208183018101519101907fffffffff00000000000000000000000000000000000000000000000000000000165b92915050565b60008282018381101561158057611580611fde600086866120e1565b6060632800659560e01b848484604051602401612053939291906127fd565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b606063e946c1bb60e01b848484604051602401612053939291906127db565b815481835581811115612124576000838152602090206121249181019083016121be565b505050565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061218157805160ff19168380011785556121ae565b828001600101855582156121ae579182015b828111156121ae578251825591602001919060010190612193565b506121ba9291506121be565b5090565b610fd691905b808211156121ba57600081556001016121c4565b600082601f8301126121e8578081fd5b81516121fb6121f682612b74565b612b4d565b81815291506020808301908481018184028601820187101561221c57600080fd5b60005b8481101561224457815161223281612c02565b8452928201929082019060010161221f565b505050505092915050565b600082601f83011261225f578081fd5b815161226d6121f682612b74565b81815291506020808301908481018184028601820187101561228e57600080fd5b60005b8481101561224457815184529282019290820190600101612291565b8035801515811461201257600080fd5b600082601f8301126122cd578081fd5b81516122db6121f682612b94565b91508082528360208285010111156122f257600080fd5b610a47816020840160208601612bd6565b600060208284031215612314578081fd5b813561158081612c02565b60008060408385031215612331578081fd5b823561233c81612c02565b9150602083013561234c81612c02565b809150509250929050565b60008060006060848603121561236b578081fd5b833561237681612c02565b925060208401359150604084013567ffffffffffffffff811115612398578182fd5b80850186601f8201126123a9578283fd5b803591506123b96121f683612b94565b8281528760208484010111156123cd578384fd5b8260208301602083013783602084830101528093505050509250925092565b600080600060608486031215612400578283fd5b835167ffffffffffffffff80821115612417578485fd5b81860187601f820112612428578586fd5b805192506124386121f684612b74565b83815260208082019190838101895b878110156124705761245e8d8484518901016122bd565b85529382019390820190600101612447565b50508901519097509350505080821115612488578384fd5b612494878388016121d8565b935060408601519150808211156124a9578283fd5b506124b68682870161224f565b9150509250925092565b600080604083850312156124d2578182fd5b6124dc84846122ad565b91506124eb84602085016122ad565b90509250929050565b60008060008060808587031215612509578081fd5b843561251481612c27565b9350602085013561252481612c35565b9250604085013561253481612c02565b915060608501356fffffffffffffffffffffffffffffffff81168114612558578182fd5b939692955090935050565b60008060408385031215612575578182fd5b823561233c81612c35565b600060208284031215612591578081fd5b5035919050565b600080604083850312156125aa578182fd5b82359150602083013561234c81612c02565b600080600080608085870312156125d1578182fd5b843593506020850135925060408501356125ea81612c27565b9150606085013561255881612c27565b6000825161260c818460208701612bd6565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff861682528460208301526080604083015283518060808401526126788160a0850160208801612bd6565b921515606083015250601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160160a0019392505050565b602080825282518282018190526000918401906040840190835b8181101561270257835173ffffffffffffffffffffffffffffffffffffffff168352602093840193909201916001016126ce565b509095945050505050565b602080825282518282018190526000918401906040840190835b81811015612702578351835260209384019390920191600101612727565b901515815260200190565b91151582526fffffffffffffffffffffffffffffffff16602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000094909416845273ffffffffffffffffffffffffffffffffffffffff929092166020840152151560408301526fffffffffffffffffffffffffffffffff16606082015260800190565b60608101600485106127e957fe5b938152602081019290925260409091015290565b60608101600885106127e957fe5b6020808252600c908201527f4e554c4c5f414444524553530000000000000000000000000000000000000000604082015260600190565b6020808252601c908201527f44454641554c545f54494d455f4c4f434b5f494e434f4d504c45544500000000604082015260600190565b6020808252600c908201527f4f574e45525f4558495354530000000000000000000000000000000000000000604082015260600190565b60208082526014908201527f54585f414c52454144595f434f4e4649524d4544000000000000000000000000604082015260600190565b60208082526016908201527f54585f4e4f545f46554c4c595f434f4e4649524d454400000000000000000000604082015260600190565b6020808252600f908201527f54585f444f45534e545f45584953540000000000000000000000000000000000604082015260600190565b60208082526010908201527f54585f4e4f545f434f4e4649524d454400000000000000000000000000000000604082015260600190565b60208082526016908201527f455155414c5f4c454e475448535f524551554952454400000000000000000000604082015260600190565b60208082526010908201527f4641494c45445f455845435554494f4e00000000000000000000000000000000604082015260600190565b60208082526012908201527f4f574e45525f444f45534e545f45584953540000000000000000000000000000604082015260600190565b6020808252601b908201527f435553544f4d5f54494d455f4c4f434b5f494e434f4d504c4554450000000000604082015260600190565b60208082526017908201527f4f4e4c595f43414c4c41424c455f42595f57414c4c4554000000000000000000604082015260600190565b60208082526012908201527f54585f46554c4c595f434f4e4649524d45440000000000000000000000000000604082015260600190565b60208082526013908201527f54585f414c52454144595f455845435554454400000000000000000000000000604082015260600190565b60208082526014908201527f494e56414c49445f524551554952454d454e5453000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715612b6c57600080fd5b604052919050565b600067ffffffffffffffff821115612b8a578081fd5b5060209081020190565b600067ffffffffffffffff821115612baa578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015612bf1578181015183820152602001612bd9565b83811115610cb85750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114612c2457600080fd5b50565b8015158114612c2457600080fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612c2457600080fdfea365627a7a723158200ac5186607cd3ec8212bb7bd34d7047a94bed6fb931222d7ea453055d00701cd6c6578706572696d656e74616cf564736f6c634300050c0040'; + public static deployedBytecode: string | undefined; public MAX_OWNER_COUNT = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -175,8 +174,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( owner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('addOwner(address)', [owner.toLowerCase()]); @@ -193,7 +193,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.addOwner.callAsync(owner, txData); + await self.addOwner.callAsync(owner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -210,8 +210,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.addOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); @@ -323,8 +324,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( _required: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required]); @@ -341,7 +343,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.changeRequirement.callAsync(_required, txData); + await self.changeRequirement.callAsync(_required, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -358,8 +360,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _required: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.changeRequirement.sendTransactionAsync(_required, txData, opts); @@ -476,8 +479,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( _secondsTimeLocked: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked]); @@ -494,7 +498,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.changeTimeLock.callAsync(_secondsTimeLocked, txData); + await self.changeTimeLock.callAsync(_secondsTimeLocked, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -512,8 +516,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _secondsTimeLocked: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.changeTimeLock.sendTransactionAsync(_secondsTimeLocked, txData, opts); @@ -634,8 +639,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( transactionId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId]); @@ -652,7 +658,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.confirmTransaction.callAsync(transactionId, txData); + await self.confirmTransaction.callAsync(transactionId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -669,8 +675,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.confirmTransaction.sendTransactionAsync(transactionId, txData, opts); @@ -892,8 +899,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( transactionId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId]); @@ -910,7 +918,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.executeTransaction.callAsync(transactionId, txData); + await self.executeTransaction.callAsync(transactionId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -927,8 +935,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.executeTransaction.sendTransactionAsync(transactionId, txData, opts); @@ -1531,8 +1540,9 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); assert.isString('destination', destination); @@ -1562,7 +1572,7 @@ export class AssetProxyOwnerContract extends BaseContract { functionSelector, destination, newSecondsTimeLocked, - txData, + txDataWithDefaults, ); } @@ -1587,8 +1597,9 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); assert.isString('destination', destination); @@ -1762,8 +1773,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( owner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner.toLowerCase()]); @@ -1780,7 +1792,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeOwner.callAsync(owner, txData); + await self.removeOwner.callAsync(owner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1797,8 +1809,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.removeOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); @@ -1914,8 +1927,9 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); assert.isString('newOwner', newOwner); const self = (this as any) as AssetProxyOwnerContract; @@ -1936,7 +1950,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.replaceOwner.callAsync(owner, newOwner, txData); + await self.replaceOwner.callAsync(owner, newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1955,8 +1969,9 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); assert.isString('newOwner', newOwner); const self = (this as any) as AssetProxyOwnerContract; @@ -2137,8 +2152,9 @@ export class AssetProxyOwnerContract extends BaseContract { async sendTransactionAsync( transactionId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId]); @@ -2155,7 +2171,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.revokeConfirmation.callAsync(transactionId, txData); + await self.revokeConfirmation.callAsync(transactionId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -2172,8 +2188,9 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.revokeConfirmation.sendTransactionAsync(transactionId, txData, opts); @@ -2338,8 +2355,9 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('destination', destination); assert.isBigNumber('value', value); assert.isString('data', data); @@ -2362,7 +2380,7 @@ export class AssetProxyOwnerContract extends BaseContract { } if (opts.shouldValidate) { - await self.submitTransaction.callAsync(destination, value, data, txData); + await self.submitTransaction.callAsync(destination, value, data, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -2383,8 +2401,9 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('destination', destination); assert.isBigNumber('value', value); assert.isString('data', data); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 9f0ef5d578..28de394895 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -220,8 +220,10 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds); @@ -256,7 +258,7 @@ export class CoordinatorContract extends BaseContract { transactionSignature, approvalExpirationTimeSeconds, approvalSignatures, - txData, + txDataWithDefaults, ); } @@ -286,8 +288,10 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index ccb84940c7..63e1c7b07b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -58,8 +58,9 @@ export class CoordinatorRegistryContract extends BaseContract { async sendTransactionAsync( coordinatorEndpoint: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint]); @@ -76,7 +77,7 @@ export class CoordinatorRegistryContract extends BaseContract { } if (opts.shouldValidate) { - await self.setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txData); + await self.setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -93,8 +94,9 @@ export class CoordinatorRegistryContract extends BaseContract { awaitTransactionSuccessAsync( coordinatorEndpoint: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; const txHashPromise = self.setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index 66ec47e9bf..fb9d25c229 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -1813,8 +1813,10 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); const self = (this as any) as DevUtilsContract; @@ -1839,7 +1841,7 @@ export class DevUtilsContract extends BaseContract { order, takerAddress, takerAssetFillAmount, - txData, + txDataWithDefaults, ); } @@ -1877,8 +1879,10 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); const self = (this as any) as DevUtilsContract; @@ -2102,8 +2106,9 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -2129,7 +2134,7 @@ export class DevUtilsContract extends BaseContract { orders, takerAddresses, takerAssetFillAmounts, - txData, + txDataWithDefaults, ); } @@ -2168,8 +2173,9 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index 6a1c1cf6a8..1a5146e3f6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -51,8 +51,7 @@ export class DummyERC20TokenContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806395d89b411161008c578063dd62ed3e11610066578063dd62ed3e146102e2578063e30443bc1461031d578063f2fde38b14610356578063fa9b701814610389576100ea565b806395d89b4114610282578063a0712d681461028a578063a9059cbb146102a9576100ea565b806323b872dd116100c857806323b872dd146101d3578063313ce5671461021657806370a082311461021e5780638da5cb5b14610251576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101b9575b600080fd5b6100f7610391565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a56004803603604081101561018257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561043d565b604080519115158252519081900360200190f35b6101c16104b0565b60408051918252519081900360200190f35b6101a5600480360360608110156101e957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356104b6565b6101c1610772565b6101c16004803603602081101561023457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610778565b6102596107a0565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100f76107bc565b6102a7600480360360208110156102a057600080fd5b5035610835565b005b6101a5600480360360408110156102bf57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356108bb565b6101c1600480360360408110156102f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610a4a565b6102a76004803603604081101561033357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a82565b6102a76004803603602081101561036c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b18565b6101c1610b95565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b820191906000526020600020905b81548152906001019060200180831161041857829003601f168201915b505050505081565b33600081815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035490565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600260209081526040808320338452825280832054938352600190915281205490919083111561056357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b828110156105d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020526040902054838101101561066857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156107025773ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083203384529091529020805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b60065481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b69021e19e0c9bab24000008111156108ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56414c55455f544f4f5f4c415247450000000000000000000000000000000000604482015290519081900360640190fd5b6108b83382610ba3565b50565b3360009081526001602052604081205482111561093957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090205482810110156109cf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b3360008181526001602090815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b610a8a610c5c565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090205480821015610ad557610acd600354610ac88385610ca5565b610ca5565b600355610aee565b610aea600354610ae58484610ca5565b610cc4565b6003555b5073ffffffffffffffffffffffffffffffffffffffff909116600090815260016020526040902055565b610b20610c5c565b73ffffffffffffffffffffffffffffffffffffffff8116610b5057610b4b610b46610ce7565b610d1e565b6108b8565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905550565b69021e19e0c9bab240000081565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054610bd4908290610cc4565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902055600354610c079082610cc4565b60035560408051828152905173ffffffffffffffffffffffffffffffffffffffff8416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ca357600054610ca390610b4690339073ffffffffffffffffffffffffffffffffffffffff16610d26565b565b600082821115610cbe57610cbe610b4660028585610db2565b50900390565b600082820183811015610ce057610ce0610b4660008686610db2565b9392505050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b805160208201fd5b6040805173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044808301919091528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1de45ad10000000000000000000000000000000000000000000000000000000017905292915050565b606063e946c1bb60e01b84848460405160240180846003811115610dd257fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050939250505056fea265627a7a7231582089c03e503c77db7069bea8a94ec1c47ee5201d8bdb53857e70a882a1130e1ac364736f6c634300050c0032'; + public static deployedBytecode: string | undefined; public MAX_MINT_AMOUNT = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -168,8 +167,9 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -190,7 +190,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(_spender, _value, txData); + await self.approve.callAsync(_spender, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -209,8 +209,9 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -444,8 +445,9 @@ export class DummyERC20TokenContract extends BaseContract { async sendTransactionAsync( _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('mint(uint256)', [_value]); @@ -462,7 +464,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.mint.callAsync(_value, txData); + await self.mint.callAsync(_value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -479,8 +481,9 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; const txHashPromise = self.mint.sendTransactionAsync(_value, txData, opts); @@ -680,8 +683,9 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_target', _target); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -702,7 +706,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.setBalance.callAsync(_target, _value, txData); + await self.setBalance.callAsync(_target, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -721,8 +725,9 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_target', _target); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -951,8 +956,9 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -970,7 +976,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transfer.callAsync(_to, _value, txData); + await self.transfer.callAsync(_to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -989,8 +995,9 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -1122,8 +1129,9 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1146,7 +1154,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(_from, _to, _value, txData); + await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1167,8 +1175,9 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1320,8 +1329,9 @@ export class DummyERC20TokenContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1338,7 +1348,7 @@ export class DummyERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1354,8 +1364,9 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index 43c3e94c3d..05e88a7e15 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -61,8 +61,7 @@ export class DummyERC721TokenContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a22cb46511610066578063a22cb46514610362578063b88d4fde1461039d578063e985e9c51461043a578063f2fde38b14610489576100f5565b806370a08231146102d45780638da5cb5b1461031957806395d89b41146103215780639dc29fac14610329576100f5565b806323b872dd116100d357806323b872dd146101f857806340c10f191461023b57806342842e0e146102745780636352211e146102b7576100f5565b806306fdde03146100fa578063081812fc14610177578063095ea7b3146101bd575b600080fd5b6101026104bc565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013c578181015183820152602001610124565b50505050905090810190601f1680156101695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101946004803603602081101561018d57600080fd5b5035610568565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101f6600480360360408110156101d357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610590565b005b6101f66004803603606081101561020e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356106b2565b6101f66004803603604081101561025157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a20565b6101f66004803603606081101561028a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610a2e565b610194600480360360208110156102cd57600080fd5b5035610bc8565b610307600480360360208110156102ea57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c5f565b60408051918252519081900360200190f35b610194610d0c565b610102610d28565b6101f66004803603604081101561033f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610da1565b6101f66004803603604081101561037857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515610db3565b6101f6600480360360808110156103b357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013590911691604082013591908101906080810160608201356401000000008111156103fb57600080fd5b82018360208201111561040d57600080fd5b8035906020019184600183028401116401000000008311171561042f57600080fd5b509092509050610e4c565b6104756004803603604081101561045057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611017565b604080519115158252519081900360200190f35b6101f66004803603602081101561049f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611052565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156105605780601f1061053557610100808354040283529160200191610560565b820191906000526020600020905b81548152906001019060200180831161054357829003601f168201915b505050505081565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061059b82610bc8565b90503373ffffffffffffffffffffffffffffffffffffffff821614806105c657506105c68133611017565b61063157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b73ffffffffffffffffffffffffffffffffffffffff821661073457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b600061073f82610bc8565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146107db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b3360006107e784610568565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148061082857506108288383611017565b8061085e57508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6108c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81161561091a57600084815260026020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600084815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8b8116919091179091558a168452600390915290912054610984916110ce565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526003602052604080822093909355908716815220546109c19060016110ed565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260036020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b610a2a8282611110565b5050565b610a398383836106b2565b813b8015610bc257604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590526080606483015260006084830181905292519086169163150b7a029160c480830192602092919082900301818787803b158015610ace57600080fd5b505af1158015610ae2573d6000803e3d6000fd5b505050506040513d6020811015610af857600080fd5b505160405190915080602f61166c8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610bc057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b50505050565b60008181526001602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610c5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610ce357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6006805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156105605780601f1061053557610100808354040283529160200191610560565b610da96112e3565b610a2a828261132c565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610e578585856106b2565b833b801561100f576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff89811660248501526044840188905260806064850190815260848501879052600094918a169363150b7a029390928c928b928b928b929060a401848480828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b158015610f1b57600080fd5b505af1158015610f2f573d6000803e3d6000fd5b505050506040513d6020811015610f4557600080fd5b505160405190915080602f61166c8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461100d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260046020908152604080832093909416825291909152205460ff1690565b61105a6112e3565b73ffffffffffffffffffffffffffffffffffffffff811661108a57611085611080611501565b611538565b6110cb565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b6000828211156110e7576110e761108060028585611540565b50900390565b6000828201838110156111095761110961108060008686611540565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff821661119257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b60008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff16801561122457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4552433732315f4f574e45525f414c52454144595f4558495354530000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8916908117909155845260039091529091205461128a916110ed565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600360205260408082209390935591518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461132a5760005461132a9061108090339073ffffffffffffffffffffffffffffffffffffffff166115df565b565b73ffffffffffffffffffffffffffffffffffffffff82166113ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732315f5a45524f5f4f574e45525f4144445245535300000000000000604482015290519081900360640190fd5b60008181526001602052604090205473ffffffffffffffffffffffffffffffffffffffff908116908316811461144557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b600082815260016020818152604080842080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905573ffffffffffffffffffffffffffffffffffffffff871684526003909152909120546114a7916110ce565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260036020526040808220939093559151849291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b805160208201fd5b606063e946c1bb60e01b8484846040516024018084600381111561156057fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044808301919091528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1de45ad1000000000000000000000000000000000000000000000000000000001790529291505056fe6f6e455243373231526563656976656428616464726573732c616464726573732c75696e743235362c627974657329a265627a7a723158207bb3c4b1d40aa051fbb8e4f8230bb310013e75ca9fa97c528018b4c4aba3b92564736f6c634300050c0032'; + public static deployedBytecode: string | undefined; /** * The zero address indicates there is no approved address. * Throws unless `msg.sender` is the current NFT owner, or an authorized @@ -81,8 +80,9 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -103,7 +103,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(_approved, _tokenId, txData); + await self.approve.callAsync(_approved, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -122,8 +122,9 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -317,8 +318,9 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -336,7 +338,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.burn.callAsync(_owner, _tokenId, txData); + await self.burn.callAsync(_owner, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -355,8 +357,9 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -599,8 +602,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -618,7 +622,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.mint.callAsync(_to, _tokenId, txData); + await self.mint.callAsync(_to, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -637,8 +641,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -914,8 +919,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -938,7 +944,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); + await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -959,8 +965,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1127,8 +1134,9 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1153,7 +1161,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); + await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1176,8 +1184,9 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1346,8 +1355,9 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as DummyERC721TokenContract; @@ -1368,7 +1378,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.setApprovalForAll.callAsync(_operator, _approved, txData); + await self.setApprovalForAll.callAsync(_operator, _approved, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1387,8 +1397,9 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as DummyERC721TokenContract; @@ -1580,8 +1591,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1604,7 +1616,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(_from, _to, _tokenId, txData); + await self.transferFrom.callAsync(_from, _to, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1625,8 +1637,9 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1777,8 +1790,9 @@ export class DummyERC721TokenContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1795,7 +1809,7 @@ export class DummyERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1811,8 +1825,9 @@ export class DummyERC721TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index 49837c0abe..38c19954f5 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -59,8 +59,10 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as DutchAuctionContract; const encodedData = self._strictEncodeArguments( 'getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', @@ -79,7 +81,7 @@ export class DutchAuctionContract extends BaseContract { } if (opts.shouldValidate) { - await self.getAuctionDetails.callAsync(order, txData); + await self.getAuctionDetails.callAsync(order, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -109,8 +111,10 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as DutchAuctionContract; const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( @@ -338,8 +342,10 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); const self = (this as any) as DutchAuctionContract; @@ -360,7 +366,7 @@ export class DutchAuctionContract extends BaseContract { } if (opts.shouldValidate) { - await self.matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txData); + await self.matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -411,8 +417,10 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); const self = (this as any) as DutchAuctionContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index 9f601af4fd..7b8a7985ff 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -67,8 +67,9 @@ export class ERC1155ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -85,7 +86,7 @@ export class ERC1155ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.addAuthorizedAddress.callAsync(target, txData); + await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -102,8 +103,9 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -442,8 +444,9 @@ export class ERC1155ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -460,7 +463,7 @@ export class ERC1155ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddress.callAsync(target, txData); + await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -477,8 +480,9 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -594,8 +598,9 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC1155ProxyContract; @@ -616,7 +621,7 @@ export class ERC1155ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -635,8 +640,9 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC1155ProxyContract; @@ -786,8 +792,9 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -812,7 +819,7 @@ export class ERC1155ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(assetData, from, to, amount, txData); + await self.transferFrom.callAsync(assetData, from, to, amount, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -837,8 +844,9 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -1006,8 +1014,9 @@ export class ERC1155ProxyContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1024,7 +1033,7 @@ export class ERC1155ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1040,8 +1049,9 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index b6c68eed54..e0edaab784 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -67,8 +67,9 @@ export class ERC20ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -85,7 +86,7 @@ export class ERC20ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.addAuthorizedAddress.callAsync(target, txData); + await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -102,8 +103,9 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -265,8 +267,9 @@ export class ERC20ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -283,7 +286,7 @@ export class ERC20ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddress.callAsync(target, txData); + await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -300,8 +303,9 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -460,8 +464,9 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC20ProxyContract; @@ -482,7 +487,7 @@ export class ERC20ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -501,8 +506,9 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC20ProxyContract; @@ -774,8 +780,9 @@ export class ERC20ProxyContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -792,7 +799,7 @@ export class ERC20ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -808,8 +815,9 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index 58aab0f9ca..b3a7d0deaa 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -51,8 +51,7 @@ export class ERC20TokenContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610121578063a9059cbb14610154578063dd62ed3e1461018d57610072565b8063095ea7b31461007757806318160ddd146100c457806323b872dd146100de575b600080fd5b6100b06004803603604081101561008d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356101c8565b604080519115158252519081900360200190f35b6100cc61023b565b60408051918252519081900360200190f35b6100b0600480360360608110156100f457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610241565b6100cc6004803603602081101561013757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661049d565b6100b06004803603604081101561016a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356104c5565b6100cc600480360360408110156101a357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610652565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260408120548211156102d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832033845290915290205482111561037457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054828101101561040a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80841660008181526020818152604080832080548801905593881680835284832080548890039055600182528483203384528252918490208054879003905583518681529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561054357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156105d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b336000818152602081815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526001602090815260408083209390941682529190915220549056fea265627a7a723158205713efa92f66e67a8d01b80af8500df66bd6e9862dcf791e587181109d8ab0c464736f6c634300050b0032'; + public static deployedBytecode: string | undefined; /** * `msg.sender` approves `_spender` to spend `_value` tokens */ @@ -69,8 +68,9 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -91,7 +91,7 @@ export class ERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(_spender, _value, txData); + await self.approve.callAsync(_spender, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -110,8 +110,9 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -300,8 +301,9 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -324,7 +326,7 @@ export class ERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(_from, _to, _value, txData); + await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -345,8 +347,9 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -557,8 +560,9 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -576,7 +580,7 @@ export class ERC20TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transfer.callAsync(_to, _value, txData); + await self.transfer.callAsync(_to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -595,8 +599,9 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index 1197754684..0cb27e8053 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -67,8 +67,9 @@ export class ERC721ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -85,7 +86,7 @@ export class ERC721ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.addAuthorizedAddress.callAsync(target, txData); + await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -102,8 +103,9 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -265,8 +267,9 @@ export class ERC721ProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -283,7 +286,7 @@ export class ERC721ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddress.callAsync(target, txData); + await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -300,8 +303,9 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -460,8 +464,9 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC721ProxyContract; @@ -482,7 +487,7 @@ export class ERC721ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -501,8 +506,9 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC721ProxyContract; @@ -774,8 +780,9 @@ export class ERC721ProxyContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -792,7 +799,7 @@ export class ERC721ProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -808,8 +815,9 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index 5a64919432..1baf2d322f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -61,8 +61,7 @@ export class ERC721TokenContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80636352211e11610076578063a22cb4651161005b578063a22cb46514610211578063b88d4fde1461024c578063e985e9c5146102e9576100a3565b80636352211e146101af57806370a08231146101cc576100a3565b8063081812fc146100a8578063095ea7b3146100ee57806323b872dd1461012957806342842e0e1461016c575b600080fd5b6100c5600480360360208110156100be57600080fd5b5035610338565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101276004803603604081101561010457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610360565b005b6101276004803603606081101561013f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610482565b6101276004803603606081101561018257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356107ef565b6100c5600480360360208110156101c557600080fd5b5035610989565b6101ff600480360360208110156101e257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a20565b60408051918252519081900360200190f35b6101276004803603604081101561022757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515610acd565b6101276004803603608081101561026257600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013590911691604082013591908101906080810160608201356401000000008111156102aa57600080fd5b8201836020820111156102bc57600080fd5b803590602001918460018302840111640100000000831117156102de57600080fd5b509092509050610b66565b610324600480360360408110156102ff57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610d31565b604080519115158252519081900360200190f35b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061036b82610989565b90503373ffffffffffffffffffffffffffffffffffffffff8216148061039657506103968133610d31565b61040157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f494e56414c49445f53454e4445520000000000000000000000604482015290519081900360640190fd5b60008281526001602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b73ffffffffffffffffffffffffffffffffffffffff821661050457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f5a45524f5f544f5f4144445245535300000000000000000000604482015290519081900360640190fd5b600061050f82610989565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146105ab57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4552433732315f4f574e45525f4d49534d415443480000000000000000000000604482015290519081900360640190fd5b3360006105b784610338565b90508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614806105f857506105f88383610d31565b8061062e57508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61069957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4552433732315f494e56414c49445f5350454e44455200000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116156106ea57600084815260016020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b60008481526020818152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a811691909117909155891683526002909152902054610753906001610d6c565b73ffffffffffffffffffffffffffffffffffffffff8088166000908152600260205260408082209390935590871681522054610790906001610d90565b73ffffffffffffffffffffffffffffffffffffffff808716600081815260026020526040808220949094559251879391928a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050505050565b6107fa838383610482565b813b801561098357604080517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590526080606483015260006084830181905292519086169163150b7a029160c480830192602092919082900301818787803b15801561088f57600080fd5b505af11580156108a3573d6000803e3d6000fd5b505050506040513d60208110156108b957600080fd5b505160405190915080602f610e5b8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461098157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b50505050565b60008181526020819052604081205473ffffffffffffffffffffffffffffffffffffffff1680610a1a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216610aa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4552433732315f5a45524f5f4f574e4552000000000000000000000000000000604482015290519081900360640190fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b33600081815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610b71858585610482565b833b8015610d29576040517f150b7a02000000000000000000000000000000000000000000000000000000008152336004820181815273ffffffffffffffffffffffffffffffffffffffff89811660248501526044840188905260806064850190815260848501879052600094918a169363150b7a029390928c928b928b928b929060a401848480828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d6020811015610c5f57600080fd5b505160405190915080602f610e5b8239602f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610d2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4552433732315f494e56414c49445f53454c4543544f52000000000000000000604482015290519081900360640190fd5b505b505050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260036020908152604080832093909416825291909152205460ff1690565b600082821115610d8a57610d8a610d8560028585610db3565b610e52565b50900390565b600082820183811015610dac57610dac610d8560008686610db3565b9392505050565b606063e946c1bb60e01b84848460405160240180846003811115610dd357fe5b60ff1681526020018381526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fdfe6f6e455243373231526563656976656428616464726573732c616464726573732c75696e743235362c627974657329a265627a7a723158204bc74831490bca4fbe1805808d58d6b0e12f618a37565e744e91d8dc73dc18b164736f6c634300050c0032'; + public static deployedBytecode: string | undefined; /** * The zero address indicates there is no approved address. * Throws unless `msg.sender` is the current NFT owner, or an authorized @@ -81,8 +80,9 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as ERC721TokenContract; @@ -103,7 +103,7 @@ export class ERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(_approved, _tokenId, txData); + await self.approve.callAsync(_approved, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -122,8 +122,9 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as ERC721TokenContract; @@ -482,8 +483,9 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -506,7 +508,7 @@ export class ERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txData); + await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -527,8 +529,9 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -695,8 +698,9 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -721,7 +725,7 @@ export class ERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txData); + await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -744,8 +748,9 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -914,8 +919,9 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as ERC721TokenContract; @@ -936,7 +942,7 @@ export class ERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.setApprovalForAll.callAsync(_operator, _approved, txData); + await self.setApprovalForAll.callAsync(_operator, _approved, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -955,8 +961,9 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as ERC721TokenContract; @@ -1105,8 +1112,9 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1129,7 +1137,7 @@ export class ERC721TokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(_from, _to, _tokenId, txData); + await self.transferFrom.callAsync(_from, _to, _tokenId, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1150,8 +1158,9 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts index 731ec437f4..3aad36e73d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -31,8 +31,7 @@ export class EthBalanceCheckerContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a0901e5114610030575b600080fd5b6100d36004803603602081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184602083028401116401000000008311171561009557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610123945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561010f5781810151838201526020016100f7565b505050509050019250505060405180910390f35b6060808251604051908082528060200260200182016040528015610151578160200160208202803883390190505b50905060005b835181146101a95783818151811061016b57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff163182828151811061019657fe5b6020908102919091010152600101610157565b509291505056fea265627a7a7231582094309783f0b63086d85d9cb4f6e5be253699056ac1580a863367c5076ecb5c1864736f6c634300050b0032'; + public static deployedBytecode: string | undefined; /** * Batch fetches ETH balances */ diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 4e0bd42d5a..7086e0f2e1 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -110,8 +110,7 @@ export class ExchangeContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x6080604052600436106102d15760003560e01c80638da5cb5b11610179578063beee2e14116100d6578063dd885e2d1161008a578063eea086ba11610064578063eea086ba14610715578063f2fde38b1461072a578063fc74896d1461074a576102d1565b8063dd885e2d146106cd578063dedfc1f1146106ef578063e14b58c414610702576102d1565b8063c26cfecd116100bb578063c26cfecd14610678578063c585bb931461068d578063d9bfa73e146106ad576102d1565b8063beee2e1414610645578063c0fa16cc14610658576102d1565b80639d3fa4b91161012d578063a6c3bf3311610112578063a6c3bf33146105ff578063b04fbddd14610612578063b718e29214610632576102d1565b80639d3fa4b9146105b2578063a12dcc6f146105df576102d1565b80639331c7421161015e5780639331c7421461056c5780639694a4021461058c5780639b44d5561461059f576102d1565b80638da5cb5b146105375780638ea8dfe41461054c576102d1565b80636a1a80fd116102325780638171c407116101e657806388ec79fb116101c057806388ec79fb146104e45780638bc8efb3146105045780638d45cd2314610517576102d1565b80638171c4071461048f57806382c174d0146104af578063850a1501146104cf576102d1565b806377fcce681161021757806377fcce681461044957806378d29ac11461045c5780637b8e35141461046f576102d1565b80636a1a80fd146104165780636fcf3e9e14610436576102d1565b80632da629871161028957806346c02d7a1161026e57806346c02d7a146103c35780634f9559b1146103d657806360704108146103e9576102d1565b80632da629871461038e578063369da099146103a3576102d1565b80632280c910116102ba5780632280c9101461032e578063288cdc911461034e5780632ac126221461036e576102d1565b80630228e168146102d65780631ce4c78b1461030c575b600080fd5b3480156102e257600080fd5b506102f66102f1366004614e64565b61076a565b60405161030391906154c4565b60405180910390f35b34801561031857600080fd5b5061032161077f565b60405161030391906154cf565b61034161033c366004615108565b610785565b60405161030391906156a0565b34801561035a57600080fd5b50610321610369366004614e64565b6107c7565b34801561037a57600080fd5b506102f6610389366004614e64565b6107d9565b6103a161039c366004614f82565b6107ee565b005b6103b66103b1366004614d60565b610812565b60405161030391906159c2565b6103a16103d1366004614e64565b610939565b6103a16103e4366004614e64565b6109ac565b3480156103f557600080fd5b50610409610404366004614eed565b610ab9565b604051610303919061535b565b610429610424366004614c40565b610b07565b604051610303919061594b565b610429610444366004614c40565b610b3f565b6103a1610457366004614b2a565b610b5d565b6103b661046a366004614d60565b610c20565b34801561047b57600080fd5b506102f661048a366004614af6565b610d70565b34801561049b57600080fd5b506102f66104aa366004614ea0565b610d90565b3480156104bb57600080fd5b506102f66104ca366004614e7c565b610def565b3480156104db57600080fd5b50610409610e0f565b6104f76104f236600461500c565b610e2b565b60405161030391906159d0565b6103b6610512366004614d60565b610e49565b34801561052357600080fd5b506102f6610532366004615108565b610e7d565b34801561054357600080fd5b50610409610ea2565b61055f61055a366004614cdc565b610ebe565b60405161030391906154b1565b34801561057857600080fd5b506103a1610587366004614e64565b610fe9565b61055f61059a366004614cdc565b611031565b6103b66105ad3660046150a8565b6110f8565b3480156105be57600080fd5b506105d26105cd366004614f82565b61111d565b6040516103039190615a12565b3480156105eb57600080fd5b506102f66105fa366004614fb5565b611201565b6103b661060d366004614d60565b611226565b34801561061e57600080fd5b506103a161062d366004614b65565b61125a565b6104f761064036600461500c565b611306565b61055f610653366004614cdc565b611324565b34801561066457600080fd5b506103a1610673366004614adb565b6113d9565b34801561068457600080fd5b5061032161147c565b34801561069957600080fd5b506103a16106a8366004614adb565b611482565b3480156106b957600080fd5b506103216106c8366004614af6565b611616565b3480156106d957600080fd5b506106e2611633565b604051610303919061562b565b6103a16106fd366004614c0d565b611657565b6103b66107103660046150a8565b611699565b34801561072157600080fd5b506104096116b4565b34801561073657600080fd5b506103a1610745366004614adb565b6116d0565b61075d610758366004614db3565b611748565b6040516103039190615433565b60056020526000908152604090205460ff1681565b60035481565b606061078f61187b565b156107a55761079e838361189d565b90506107c1565b6107ad6119b7565b6107b7838361189d565b90506107c16119f9565b92915050565b60096020526000908152604090205481565b600a6020526000908152604090205460ff1681565b6107f6611a2b565b6107ff81611a9a565b610807611ad7565b61080f611aeb565b50565b61081a614561565b61082261187b565b156108b857835160005b8181146108b157600061084c846020015187611b1590919063ffffffff16565b9050610856614561565b61088788848151811061086557fe5b60200260200101518388868151811061087a57fe5b6020026020010151611b34565b90506108938582611c75565b9450868560200151106108a75750506108b1565b505060010161082c565b5050610932565b6108c06119b7565b835160005b8181146109285760006108e5846020015187611b1590919063ffffffff16565b90506108ef614561565b6108fe88848151811061086557fe5b905061090a8582611c75565b94508685602001511061091e575050610928565b50506001016108c5565b50506109326119f9565b9392505050565b610941611a2b565b600061094b611d10565b600083815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff90941683529290522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905550610807611ad7565b6109b4611a2b565b60006109be611d10565b9050600073ffffffffffffffffffffffffffffffffffffffff821633146109e557336109e8565b60005b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b60209081526040808320938516835292905220549091506001840190808211610a3d57610a3d610a38858584611d42565b611de7565b73ffffffffffffffffffffffffffffffffffffffff8085166000818152600b602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610aa59086906154cf565b60405180910390a350505050610807611ad7565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b610b0f614590565b610b17611a2b565b610b25858585856001611def565b9050610b2f611ad7565b610b37611aeb565b949350505050565b610b47614590565b610b4f611a2b565b610b25858585856000611def565b610b65611a2b565b6000610b6f611d10565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba89190610c039086906154c4565b60405180910390a350610c14611ad7565b610c1c611aeb565b5050565b610c28614561565b610c3061187b565b15610cee57835160005b8181146108b1578251600090610c5790879063ffffffff611b1516565b90506000610c94888481518110610c6a57fe5b602002602001015160a00151898581518110610c8257fe5b6020026020010151608001518461215c565b9050610c9e614561565b610cc2898581518110610cad57fe5b60200260200101518389878151811061087a57fe5b9050610cce8682611c75565b955087866000015110610ce3575050506108b1565b505050600101610c3a565b610cf66119b7565b835160005b818114610928578251600090610d1890879063ffffffff611b1516565b90506000610d2b888481518110610c6a57fe5b9050610d35614561565b610d44898581518110610cad57fe5b9050610d508682611c75565b955087866000015110610d6557505050610928565b505050600101610cfb565b600860209081526000928352604080842090915290825290205460ff1681565b600080610d9e85858561217e565b90506005816008811115610dae57fe5b1480610dc557506007816008811115610dc357fe5b145b15610dda57610dda610a3860058787876121fd565b610de6818686866122a5565b95945050505050565b600760209081526000928352604080842090915290825290205460ff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b610e336145b8565b610e3b611a2b565b610b25858585856000612515565b610e51614561565b610e5c848484610c20565b9050828160000151101561093257610932610a386000858460000151612602565b600080610e956001548561262190919063ffffffff16565b9050610b37848285612635565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6060610ec861187b565b15610f6b578351604080518281526020808402820101909152818015610f0857816020015b610ef5614561565b815260200190600190039081610eed5790505b50915060005b8181146108b157610f4c868281518110610f2457fe5b6020026020010151868381518110610f3857fe5b602002602001015186848151811061087a57fe5b838281518110610f5857fe5b6020908102919091010152600101610f0e565b610f736119b7565b8351604080518281526020808402820101909152818015610fae57816020015b610f9b614561565b815260200190600190039081610f935790505b50915060005b81811461092857610fca868281518110610f2457fe5b838281518110610fd657fe5b6020908102919091010152600101610fb4565b610ff16126bb565b7f3a3e76d7a75e198aef1f53137e4f2a8a2ec74e2e9526db8404d08ccc9f1e621d60035482604051611024929190615543565b60405180910390a1600355565b606061103b611a2b565b835160408051828152602080840282010190915281801561107657816020015b611063614561565b81526020019060019003908161105b5790505b50915060005b8181146110e6576110c786828151811061109257fe5b60200260200101518683815181106110a657fe5b60200260200101518684815181106110ba57fe5b6020026020010151612702565b8382815181106110d357fe5b602090810291909101015260010161107c565b50506110f0611ad7565b610932611aeb565b611100614561565b611108611a2b565b611113848484612702565b90506110f0611ad7565b6111256145ec565b61112e826127a4565b60408301526020820152608082015161114e5760015b60ff168152610b02565b60a082015161115e576002611144565b8160a00151816040015110611174576005611144565b8161010001514210611187576004611144565b6020808201516000908152600a909152604090205460ff16156111ab576006611144565b610120820151825173ffffffffffffffffffffffffffffffffffffffff9081166000908152600b6020908152604080832060608801519094168352929052205411156111f8576006611144565b60038152919050565b600080611219600154856127d590919063ffffffff16565b9050610b378482856127e4565b61122e614561565b611239848484610812565b9050828160200151101561093257610932610a386001858460200151612602565b835160005b8181146112ca576112c28160001b87838151811061127957fe5b602002602001015187848151811061128d57fe5b60200260200101518785815181106112a157fe5b60200260200101518786815181106112b557fe5b6020026020010151612839565b60010161125f565b506040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fd90615914565b60405180910390fd5b61130e6145b8565b611316611a2b565b610b25858585856001612515565b606061132e611a2b565b835160408051828152602080840282010190915281801561136957816020015b611356614561565b81526020019060019003908161134e5790505b50915060005b8181146110e6576113ba86828151811061138557fe5b602002602001015186838151811061139957fe5b60200260200101518684815181106113ad57fe5b60200260200101516129f3565b8382815181106113c657fe5b602090810291909101015260010161136f565b6113e16126bb565b6004546040517fe1a5430ebec577336427f40f15822f1f36c5e3509ff209d6db9e6c9e6941cb0b9161142d9173ffffffffffffffffffffffffffffffffffffffff90911690849061537c565b60405180910390a1600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015481565b61148a6126bb565b60008173ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114d257600080fd5b505afa1580156114e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061150a9190810190614f09565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16801561156857611568610a388383612a26565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600260205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c03194906116099084908690615658565b60405180910390a1505050565b600b60209081526000928352604080842090915290825290205481565b7f20c13b0b0000000000000000000000000000000000000000000000000000000081565b61165f611a2b565b805160005b81811461168f5761168783828151811061167a57fe5b6020026020010151611a9a565b600101611664565b5050610807611ad7565b6116a1614561565b6116a9611a2b565b6111138484846129f3565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b6116d86126bb565b73ffffffffffffffffffffffffffffffffffffffff8116611703576116fe610a38612ac8565b61080f565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905550565b606061175261187b565b156117f457825160408051828152602080840282010190915260609082801561178f57816020015b606081526020019060019003908161177a5790505b50905060005b8281146117eb576117cc8682815181106117ab57fe5b60200260200101518683815181106117bf57fe5b602002602001015161189d565b8282815181106117d857fe5b6020908102919091010152600101611795565b509150506107c1565b6117fc6119b7565b825160408051828152602080840282010190915260609082801561183457816020015b606081526020019060019003908161181f5790505b50905060005b82811461186f576118508682815181106117ab57fe5b82828151811061185c57fe5b602090810291909101015260010161183a565b509150506107c16119f9565b6000547501000000000000000000000000000000000000000000900460ff1690565b606060006118b66001548561262190919063ffffffff16565b90506118c3848483612aff565b60608401516118d28180612bd3565b60008281526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055608087015190516060913091611920919061530e565b600060405180830381855af49150503d806000811461195b576040519150601f19603f3d011682016040523d82523d6000602084013e611960565b606091505b50915091508161197757611977610a388583612c36565b611982836000612bd3565b60405184907fa4a7329f1dd821363067e07d359e347b4af9b1efe4b6cccf13240228af3c800d90600090a29695505050505050565b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055565b600080547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055611a29612c53565b565b60005474010000000000000000000000000000000000000000900460ff1615611a5957611a59610a38612c88565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b611aa26145ec565b611aab8261111d565b9050611ab78282612cbf565b805160ff16600314611ac9575061080f565b610c1c828260200151612d6e565b611adf61187b565b611a2957611a29612c53565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b600082821115611b2e57611b2e610a3860028585612e17565b50900390565b611b3c614561565b6040516060907f9b44d5560000000000000000000000000000000000000000000000000000000090611b7690879087908790602401615a58565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060603073ffffffffffffffffffffffffffffffffffffffff1683604051611bfe919061530e565b600060405180830381855af49150503d8060008114611c39576040519150601f19603f3d011682016040523d82523d6000602084013e611c3e565b606091505b50915091508115611c6b57805160a014611c5457fe5b80806020019051611c689190810190614f25565b93505b5050509392505050565b611c7d614561565b81518351611c909163ffffffff612e3616565b815260208083015190840151611cab9163ffffffff612e3616565b602082015260408083015190840151611cc99163ffffffff612e3616565b604082015260608083015190840151611ce79163ffffffff612e3616565b606082015260808083015190840151611d059163ffffffff612e3616565b608082015292915050565b60065460009073ffffffffffffffffffffffffffffffffffffffff16818115611d395781611d3b565b335b9250505090565b6060634ad3127560e01b848484604051602401611d61939291906153a3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b611df7614590565b8551611e0a57611e0a610a386000612e52565b8451611e1d57611e1d610a386001612e52565b8351865114611e3357611e33610a386002612e52565b8251855114611e4957611e49610a386003612e52565b8551604051908082528060200260200182016040528015611e8457816020015b611e71614561565b815260200190600190039081611e695790505b5081528451604080518281526020808402820101909152908015611ec257816020015b611eaf614561565b815260200190600190039081611ea75790505b506020820152600080611ed361460c565b88600081518110611ee057fe5b60200260200101519050611ef261460c565b88600081518110611eff57fe5b602002602001015190506000611f14836127a4565b9150506000611f22836127a4565b915050611f2d614561565b611f35614561565b611f3d6145b8565b611f7087878f8c81518110611f4e57fe5b60200260200101518f8c81518110611f6257fe5b60200260200101518f612515565b805160200151909150611f8a90869063ffffffff612e3616565b9450611fa781602001516020015185612e3690919063ffffffff16565b9350611fb7838260000151611c75565b9250611fc7828260200151611c75565b9150611fe481604001518b60400151612e3690919063ffffffff16565b60408b0152606080820151908b01516120029163ffffffff612e3616565b60608b015260a087015185106120ad578951805160018b019a859291811061202657fe5b60200260200101819052506040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525092508e5189141561208a57818a60200151898151811061207957fe5b60200260200101819052505061214b565b8e898151811061209657fe5b602002602001015196506120a9876127a4565b9550505b8560a00151841061214557818a6020015189806001019a50815181106120cf57fe5b60200260200101819052506040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525091508d5188141561212257828a600001518a8151811061207957fe5b8d888151811061212e57fe5b60200260200101519550612141866127a4565b9450505b50611f35565b505050505050505095945050505050565b6000610b3783612172868563ffffffff612ef116565b9063ffffffff612f2216565b600061218b848484612f4c565b905073ffffffffffffffffffffffffffffffffffffffff83166121b8576121b8610a3860068686866121fd565b600881818111156121c557fe5b60ff16106121dd576121dd610a3860038686866121fd565b60008160088111156121eb57fe5b141561093257610932610a3860048686865b6060637e5a231860e01b8585858560405160240161221e94939291906158b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050949350505050565b600060018560088111156122b557fe5b14156122dc5781516001146122d4576122d4610a3860028686866121fd565b506000610b37565b60028560088111156122ea57fe5b14156123e357815160421461230957612309610a3860028686866121fd565b60008260008151811061231857fe5b016020015160f81c9050600061233584600163ffffffff612f8b16565b9050600061234a85602163ffffffff612f8b16565b9050600060018885858560405160008152602001604052604051612371949392919061560d565b6020604051602081039080840390855afa158015612393573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8981169116149550610b37945050505050565b60038560088111156123f157fe5b141561249e57815160421461241057612410610a3860028686866121fd565b60008260008151811061241f57fe5b016020015160f81c9050600061243c84600163ffffffff612f8b16565b9050600061245185602163ffffffff612f8b16565b90506000600188604051602001612468919061532a565b6040516020818303038152906040528051906020012085858560405160008152602001604052604051612371949392919061560d565b60048560088111156124ac57fe5b14156124c4576124bd848484612fb5565b9050610b37565b60068560088111156124d257fe5b146124d957fe5b50600083815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915290205460ff16949350505050565b61251d6145b8565b61016080870151610140808801919091528701519086015261253d6145ec565b6125468761111d565b90506125506145ec565b6125598761111d565b90506000612565611d10565b90506125738984838a6131ab565b61257f888383896131ab565b6125938989856020015185602001516132e1565b6125ac8989856040015185604001516003543a8b61332c565b93506125c78982856020015186604001518860000151613481565b6125e08882846020015185604001518860200151613481565b6125f6836020015183602001518b8b858961355f565b50505095945050505050565b60606318e4b14160e01b848484604051602401611d619392919061589e565b60006109328261263085613706565b61378e565b60608301516000908161264985838661217e565b9050600581600881111561265957fe5b141561267b5761267461266c87876137c8565b868487613800565b92506126b2565b600781600881111561268957fe5b14156126a35761267461269c87876137c8565b83866138b4565b6126af818684876122a5565b92505b50509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a2957600054611a2990610a3890339073ffffffffffffffffffffffffffffffffffffffff166138c3565b61270a614561565b6127126145ec565b61271b8561111d565b90506000612727611d10565b9050612735868383876131ab565b600061275283604001518860a00151611b1590919063ffffffff16565b9050600061276087836138e0565b905061277088826003543a6138f6565b945060008460200151905061278c89858388604001518a613481565b612798818a868961396d565b50505050509392505050565b6000806127bc600154846127d590919063ffffffff16565b6000818152600960205260409020549092509050915091565b60006109328261263085613a04565b8251600090816127f585838661217e565b9050600581600881111561280557fe5b14156128185761267461266c8787613adb565b600781600881111561282657fe5b14156126a35761267461269c8787613adb565b80156129ec57600384511161285757612857610a3860008787613b13565b6000612869858263ffffffff613b3216565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16806128c8576128c8610a3860018989613b13565b6040516060907fa85e59e400000000000000000000000000000000000000000000000000000000906129049089908990899089906024016156b3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608373ffffffffffffffffffffffffffffffffffffffff168360405161298c919061530e565b6000604051808303816000865af19150503d80600081146129c9576040519150601f19603f3d011682016040523d82523d6000602084013e6129ce565b606091505b5091509150816129e6576129e6610a388b8b84613b7e565b50505050505b5050505050565b6129fb614561565b612a06848484612702565b90508281602001511461093257610932610a386002858460200151612602565b60606311c7b72060e01b8383604051602401612a43929190615658565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b82602001514210612b1857612b18610a38600183613b9d565b60408301513a8114612b3257612b32610a38833a84613bba565b60065473ffffffffffffffffffffffffffffffffffffffff168015612b5e57612b5e610a388483613bd9565b60008381526005602052604090205460ff1615612b8357612b83610a38600085613b9d565b606085015173ffffffffffffffffffffffffffffffffffffffff81163314801590612bb65750612bb4868587612635565b155b15612bcb57612bcb610a3860018684896121fd565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff82163314610c1c576006805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790555050565b60606320d11f6160e01b8383604051602401612a43929190615551565b3031801561080f57604051339082156108fc029083906000818181858888f19350505050158015610c1c573d6000803e3d6000fd5b60408051808201909152600481527f0c3b823f00000000000000000000000000000000000000000000000000000000602082015290565b606082015173ffffffffffffffffffffffffffffffffffffffff1615612d1357606082015173ffffffffffffffffffffffffffffffffffffffff163314612d1357612d13610a386002836020015133613bf6565b6000612d1d611d10565b90508073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614612d6957612d69610a386000846020015184613bf6565b505050565b6000818152600a60205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927f02c310a9a43963ff31a754a4099cc435ed498049687539d72d7818d9b093415c92612e0b92909190339061571b565b60405180910390a45050565b606063e946c1bb60e01b848484604051602401611d6193929190615846565b60008282018381101561093257610932610a3860008686612e17565b606063d4092f4f60e01b82604051602401612e6d9190615833565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b600082612f00575060006107c1565b82820282848281612f0d57fe5b041461093257610932610a3860018686612e17565b600081612f3857612f38610a3860038585612e17565b6000828481612f4357fe5b04949350505050565b6000815160001415612f6857612f68610a3860028686866121fd565b81600183510381518110612f7857fe5b016020015160f81c6008811115610b3757fe5b60008160200183511015612fac57612fac610a386005855185602001613c15565b50016020015190565b8051600090612fec837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830163ffffffff613c3416565b6040516060907f1626ba7e00000000000000000000000000000000000000000000000000000000906130249088908790602401615551565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290506130b3848363ffffffff613c3416565b600060608673ffffffffffffffffffffffffffffffffffffffff16836040516130dc919061530e565b600060405180830381855afa9150503d8060008114613117576040519150601f19603f3d011682016040523d82523d6000602084013e61311c565b606091505b509150915081801561312f575080516020145b15613191577fb06713810000000000000000000000000000000000000000000000000000000061316682600063ffffffff613b3216565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614945050505050610932565b6131a0610a3889898985613c38565b505050509392505050565b825160ff166003146131da576131da610a388460200151856000015160ff1660068111156131d557fe5b613c59565b606084015173ffffffffffffffffffffffffffffffffffffffff161561322e57606084015173ffffffffffffffffffffffffffffffffffffffff16331461322e5761322e610a386002856020015133613bf6565b602084015173ffffffffffffffffffffffffffffffffffffffff1615613298578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff161461329857613298610a386001856020015185613bf6565b8351604084015115806132b557506132b584602001518284613c76565b156129ec576132c9858560200151846127e4565b6129ec576129ec610a386000866020015184866121fd565b60a080840151908501516132fa9163ffffffff612ef116565b608080850151908601516133139163ffffffff612ef116565b101561332657613326610a388383613cc9565b50505050565b6133346145b8565b60a088015160009061334c908863ffffffff611b1516565b905060006133638a608001518b60a0015184613ce6565b9050600061337e888b60a00151611b1590919063ffffffff16565b905060006133958b608001518c60a0015184613ce6565b905085156133b2576133ab8c8c85878587613d1a565b94506133c3565b6133c08c8c85878587613dec565b94505b84515160808d015160c08e01516133db929190613ce6565b85516040015284516020015160a08d015160e08e01516133fc929190613ce6565b85516060015260208501515160808c015160c08d015161341d929190613ce6565b856020015160400181815250506134458560200151602001518c60a001518d60e00151613ce6565b6020860151606001526000613460888a63ffffffff612ef116565b86516080908101829052602088015101525050505050979650505050505050565b602081015161349790839063ffffffff612e3616565b600960008581526020019081526020016000208190555082856040015173ffffffffffffffffffffffffffffffffffffffff16866000015173ffffffffffffffffffffffffffffffffffffffff167f6869791f0a34781b29882982cc39e882768cf2c96995c2a110c577c53bc932d58861014001518961016001518a61018001518b6101a001518b338a600001518b602001518c604001518d606001518e608001516040516135509b9a99989796959493929190615767565b60405180910390a45050505050565b8351835160408087015190860151610140870151855160200151613588918b9186908890612839565b6135a28a8961014001518686896020015160200151612839565b6135bc898861018001518584896020015160400151612839565b6135d68a8961018001518685896000015160400151612839565b6135ec8a89610140015186898960400151612839565b6136028988610140015185898960600151612839565b600061361a8b8b88600001516080015188888c613e85565b905080613637578551600060809182018190526020880151909101525b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561368757506101a080890151908a01516136879163ffffffff613ee216565b156136c5576136c08b8a6101a0015189866136bb8b60200151606001518c6000015160600151612e3690919063ffffffff16565b612839565b6136f9565b6136df8a896101a0015189858a6020015160600151612839565b6136f98b8a6101a0015189868a6000015160600151612839565b5050505050505050505050565b608081810151825160208085015160408087015160609788015186519685019690962082517fec69816980a3a3ca4554410e60253953e9ff375ba4536a98adfa15cc71541508815294850195909552908301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff9091169183019190915260a082015260c0902090565b6040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b6040516060907fde047db40000000000000000000000000000000000000000000000000000000090612a439085908590602401615a83565b8051600090601581101561381e5761381e610a3860028787876121fd565b6000613852847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeb840163ffffffff613f0716565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526008602090815260408083209385168352929052205490915060ff1661389c5761389c610a388683613f47565b6138a98188866015613f64565b979650505050505050565b6000610b378385846001613f64565b6060631de45ad160e01b8383604051602401612a4392919061537c565b60008183106138ef5781610932565b5090919050565b6138fe614561565b6020810184905260a0850151608086015161391a918691613ce6565b815260a085015160c0860151613931918691613ce6565b604082015260a085015160e086015161394b918691613ce6565b6060820152613960828463ffffffff612ef116565b6080820152949350505050565b613987848461016001518486600001518560200151612839565b6139a1848461014001518560000151858560000151612839565b6139bb84846101a001518486604001518560600151612839565b6139d984846101800151856000015186604001518560400151612839565b60006139ef85836080015186600001518661413b565b9050806129ec57600060808301525050505050565b6101408101516101608201516101808301516101a08401516000937ff80322eb8376aafb64eadf8f0d7623f22130fd9491a221e902b713cb984a753493909290916020871015613a5057fe5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087018051610140890180516101608b0180516101808d0180516101a08f0180519d89528c5160209d8e012087528b519b8d019b909b2084528951998c01999099208152875197909a019690962088526101e085209390945290529190529252919091529050919050565b6040516060907f3efe50c80000000000000000000000000000000000000000000000000000000090612a439085908590602401615a36565b606063488219a660e01b848484604051602401611d619392919061580b565b60008160040183511015613b5357613b53610a386003855185600401613c15565b5001602001517fffffffff000000000000000000000000000000000000000000000000000000001690565b6060634678472b60e01b848484604051602401611d619392919061556a565b606063f598518460e01b8383604051602401612a439291906158fd565b606063a26dac0960e01b848484604051602401611d61939291906155f7565b606063dec4aedf60e01b8383604051602401612a439291906154d8565b606063e53c76c860e01b848484604051602401611d6193929190615867565b6060632800659560e01b848484604051602401611d61939291906158ab565b9052565b6060631b8388f760e01b8585858560405160240161221e94939291906154fc565b606063fdb6ca8d60e01b8383604051602401612a43929190615595565b600080613c84858585612f4c565b90506004816008811115613c9457fe5b1480613cab57506005816008811115613ca957fe5b145b80610de657506007816008811115613cbf57fe5b1495945050505050565b606063b6555d6f60e01b8383604051602401612a43929190615543565b6000613cf3848484614181565b15613d0657613d06610a388585856141e7565b610b3783612172868563ffffffff612ef116565b613d226145b8565b81851184841184861115613d4257613d3b898686614206565b9250613d91565b86841115613d825782518790528251602001869052608088015160a0890151613d6c919089613ce6565b6020808501805192909252905101879052613d91565b613d8e87878787614243565b92505b8115613db7576020808401510151835151613db19163ffffffff611b1516565b60408401525b8015613ddf5782516020908101519084015151613dd99163ffffffff611b1516565b60608401525b50505b9695505050505050565b613df46145b8565b82841115613e0e57613e07878484614206565b9050613e5c565b82841015613e4d5780518590528051602090810185905281015184905260a08601516080870151613e4091908661426e565b6020808301510152613e5c565b613e5985858585614243565b90505b6020808201510151815151613e769163ffffffff611b1516565b60408201529695505050505050565b60045460009073ffffffffffffffffffffffffffffffffffffffff168015613ed85730316000613eb98a84848b8b8a6142c2565b9050613ecb89848385038b8a8a6142c2565b5060019350505050613de2565b6000915050613de2565b6000815183511480156109325750508051602091820120825192909101919091201490565b60008160140183511015613f2857613f28610a386004855185601401613c15565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b606063a15c0d0660e01b8383604051602401612a4392919061537c565b8151600090613f7b8484830363ffffffff613c3416565b6040516060907f20c13b0b0000000000000000000000000000000000000000000000000000000090613fb390889088906024016156f6565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050614042858363ffffffff613c3416565b600060608873ffffffffffffffffffffffffffffffffffffffff168360405161406b919061530e565b600060405180830381855afa9150503d80600081146140a6576040519150601f19603f3d011682016040523d82523d6000602084013e6140ab565b606091505b50915091508180156140be575080516020145b15614120577f20c13b0b000000000000000000000000000000000000000000000000000000006140f582600063ffffffff613b3216565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614945050505050610b37565b61412f610a388a8a8a856143fa565b50505050949350505050565b60045460009073ffffffffffffffffffffffffffffffffffffffff1680156141775761416c868230318888886142c2565b506001915050610b37565b6000915050610b37565b60008261419357614193610a3861441b565b81158061419e575083155b156141ab57506000610932565b600083806141b557fe5b85840990506141ca858463ffffffff612ef116565b6141dc826103e863ffffffff612ef116565b101595945050505050565b606063339f3de260e01b848484604051602401611d61939291906155f7565b61420e6145b8565b60208082018051859052518101839052815101839052608084015160a0850151614239919085613ce6565b8151529392505050565b61424b6145b8565b805194909452835160209081019390935282840180519290925290519091015290565b600061427b848484614452565b1561428e5761428e610a388585856141e7565b610b37836121726142a682600163ffffffff611b1516565b6142b6888763ffffffff612ef116565b9063ffffffff612e3616565b60008385106142ce5750825b6040516060907fa3b4a3270000000000000000000000000000000000000000000000000000000090614308908690869089906024016153a3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600060608873ffffffffffffffffffffffffffffffffffffffff168484604051614391919061530e565b60006040518083038185875af1925050503d80600081146143ce576040519150601f19603f3d011682016040523d82523d6000602084013e6143d3565b606091505b5091509150816143ed576143ed610a388b898989866144b6565b5050509695505050505050565b6060635bd0428d60e01b8585858560405160240161221e94939291906153d4565b60408051808201909152600481527fa791837c00000000000000000000000000000000000000000000000000000000602082015290565b60008261446457614464610a3861441b565b81158061446f575083155b1561447c57506000610932565b6000838061448657fe5b85840990508361449c818363ffffffff611b1516565b816144a357fe5b0690506141ca858463ffffffff612ef116565b60606387cb1e7560e01b86868686866040516024016144d99594939291906155b2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905095945050505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b6040518060800160405280606081526020016060815260200160008152602001600081525090565b60405180608001604052806145cb614561565b81526020016145d8614561565b815260200160008152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b604051806101c00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081526020016060815260200160608152602001606081525090565b803573ffffffffffffffffffffffffffffffffffffffff811681146107c157600080fd5b600082601f830112614707578081fd5b813561471a61471582615b14565b615aed565b81815291506020808301908481018184028601820187101561473b57600080fd5b60005b848110156147625761475088836146d3565b8452928201929082019060010161473e565b505050505092915050565b600082601f83011261477d578081fd5b813561478b61471582615b14565b8181529150602080830190840160005b838110156147c8576147b3876020843589010161488b565b8352602092830192919091019060010161479b565b5050505092915050565b600082601f8301126147e2578081fd5b81356147f061471582615b14565b8181529150602080830190840160005b838110156147c8576148188760208435890101614912565b83526020928301929190910190600101614800565b600082601f83011261483d578081fd5b813561484b61471582615b14565b81815291506020808301908481018184028601820187101561486c57600080fd5b60005b848110156147625781358452928201929082019060010161486f565b600082601f83011261489b578081fd5b813567ffffffffffffffff8111156148b1578182fd5b6148e260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601615aed565b91508082528360208285010111156148f957600080fd5b8060208401602084013760009082016020015292915050565b60006101c0808385031215614925578182fd5b61492e81615aed565b91505061493b83836146d3565b815261494a83602084016146d3565b602082015261495c83604084016146d3565b604082015261496e83606084016146d3565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff808211156149d057600080fd5b6149dc8683870161488b565b838501526101609250828501359150808211156149f857600080fd5b614a048683870161488b565b83850152610180925082850135915080821115614a2057600080fd5b614a2c8683870161488b565b838501526101a0925082850135915080821115614a4857600080fd5b50614a558582860161488b565b82840152505092915050565b600060a08284031215614a72578081fd5b614a7c60a0615aed565b90508135815260208201356020820152604082013560408201526060820135614aa481615b88565b6060820152608082013567ffffffffffffffff811115614ac357600080fd5b614acf8482850161488b565b60808301525092915050565b600060208284031215614aec578081fd5b61093283836146d3565b60008060408385031215614b08578081fd5b614b1284846146d3565b9150614b2184602085016146d3565b90509250929050565b60008060408385031215614b3c578182fd5b614b4684846146d3565b915060208301358015158114614b5a578182fd5b809150509250929050565b60008060008060808587031215614b7a578182fd5b843567ffffffffffffffff80821115614b91578384fd5b614b9d8883890161476d565b95506020870135915080821115614bb2578384fd5b614bbe888389016146f7565b94506040870135915080821115614bd3578384fd5b614bdf888389016146f7565b93506060870135915080821115614bf4578283fd5b50614c018782880161482d565b91505092959194509250565b600060208284031215614c1e578081fd5b813567ffffffffffffffff811115614c34578182fd5b610b37848285016147d2565b60008060008060808587031215614c55578182fd5b843567ffffffffffffffff80821115614c6c578384fd5b614c78888389016147d2565b95506020870135915080821115614c8d578384fd5b614c99888389016147d2565b94506040870135915080821115614cae578384fd5b614cba8883890161476d565b93506060870135915080821115614ccf578283fd5b50614c018782880161476d565b600080600060608486031215614cf0578081fd5b833567ffffffffffffffff80821115614d07578283fd5b614d13878388016147d2565b94506020860135915080821115614d28578283fd5b614d348783880161482d565b93506040860135915080821115614d49578283fd5b50614d568682870161476d565b9150509250925092565b600080600060608486031215614d74578081fd5b833567ffffffffffffffff80821115614d8b578283fd5b614d97878388016147d2565b9450602086013593506040860135915080821115614d49578283fd5b60008060408385031215614dc5578182fd5b823567ffffffffffffffff80821115614ddc578384fd5b81850186601f820112614ded578485fd5b80359250614dfd61471584615b14565b83815260208082019190838101885b87811015614e3557614e238c848435890101614a61565b85529382019390820190600101614e0c565b50919750880135945050505080821115614e4d578283fd5b50614e5a8582860161476d565b9150509250929050565b600060208284031215614e75578081fd5b5035919050565b60008060408385031215614e8e578182fd5b823591506020830135614b5a81615b88565b600080600060608486031215614eb4578081fd5b833592506020840135614ec681615b88565b9150604084013567ffffffffffffffff811115614ee1578182fd5b614d568682870161488b565b600060208284031215614efe578081fd5b813561093281615baa565b600060208284031215614f1a578081fd5b815161093281615baa565b600060a0828403128015614f37578182fd5b8015614f41578182fd5b50614f4c60a0615aed565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600060208284031215614f93578081fd5b813567ffffffffffffffff811115614fa9578182fd5b610b3784828501614912565b60008060408385031215614fc7578182fd5b823567ffffffffffffffff80821115614fde578384fd5b614fea86838701614912565b93506020850135915080821115614fff578283fd5b50614e5a8582860161488b565b60008060008060808587031215615021578182fd5b843567ffffffffffffffff80821115615038578384fd5b61504488838901614912565b95506020870135915080821115615059578384fd5b61506588838901614912565b9450604087013591508082111561507a578384fd5b6150868883890161488b565b9350606087013591508082111561509b578283fd5b50614c018782880161488b565b6000806000606084860312156150bc578081fd5b833567ffffffffffffffff808211156150d3578283fd5b6150df87838801614912565b94506020860135935060408601359150808211156150fb578283fd5b50614d568682870161488b565b6000806040838503121561511a578182fd5b823567ffffffffffffffff80821115615131578384fd5b614fea86838701614a61565b73ffffffffffffffffffffffffffffffffffffffff169052565b6000815180845260208401935060208301825b828110156151935761517d8683516151e7565b60a095909501946020919091019060010161516a565b5093949350505050565b600081518084526151b5816020860160208601615b34565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b80518252602081015160208301526040810151604083015260608101516060830152608081015160808301525050565b60006101c061522784845161513d565b6020830151615239602086018261513d565b50604083015161524c604086018261513d565b50606083015161525f606086018261513d565b506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152506101208084015181860152506101408084015182828701526152b88387018261519d565b915050610160915081840151858203838701526152d5828261519d565b9250505061018080840151858303828701526152f1838261519d565b9150506101a091508184015185820383870152613de2828261519d565b60008251615320818460208701615b34565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600073ffffffffffffffffffffffffffffffffffffffff8616825260806020830152615403608083018661519d565b8281036040840152615415818661519d565b8381036060850152615427818661519d565b98975050505050505050565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156154a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261549285835161519d565b94509285019290850190600101615458565b5092979650505050505050565b6000602082526109326020830184615157565b901515815260200190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600085825273ffffffffffffffffffffffffffffffffffffffff8516602083015260806040830152615531608083018561519d565b82810360608401526138a9818561519d565b918252602082015260400190565b600083825260406020830152610b37604083018461519d565b600084825260606020830152615583606083018561519d565b8281036040840152613de2818561519d565b828152604081016155a583615b7e565b8260208301529392505050565b600086825285602083015273ffffffffffffffffffffffffffffffffffffffff808616604084015280851660608401525060a060808301526138a960a083018461519d565b9283526020830191909152604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b600060208252610932602083018461519d565b6000608082526156c6608083018761519d565b73ffffffffffffffffffffffffffffffffffffffff95861660208401529390941660408201526060015292915050565b600060408252615709604083018561519d565b8281036020840152610de6818561519d565b60006060825261572e606083018661519d565b8281036020840152615740818661519d565b91505073ffffffffffffffffffffffffffffffffffffffff83166040830152949350505050565b600061016080835261577b8184018f61519d565b838103602085015261578d818f61519d565b91505082810360408401526157a2818d61519d565b83810360608501526157b4818d61519d565b73ffffffffffffffffffffffffffffffffffffffff9b8c16608086015299909a1660a0840152505060c081019590955260e08501939093526101008401919091526101208301526101409091015295945050505050565b600061581685615b60565b84825283602083015260606040830152610de6606083018461519d565b6020810161584083615b6a565b91905290565b6060810161585385615b6a565b938152602081019290925260409091015290565b6060810161587485615b74565b938152602081019290925273ffffffffffffffffffffffffffffffffffffffff1660409091015290565b6060810161585385615b74565b606081016008851061585357fe5b60006158c486615b7e565b85825284602083015273ffffffffffffffffffffffffffffffffffffffff8416604083015260806060830152613de2608083018461519d565b6040810161590a84615b60565b9281526020015290565b60208082526014908201527f5452414e53464552535f5355434345535346554c000000000000000000000000604082015260600190565b60006020825282516080602084015261596760a0840182615157565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08482030160408501526159a28183615157565b604086015160608601526060860151608086015280935050505092915050565b60a081016107c182846151e7565b6000610180820190506159e48284516151e7565b60208301516159f660a08401826151e7565b5060408301516101408301526060909201516101609091015290565b815160ff168152602080830151908201526040918201519181019190915260600190565b600060408252615a496040830185615217565b90508260208301529392505050565b600060608252615a6b6060830186615217565b8460208401528281036040840152613de2818561519d565b60006040825283516040830152602084015160608301526040840151608083015273ffffffffffffffffffffffffffffffffffffffff60608501511660a0830152608084015160a060c0840152615add60e084018261519d565b9150508260208301529392505050565b60405181810167ffffffffffffffff81118282101715615b0c57600080fd5b604052919050565b600067ffffffffffffffff821115615b2a578081fd5b5060209081020190565b60005b83811015615b4f578181015183820152602001615b37565b838111156133265750506000910152565b6002811061080f57fe5b6004811061080f57fe5b6003811061080f57fe5b6007811061080f57fe5b73ffffffffffffffffffffffffffffffffffffffff8116811461080f57600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461080f57600080fd5b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a090209056fea365627a7a723158206fc97c5a1d6fde6b2ada9eb4429966e52d7e2da39180893c04bf55c840b346a16c6578706572696d656e74616cf564736f6c634300050c0040'; + public static deployedBytecode: string | undefined; public EIP1271_MAGIC_VALUE = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -280,8 +279,9 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( @@ -301,7 +301,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchCancelOrders.callAsync(orders, txData); + await self.batchCancelOrders.callAsync(orders, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -333,8 +333,9 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; const txHashPromise = self.batchCancelOrders.sendTransactionAsync(orders, txData, opts); @@ -520,8 +521,9 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; @@ -542,7 +544,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchExecuteTransactions.callAsync(transactions, signatures, txData); + await self.batchExecuteTransactions.callAsync(transactions, signatures, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -568,8 +570,9 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; @@ -758,8 +761,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -781,7 +785,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchFillOrKillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); + await self.batchFillOrKillOrders.callAsync( + orders, + takerAssetFillAmounts, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -818,8 +827,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1062,8 +1072,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1085,7 +1096,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchFillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txData); + await self.batchFillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1122,8 +1133,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1366,8 +1378,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1389,7 +1402,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchFillOrdersNoThrow.callAsync(orders, takerAssetFillAmounts, signatures, txData); + await self.batchFillOrdersNoThrow.callAsync( + orders, + takerAssetFillAmounts, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1426,8 +1444,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1690,8 +1709,9 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -1714,7 +1734,13 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.batchMatchOrders.callAsync(leftOrders, rightOrders, leftSignatures, rightSignatures, txData); + await self.batchMatchOrders.callAsync( + leftOrders, + rightOrders, + leftSignatures, + rightSignatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1769,8 +1795,9 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2111,8 +2138,9 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2140,7 +2168,7 @@ export class ExchangeContract extends BaseContract { rightOrders, leftSignatures, rightSignatures, - txData, + txDataWithDefaults, ); } @@ -2196,8 +2224,9 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2512,8 +2541,10 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', @@ -2532,7 +2563,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.cancelOrder.callAsync(order, txData); + await self.cancelOrder.callAsync(order, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -2564,8 +2595,10 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( @@ -2738,8 +2771,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( targetOrderEpoch: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch]); @@ -2756,7 +2790,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.cancelOrdersUpTo.callAsync(targetOrderEpoch, txData); + await self.cancelOrdersUpTo.callAsync(targetOrderEpoch, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -2774,8 +2808,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( targetOrderEpoch: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, txData, opts); @@ -2995,8 +3030,10 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('signature', signature); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( @@ -3016,7 +3053,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.executeTransaction.callAsync(transaction, signature, txData); + await self.executeTransaction.callAsync(transaction, signature, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -3041,8 +3078,10 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('signature', signature); const self = (this as any) as ExchangeContract; const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction, signature, txData, opts); @@ -3218,8 +3257,10 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3240,7 +3281,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.fillOrKillOrder.callAsync(order, takerAssetFillAmount, signature, txData); + await self.fillOrKillOrder.callAsync(order, takerAssetFillAmount, signature, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -3276,8 +3317,10 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3507,8 +3550,10 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3529,7 +3574,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.fillOrder.callAsync(order, takerAssetFillAmount, signature, txData); + await self.fillOrder.callAsync(order, takerAssetFillAmount, signature, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -3565,8 +3610,10 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -4179,8 +4226,9 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4202,7 +4250,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.marketBuyOrdersFillOrKill.callAsync(orders, makerAssetFillAmount, signatures, txData); + await self.marketBuyOrdersFillOrKill.callAsync( + orders, + makerAssetFillAmount, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -4238,8 +4291,9 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4476,8 +4530,9 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4499,7 +4554,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.marketBuyOrdersNoThrow.callAsync(orders, makerAssetFillAmount, signatures, txData); + await self.marketBuyOrdersNoThrow.callAsync( + orders, + makerAssetFillAmount, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -4535,8 +4595,9 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4772,8 +4833,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4795,7 +4857,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.marketSellOrdersFillOrKill.callAsync(orders, takerAssetFillAmount, signatures, txData); + await self.marketSellOrdersFillOrKill.callAsync( + orders, + takerAssetFillAmount, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -4831,8 +4898,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5069,8 +5137,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5092,7 +5161,12 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.marketSellOrdersNoThrow.callAsync(orders, takerAssetFillAmount, signatures, txData); + await self.marketSellOrdersNoThrow.callAsync( + orders, + takerAssetFillAmount, + signatures, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -5128,8 +5202,9 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5384,8 +5459,10 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5406,7 +5483,13 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.matchOrders.callAsync(leftOrder, rightOrder, leftSignature, rightSignature, txData); + await self.matchOrders.callAsync( + leftOrder, + rightOrder, + leftSignature, + rightSignature, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -5459,8 +5542,10 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5785,8 +5870,10 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5812,7 +5899,7 @@ export class ExchangeContract extends BaseContract { rightOrder, leftSignature, rightSignature, - txData, + txDataWithDefaults, ); } @@ -5866,8 +5953,10 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -6250,8 +6339,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( hash: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('hash', hash); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('preSign(bytes32)', [hash]); @@ -6268,7 +6358,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.preSign.callAsync(hash, txData); + await self.preSign.callAsync(hash, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -6285,8 +6375,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( hash: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('hash', hash); const self = (this as any) as ExchangeContract; const txHashPromise = self.preSign.sendTransactionAsync(hash, txData, opts); @@ -6538,8 +6629,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( assetProxy: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -6556,7 +6648,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.registerAssetProxy.callAsync(assetProxy, txData); + await self.registerAssetProxy.callAsync(assetProxy, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -6573,8 +6665,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); @@ -6693,8 +6786,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( updatedProtocolFeeCollector: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('setProtocolFeeCollectorAddress(address)', [ @@ -6713,7 +6807,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.setProtocolFeeCollectorAddress.callAsync(updatedProtocolFeeCollector, txData); + await self.setProtocolFeeCollectorAddress.callAsync(updatedProtocolFeeCollector, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -6731,8 +6825,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeCollector: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeCollectorAddress.sendTransactionAsync( @@ -6864,8 +6959,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('setProtocolFeeMultiplier(uint256)', [ @@ -6884,7 +6980,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.setProtocolFeeMultiplier.callAsync(updatedProtocolFeeMultiplier, txData); + await self.setProtocolFeeMultiplier.callAsync(updatedProtocolFeeMultiplier, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -6901,8 +6997,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeMultiplier.sendTransactionAsync( @@ -7034,8 +7131,9 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); const self = (this as any) as ExchangeContract; @@ -7056,7 +7154,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.setSignatureValidatorApproval.callAsync(validatorAddress, approval, txData); + await self.setSignatureValidatorApproval.callAsync(validatorAddress, approval, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -7075,8 +7173,9 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); const self = (this as any) as ExchangeContract; @@ -7228,8 +7327,9 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); assert.isArray('toAddresses', toAddresses); @@ -7257,7 +7357,7 @@ export class ExchangeContract extends BaseContract { fromAddresses, toAddresses, amounts, - txData, + txDataWithDefaults, ); } @@ -7285,8 +7385,9 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); assert.isArray('toAddresses', toAddresses); @@ -7512,8 +7613,9 @@ export class ExchangeContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -7530,7 +7632,7 @@ export class ExchangeContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -7546,8 +7648,9 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 55ead667a2..e3a28b3adf 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -31,8 +31,7 @@ export class ForwarderContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x6080604052600436106100655760003560e01c8063942d33c011610043578063942d33c014610102578063ae93b97a14610124578063f2fde38b1461013757610065565b8063442026ed14610097578063630f1e6c146100b75780638da5cb5b146100d7575b60025473ffffffffffffffffffffffffffffffffffffffff1633146100955761009561009033610157565b6101f6565b005b3480156100a357600080fd5b506100956100b2366004611bc6565b6101fe565b3480156100c357600080fd5b506100956100d2366004611c06565b6104a8565b3480156100e357600080fd5b506100ec6104f1565b6040516100f99190611dc0565b60405180910390f35b610115610110366004611b1d565b61050d565b6040516100f993929190612047565b610115610132366004611aa0565b610542565b34801561014357600080fd5b50610095610152366004611a68565b61059d565b60606308b1869860e01b826040516024016101729190611dc0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b600061024a600084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff610614169050565b905060405161025890611d97565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156104a35760015460405160009173ffffffffffffffffffffffffffffffffffffffff16906360704108906102d490611d97565b6040519081900381207fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16825261031291600401611e5f565b60206040518083038186803b15801561032a57600080fd5b505afa15801561033e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506103629190810190611a84565b905073ffffffffffffffffffffffffffffffffffffffff811661038a5761038a61009061066a565b60006103d6601086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff6106c4169050565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063095ea7b39061044d9085907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90600401611de1565b602060405180830381600087803b15801561046757600080fd5b505af115801561047b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061049f9190810190611ba6565b5050505b505050565b6104b0610704565b6104a383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085925061074d915050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600080600061051a610838565b6105258888886108cd565b90935091506105358386866109f0565b9050955095509592505050565b600080600061054f610838565b6000610573670de0b6b3a764000061056d888263ffffffff610b8f16565b34610bb2565b9050610580888289610bdc565b90945092506105908487876109f0565b9150509450945094915050565b6105a5610704565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576105cb610090610d9f565b610611565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60008160040183511015610635576106356100906003855185600401610dd6565b5060208183018101519101907fffffffff00000000000000000000000000000000000000000000000000000000165b92915050565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff3b96b8d0000000000000000000000000000000000000000000000000000000017905290565b600081601401835110156106e5576106e56100906004855185601401610dd6565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331461074b5760005461074b9061009090339073ffffffffffffffffffffffffffffffffffffffff16610e7b565b565b600061075f838263ffffffff61061416565b905060405161076d90611d97565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156107c9576107c48383610f1d565b6104a3565b6040516107d590611d45565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561082c576107c48383611085565b6104a361009082611152565b346108485761084861009061116d565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156108b257600080fd5b505af11580156108c6573d6000803e3d6000fd5b5050505050565b82516000908190815b8181146109d1578681815181106108e957fe5b6020026020010151608001516000148061091a575086818151811061090a57fe5b602002602001015160a001516000145b15610924576109c9565b6000610936878563ffffffff6111c716565b905060008061096c8a858151811061094a57fe5b602002602001015189868151811061095e57fe5b6020026020010151856111e6565b915091506109928a858151811061097f57fe5b602002602001015161014001518261074d565b6109a2878363ffffffff610b8f16565b96506109b4868263ffffffff610b8f16565b95508886106109c5575050506109d1565b5050505b6001016108d6565b50848210156109e7576109e76100908684611339565b50935093915050565b600066b1a2bc2ec50000831115610a0d57610a0d61009084611356565b34841115610a2257610a226100908534611371565b6000610a34348663ffffffff6111c716565b9050610a4984670de0b6b3a764000087610bb2565b915080821115610a6057610a60610090838361138e565b8015610b87576002546040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90610abc908490600401612030565b600060405180830381600087803b158015610ad657600080fd5b505af1158015610aea573d6000803e3d6000fd5b505050506000821115610b3c5760405173ffffffffffffffffffffffffffffffffffffffff84169083156108fc029084906000818181858888f19350505050158015610b3a573d6000803e3d6000fd5b505b6000610b4e828463ffffffff6111c716565b90508015610b8557604051339082156108fc029083906000818181858888f19350505050158015610b83573d6000803e3d6000fd5b505b505b509392505050565b600082820183811015610bab57610bab610090600086866113ab565b9392505050565b6000610bd483610bc8868563ffffffff6113ca16565b9063ffffffff6113fb16565b949350505050565b6000806000855190506000610c97600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ce4c78b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5257600080fd5b505afa158015610c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c8a9190810190611cad565b3a9063ffffffff6113ca16565b905060005b828114610d9457878181518110610caf57fe5b60200260200101516080015160001480610ce05750878181518110610cd057fe5b602002602001015160a001516000145b15610cea57610d8c565b6000610d0c83610d008a8963ffffffff6111c716565b9063ffffffff6111c716565b9050600080610d428b8581518110610d2057fe5b60200260200101518a8681518110610d3457fe5b602002602001015185611425565b91509150610d558b858151811061097f57fe5b610d65888363ffffffff610b8f16565b9750610d77878263ffffffff610b8f16565b9650898810610d8857505050610d94565b5050505b600101610c9c565b505050935093915050565b60408051808201909152600481527fe69edc3e00000000000000000000000000000000000000000000000000000000602082015290565b6060632800659560e01b848484604051602401610df593929190611ec1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b6060631de45ad160e01b8383604051602401610e98929190611e07565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b6000610f3083601063ffffffff6106c416565b9050600060608273ffffffffffffffffffffffffffffffffffffffff16604051610f5990611d6e565b60405180910390203386604051602401610f74929190611de1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610ffd9190611d29565b6000604051808303816000865af19150503d806000811461103a576040519150601f19603f3d011682016040523d82523d6000602084013e61103f565b606091505b50915091508161105557611055610090826114ea565b3d15611074576000915060203d14156110745760206000803e60005191505b816108c6576108c6610090826114ea565b806001146110995761109961009082611505565b60006110ac83601063ffffffff6106c416565b905060006110c184602463ffffffff61152016565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8316906323b872dd9061111a90309033908690600401611e2e565b600060405180830381600087803b15801561113457600080fd5b505af1158015611148573d6000803e3d6000fd5b5050505050505050565b6060637996a27160e01b826040516024016101729190611e5f565b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8c0e562b0000000000000000000000000000000000000000000000000000000017905290565b6000828211156111e0576111e0610090600285856113ab565b50900390565b6000808460e001516000148061121257506101608501516101a08601516112129163ffffffff61152c16565b1561128057600061122c8660a00151876080015186611552565b905061123661172e565b61124187838861157c565b9050611272816080015161126683606001518460200151610b8f90919063ffffffff16565b9063ffffffff610b8f16565b905190935091506113319050565b6101408501516101a086015161129b9163ffffffff61152c16565b156113205760006112cb8660a001516112c58860e0015189608001516111c790919063ffffffff16565b86611552565b90506112d561172e565b6112e087838861157c565b90506112fd81608001518260200151610b8f90919063ffffffff16565b60608201518251919550611317919063ffffffff6111c716565b92505050611331565b611331610090866101a001516116e9565b935093915050565b60606391353a0c60e01b8383604051602401610e98929190612039565b6060631174fb8060e01b826040516024016101729190612030565b606063cdcbed5d60e01b8383604051602401610e98929190612039565b606063ecf40fd960e01b8383604051602401610e98929190612039565b606063e946c1bb60e01b848484604051602401610df593929190611e9f565b6000826113d957506000610664565b828202828482816113e657fe5b0414610bab57610bab610090600186866113ab565b60008161141157611411610090600385856113ab565b600082848161141c57fe5b04949350505050565b6000808460e001516000148061145157506101408501516101a08601516114519163ffffffff61152c16565b156114a85761145e61172e565b61146986858761157c565b905061148681608001518260200151610b8f90919063ffffffff16565b606082015182519194506114a0919063ffffffff6111c716565b915050611331565b6101608501516101a08601516114c39163ffffffff61152c16565b156113205760a085015160e086015160009161122c916112c590829063ffffffff610b8f16565b6060635e7eb60f60e01b826040516024016101729190611e8c565b606063baffa47460e01b826040516024016101729190612030565b6000610bab8383611704565b600081518351148015610bab575081805190602001208380519060200120149392505050565b6000610bd483610bc861156c82600163ffffffff6111c716565b611266888763ffffffff6113ca16565b61158461172e565b6040516060907f9b44d55600000000000000000000000000000000000000000000000000000000906115be90879087908790602401611ecf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600154915190925073ffffffffffffffffffffffffffffffffffffffff90911690600090606090839061166f908690611d29565b6000604051808303816000865af19150503d80600081146116ac576040519150601f19603f3d011682016040523d82523d6000602084013e6116b1565b606091505b509150915081156116de57805160a0146116c757fe5b808060200190516116db9190810190611c50565b94505b505050509392505050565b60606331360af160e01b826040516024016101729190611e8c565b60008160200183511015611725576117256100906005855185602001610dd6565b50016020015190565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8035610664816120d4565b600082601f830112611778578081fd5b813561178b61178682612084565b61205d565b8181529150602080830190840160005b838110156117c8576117b387602084358901016119e1565b8352602092830192919091019060010161179b565b5050505092915050565b600082601f8301126117e2578081fd5b81356117f061178682612084565b818152915060208083019084810160005b8481101561198f57813587016101c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c0301121561184157600080fd5b61184a8161205d565b6118568b87850161175d565b81526118658b6040850161175d565b868201526118768b6060850161175d565b60408201526118888b6080850161175d565b606082015260a0830135608082015260c083013560a082015260e083013560c08201526101008084013560e0830152610120808501358284015261014091508185013581840152506101608085013567ffffffffffffffff808211156118ed57600080fd5b6118fb8f8b848a01016119e1565b8486015261018093508387013591508082111561191757600080fd5b6119258f8b848a01016119e1565b838601526101a092508287013591508082111561194157600080fd5b61194f8f8b848a01016119e1565b848601528587013593508084111561196657600080fd5b50506119768d89848801016119e1565b9083015250865250509282019290820190600101611801565b505050505092915050565b60008083601f8401126119ab578182fd5b50813567ffffffffffffffff8111156119c2578182fd5b6020830191508360208285010111156119da57600080fd5b9250929050565b600082601f8301126119f1578081fd5b813567ffffffffffffffff811115611a07578182fd5b611a3860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161205d565b9150808252836020828501011115611a4f57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611a79578081fd5b8135610bab816120d4565b600060208284031215611a95578081fd5b8151610bab816120d4565b60008060008060808587031215611ab5578283fd5b843567ffffffffffffffff80821115611acc578485fd5b611ad8888389016117d2565b95506020870135915080821115611aed578485fd5b50611afa87828801611768565b935050604085013591506060850135611b12816120d4565b939692955090935050565b600080600080600060a08688031215611b34578081fd5b853567ffffffffffffffff80821115611b4b578283fd5b611b5789838a016117d2565b9650602088013595506040880135915080821115611b73578283fd5b50611b8088828901611768565b935050606086013591506080860135611b98816120d4565b809150509295509295909350565b600060208284031215611bb7578081fd5b81518015158114610bab578182fd5b60008060208385031215611bd8578182fd5b823567ffffffffffffffff811115611bee578283fd5b611bfa8582860161199a565b90969095509350505050565b600080600060408486031215611c1a578283fd5b833567ffffffffffffffff811115611c30578384fd5b611c3c8682870161199a565b909790965060209590950135949350505050565b600060a0828403128015611c62578182fd5b8015611c6c578182fd5b50611c7760a061205d565b82518152602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600060208284031215611cbe578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff169052565b60008151808452611cf78160208601602086016120a4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611d3b8184602087016120a4565b9190910192915050565b7f455243373231546f6b656e28616464726573732c75696e7432353629000000008152601c0190565b7f7472616e7366657228616464726573732c75696e743235362900000000000000815260190190565b7f4552433230546f6b656e28616464726573732900000000000000000000000000815260130190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b600060208252610bab6020830184611cdf565b6060810160048510611ead57fe5b938152602081019290925260409091015290565b6060810160088510611ead57fe5b600060608252611ee3606083018651611cc5565b6020850151611ef56080840182611cc5565b506040850151611f0860a0840182611cc5565b506060850151611f1b60c0840182611cc5565b50608085015160e083015260a0850151610100818185015260c08701519150610120828186015260e0880151925061014083818701528289015193506101609250838387015281890151935061018091508382870152808901519350506101c06101a08181880152611f91610220880186611cdf565b848b015195507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa09450848882030183890152611fcd8187611cdf565b925050828a0151945083878303016101e0880152611feb8286611cdf565b9250808a015194505050818582030161020086015261200a8184611cdf565b91505085602085015283810360408501526120258186611cdf565b979650505050505050565b90815260200190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff8111828210171561207c57600080fd5b604052919050565b600067ffffffffffffffff82111561209a578081fd5b5060209081020190565b60005b838110156120bf5781810151838201526020016120a7565b838111156120ce576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461061157600080fdfea365627a7a72315820afeb88c9cc19090963cb885eb76d709ca1a151f8f73996031898e2b50578a89b6c6578706572696d656e74616cf564736f6c634300050c0040'; + public static deployedBytecode: string | undefined; /** * Approves the respective proxy for a given asset to transfer tokens on the Forwarder contract's behalf. * This is necessary because an order fee denominated in the maker asset (i.e. a percentage fee) is sent by the @@ -51,8 +50,9 @@ export class ForwarderContract extends BaseContract { async sendTransactionAsync( assetData: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('approveMakerAssetProxy(bytes)', [assetData]); @@ -69,7 +69,7 @@ export class ForwarderContract extends BaseContract { } if (opts.shouldValidate) { - await self.approveMakerAssetProxy.callAsync(assetData, txData); + await self.approveMakerAssetProxy.callAsync(assetData, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -86,8 +86,9 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( assetData: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; const txHashPromise = self.approveMakerAssetProxy.sendTransactionAsync(assetData, txData, opts); @@ -227,8 +228,9 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); assert.isArray('signatures', signatures); @@ -258,7 +260,7 @@ export class ForwarderContract extends BaseContract { signatures, feePercentage, feeRecipient, - txData, + txDataWithDefaults, ); } @@ -301,8 +303,9 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); assert.isArray('signatures', signatures); @@ -558,8 +561,9 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('signatures', signatures); assert.isBigNumber('feePercentage', feePercentage); @@ -582,7 +586,13 @@ export class ForwarderContract extends BaseContract { } if (opts.shouldValidate) { - await self.marketSellOrdersWithEth.callAsync(orders, signatures, feePercentage, feeRecipient, txData); + await self.marketSellOrdersWithEth.callAsync( + orders, + signatures, + feePercentage, + feeRecipient, + txDataWithDefaults, + ); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -622,8 +632,9 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('signatures', signatures); assert.isBigNumber('feePercentage', feePercentage); @@ -883,8 +894,9 @@ export class ForwarderContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -901,7 +913,7 @@ export class ForwarderContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -917,8 +929,9 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); @@ -1033,8 +1046,9 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); const self = (this as any) as ForwarderContract; @@ -1052,7 +1066,7 @@ export class ForwarderContract extends BaseContract { } if (opts.shouldValidate) { - await self.withdrawAsset.callAsync(assetData, amount, txData); + await self.withdrawAsset.callAsync(assetData, amount, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1071,8 +1085,9 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); const self = (this as any) as ForwarderContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index d844e04f3e..c63ac01674 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -52,8 +52,9 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -78,7 +79,7 @@ export class IAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(assetData, from, to, amount, txData); + await self.transferFrom.callAsync(assetData, from, to, amount, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -101,8 +102,9 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index c52398fcec..d673b4fb61 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 22d1c9e94a..45676b311f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index 3e6afe6c91..a1f2e4c22e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -118,8 +118,9 @@ export class MultiAssetProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -136,7 +137,7 @@ export class MultiAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.addAuthorizedAddress.callAsync(target, txData); + await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -153,8 +154,9 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -369,8 +371,9 @@ export class MultiAssetProxyContract extends BaseContract { async sendTransactionAsync( target: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -387,7 +390,7 @@ export class MultiAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddress.callAsync(target, txData); + await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -404,8 +407,9 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -564,8 +568,9 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as MultiAssetProxyContract; @@ -586,7 +591,7 @@ export class MultiAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txData); + await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -605,8 +610,9 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as MultiAssetProxyContract; @@ -836,8 +842,9 @@ export class MultiAssetProxyContract extends BaseContract { async sendTransactionAsync( assetProxy: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -854,7 +861,7 @@ export class MultiAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.registerAssetProxy.callAsync(assetProxy, txData); + await self.registerAssetProxy.callAsync(assetProxy, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -871,8 +878,9 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); @@ -1033,8 +1041,9 @@ export class MultiAssetProxyContract extends BaseContract { async sendTransactionAsync( newOwner: string, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1051,7 +1060,7 @@ export class MultiAssetProxyContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferOwnership.callAsync(newOwner, txData); + await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1067,8 +1076,9 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index 57f68822b9..2811567a2a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts index 27da63136f..2187973f03 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 5d1563c424..4d1f4d27a6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -67,8 +67,7 @@ export class WETH9Contract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x6080604052600436106100925760003560e01c63ffffffff16806306fdde031461009c578063095ea7b31461012657806318160ddd1461016b57806323b872dd146101925780632e1a7d4d146101c9578063313ce567146101e157806370a082311461020c57806395d89b411461023a578063a9059cbb1461024f578063d0e30db014610092578063dd62ed3e14610280575b61009a6102b4565b005b3480156100a857600080fd5b506100b1610303565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100eb5781810151838201526020016100d3565b50505050905090810190601f1680156101185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013257600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff600435166024356103af565b604080519115158252519081900360200190f35b34801561017757600080fd5b50610180610422565b60408051918252519081900360200190f35b34801561019e57600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610427565b3480156101d557600080fd5b5061009a6004356105c7565b3480156101ed57600080fd5b506101f661065c565b6040805160ff9092168252519081900360200190f35b34801561021857600080fd5b5061018073ffffffffffffffffffffffffffffffffffffffff60043516610665565b34801561024657600080fd5b506100b1610677565b34801561025b57600080fd5b5061015773ffffffffffffffffffffffffffffffffffffffff600435166024356106ef565b34801561028c57600080fd5b5061018073ffffffffffffffffffffffffffffffffffffffff60043581169060243516610703565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103a75780601f1061037c576101008083540402835291602001916103a7565b820191906000526020600020905b81548152906001019060200180831161038a57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b303190565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205482111561045957600080fd5b73ffffffffffffffffffffffffffffffffffffffff841633148015906104cf575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105495773ffffffffffffffffffffffffffffffffffffffff8416600090815260046020908152604080832033845290915290205482111561051157600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b336000908152600360205260409020548111156105e357600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610622573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103a75780601f1061037c576101008083540402835291602001916103a7565b60006106fc338484610427565b9392505050565b6004602090815260009283526040808420909152908252902054815600a165627a7a723058201ebe888a6b56dd871f599adbe0f19ec3c29c28aec0685788dfac9b37a99fc9d20029'; + public static deployedBytecode: string | undefined; public name = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -123,8 +122,9 @@ export class WETH9Contract extends BaseContract { guy: string, wad: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -142,7 +142,7 @@ export class WETH9Contract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(guy, wad, txData); + await self.approve.callAsync(guy, wad, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -159,8 +159,9 @@ export class WETH9Contract extends BaseContract { guy: string, wad: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -322,8 +323,9 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('src', src); assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -346,7 +348,7 @@ export class WETH9Contract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(src, dst, wad, txData); + await self.transferFrom.callAsync(src, dst, wad, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -364,8 +366,9 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('src', src); assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -507,8 +510,9 @@ export class WETH9Contract extends BaseContract { async sendTransactionAsync( wad: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); @@ -525,7 +529,7 @@ export class WETH9Contract extends BaseContract { } if (opts.shouldValidate) { - await self.withdraw.callAsync(wad, txData); + await self.withdraw.callAsync(wad, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -541,8 +545,9 @@ export class WETH9Contract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); @@ -782,8 +787,9 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -801,7 +807,7 @@ export class WETH9Contract extends BaseContract { } if (opts.shouldValidate) { - await self.transfer.callAsync(dst, wad, txData); + await self.transfer.callAsync(dst, wad, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -818,8 +824,9 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -935,8 +942,9 @@ export class WETH9Contract extends BaseContract { */ async sendTransactionAsync( txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('deposit()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -952,7 +960,7 @@ export class WETH9Contract extends BaseContract { } if (opts.shouldValidate) { - await self.deposit.callAsync(txData); + await self.deposit.callAsync(txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -967,8 +975,9 @@ export class WETH9Contract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as WETH9Contract; const txHashPromise = self.deposit.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index b8280b015d..d95f93b9fd 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -19,7 +19,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -51,8 +51,7 @@ export class ZRXTokenContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a72305820d984298155c708a8164f1cbf83c7275bcc6851dd082c0404013c1f4463b238fa0029'; + public static deployedBytecode: string | undefined; public name = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an @@ -107,8 +106,9 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -129,7 +129,7 @@ export class ZRXTokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.approve.callAsync(_spender, _value, txData); + await self.approve.callAsync(_spender, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -146,8 +146,9 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -325,8 +326,9 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -349,7 +351,7 @@ export class ZRXTokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transferFrom.callAsync(_from, _to, _value, txData); + await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -370,8 +372,9 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -658,8 +661,9 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -677,7 +681,7 @@ export class ZRXTokenContract extends BaseContract { } if (opts.shouldValidate) { - await self.transfer.callAsync(_to, _value, txData); + await self.transfer.callAsync(_to, _value, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -694,8 +698,9 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index e35586ca43..b1cbfed930 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -79,9 +79,11 @@ "yargs": "^10.0.3" }, "devDependencies": { + "@0x/assert": "^2.2.0-beta.0", "@0x/base-contract": "^5.5.0-beta.0", "@0x/contracts-gen": "^1.1.0-beta.0", "@0x/dev-utils": "^2.4.0-beta.0", + "@0x/json-schemas": "^4.1.0-beta.0", "@0x/sol-compiler": "^3.2.0-beta.0", "@0x/subproviders": "^5.1.0-beta.0", "@0x/tslint-config": "^3.0.1", @@ -96,6 +98,7 @@ "chai-as-promised": "^7.1.0", "chai-bignumber": "^3.0.0", "dirty-chai": "^2.0.1", + "ethers": "~4.0.4", "make-promises-safe": "^1.1.0", "mocha": "^6.2.0", "npm-run-all": "^4.1.2", diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index a5902a5cff..143ec23924 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -46,7 +46,7 @@ const args = yargs }) .option('debug', { describe: 'Enable debug functions', - type: 'count', + type: 'boolean', }) .option('partials', { describe: 'Glob pattern for the partial template files', @@ -420,15 +420,17 @@ for (const abiFileName of abiFileNames) { return eventData; }); + const shouldIncludeBytecode = methodsData.find(methodData => methodData.stateMutability === 'pure') !== undefined; + const contextData = { contractName: namedContent.name, ctor, - deployedBytecode, + deployedBytecode: shouldIncludeBytecode ? deployedBytecode : undefined, ABI: ABI as ContractAbi, ABIString: JSON.stringify(ABI), methods: methodsData, events: eventsData, - debug: args.debug > 0, + debug: args.debug, }; const renderedCode = template(contextData); utils.writeOutputFile(outFilePath, renderedCode); diff --git a/packages/abi-gen/templates/TypeScript/contract.handlebars b/packages/abi-gen/templates/TypeScript/contract.handlebars index 8913d14cb2..afaef02a50 100644 --- a/packages/abi-gen/templates/TypeScript/contract.handlebars +++ b/packages/abi-gen/templates/TypeScript/contract.handlebars @@ -20,7 +20,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars index 01b38ef45f..5d051a7d86 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars @@ -8,8 +8,9 @@ async sendTransactionAsync( {{> typed_params inputs=inputs}} txData?: Partial | undefined, -opts: TxOpts = { shouldValidate: true }, +opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); {{#each inputs}} {{#assertionType name type}}{{/assertionType}} {{/each}} @@ -50,8 +51,9 @@ opts: TxOpts = { shouldValidate: true }, awaitTransactionSuccessAsync( {{> typed_params inputs=inputs}} txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); {{#each inputs}} {{#assertionType name type}}{{/assertionType}} {{/each}} diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json index 355fe2119a..d6f248d320 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/AbiGenDummy.json @@ -4,144 +4,100 @@ "compilerOutput": { "abi": [ { - "anonymous": false, + "constant": true, + "inputs": [], + "name": "simpleRequire", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, "inputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "string", - "name": "someString", - "type": "string" + "internalType": "bytes[]", + "name": "a", + "type": "bytes[]" } ], - "name": "SimpleEvent", - "type": "event" + "name": "acceptsAnArrayOfBytes", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "_value", + "name": "", "type": "uint256" } ], - "name": "Withdrawal", - "type": "event" - }, - { - "constant": true, - "inputs": [ + "name": "simpleInputSimpleOutput", + "outputs": [ { - "internalType": "bytes[]", - "name": "a", - "type": "bytes[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "acceptsAnArrayOfBytes", - "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "bytes", - "name": "a", - "type": "bytes" + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "name": "acceptsBytes", + "name": "withdraw", "outputs": [], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "foo", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "bar", - "type": "bytes" - }, - { - "internalType": "string", - "name": "car", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexInput", - "name": "complexInput", - "type": "tuple" + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "complexInputComplexOutput", + "name": "multiInputMultiOutput", "outputs": [ { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "foo", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "bar", - "type": "bytes" - }, - { - "internalType": "string", - "name": "car", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexInput", - "name": "input", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "lorem", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "ipsum", - "type": "bytes" - }, - { - "internalType": "string", - "name": "dolor", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.ComplexOutput", + "internalType": "bytes", "name": "", - "type": "tuple" + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "string", + "name": "", + "type": "string" } ], "payable": false, @@ -184,48 +140,17 @@ "stateMutability": "pure", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "emitSimpleEvent", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, - "inputs": [], - "name": "methodReturningArrayOfStructs", - "outputs": [ + "inputs": [ { - "components": [ - { - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "anInteger", - "type": "uint32" - }, - { - "internalType": "bytes[]", - "name": "aDynamicArrayOfBytes", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "aString", - "type": "string" - } - ], - "internalType": "struct AbiGenDummy.Struct[]", - "name": "", - "type": "tuple[]" + "internalType": "bytes", + "name": "a", + "type": "bytes" } ], + "name": "acceptsBytes", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" @@ -233,17 +158,12 @@ { "constant": true, "inputs": [], - "name": "methodReturningMultipleValues", + "name": "noInputSimpleOutput", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - }, - { - "internalType": "string", - "name": "", - "type": "string" } ], "payable": false, @@ -253,118 +173,46 @@ { "constant": true, "inputs": [], - "name": "methodUsingNestedStructWithInnerStructNotUsedElsewhere", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "aField", - "type": "uint256" - } - ], - "internalType": "struct AbiGenDummy.StructNotDirectlyUsedAnywhere", - "name": "innerStruct", - "type": "tuple" - } - ], - "internalType": "struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere", - "name": "", - "type": "tuple" - } - ], + "name": "revertWithConstant", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "multiInputMultiOutput", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - }, - { - "internalType": "string", - "name": "", - "type": "string" - } - ], + "inputs": [], + "name": "simpleRevert", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "methodUsingNestedStructWithInnerStructNotUsedElsewhere", + "outputs": [ { "components": [ { "components": [ { - "internalType": "bytes", - "name": "someBytes", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "anInteger", - "type": "uint32" - }, - { - "internalType": "bytes[]", - "name": "aDynamicArrayOfBytes", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "aString", - "type": "string" + "internalType": "uint256", + "name": "aField", + "type": "uint256" } ], - "internalType": "struct AbiGenDummy.Struct", + "internalType": "struct AbiGenDummy.StructNotDirectlyUsedAnywhere", "name": "innerStruct", "type": "tuple" - }, - { - "internalType": "string", - "name": "description", - "type": "string" } ], - "internalType": "struct AbiGenDummy.NestedStruct", - "name": "n", + "internalType": "struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere", + "name": "", "type": "tuple" } ], - "name": "nestedStructInput", - "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" @@ -421,7 +269,7 @@ { "constant": true, "inputs": [], - "name": "noInputNoOutput", + "name": "requireWithConstant", "outputs": [], "payable": false, "stateMutability": "pure", @@ -429,108 +277,168 @@ }, { "constant": true, - "inputs": [], - "name": "noInputSimpleOutput", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "x", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "a", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { "internalType": "uint256", - "name": "id", + "name": "b", "type": "uint256" }, + { + "internalType": "address", + "name": "y", + "type": "address" + }, { "internalType": "uint256", - "name": "someValue", + "name": "c", "type": "uint256" } ], - "name": "nonPureFunction", + "name": "withAddressInput", "outputs": [ { - "internalType": "uint256", - "name": "result", - "type": "uint256" + "internalType": "address", + "name": "z", + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "nonPureMethod", - "outputs": [ + "constant": true, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "components": [ + { + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "anInteger", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "aDynamicArrayOfBytes", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "aString", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.Struct", + "name": "s", + "type": "tuple" } ], + "name": "structInput", + "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { "constant": false, "inputs": [], - "name": "nonPureMethodThatReturnsNothing", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ + "name": "nonPureMethod", + "outputs": [ { - "internalType": "string", - "name": "a", - "type": "string" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "overloadedMethod", - "outputs": [], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { - "internalType": "int256", - "name": "a", - "type": "int256" + "components": [ + { + "internalType": "uint256", + "name": "foo", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "bar", + "type": "bytes" + }, + { + "internalType": "string", + "name": "car", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexInput", + "name": "complexInput", + "type": "tuple" } ], - "name": "overloadedMethod", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pureFunctionWithConstant", + "name": "complexInputComplexOutput", "outputs": [ { - "internalType": "uint256", - "name": "someConstant", - "type": "uint256" + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "foo", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "bar", + "type": "bytes" + }, + { + "internalType": "string", + "name": "car", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexInput", + "name": "input", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "lorem", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "ipsum", + "type": "bytes" + }, + { + "internalType": "string", + "name": "dolor", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.ComplexOutput", + "name": "", + "type": "tuple" } ], "payable": false, @@ -540,31 +448,7 @@ { "constant": true, "inputs": [], - "name": "requireWithConstant", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "revertWithConstant", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "simpleInputNoOutput", + "name": "noInputNoOutput", "outputs": [], "payable": false, "stateMutability": "pure", @@ -575,15 +459,15 @@ "inputs": [ { "internalType": "uint256", - "name": "", + "name": "x", "type": "uint256" } ], - "name": "simpleInputSimpleOutput", + "name": "simplePureFunctionWithInput", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "sum", "type": "uint256" } ], @@ -591,6 +475,15 @@ "stateMutability": "pure", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "nonPureMethodThatReturnsNothing", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -610,27 +503,46 @@ "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "x", - "type": "uint256" - } - ], - "name": "simplePureFunctionWithInput", - "outputs": [ - { - "internalType": "uint256", - "name": "sum", - "type": "uint256" + "components": [ + { + "components": [ + { + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "anInteger", + "type": "uint32" + }, + { + "internalType": "bytes[]", + "name": "aDynamicArrayOfBytes", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "aString", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.Struct", + "name": "innerStruct", + "type": "tuple" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "internalType": "struct AbiGenDummy.NestedStruct", + "name": "n", + "type": "tuple" } ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "simpleRequire", + "name": "nestedStructInput", "outputs": [], "payable": false, "stateMutability": "pure", @@ -639,36 +551,28 @@ { "constant": true, "inputs": [], - "name": "simpleRevert", - "outputs": [], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [ + "name": "methodReturningMultipleValues", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "name": "someMapping", - "outputs": [ + }, { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "methodReturningArrayOfStructs", + "outputs": [ { "components": [ { @@ -692,17 +596,24 @@ "type": "string" } ], - "internalType": "struct AbiGenDummy.Struct", - "name": "s", - "type": "tuple" + "internalType": "struct AbiGenDummy.Struct[]", + "name": "", + "type": "tuple[]" } ], - "name": "structInput", - "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "emitSimpleEvent", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -742,59 +653,101 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "x", - "type": "address" - }, - { - "internalType": "uint256", - "name": "a", - "type": "uint256" - }, + "inputs": [], + "name": "pureFunctionWithConstant", + "outputs": [ { "internalType": "uint256", - "name": "b", + "name": "someConstant", "type": "uint256" - }, - { - "internalType": "address", - "name": "y", - "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ { "internalType": "uint256", - "name": "c", + "name": "", "type": "uint256" } ], - "name": "withAddressInput", - "outputs": [ + "name": "simpleInputNoOutput", + "outputs": [], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "internalType": "address", - "name": "z", - "type": "address" + "internalType": "string", + "name": "a", + "type": "string" } ], + "name": "overloadedMethod", + "outputs": [], "payable": false, "stateMutability": "pure", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "wad", - "type": "uint256" + "internalType": "int256", + "name": "a", + "type": "int256" } ], - "name": "withdraw", + "name": "overloadedMethod", "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "someBytes", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "string", + "name": "someString", + "type": "string" + } + ], + "name": "SimpleEvent", + "type": "event" } ], "devdoc": { @@ -842,15 +795,15 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b50611517806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1517 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1EF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x647341EB GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x3D7 JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3F2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x38F JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x3A5 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x3BA JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x3C2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x35E JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x371 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x379 JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x381 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x647341EB EQ PUSH2 0x320 JUMPI DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x32E JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x336 JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x356 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x586F84B2 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2F0 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x30D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x2AD JUMPI DUP1 PUSH4 0x4BB9A37B EQ PUSH2 0x2B5 JUMPI DUP1 PUSH4 0x51BD9CE7 EQ PUSH2 0x2C8 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x3687617D GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x26F JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x4303A542 EQ PUSH2 0x29D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1F4 JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1FE JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x211 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x23A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FC PUSH2 0x400 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xCE2 JUMP JUMPDEST PUSH2 0x43D JUMP JUMPDEST PUSH2 0x224 PUSH2 0x21F CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x440 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1FC PUSH2 0x248 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x447 JUMP JUMPDEST PUSH2 0x260 PUSH2 0x25B CALLDATASIZE PUSH1 0x4 PUSH2 0xF5F JUMP JUMPDEST PUSH2 0x498 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x11A3 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x27D CALLDATASIZE PUSH1 0x4 PUSH2 0xD6E JUMP JUMPDEST PUSH2 0x538 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDAF JUMP JUMPDEST PUSH2 0x224 PUSH2 0x61A JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x621 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x686 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2C3 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x6B8 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2D6 CALLDATASIZE PUSH1 0x4 PUSH2 0xFC9 JUMP JUMPDEST PUSH2 0x6CA JUMP JUMPDEST PUSH2 0x2E3 PUSH2 0x6E7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13A4 JUMP JUMPDEST PUSH2 0x2F8 PUSH2 0x6EF JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13AF JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x6F7 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x31B CALLDATASIZE PUSH1 0x4 PUSH2 0xC91 JUMP JUMPDEST PUSH2 0x75C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xF2C JUMP JUMPDEST PUSH2 0x224 PUSH2 0x765 JUMP JUMPDEST PUSH2 0x349 PUSH2 0x344 CALLDATASIZE PUSH1 0x4 PUSH2 0xE02 JUMP JUMPDEST PUSH2 0x772 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x12D9 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x82F JUMP JUMPDEST PUSH2 0x224 PUSH2 0x36C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x834 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x83A JUMP JUMPDEST PUSH2 0x224 PUSH2 0x844 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xE9C JUMP JUMPDEST PUSH2 0x397 PUSH2 0x849 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP3 SWAP2 SWAP1 PUSH2 0x1422 JUMP JUMPDEST PUSH2 0x3AD PUSH2 0x882 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1139 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x887 JUMP JUMPDEST PUSH2 0x3CA PUSH2 0x8BE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1406 JUMP JUMPDEST PUSH2 0x224 PUSH2 0xA17 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x20C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x48D SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x589 SWAP3 SWAP2 SWAP1 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5C4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1185 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x126B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 SWAP1 MSTORE SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP3 ADD SWAP1 DUP2 SWAP1 SSTORE JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA1D JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA35 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x77A PUSH2 0xA55 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x43B JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x8B4 SWAP1 PUSH2 0x11FF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x8C6 PUSH2 0xA83 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x8DC JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x936 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x984 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA30 PUSH2 0xAB1 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA48 PUSH2 0xA83 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA68 PUSH2 0xAC4 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xAF5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xB08 PUSH2 0xB03 DUP3 PUSH2 0x1462 JUMP JUMPDEST PUSH2 0x143B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 ADD PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB45 JUMPI PUSH2 0xB30 DUP8 PUSH1 0x20 DUP5 CALLDATALOAD DUP10 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 SWAP3 DUP4 ADD SWAP3 SWAP2 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xB18 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB5F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB75 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBA6 PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x143B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xBBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBE7 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xBF1 PUSH1 0x80 PUSH2 0x143B JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xC0B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC17 DUP6 DUP4 DUP7 ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH2 0xC26 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xC7D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC3F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC4B DUP6 DUP4 DUP7 ADD PUSH2 0xAE5 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xC71 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x6E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xCA8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xCB3 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xCD1 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xCF4 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD0A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 DUP5 ADD DUP6 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xD1B JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0xD2B PUSH2 0xB03 DUP4 PUSH2 0x1462 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP3 DUP6 ADD DUP7 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0xD60 JUMPI PUSH2 0xD4E DUP11 DUP9 DUP5 CALLDATALOAD DUP9 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP7 ADD SWAP3 SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xD37 JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xD83 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xD9A JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDD6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDFB JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE2A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE3C JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE46 PUSH1 0x60 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5D JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE69 DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE80 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE8C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEAD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEC4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xED6 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xEE0 PUSH1 0x40 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xEF0 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xEFC DUP8 DUP3 DUP5 ADD PUSH2 0xBD6 JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xF10 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xF1C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF3D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF53 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xBD6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xF73 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF91 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xF9D DUP8 DUP4 DUP9 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xFB2 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xFBF DUP7 DUP3 DUP8 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDB JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x1002 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1482 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0x1049 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD DUP8 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x10CF JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0x10BB DUP3 DUP3 MLOAD PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0x1081 JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x10E9 DUP2 DUP8 PUSH2 0xFEA JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1108 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x1482 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE DUP4 DUP4 ADD SWAP2 POP DUP2 SWAP3 POP DUP4 DUP2 MUL DUP3 ADD DUP5 DUP9 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD60 JUMPI DUP6 DUP4 SUB DUP6 MSTORE PUSH2 0x1173 DUP4 DUP4 MLOAD PUSH2 0x1034 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x115B JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x11B6 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x11C8 DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x11DA DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH1 0xA0 DUP3 ADD DUP4 MLOAD PUSH1 0x80 PUSH1 0x20 DUP6 ADD MSTORE DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1309 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x1322 DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP4 POP POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x1361 DUP4 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x137C DUP2 DUP6 PUSH2 0xFEA JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x13CB PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1034 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1034 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xDE2 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x145A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1478 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x149D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1485 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x14AC JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x43D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 GAS SWAP9 PUSH5 0x6A73BBDA26 PUSH10 0x99B92495C98B4F927E58 JUMPDEST 0xf6 0xc0 DUP2 SWAP8 0xe2 SUB 0xd8 0xda RETURNDATASIZE CALLDATASIZE NUMBER PUSH23 0x6C6578706572696D656E74616CF564736F6C634300050C STOP BLOCKHASH ", - "sourceMap": "641:7002:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:7002:0;;;;;;;" + "object": "0x608060405234801561001057600080fd5b50611478806100206000396000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1478 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1D9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x76F15D5B GT PUSH2 0x104 JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x39B JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3A3 JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3B6 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x353 JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x369 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x37E JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x386 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x322 JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x345 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x2F2 JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x2FA JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x31A JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x59C28ADD GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2B4 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x2C9 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x2D1 JUMPI DUP1 PUSH4 0x647341EB EQ PUSH2 0x2E4 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x297 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x29F JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x2E1A7D4D GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x224 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x237 JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x259 JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x279 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1DE JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1E8 JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x1FB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1E6 PUSH2 0x3C4 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xC7F JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x209 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x404 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E6 PUSH2 0x232 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x40B JUMP JUMPDEST PUSH2 0x24A PUSH2 0x245 CALLDATASIZE PUSH1 0x4 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x45C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x26C PUSH2 0x267 CALLDATASIZE PUSH1 0x4 PUSH2 0xCBC JUMP JUMPDEST PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1045 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x20E PUSH2 0x5DE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x5E5 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x64A JUMP JUMPDEST PUSH2 0x2A7 PUSH2 0x67C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1325 JUMP JUMPDEST PUSH2 0x2BC PUSH2 0x684 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1330 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x68C JUMP JUMPDEST PUSH2 0x26C PUSH2 0x2DF CALLDATASIZE PUSH1 0x4 PUSH2 0xC2D JUMP JUMPDEST PUSH2 0x6F1 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xE77 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x6FA JUMP JUMPDEST PUSH2 0x30D PUSH2 0x308 CALLDATASIZE PUSH1 0x4 PUSH2 0xD4D JUMP JUMPDEST PUSH2 0x708 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1239 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7C5 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x330 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7D0 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x7DB JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xDE7 JUMP JUMPDEST PUSH2 0x35B PUSH2 0x7E0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP3 SWAP2 SWAP1 PUSH2 0x13A3 JUMP JUMPDEST PUSH2 0x371 PUSH2 0x819 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x81E JUMP JUMPDEST PUSH2 0x38E PUSH2 0x855 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1387 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x9AE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x3B1 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x1F6 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x1202 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x451 SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x54D SWAP3 SWAP2 SWAP1 PUSH2 0x1023 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x588 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x10E5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x11CB JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9B4 JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9CC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x710 PUSH2 0x9EC JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x3FF JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x84B SWAP1 PUSH2 0x115F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x85D PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x873 JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x8CD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x91B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9C7 PUSH2 0xA48 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9DF PUSH2 0xA1A JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9FF PUSH2 0xA5B JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA8C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH2 0xAB1 DUP2 DUP3 DUP5 MUL ADD PUSH2 0x13BC JUMP JUMPDEST DUP3 DUP2 MSTORE SWAP3 POP DUP1 DUP4 ADD DUP5 DUP3 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0xAE8 JUMPI PUSH2 0xAD6 DUP9 DUP6 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0xAF3 JUMP JUMPDEST DUP4 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xABF JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB03 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB19 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB4A PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x13BC JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xB61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB8B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xB95 PUSH1 0x80 PUSH2 0x13BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xBB0 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBBC DUP7 DUP4 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP2 POP PUSH4 0xFFFFFFFF DUP3 AND DUP3 EQ PUSH2 0xBD6 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xBEF JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBFB DUP7 DUP4 DUP8 ADD PUSH2 0xA7C JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC13 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xC20 DUP6 DUP3 DUP7 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x60 DUP5 ADD MSTORE POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xC45 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xC50 DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xC6E DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xCA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xA7C JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xCD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xCEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xD75 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xD87 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xD91 PUSH1 0x60 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDA8 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDB4 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDCB JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDD7 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDF8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE0F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE21 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE2B PUSH1 0x40 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE3B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE47 DUP8 DUP3 DUP5 ADD PUSH2 0xB7A JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE67 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xB7A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xEC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEDE JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xEEA DUP8 DUP4 DUP9 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xEFF JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xF0C DUP7 DUP3 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xF2E DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x13E3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0xF75 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD PUSH1 0x0 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0xFFC JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0xFE8 DUP3 DUP3 MLOAD PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0xFAE JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x1016 DUP2 DUP8 PUSH2 0xF16 JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1035 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x13E3 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x10D8 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x10C6 DUP6 DUP4 MLOAD PUSH2 0xF60 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x108C JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x1116 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1128 DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x113A DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x80 PUSH1 0x20 DUP5 ADD MSTORE DUP1 MLOAD PUSH1 0xA0 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0xC0 DUP6 ADD MSTORE PUSH2 0x1269 PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP6 DUP3 SUB ADD PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x12A4 DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x12E2 DUP4 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x12FD DUP2 DUP6 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x134C PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xF60 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF60 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCB4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x13DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13FE JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x13E6 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x140D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x401 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 PUSH32 0x854B76FC684DE0BE1F1A5DB2D486BC187FF28D1E99D27CA0F61B452A1942F6C PUSH6 0x78706572696D PUSH6 0x6E74616CF564 PUSH20 0x6F6C634300050B00400000000000000000000000 ", + "sourceMap": "641:6754:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:6754:0;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1EF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x647341EB GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x3D7 JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3F2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x38F JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x3A5 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x3BA JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x3C2 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x35E JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x371 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x379 JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x381 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x647341EB EQ PUSH2 0x320 JUMPI DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x32E JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x336 JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x356 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x586F84B2 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x2DB JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2F0 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x30D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x2AD JUMPI DUP1 PUSH4 0x4BB9A37B EQ PUSH2 0x2B5 JUMPI DUP1 PUSH4 0x51BD9CE7 EQ PUSH2 0x2C8 JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH4 0x3687617D GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x26F JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x4303A542 EQ PUSH2 0x29D JUMPI PUSH2 0x1EF JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1F4 JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1FE JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x211 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x23A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FC PUSH2 0x400 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xCE2 JUMP JUMPDEST PUSH2 0x43D JUMP JUMPDEST PUSH2 0x224 PUSH2 0x21F CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x440 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1FC PUSH2 0x248 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x447 JUMP JUMPDEST PUSH2 0x260 PUSH2 0x25B CALLDATASIZE PUSH1 0x4 PUSH2 0xF5F JUMP JUMPDEST PUSH2 0x498 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x11A3 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x27D CALLDATASIZE PUSH1 0x4 PUSH2 0xD6E JUMP JUMPDEST PUSH2 0x538 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1118 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDAF JUMP JUMPDEST PUSH2 0x224 PUSH2 0x61A JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x621 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x686 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2C3 CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x6B8 JUMP JUMPDEST PUSH2 0x224 PUSH2 0x2D6 CALLDATASIZE PUSH1 0x4 PUSH2 0xFC9 JUMP JUMPDEST PUSH2 0x6CA JUMP JUMPDEST PUSH2 0x2E3 PUSH2 0x6E7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13A4 JUMP JUMPDEST PUSH2 0x2F8 PUSH2 0x6EF JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x13AF JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x6F7 JUMP JUMPDEST PUSH2 0x282 PUSH2 0x31B CALLDATASIZE PUSH1 0x4 PUSH2 0xC91 JUMP JUMPDEST PUSH2 0x75C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xF2C JUMP JUMPDEST PUSH2 0x224 PUSH2 0x765 JUMP JUMPDEST PUSH2 0x349 PUSH2 0x344 CALLDATASIZE PUSH1 0x4 PUSH2 0xE02 JUMP JUMPDEST PUSH2 0x772 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x12D9 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x82F JUMP JUMPDEST PUSH2 0x224 PUSH2 0x36C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x834 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x83A JUMP JUMPDEST PUSH2 0x224 PUSH2 0x844 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xE9C JUMP JUMPDEST PUSH2 0x397 PUSH2 0x849 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP3 SWAP2 SWAP1 PUSH2 0x1422 JUMP JUMPDEST PUSH2 0x3AD PUSH2 0x882 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1139 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x887 JUMP JUMPDEST PUSH2 0x3CA PUSH2 0x8BE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x231 SWAP2 SWAP1 PUSH2 0x1406 JUMP JUMPDEST PUSH2 0x224 PUSH2 0xA17 JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH2 0x20C JUMP JUMPDEST PUSH2 0x1FC PUSH2 0x20C CALLDATASIZE PUSH1 0x4 PUSH2 0xDEA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x12A2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x48D SWAP2 SWAP1 PUSH2 0x1419 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x589 SWAP3 SWAP2 SWAP1 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5C4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1185 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x432 SWAP1 PUSH2 0x126B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 SWAP1 MSTORE SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP3 ADD SWAP1 DUP2 SWAP1 SSTORE JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA1D JUMP JUMPDEST PUSH2 0x61E PUSH2 0xA35 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x432 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x11E5 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x77A PUSH2 0xA55 JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x43B JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD DUP2 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x8B4 SWAP1 PUSH2 0x11FF JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x8C6 PUSH2 0xA83 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x8DC JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x936 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x984 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA30 PUSH2 0xAB1 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA48 PUSH2 0xA83 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0xA68 PUSH2 0xAC4 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xAF5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xB08 PUSH2 0xB03 DUP3 PUSH2 0x1462 JUMP JUMPDEST PUSH2 0x143B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 ADD PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB45 JUMPI PUSH2 0xB30 DUP8 PUSH1 0x20 DUP5 CALLDATALOAD DUP10 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 SWAP3 DUP4 ADD SWAP3 SWAP2 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xB18 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB5F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB75 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBA6 PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x143B JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xBBD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBE7 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xBF1 PUSH1 0x80 PUSH2 0x143B JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xC0B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC17 DUP6 DUP4 DUP7 ADD PUSH2 0xB4F JUMP JUMPDEST DUP4 MSTORE PUSH2 0xC26 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xC7D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC3F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC4B DUP6 DUP4 DUP7 ADD PUSH2 0xAE5 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC64 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xC71 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x60 DUP4 ADD MSTORE POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x6E1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xCA8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xCB3 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xCD1 DUP2 PUSH2 0x14B2 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xCF4 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD0A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 DUP5 ADD DUP6 PUSH1 0x1F DUP3 ADD SLT PUSH2 0xD1B JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP2 POP PUSH2 0xD2B PUSH2 0xB03 DUP4 PUSH2 0x1462 JUMP JUMPDEST DUP3 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP3 DUP6 ADD DUP7 JUMPDEST DUP6 DUP2 LT ISZERO PUSH2 0xD60 JUMPI PUSH2 0xD4E DUP11 DUP9 DUP5 CALLDATALOAD DUP9 ADD ADD PUSH2 0xB4F JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP7 ADD SWAP3 SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xD37 JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xD83 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xD9A JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xDD6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDFB JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE2A JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE3C JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE46 PUSH1 0x60 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5D JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE69 DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE80 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE8C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEAD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEC4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xED6 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xEE0 PUSH1 0x40 PUSH2 0x143B JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xEF0 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xEFC DUP8 DUP3 DUP5 ADD PUSH2 0xBD6 JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xF10 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xF1C DUP8 DUP3 DUP5 ADD PUSH2 0xB4F JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xF3D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xF53 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xDE2 DUP5 DUP3 DUP6 ADD PUSH2 0xBD6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xF73 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF91 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xF9D DUP8 DUP4 DUP9 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xFB2 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xFBF DUP7 DUP3 DUP8 ADD PUSH2 0xB4F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xFDB JUMPI DUP2 DUP3 REVERT JUMPDEST POP POP DUP1 CALLDATALOAD SWAP3 PUSH1 0x20 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x1002 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x1482 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0x1049 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD DUP8 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0x10CF JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0x10BB DUP3 DUP3 MLOAD PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0x1081 JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x10E9 DUP2 DUP8 PUSH2 0xFEA JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1108 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x1482 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE DUP4 DUP4 ADD SWAP2 POP DUP2 SWAP3 POP DUP4 DUP2 MUL DUP3 ADD DUP5 DUP9 ADD DUP7 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD60 JUMPI DUP6 DUP4 SUB DUP6 MSTORE PUSH2 0x1173 DUP4 DUP4 MLOAD PUSH2 0x1034 JUMP JUMPDEST SWAP5 DUP8 ADD SWAP5 SWAP3 POP SWAP1 DUP7 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x115B JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x11B6 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x11C8 DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x11DA DUP2 DUP7 PUSH2 0xFEA JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH1 0xA0 DUP3 ADD DUP4 MLOAD PUSH1 0x80 PUSH1 0x20 DUP6 ADD MSTORE DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1309 PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x1322 DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP4 POP POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x1361 DUP4 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x137C DUP2 DUP6 PUSH2 0xFEA JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x13CB PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0x1034 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x139B DUP2 DUP4 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x11F8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x1034 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xDE2 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xFEA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x145A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1478 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x149D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x1485 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x14AC JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x43D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 GAS SWAP9 PUSH5 0x6A73BBDA26 PUSH10 0x99B92495C98B4F927E58 JUMPDEST 0xf6 0xc0 DUP2 SWAP8 0xe2 SUB 0xd8 0xda RETURNDATASIZE CALLDATASIZE NUMBER PUSH23 0x6C6578706572696D656E74616CF564736F6C634300050C STOP BLOCKHASH ", - "sourceMap": "641:7002:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:7002:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1549:107;;;:::i;:::-;;3163:63;;;;;;;;;:::i;6607:128::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;5021:84;;;;;;;;;:::i;7230:345::-;;;;;;;;;:::i;:::-;;;;;;;;;;2341:334;;;;;;;;;:::i;:::-;;;;;;;;3001:52;;;;;;;6212:117;;;:::i;1442:101::-;;;:::i;1339:97::-;;;:::i;861:47::-;;;;;;;;;:::i;5302:189::-;;;;;;;;;:::i;4374:153::-;;;:::i;:::-;;;;;;;;4106:73;;;:::i;:::-;;;;;;;;1662:111;;;:::i;2829:166::-;;;;;;;;;:::i;3372:52::-;;;;;;;4553:72;;;:::i;6808:317::-;;;;;;;;;:::i;:::-;;;;;;;;6021:112;;;:::i;1042:140::-;;;;;;;;;:::i;4630:69::-;;;:::i;915:121::-;;;:::i;4037:64::-;;;;;;;4705:134;;;:::i;:::-;;;;;;;;;3862:80;;;:::i;:::-;;;;;;;;5171:125;;;:::i;3506:350::-;;;:::i;:::-;;;;;;;;1188:145;;;:::i;6408:123::-;;;;;;;;;:::i;4845:47::-;;;;;;;1549:107;1617:32;;;;;;;;;;;;;;;;;;;;1549:107::o;3163:63::-;;:::o;6607:128::-;-1:-1:-1;6724:4:0;;6607:128::o;5021:84::-;5082:10;5071:27;;;5094:3;5071:27;;;;;;;;;;;;;;;5021:84;:::o;7230:345::-;-1:-1:-1;;7477:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7230:345:0:o;2341:334::-;2452:21;2489:19;:56;;;;;;;;;;;;;;;;;;;2555:20;2605:6;2613:4;2588:30;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2588:30:0;;;2578:41;;;;;;2555:64;;2636:32;2646:12;2660:1;2663;2666;2636:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2636:32:0;;;;;;2341:334;-1:-1:-1;;;;;;;;2341:334:0:o;6212:117::-;6318:4;6212:117;;:::o;1442:101::-;1522:13;;;;;;;;;;;;;;;;1515:21;;;;;;;1522:13;1515:21;;;;1339:97;1406:23;;;;;;;;;;;861:47;;;;;;;;;;;;;;:::o;5302:189::-;5391:14;5421:15;;;;;;;;;;5451:1;5439:13;;5421:31;;;;5302:189;;;;;:::o;4374:153::-;4468:51;;:::i;4106:73::-;4156:19;;:::i;1662:111::-;1751:14;;;;;;;;;;;;;;;;1736:30;;;;;;;1751:14;1736:30;;;;2829:166;-1:-1:-1;2987:1:0;;2829:166;-1:-1:-1;;;2829:166:0:o;4553:72::-;4621:1;4608:14;;;;;;;;4553:72;:::o;6808:317::-;6922:20;;:::i;:::-;-1:-1:-1;6965:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6808:317::o;6021:112::-;6105:21;;1042:140;1170:1;:5;;1042:140::o;4630:69::-;4695:1;4682:14;;;;;;4630:69::o;915:121::-;1028:1;915:121;:::o;4705:134::-;4813:19;;;;;;;;;;;;;;;;;4821:1;4705:134;:::o;3862:80::-;3923:15;3862:80;:::o;5171:125::-;5220:69;;;;;;;;;;;;;;;5171:125::o;3506:350::-;3550:15;;:::i;:::-;3604:14;;;3616:1;3604:14;;;3577:24;3604:14;;;;;;;;;;;;;;;;;;;;;;;;;;3577:41;;3628:22;;;;;;;;;;;;;;;;;:9;3638:1;3628:12;;;;;;;;;;;;;:22;;;;3660;;;;;;;;;;;;;;;;;:9;3670:1;3660:12;;;;;;;;;;;;;;;;;;:22;;;;3700:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3700:149:0;;;;-1:-1:-1;3506:350:0;:::o;1188:145::-;711:4;1188:145;:::o;641:7002::-;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;158:685:-1:-;;276:3;269:4;261:6;257:17;253:27;243:2;;-1:-1;;284:12;243:2;331:6;318:20;353:81;368:65;426:6;368:65;;;353:81;;;462:21;;;344:90;-1:-1;506:4;519:14;;;;494:17;;614:1;599:238;624:6;621:1;618:13;599:238;;;731:42;769:3;506:4;707:3;694:17;498:6;682:30;;731:42;;;719:55;;506:4;788:14;;;;816;;;;;646:1;639:9;599:238;;;603:14;;;;236:607;;;;;1706:432;;1803:3;1796:4;1788:6;1784:17;1780:27;1770:2;;-1:-1;;1811:12;1770:2;1858:6;1845:20;33451:18;33443:6;33440:30;33437:2;;;-1:-1;;33473:12;33437:2;1880:60;33614:4;33546:9;1796:4;33531:6;33527:17;33523:33;33604:15;1880:60;;;1871:69;;1960:6;1953:5;1946:21;2064:3;33614:4;2055:6;1988;2046:16;;2043:25;2040:2;;;2081:1;;2071:12;2040:2;37952:6;33614:4;1988:6;1984:17;33614:4;2022:5;2018:16;37929:30;38008:1;37990:16;;;33614:4;37990:16;37983:27;2022:5;1763:375;-1:-1;;1763:375;5221:1071;;5329:4;5317:9;5312:3;5308:19;5304:30;5301:2;;;-1:-1;;5337:12;5301:2;5365:20;5329:4;5365:20;;;5356:29;;5453:17;5440:31;5491:18;;5483:6;5480:30;5477:2;;;5468:1;;5513:12;5477:2;5557:54;5607:3;5598:6;5587:9;5583:22;5557:54;;;5540:15;5533:79;5711:48;5755:3;5678:2;5735:9;5731:22;5711:48;;;5678:2;5697:5;5693:16;5686:74;5865:2;5854:9;5850:18;5837:32;5823:46;;5491:18;5881:6;5878:30;5875:2;;;5468:1;;5911:12;5875:2;5956:75;6027:3;6018:6;6007:9;6003:22;5956:75;;;5865:2;5942:5;5938:16;5931:101;6124:2;6113:9;6109:18;6096:32;6082:46;;5491:18;6140:6;6137:30;6134:2;;;5468:1;;6170:12;6134:2;;6215:55;6266:3;6257:6;6246:9;6242:22;6215:55;;;6124:2;6201:5;6197:16;6190:81;;5295:997;;;;;7550:128;7616:20;;37759:10;37748:22;;39039:34;;39029:2;;39087:1;;39077:12;7818:743;;;;;;7990:3;7978:9;7969:7;7965:23;7961:33;7958:2;;;-1:-1;;7997:12;7958:2;85:6;72:20;97:33;124:5;97:33;;;8049:63;-1:-1;8149:2;8188:22;;7480:20;;-1:-1;8257:2;8296:22;;7480:20;;-1:-1;8365:2;8404:22;;72:20;97:33;72:20;97:33;;;7952:609;;;;-1:-1;7952:609;;8473:3;8513:22;7480:20;;7952:609;-1:-1;;7952:609;8568:387;;8702:2;;8690:9;8681:7;8677:23;8673:32;8670:2;;;-1:-1;;8708:12;8670:2;8766:17;8753:31;8804:18;8796:6;8793:30;8790:2;;;-1:-1;;8826:12;8790:2;8922:6;8911:9;8907:22;989:3;982:4;974:6;970:17;966:27;956:2;;-1:-1;;997:12;956:2;1044:6;1031:20;1017:34;;1066:85;1081:69;1143:6;1081:69;;1066:85;1179:21;;;1236:14;;;;1211:17;;;-1:-1;1316:238;1341:6;1338:1;1335:13;1316:238;;;1448:42;1486:3;8702:2;1424:3;1411:17;1215:6;1399:30;;1448:42;;;1436:55;;1505:14;;;;1533;;;;1363:1;1356:9;1316:238;;;-1:-1;8846:93;;8664:291;-1:-1;;;;;;;;8664:291;8962:613;;;;;9115:3;9103:9;9094:7;9090:23;9086:33;9083:2;;;-1:-1;;9122:12;9083:2;1648:6;1635:20;9174:63;;9274:2;9315:9;9311:22;7750:20;37853:4;39186:5;37842:16;39163:5;39160:33;39150:2;;-1:-1;;39197:12;39150:2;9077:498;;9282:61;;-1:-1;;;;9380:2;9419:22;;1635:20;;9488:2;9527:22;1635:20;;9077:498;9582:345;;9695:2;9683:9;9674:7;9670:23;9666:32;9663:2;;;-1:-1;;9701:12;9663:2;9759:17;9746:31;9797:18;9789:6;9786:30;9783:2;;;-1:-1;;9819:12;9783:2;9849:62;9903:7;9894:6;9883:9;9879:22;9849:62;;;9839:72;9657:270;-1:-1;;;;9657:270;9934:239;;10037:2;10025:9;10016:7;10012:23;10008:32;10005:2;;;-1:-1;;10043:12;10005:2;-1:-1;2661:20;;9999:174;-1:-1;9999:174;10534:385;;10667:2;10655:9;10646:7;10642:23;10638:32;10635:2;;;-1:-1;;10673:12;10635:2;10731:17;10718:31;10769:18;;10761:6;10758:30;10755:2;;;-1:-1;;10791:12;10755:2;10886:6;10875:9;10871:22;3780:4;3768:9;3763:3;3759:19;3755:30;3752:2;;;-1:-1;;3788:12;3752:2;3816:20;3780:4;3816:20;;;3807:29;;3937:22;7480:20;3899:15;3892:74;10667:2;4043:9;4039:18;4026:32;10769:18;4070:6;4067:30;4064:2;;;-1:-1;;4100:12;4064:2;4145:54;4195:3;4186:6;4175:9;4171:22;4145:54;;;10667:2;4131:5;4127:16;4120:80;;4288:2;4277:9;4273:18;4260:32;10769:18;4304:6;4301:30;4298:2;;;-1:-1;;4334:12;4298:2;4379:55;4430:3;4421:6;4410:9;4406:22;4379:55;;;4288:2;4361:16;;4354:81;-1:-1;4365:5;;10629:290;-1:-1;;;;;10629:290;10926:385;;11059:2;11047:9;11038:7;11034:23;11030:32;11027:2;;;-1:-1;;11065:12;11027:2;11123:17;11110:31;11161:18;;11153:6;11150:30;11147:2;;;-1:-1;;11183:12;11147:2;11278:6;11267:9;11263:22;4619:4;4607:9;4602:3;4598:19;4594:30;4591:2;;;-1:-1;;4627:12;4591:2;4655:20;4619:4;4655:20;;;4646:29;;4745:17;4732:31;11161:18;4775:6;4772:30;4769:2;;;-1:-1;;4805:12;4769:2;4849:68;4913:3;4904:6;4893:9;4889:22;4849:68;;;4832:15;4825:93;;11059:2;5003:9;4999:18;4986:32;11161:18;5030:6;5027:30;5024:2;;;-1:-1;;5060:12;5024:2;5105:55;5156:3;5147:6;5136:9;5132:22;5105:55;;;11059:2;5087:16;;5080:81;-1:-1;5091:5;;11021:290;-1:-1;;;;;11021:290;11318:373;;11445:2;11433:9;11424:7;11420:23;11416:32;11413:2;;;-1:-1;;11451:12;11413:2;11509:17;11496:31;11547:18;11539:6;11536:30;11533:2;;;-1:-1;;11569:12;11533:2;11599:76;11667:7;11658:6;11647:9;11643:22;11599:76;;11946:701;;;;12103:2;12091:9;12082:7;12078:23;12074:32;12071:2;;;-1:-1;;12109:12;12071:2;7493:6;7480:20;12161:63;;12289:2;12278:9;12274:18;12261:32;12313:18;;12305:6;12302:30;12299:2;;;-1:-1;;12335:12;12299:2;12365:62;12419:7;12410:6;12399:9;12395:22;12365:62;;;12355:72;;12492:2;12481:9;12477:18;12464:32;12450:46;;12313:18;12508:6;12505:30;12502:2;;;-1:-1;;12538:12;12502:2;;12568:63;12623:7;12614:6;12603:9;12599:22;12568:63;;;12558:73;;;12065:582;;;;;;12654:366;;;12775:2;12763:9;12754:7;12750:23;12746:32;12743:2;;;-1:-1;;12781:12;12743:2;-1:-1;;7480:20;;;12933:2;12972:22;;;7480:20;;-1:-1;12737:283;15816:343;;15958:5;35058:12;36144:6;36139:3;36132:19;16051:52;16096:6;36181:4;36176:3;36172:14;36181:4;16077:5;16073:16;16051:52;;;38470:2;38450:14;38466:7;38446:28;16115:39;;;;36181:4;16115:39;;15906:253;-1:-1;;15906:253;23361:1078;;23585:15;23579:22;23508:4;23621:13;23614:37;23666:67;23508:4;23503:3;23499:14;23714:12;23666:67;;;23823:4;;;37759:10;23823:4;23816:5;23812:16;23806:23;37748:22;23823:4;23885:3;23881:14;25867:36;23991:4;23984:5;23980:16;23974:23;24043:3;24037:4;24033:14;23991:4;24021:3;24017:14;24010:38;24063:109;13792:5;35058:12;36144:6;36139:3;36132:19;23823:4;36176:3;36172:14;13804:88;;23823:4;;13949:6;13945:17;36176:3;13936:27;;23823:4;14035:5;34734:14;-1:-1;14080:10;;14074:341;14099:6;14096:1;14093:13;14074:341;;;14151:20;36176:3;14155:4;14151:20;;14146:3;14139:33;13139:60;13195:3;14206:6;14200:13;13139:60;;;14121:1;14114:9;;;;;14394:14;;;;14220:82;-1:-1;35858:14;;14074:341;;;14078:14;24260:4;24253:5;24249:16;24243:23;24223:43;;24312:3;24306:4;24302:14;24260:4;24290:3;24286:14;24279:38;24332:69;24396:4;24382:12;24332:69;;;24423:11;23481:958;-1:-1;;;;;;;;;23481:958;26029:401;;16326:5;35058:12;16437:52;16482:6;16477:3;16470:4;16463:5;16459:16;16437:52;;;16501:16;;;;15608:37;;;-1:-1;16470:4;26393:12;;26182:248;-1:-1;26182:248;26437:213;37553:42;37542:54;;;;13526:37;;26555:2;26540:18;;26526:124;26657:437;;26863:2;;26852:9;26848:18;26863:2;26884:17;26877:47;26938:146;14779:5;35058:12;36144:6;36139:3;36132:19;26863:2;36176:3;36172:14;14791:112;;;36157:29;;26863:2;14960:6;14956:17;14951:3;14947:27;26863:2;15064:5;34734:14;-1:-1;15103:387;15128:6;15125:1;15122:13;15103:387;;;15190:9;15184:4;15180:20;15175:3;15168:33;13353:88;13437:3;15235:6;15229:13;13353:88;;;15469:14;;;;15249:110;-1:-1;35858:14;;;;15150:1;15143:9;15103:387;;27101:539;15608:37;;;37853:4;37842:16;;;;27460:2;27445:18;;25982:35;27543:2;27528:18;;15608:37;27626:2;27611:18;;15608:37;27299:3;27284:19;;27270:370;27647:691;;27877:2;27898:17;27891:47;27952:76;27877:2;27866:9;27862:18;28014:6;27952:76;;;28076:9;28070:4;28066:20;28061:2;28050:9;28046:18;28039:48;28101:76;28172:4;28163:6;28101:76;;;28225:9;28219:4;28215:20;28210:2;28199:9;28195:18;28188:48;28250:78;28323:4;28314:6;28250:78;;;28242:86;27848:490;-1:-1;;;;;;;27848:490;28345:293;;28479:2;28500:17;28493:47;28554:74;28479:2;28468:9;28464:18;28614:6;28554:74;;;28546:82;28450:188;-1:-1;;;28450:188;28645:710;28936:2;28950:47;;;18472:1;28921:18;;;36132:19;18507:66;36172:14;;;18487:87;18593:12;36181:4;29159:18;;29152:48;;;18102:1;18593:12;;;36132:19;18137:66;36172:14;;;18117:87;18223:12;;;28907:448;29362:407;29553:2;29567:47;;;18844:2;29538:18;;;36132:19;18880:66;36172:14;;;18860:87;18966:12;;;29524:245;29776:407;29967:2;29981:47;;;19217:2;29952:18;;;36132:19;19253:66;36172:14;;;19233:87;19339:12;;;29938:245;30190:381;;30368:2;30389:17;30382:47;20452:14;30357:9;20452:14;20534:15;20528:22;20461:4;30368:2;30357:9;30353:18;20563:37;19654:15;19648:22;15615:3;15608:37;30368:2;19809:5;19805:16;19799:23;19583:4;30368:2;19846:3;19842:14;19835:38;19888:67;19583:4;19578:3;19574:14;19936:12;19888:67;;;20039:4;20032:5;20028:16;20022:23;20002:43;;20091:3;20085:4;20081:14;20039:4;20069:3;20065:14;20058:38;20111:69;20175:4;20161:12;20111:69;;;20202:11;;;;;30368:2;20801:5;20797:16;20791:23;20850:14;;30357:9;20854:4;20850:14;;20039:4;30357:9;20834:14;20827:38;20880:67;20942:4;20928:12;20880:67;;;20039:4;21026:5;21022:16;21016:23;20996:43;;20850:14;30357:9;21079:4;21075:14;;19583:4;30357:9;21059:14;21052:38;21105:67;21167:4;21153:12;21105:67;;;21097:75;;;19583:4;21251:5;21247:16;21241:23;21221:43;;20850:14;30357:9;21304:4;21300:14;;20461:4;30357:9;21284:14;21277:38;;21330:69;21394:4;21380:12;21330:69;;;30435:126;30339:232;-1:-1;;;;;30339:232;30578:453;21865:22;;23182;15608:37;;30816:2;30801:18;;30787:244;31038:377;;31214:2;31235:17;31228:47;22382:15;22376:22;22303:4;31214:2;31203:9;31199:18;22411:37;22463:95;22294:14;31203:9;22294:14;22539:12;22463:95;;;31214:2;22643:5;22639:16;22633:23;22613:43;;22692:14;31203:9;22696:4;22692:14;;22303:4;31203:9;22676:14;22669:38;22722:69;22786:4;22772:12;22722:69;;31422:353;;31586:2;31607:17;31600:47;31661:104;31586:2;31575:9;31571:18;31751:6;31661:104;;31782:213;15608:37;;;31900:2;31885:18;;31871:124;32002:412;;15638:5;15615:3;15608:37;32168:2;32286;32275:9;32271:18;32264:48;32326:78;32168:2;32157:9;32153:18;32390:6;32326:78;;32421:256;32483:2;32477:9;32509:17;;;32584:18;32569:34;;32605:22;;;32566:62;32563:2;;;32641:1;;32631:12;32563:2;32483;32650:22;32461:216;;-1:-1;32461:216;32684:305;;32844:18;32836:6;32833:30;32830:2;;;-1:-1;;32866:12;32830:2;-1:-1;32911:4;32899:17;;;32964:15;;32767:222;38025:268;38090:1;38097:101;38111:6;38108:1;38105:13;38097:101;;;38178:11;;;38172:18;38159:11;;;38152:39;38133:2;38126:10;38097:101;;;38213:6;38210:1;38207:13;38204:2;;;38090:1;38269:6;38264:3;38260:16;38253:27;38204:2;;38074:219;;;;38487:117;37553:42;38574:5;37542:54;38549:5;38546:35;38536:2;;38595:1;;38585:12" + "object": "0x608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1D9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x76F15D5B GT PUSH2 0x104 JUMPI DUP1 PUSH4 0xBB607362 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD88BE12F GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD88BE12F EQ PUSH2 0x39B JUMPI DUP1 PUSH4 0xEE8B86FB EQ PUSH2 0x3A3 JUMPI DUP1 PUSH4 0xF408FB31 EQ PUSH2 0x279 JUMPI DUP1 PUSH4 0xFA315F9D EQ PUSH2 0x3B6 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0xBB607362 EQ PUSH2 0x353 JUMPI DUP1 PUSH4 0xBDAB1688 EQ PUSH2 0x369 JUMPI DUP1 PUSH4 0xCD3C0B97 EQ PUSH2 0x37E JUMPI DUP1 PUSH4 0xD6D7618C EQ PUSH2 0x386 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x8EE52B4E GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8EE52B4E EQ PUSH2 0x322 JUMPI DUP1 PUSH4 0x9A3B6185 EQ PUSH2 0x335 JUMPI DUP1 PUSH4 0xA3C2F6B6 EQ PUSH2 0x33D JUMPI DUP1 PUSH4 0xAE2DAE17 EQ PUSH2 0x345 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x76F15D5B EQ PUSH2 0x2F2 JUMPI DUP1 PUSH4 0x7833BEC0 EQ PUSH2 0x2FA JUMPI DUP1 PUSH4 0x7A791E6E EQ PUSH2 0x31A JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x59C28ADD GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x59C28ADD EQ PUSH2 0x2B4 JUMPI DUP1 PUSH4 0x5BA3C7C0 EQ PUSH2 0x2C9 JUMPI DUP1 PUSH4 0x63D69C88 EQ PUSH2 0x2D1 JUMPI DUP1 PUSH4 0x647341EB EQ PUSH2 0x2E4 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x4303A542 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x4582EAB2 EQ PUSH2 0x28F JUMPI DUP1 PUSH4 0x45FDBDB7 EQ PUSH2 0x297 JUMPI DUP1 PUSH4 0x586F84B2 EQ PUSH2 0x29F JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH4 0x2E1A7D4D GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x224 JUMPI DUP1 PUSH4 0x3687617D EQ PUSH2 0x237 JUMPI DUP1 PUSH4 0x36B32396 EQ PUSH2 0x259 JUMPI DUP1 PUSH4 0x3E9EF66A EQ PUSH2 0x279 JUMPI PUSH2 0x1D9 JUMP JUMPDEST DUP1 PUSH3 0x9E437 EQ PUSH2 0x1DE JUMPI DUP1 PUSH4 0x527C28F EQ PUSH2 0x1E8 JUMPI DUP1 PUSH4 0x1310E444 EQ PUSH2 0x1FB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1E6 PUSH2 0x3C4 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xC7F JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x209 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x404 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E6 PUSH2 0x232 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x40B JUMP JUMPDEST PUSH2 0x24A PUSH2 0x245 CALLDATASIZE PUSH1 0x4 PUSH2 0xEAC JUMP JUMPDEST PUSH2 0x45C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x1103 JUMP JUMPDEST PUSH2 0x26C PUSH2 0x267 CALLDATASIZE PUSH1 0x4 PUSH2 0xCBC JUMP JUMPDEST PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1045 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x20E PUSH2 0x5DE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x5E5 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x64A JUMP JUMPDEST PUSH2 0x2A7 PUSH2 0x67C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1325 JUMP JUMPDEST PUSH2 0x2BC PUSH2 0x684 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1330 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x68C JUMP JUMPDEST PUSH2 0x26C PUSH2 0x2DF CALLDATASIZE PUSH1 0x4 PUSH2 0xC2D JUMP JUMPDEST PUSH2 0x6F1 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xE77 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x6FA JUMP JUMPDEST PUSH2 0x30D PUSH2 0x308 CALLDATASIZE PUSH1 0x4 PUSH2 0xD4D JUMP JUMPDEST PUSH2 0x708 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1239 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7C5 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x330 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x7D0 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x7DB JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xDE7 JUMP JUMPDEST PUSH2 0x35B PUSH2 0x7E0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP3 SWAP2 SWAP1 PUSH2 0x13A3 JUMP JUMPDEST PUSH2 0x371 PUSH2 0x819 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1066 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x81E JUMP JUMPDEST PUSH2 0x38E PUSH2 0x855 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x21B SWAP2 SWAP1 PUSH2 0x1387 JUMP JUMPDEST PUSH2 0x20E PUSH2 0x9AE JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x3B1 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH2 0x1F6 JUMP JUMPDEST PUSH2 0x1E6 PUSH2 0x1F6 CALLDATASIZE PUSH1 0x4 PUSH2 0xD34 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x1202 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST JUMP JUMPDEST POP JUMP JUMPDEST POP PUSH2 0x7C7 SWAP1 JUMP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0x7FCF532C15F0A6DB0BD6D0E038BEA71D30D808C7D98CB3BF7268A95BF5081B65 DUP3 PUSH1 0x40 MLOAD PUSH2 0x451 SWAP2 SWAP1 PUSH2 0x139A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP JUMP JUMPDEST POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP4 MLOAD DUP1 DUP6 ADD DUP6 MSTORE DUP3 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP4 ADD MSTORE DUP5 MLOAD DUP1 DUP7 ADD SWAP1 SWAP6 MSTORE SWAP2 DUP5 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE SWAP1 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1C DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP2 MSTORE POP SWAP1 POP PUSH1 0x0 DUP2 DUP8 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x54D SWAP3 SWAP2 SWAP1 PUSH2 0x1023 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x1 DUP2 DUP8 DUP8 DUP8 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x588 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x10E5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5AA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0x7C7 JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x14 DUP2 MSTORE PUSH32 0x5245564552545F574954485F434F4E5354414E54000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3F6 SWAP1 PUSH2 0x11CB JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9B4 JUMP JUMPDEST PUSH2 0x5E2 PUSH2 0x9CC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x15 DUP2 MSTORE PUSH32 0x524551554952455F574954485F434F4E5354414E540000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE SWAP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH2 0x3F6 SWAP2 SWAP1 PUSH1 0x4 ADD PUSH2 0x1145 JUMP JUMPDEST POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 DUP2 SWAP1 SSTORE SWAP1 JUMP JUMPDEST PUSH2 0x710 PUSH2 0x9EC JUMP JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP2 DUP3 MSTORE DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x4 DUP1 DUP3 MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP4 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP6 ADD SWAP3 SWAP1 SWAP3 MSTORE DUP3 MLOAD DUP1 DUP5 ADD DUP5 MSTORE DUP2 DUP2 MSTORE PUSH32 0x8765432100000000000000000000000000000000000000000000000000000000 DUP2 DUP5 ADD MSTORE DUP5 DUP5 ADD MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE DUP3 MSTORE PUSH32 0x616D657400000000000000000000000000000000000000000000000000000000 SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH2 0x3FF JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x68656C6C6F000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x1 SWAP2 JUMP JUMPDEST PUSH1 0x60 SWAP1 JUMP JUMPDEST PUSH32 0x61A6029A4C7DDEE5824D171331EECBD015D26A271310A223718B837FACB5B771 PUSH1 0x40 MLOAD PUSH2 0x84B SWAP1 PUSH2 0x115F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH2 0x85D PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 DUP2 ADD SWAP1 SWAP4 MSTORE DUP2 PUSH1 0x20 ADD JUMPDEST PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 PUSH1 0x1 SWAP1 SUB SWAP1 DUP2 PUSH2 0x873 JUMPI SWAP1 POP POP SWAP1 POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x8CD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 SWAP1 MSTORE POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x5 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x3078333231000000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x91B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0xC0 DUP2 ADD DUP3 MSTORE PUSH1 0x5 PUSH1 0x80 DUP3 ADD DUP2 DUP2 MSTORE PUSH32 0x3078313233000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 MSTORE DUP2 DUP5 ADD MSTORE DUP1 DUP3 ADD SWAP4 SWAP1 SWAP4 MSTORE DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x6162630000000000000000000000000000000000000000000000000000000000 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP3 ADD MSTORE SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x4D2 SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9C7 PUSH2 0xA48 JUMP JUMPDEST SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9DF PUSH2 0xA1A JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH2 0x9FF PUSH2 0xA5B JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA8C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xAA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH2 0xAB1 DUP2 DUP3 DUP5 MUL ADD PUSH2 0x13BC JUMP JUMPDEST DUP3 DUP2 MSTORE SWAP3 POP DUP1 DUP4 ADD DUP5 DUP3 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0xAE8 JUMPI PUSH2 0xAD6 DUP9 DUP6 DUP5 CALLDATALOAD DUP11 ADD ADD PUSH2 0xAF3 JUMP JUMPDEST DUP4 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xABF JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xB03 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB19 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB4A PUSH1 0x20 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 PUSH1 0x1F DUP5 ADD AND ADD PUSH2 0x13BC JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xB61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB8B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0xB95 PUSH1 0x80 PUSH2 0x13BC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xBB0 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBBC DUP7 DUP4 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x20 DUP6 ADD CALLDATALOAD SWAP2 POP PUSH4 0xFFFFFFFF DUP3 AND DUP3 EQ PUSH2 0xBD6 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 PUSH1 0x20 DUP6 ADD MSTORE PUSH1 0x40 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xBEF JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xBFB DUP7 DUP4 DUP8 ADD PUSH2 0xA7C JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP6 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xC13 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xC20 DUP6 DUP3 DUP7 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x60 DUP5 ADD MSTORE POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xA0 DUP7 DUP9 SUB SLT ISZERO PUSH2 0xC45 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH2 0xC50 DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 POP PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP3 POP PUSH1 0x60 DUP7 ADD CALLDATALOAD PUSH2 0xC6E DUP2 PUSH2 0x1413 JUMP JUMPDEST SWAP5 SWAP8 SWAP4 SWAP7 POP SWAP2 SWAP5 PUSH1 0x80 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC91 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xCA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xA7C JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xCD2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0xCEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0x40 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0x60 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xD75 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x60 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xD87 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xD91 PUSH1 0x60 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDA8 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDB4 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP PUSH1 0x40 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xDCB JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xDD7 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x40 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xDF8 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xE0F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP5 ADD PUSH1 0x40 DUP2 DUP8 SUB SLT ISZERO PUSH2 0xE21 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0xE2B PUSH1 0x40 PUSH2 0x13BC JUMP JUMPDEST SWAP3 POP DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE3B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE47 DUP8 DUP3 DUP5 ADD PUSH2 0xB7A JUMP JUMPDEST DUP5 MSTORE POP PUSH1 0x20 DUP2 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0xE5B JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0xE67 DUP8 DUP3 DUP5 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MSTORE POP SWAP2 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xE89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xEA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP5 DUP3 DUP6 ADD PUSH2 0xB7A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xEC0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xEDE JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0xEEA DUP8 DUP4 DUP9 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP4 POP PUSH1 0x40 DUP7 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0xEFF JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xF0C DUP7 DUP3 DUP8 ADD PUSH2 0xAF3 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xF2E DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x13E3 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD PUSH1 0x80 DUP5 MSTORE PUSH2 0xF75 PUSH1 0x80 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x20 SWAP2 POP PUSH4 0xFFFFFFFF DUP3 DUP6 ADD MLOAD AND DUP3 DUP7 ADD MSTORE PUSH1 0x40 DUP5 ADD MLOAD DUP6 DUP3 SUB PUSH1 0x40 DUP8 ADD MSTORE DUP2 DUP2 MLOAD DUP1 DUP5 MSTORE DUP5 DUP5 ADD SWAP2 POP DUP5 DUP6 DUP3 MUL DUP6 ADD ADD DUP6 DUP5 ADD PUSH1 0x0 SWAP5 POP JUMPDEST DUP3 DUP6 LT ISZERO PUSH2 0xFFC JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP7 DUP4 SUB ADD DUP5 MSTORE PUSH2 0xFE8 DUP3 DUP3 MLOAD PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP4 DUP8 ADD SWAP4 SWAP2 POP DUP7 ADD PUSH2 0xFAE JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD MLOAD SWAP6 POP DUP9 DUP2 SUB PUSH1 0x60 DUP11 ADD MSTORE PUSH2 0x1016 DUP2 DUP8 PUSH2 0xF16 JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 MLOAD PUSH2 0x1035 DUP2 DUP5 PUSH1 0x20 DUP9 ADD PUSH2 0x13E3 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP2 DUP3 MSTORE POP PUSH1 0x20 ADD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 ADD DUP2 DUP5 MSTORE DUP1 DUP6 MLOAD DUP1 DUP4 MSTORE PUSH1 0x40 DUP7 ADD SWAP2 POP PUSH1 0x40 DUP5 DUP3 MUL DUP8 ADD ADD SWAP3 POP DUP4 DUP8 ADD PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x10D8 JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 DUP9 DUP7 SUB ADD DUP5 MSTORE PUSH2 0x10C6 DUP6 DUP4 MLOAD PUSH2 0xF60 JUMP JUMPDEST SWAP5 POP SWAP3 DUP6 ADD SWAP3 SWAP1 DUP6 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x108C JUMP JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x1116 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x1128 DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x113A DUP2 DUP7 PUSH2 0xF16 JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 DUP3 MSTORE PUSH1 0x4 SWAP1 DUP3 ADD MSTORE PUSH32 0x1234567800000000000000000000000000000000000000000000000000000000 PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x5 SWAP1 DUP3 ADD MSTORE PUSH32 0x6C6F72656D000000000000000000000000000000000000000000000000000000 PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xD SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455645525400000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE PUSH1 0xE SWAP1 DUP3 ADD MSTORE PUSH32 0x53494D504C455F52455155495245000000000000000000000000000000000000 PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x80 PUSH1 0x20 DUP5 ADD MSTORE DUP1 MLOAD PUSH1 0xA0 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD MLOAD PUSH1 0x60 PUSH1 0xC0 DUP6 ADD MSTORE PUSH2 0x1269 PUSH2 0x100 DUP6 ADD DUP3 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60 DUP6 DUP3 SUB ADD PUSH1 0xE0 DUP7 ADD MSTORE PUSH2 0x12A4 DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP POP PUSH1 0x20 DUP5 ADD MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP1 DUP6 DUP5 SUB ADD PUSH1 0x40 DUP7 ADD MSTORE PUSH2 0x12E2 DUP4 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 DUP8 ADD MLOAD SWAP4 POP DUP2 DUP7 DUP3 SUB ADD PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x12FD DUP2 DUP6 PUSH2 0xF16 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x60 DUP7 ADD MLOAD SWAP3 POP DUP1 DUP6 DUP4 SUB ADD PUSH1 0x80 DUP7 ADD MSTORE POP PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 MLOAD MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE DUP3 MLOAD PUSH1 0x40 PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x134C PUSH1 0x60 DUP5 ADD DUP3 PUSH2 0xF60 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP5 DUP3 SUB ADD PUSH1 0x40 DUP6 ADD MSTORE PUSH2 0x131C DUP2 DUP4 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1158 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xF60 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCB4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xF16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x13DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x13FE JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x13E6 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x140D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x401 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG3 PUSH6 0x627A7A723158 KECCAK256 PUSH32 0x854B76FC684DE0BE1F1A5DB2D486BC187FF28D1E99D27CA0F61B452A1942F6C PUSH6 0x78706572696D PUSH6 0x6E74616CF564 PUSH20 0x6F6C634300050B00400000000000000000000000 ", + "sourceMap": "641:6754:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;641:6754:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1496:107;;;:::i;:::-;;3110:63;;;;;;;;;:::i;6359:128::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;4968:84;;;;;;;;;:::i;6982:345::-;;;;;;;;;:::i;:::-;;;;;;;;;;2288:334;;;;;;;;;:::i;:::-;;;;;;;;2948:52;;;;;;;5964:117;;;:::i;1389:101::-;;;:::i;1286:97::-;;;:::i;4321:153::-;;;:::i;:::-;;;;;;;;4053:73;;;:::i;:::-;;;;;;;;1609:111;;;:::i;2776:166::-;;;;;;;;;:::i;3319:52::-;;;;;;;4500:72;;;:::i;6560:317::-;;;;;;;;;:::i;:::-;;;;;;;;5773:112;;;:::i;989:140::-;;;;;;;;;:::i;4577:69::-;;;:::i;862:121::-;;;:::i;3984:64::-;;;;;;;4652:134;;;:::i;:::-;;;;;;;;;3809:80;;;:::i;:::-;;;;;;;;5118:125;;;:::i;3453:350::-;;;:::i;:::-;;;;;;;;1135:145;;;:::i;6160:123::-;;;;;;;;;:::i;4792:47::-;;;;;;;1496:107;1564:32;;;;;;;;;;;;;;;;;;;;1496:107::o;3110:63::-;;:::o;6359:128::-;-1:-1:-1;6476:4:0;;6359:128::o;4968:84::-;5029:10;5018:27;;;5041:3;5018:27;;;;;;;;;;;;;;;4968:84;:::o;6982:345::-;-1:-1:-1;;7229:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6982:345:0:o;2288:334::-;2399:21;2436:19;:56;;;;;;;;;;;;;;;;;;;2502:20;2552:6;2560:4;2535:30;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2535:30:0;;;2525:41;;;;;;2502:64;;2583:32;2593:12;2607:1;2610;2613;2583:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2583:32:0;;;;;;2288:334;-1:-1:-1;;;;;;;;2288:334:0:o;5964:117::-;6070:4;5964:117;;:::o;1389:101::-;1469:13;;;;;;;;;;;;;;;;1462:21;;;;;;;1469:13;1462:21;;;;1286:97;1353:23;;;;;;;;;;;4321:153;4415:51;;:::i;4053:73::-;4103:19;;:::i;1609:111::-;1698:14;;;;;;;;;;;;;;;;1683:30;;;;;;;1698:14;1683:30;;;;2776:166;-1:-1:-1;2934:1:0;;2776:166;-1:-1:-1;;;2776:166:0:o;4500:72::-;4540:4;4555:14;;4568:1;4555:14;;;;;4500:72;:::o;6560:317::-;6674:20;;:::i;:::-;-1:-1:-1;6717:153:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6560:317::o;5773:112::-;5857:21;;989:140;1117:1;:5;;989:140::o;4577:69::-;4629:9;:14;;4642:1;4629:14;;;4577:69::o;862:121::-;975:1;862:121;:::o;4652:134::-;4760:19;;;;;;;;;;;;;;;;;4768:1;4652:134;:::o;3809:80::-;3870:15;3809:80;:::o;5118:125::-;5167:69;;;;;;;;;;;;;;;5118:125::o;3453:350::-;3497:15;;:::i;:::-;3551:14;;;3563:1;3551:14;;;3524:24;3551:14;;;;;;;;;;;;;;;;;;;;;;;;;;3524:41;;3575:22;;;;;;;;;;;;;;;;;:9;3585:1;3575:12;;;;;;;;;;;;;:22;;;;3607;;;;;;;;;;;;;;;;;:9;3617:1;3607:12;;;;;;;;;;;;;;;;;;:22;;;;3647:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3647:149:0;;;;-1:-1:-1;3453:350:0;:::o;1135:145::-;711:4;1135:145;:::o;641:6754::-;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;158:685:-1:-;;276:3;269:4;261:6;257:17;253:27;243:2;;-1:-1;;284:12;243:2;331:6;318:20;32471:18;32463:6;32460:30;32457:2;;;-1:-1;;32493:12;32457:2;32538:4;353:81;32601:4;32538;32530:6;32526:17;32591:15;353:81;;;462:21;;;344:90;-1:-1;519:14;;;494:17;;;614:1;599:238;624:6;621:1;618:13;599:238;;;731:42;769:3;506:4;707:3;694:17;498:6;682:30;;731:42;;;719:55;;788:14;;;;816;;;;646:1;639:9;599:238;;;603:14;;;;;236:607;;;;;1706:432;;1803:3;1796:4;1788:6;1784:17;1780:27;1770:2;;-1:-1;;1811:12;1770:2;1858:6;1845:20;33078:18;33070:6;33067:30;33064:2;;;-1:-1;;33100:12;33064:2;1880:60;33241:4;33173:9;1796:4;33158:6;33154:17;33150:33;33231:15;1880:60;;;1871:69;;1960:6;1953:5;1946:21;2064:3;33241:4;2055:6;1988;2046:16;;2043:25;2040:2;;;2081:1;;2071:12;2040:2;37579:6;33241:4;1988:6;1984:17;33241:4;2022:5;2018:16;37556:30;37635:1;37617:16;;;33241:4;37617:16;37610:27;2022:5;1763:375;-1:-1;;1763:375;5221:1071;;5329:4;5317:9;5312:3;5308:19;5304:30;5301:2;;;-1:-1;;5337:12;5301:2;5365:20;5329:4;5365:20;;;5356:29;;5468:1;5453:17;5440:31;5491:18;;5483:6;5480:30;5477:2;;;5523:1;5520;5513:12;5477:2;5557:54;5607:3;5598:6;5587:9;5583:22;5557:54;;;5540:15;5533:79;5678:2;5735:9;5731:22;7616:20;7607:29;;37386:10;38693:5;37375:22;38669:5;38666:34;38656:2;;38714:1;38711;38704:12;38656:2;5711:48;5678:2;5697:5;5693:16;5686:74;5865:2;5854:9;5850:18;5837:32;5823:46;;5889:18;5881:6;5878:30;5875:2;;;5921:1;5918;5911:12;5875:2;5956:75;6027:3;6018:6;6007:9;6003:22;5956:75;;;5865:2;5942:5;5938:16;5931:101;6124:2;6113:9;6109:18;6096:32;6082:46;;6148:18;6140:6;6137:30;6134:2;;;6180:1;6177;6170:12;6134:2;;6215:55;6266:3;6257:6;6246:9;6242:22;6215:55;;;6124:2;6201:5;6197:16;6190:81;;;5295:997;;;;;7818:743;;;;;;7990:3;7978:9;7969:7;7965:23;7961:33;7958:2;;;-1:-1;;7997:12;7958:2;85:6;72:20;97:33;124:5;97:33;;;8049:63;-1:-1;8149:2;8188:22;;7480:20;;-1:-1;8257:2;8296:22;;7480:20;;-1:-1;8365:2;8404:22;;72:20;97:33;72:20;97:33;;;7952:609;;;;-1:-1;7952:609;;8473:3;8513:22;7480:20;;7952:609;-1:-1;;7952:609;8568:387;;8702:2;8690:9;8681:7;8677:23;8673:32;8670:2;;;-1:-1;;8708:12;8670:2;8766:17;8753:31;8804:18;8796:6;8793:30;8790:2;;;-1:-1;;8826:12;8790:2;8856:83;8931:7;8922:6;8911:9;8907:22;8856:83;;;8846:93;8664:291;-1:-1;;;;8664:291;8962:613;;;;;9115:3;9103:9;9094:7;9090:23;9086:33;9083:2;;;-1:-1;;9122:12;9083:2;1648:6;1635:20;9174:63;;9274:2;9315:9;9311:22;7750:20;37480:4;38813:5;37469:16;38790:5;38787:33;38777:2;;-1:-1;;38824:12;38777:2;9077:498;;9282:61;;-1:-1;;;;9380:2;9419:22;;1635:20;;9488:2;9527:22;1635:20;;9077:498;9582:345;;9695:2;9683:9;9674:7;9670:23;9666:32;9663:2;;;-1:-1;;9701:12;9663:2;9759:17;9746:31;9797:18;9789:6;9786:30;9783:2;;;-1:-1;;9819:12;9783:2;9849:62;9903:7;9894:6;9883:9;9879:22;9849:62;;9934:239;;10037:2;10025:9;10016:7;10012:23;10008:32;10005:2;;;-1:-1;;10043:12;10005:2;-1:-1;2661:20;;9999:174;-1:-1;9999:174;10534:385;;10667:2;10655:9;10646:7;10642:23;10638:32;10635:2;;;10683:1;10680;10673:12;10635:2;10731:17;10718:31;10769:18;;10761:6;10758:30;10755:2;;;10801:1;10798;10791:12;10755:2;10886:6;10875:9;10871:22;3780:4;3768:9;3763:3;3759:19;3755:30;3752:2;;;3798:1;3795;3788:12;3752:2;3816:20;3780:4;3816:20;;;3807:29;;7493:6;7480:20;3899:15;3892:74;10667:2;4043:9;4039:18;4026:32;4078:18;4070:6;4067:30;4064:2;;;4110:1;4107;4100:12;4064:2;4145:54;4195:3;4186:6;4175:9;4171:22;4145:54;;;10667:2;4131:5;4127:16;4120:80;;4288:2;4277:9;4273:18;4260:32;4312:18;4304:6;4301:30;4298:2;;;4344:1;4341;4334:12;4298:2;4379:55;4430:3;4421:6;4410:9;4406:22;4379:55;;;4288:2;4361:16;;4354:81;-1:-1;4365:5;;10629:290;-1:-1;;;;;10629:290;10926:385;;11059:2;11047:9;11038:7;11034:23;11030:32;11027:2;;;11075:1;11072;11065:12;11027:2;11123:17;11110:31;11161:18;;11153:6;11150:30;11147:2;;;11193:1;11190;11183:12;11147:2;11278:6;11267:9;11263:22;4619:4;4607:9;4602:3;4598:19;4594:30;4591:2;;;4637:1;4634;4627:12;4591:2;4655:20;4619:4;4655:20;;;4646:29;;4745:17;4732:31;4783:18;4775:6;4772:30;4769:2;;;4815:1;4812;4805:12;4769:2;4849:68;4913:3;4904:6;4893:9;4889:22;4849:68;;;4832:15;4825:93;;11059:2;5003:9;4999:18;4986:32;5038:18;5030:6;5027:30;5024:2;;;5070:1;5067;5060:12;5024:2;5105:55;5156:3;5147:6;5136:9;5132:22;5105:55;;;11059:2;5087:16;;5080:81;-1:-1;5091:5;;11021:290;-1:-1;;;;;11021:290;11318:373;;11445:2;11433:9;11424:7;11420:23;11416:32;11413:2;;;-1:-1;;11451:12;11413:2;11509:17;11496:31;11547:18;11539:6;11536:30;11533:2;;;-1:-1;;11569:12;11533:2;11599:76;11667:7;11658:6;11647:9;11643:22;11599:76;;11946:701;;;;12103:2;12091:9;12082:7;12078:23;12074:32;12071:2;;;12119:1;12116;12109:12;12071:2;7493:6;7480:20;12161:63;;12289:2;12278:9;12274:18;12261:32;12313:18;;12305:6;12302:30;12299:2;;;12345:1;12342;12335:12;12299:2;12365:62;12419:7;12410:6;12399:9;12395:22;12365:62;;;12355:72;;12492:2;12481:9;12477:18;12464:32;12450:46;;12516:18;12508:6;12505:30;12502:2;;;12548:1;12545;12538:12;12502:2;;12568:63;12623:7;12614:6;12603:9;12599:22;12568:63;;;12558:73;;;12065:582;;;;;;15443:343;;15585:5;34685:12;35771:6;35766:3;35759:19;15678:52;15723:6;35808:4;35803:3;35799:14;35808:4;15704:5;15700:16;15678:52;;;38097:2;38077:14;38093:7;38073:28;15742:39;;;;35808:4;15742:39;;15533:253;-1:-1;;15533:253;22988:1078;;23212:15;23206:22;23135:4;23248:13;23241:37;23293:67;23135:4;23130:3;23126:14;23341:12;23293:67;;;23450:4;;;37386:10;23450:4;23443:5;23439:16;23433:23;37375:22;23517:4;23512:3;23508:14;25494:36;23618:4;23611:5;23607:16;23601:23;23670:3;23664:4;23660:14;23618:4;23648:3;23644:14;23637:38;23690:109;13419:5;34685:12;35771:6;35766:3;35759:19;35808:4;35803:3;35799:14;13431:88;;23450:4;13584;13576:6;13572:17;35803:3;13563:27;;34370:4;13662:5;34361:14;-1:-1;13707:10;;13701:341;13726:6;13723:1;13720:13;13701:341;;;13778:20;35803:3;13782:4;13778:20;;13773:3;13766:33;12766:60;12822:3;13833:6;13827:13;12766:60;;;13748:1;13741:9;;;;;14021:14;;;;13847:82;-1:-1;35485:14;;13701:341;;;13705:14;23887:4;23880:5;23876:16;23870:23;23850:43;;23939:3;23933:4;23929:14;23887:4;23917:3;23913:14;23906:38;23959:69;24023:4;24009:12;23959:69;;;24050:11;23108:958;-1:-1;;;;;;;;;23108:958;25656:401;;15953:5;34685:12;16064:52;16109:6;16104:3;16097:4;16090:5;16086:16;16064:52;;;16128:16;;;;15235:37;;;-1:-1;16097:4;26020:12;;25809:248;-1:-1;25809:248;26064:213;37180:42;37169:54;;;;13153:37;;26182:2;26167:18;;26153:124;26284:437;;26490:2;;26479:9;26475:18;26530:20;26511:17;26504:47;26565:146;14406:5;34685:12;35771:6;35766:3;35759:19;35799:14;26479:9;35799:14;14418:112;;35799:14;14595:4;14587:6;14583:17;26479:9;14574:27;;14562:39;;34370:4;14691:5;34361:14;-1:-1;14730:387;14755:6;14752:1;14749:13;14730:387;;;14807:20;26479:9;14811:4;14807:20;;14802:3;14795:33;12980:88;13064:3;14862:6;14856:13;12980:88;;;14876:110;-1:-1;15096:14;;;;35485;;;;14777:1;14770:9;14730:387;;;-1:-1;26557:154;;26461:260;-1:-1;;;;;;;26461:260;26728:539;15235:37;;;37480:4;37469:16;;;;27087:2;27072:18;;25609:35;27170:2;27155:18;;15235:37;27253:2;27238:18;;15235:37;26926:3;26911:19;;26897:370;27274:691;;27504:2;27525:17;27518:47;27579:76;27504:2;27493:9;27489:18;27641:6;27579:76;;;27703:9;27697:4;27693:20;27688:2;27677:9;27673:18;27666:48;27728:76;27799:4;27790:6;27728:76;;;27852:9;27846:4;27842:20;27837:2;27826:9;27822:18;27815:48;27877:78;27950:4;27941:6;27877:78;;;27869:86;27475:490;-1:-1;;;;;;;27475:490;27972:293;;28106:2;28127:17;28120:47;28181:74;28106:2;28095:9;28091:18;28241:6;28181:74;;;28173:82;28077:188;-1:-1;;;28077:188;28272:710;28563:2;28577:47;;;18099:1;28548:18;;;35759:19;18134:66;35799:14;;;18114:87;18220:12;35808:4;28786:18;;28779:48;;;17729:1;18220:12;;;35759:19;17764:66;35799:14;;;17744:87;17850:12;;;28534:448;28989:407;29180:2;29194:47;;;18471:2;29165:18;;;35759:19;18507:66;35799:14;;;18487:87;18593:12;;;29151:245;29403:407;29594:2;29608:47;;;18844:2;29579:18;;;35759:19;18880:66;35799:14;;;18860:87;18966:12;;;29565:245;29817:381;;29995:2;30016:17;30009:47;20161:15;20155:22;20088:4;29995:2;29984:9;29980:18;20190:37;19281:15;19275:22;20079:14;29984:9;20079:14;15235:37;29995:2;19436:5;19432:16;19426:23;19210:4;19469:14;29984:9;19469:14;19462:38;19515:67;19201:14;29984:9;19201:14;19563:12;19515:67;;;19666:4;19659:5;19655:16;19649:23;19629:43;;19708:14;29984:9;19712:4;19708:14;;19692;29984:9;19692:14;19685:38;19738:69;19802:4;19788:12;19738:69;;;19829:11;;;;29995:2;20428:5;20424:16;20418:23;20477:14;;29984:9;20481:4;20477:14;;19666:4;29984:9;20461:14;20454:38;20507:67;20569:4;20555:12;20507:67;;;19666:4;20653:5;20649:16;20643:23;20623:43;;20702:14;29984:9;20706:4;20702:14;;19210:4;29984:9;20686:14;20679:38;20732:67;20794:4;20780:12;20732:67;;;20724:75;;;19210:4;20878:5;20874:16;20868:23;20848:43;;20927:14;29984:9;20931:4;20927:14;;20088:4;29984:9;20911:14;20904:38;;20957:69;21021:4;21007:12;20957:69;;;30062:126;29966:232;-1:-1;;;;;29966:232;30205:453;21492:22;;22809;15235:37;;30443:2;30428:18;;30414:244;30665:377;;30841:2;30862:17;30855:47;22009:15;22003:22;21930:4;30841:2;30830:9;30826:18;22038:37;22090:95;21921:14;30830:9;21921:14;22166:12;22090:95;;;30841:2;22270:5;22266:16;22260:23;22240:43;;22319:14;30830:9;22323:4;22319:14;;21930:4;30830:9;22303:14;22296:38;22349:69;22413:4;22399:12;22349:69;;31049:353;;31213:2;31234:17;31227:47;31288:104;31213:2;31202:9;31198:18;31378:6;31288:104;;31409:213;15235:37;;;31527:2;31512:18;;31498:124;31629:412;;15265:5;15242:3;15235:37;31795:2;31913;31902:9;31898:18;31891:48;31953:78;31795:2;31784:9;31780:18;32017:6;31953:78;;32048:256;32110:2;32104:9;32136:17;;;32211:18;32196:34;;32232:22;;;32193:62;32190:2;;;32268:1;;32258:12;32190:2;32110;32277:22;32088:216;;-1:-1;32088:216;37652:268;37717:1;37724:101;37738:6;37735:1;37732:13;37724:101;;;37805:11;;;37799:18;37786:11;;;37779:39;37760:2;37753:10;37724:101;;;37840:6;37837:1;37834:13;37831:2;;;37717:1;37896:6;37891:3;37887:16;37880:27;37831:2;;37701:219;;;;38114:117;37180:42;38201:5;37169:54;38176:5;38173:35;38163:2;;38222:1;;38212:12" } } }, @@ -860,12 +813,12 @@ } }, "sourceCodes": { - "AbiGenDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma experimental ABIEncoderV2;\n\npragma solidity ^0.5.5;\n\n\ncontract AbiGenDummy\n{\n\n uint256 constant internal SOME_CONSTANT = 1234;\n string constant internal REVERT_REASON = \"REVERT_WITH_CONSTANT\";\n string constant internal REQUIRE_REASON = \"REQUIRE_WITH_CONSTANT\";\n mapping (uint256 => uint256) public someMapping;\n\n function simplePureFunction ()\n public\n pure\n returns (uint256 result)\n {\n return 1;\n }\n\n function simplePureFunctionWithInput (uint256 x)\n public\n pure\n returns (uint256 sum)\n {\n return 1 + x;\n }\n\n function pureFunctionWithConstant ()\n public\n pure\n returns (uint256 someConstant)\n {\n return SOME_CONSTANT;\n }\n\n function simpleRevert ()\n public\n pure\n {\n revert(\"SIMPLE_REVERT\");\n }\n\n function revertWithConstant ()\n public\n pure\n {\n revert(REVERT_REASON);\n }\n\n function simpleRequire ()\n public\n pure\n {\n require(0 > 1, \"SIMPLE_REQUIRE\");\n }\n\n function requireWithConstant ()\n public\n pure\n {\n require(0 > 1, REQUIRE_REASON);\n }\n\n /// @dev test that devdocs will be generated and\n /// that multiline devdocs will look okay\n /// @param hash description of some hash. Let's make this line super long to demonstrate hanging indents for method params. It has to be more than one hundred twenty columns.\n /// @param v some v, recovery id\n /// @param r ECDSA r output\n /// @param s ECDSA s output\n /// @return the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.\n function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n public\n pure\n returns (address signerAddress)\n {\n bytes memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, hash));\n return ecrecover(prefixedHash, v, r, s);\n }\n\n // test: generated code should normalize address inputs to lowercase\n // add extra inputs to make sure it works with address in any position\n function withAddressInput(address x, uint256 a, uint256 b, address y, uint256 c)\n public\n pure\n returns (address z)\n {\n return x;\n }\n\n function acceptsBytes(bytes memory a) public pure {}\n\n /// @dev a method that accepts an array of bytes\n /// @param a the array of bytes being accepted\n function acceptsAnArrayOfBytes(bytes[] memory a) public pure {}\n\n struct Struct {\n bytes someBytes;\n uint32 anInteger;\n bytes[] aDynamicArrayOfBytes;\n string aString;\n }\n\n function structInput(Struct memory s) public pure {}\n\n /// @dev a method that returns a struct\n /// @return a Struct struct\n function structOutput() public pure returns(Struct memory s) {\n bytes[] memory byteArray = new bytes[](2);\n byteArray[0] = \"0x123\";\n byteArray[1] = \"0x321\";\n\n return Struct({\n someBytes: \"0x123\",\n anInteger: 5,\n aDynamicArrayOfBytes: byteArray,\n aString: \"abc\"\n });\n }\n\n function methodReturningArrayOfStructs() public pure returns(Struct[] memory) {}\n\n struct NestedStruct {\n Struct innerStruct;\n string description;\n }\n\n function nestedStructInput(NestedStruct memory n) public pure {}\n function nestedStructOutput() public pure returns(NestedStruct memory) {}\n\n struct StructNotDirectlyUsedAnywhere {\n uint256 aField;\n }\n\n struct NestedStructWithInnerStructNotUsedElsewhere {\n StructNotDirectlyUsedAnywhere innerStruct;\n }\n\n function methodUsingNestedStructWithInnerStructNotUsedElsewhere()\n public pure returns(NestedStructWithInnerStructNotUsedElsewhere memory)\n {}\n\n uint someState;\n function nonPureMethod() public returns(uint) { return someState += 1; }\n function nonPureMethodThatReturnsNothing() public { someState += 1; }\n\n function methodReturningMultipleValues()\n public pure returns (uint256, string memory)\n {\n return (1, \"hello\");\n }\n\n function overloadedMethod(int a) public pure {}\n function overloadedMethod(string memory a) public pure {}\n\n\n event Withdrawal(address indexed _owner, uint _value);\n\n function withdraw(uint wad) public {\n emit Withdrawal(msg.sender, wad);\n }\n\n event SimpleEvent(bytes someBytes, string someString);\n\n function emitSimpleEvent() public {\n emit SimpleEvent(\n hex'12345678',\n \"lorem\"\n );\n }\n\n function nonPureFunction (uint256 id, uint256 someValue)\n public\n returns (uint256 result)\n {\n someMapping[id] = someValue + 1;\n return someMapping[id];\n }\n\n // begin tests for `decodeTransactionData`, `decodeReturnData`\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexInput {\n uint256 foo;\n bytes bar;\n string car;\n }\n\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexOutput {\n ComplexInput input;\n bytes lorem;\n bytes ipsum;\n string dolor;\n }\n\n /// @dev Tests decoding when both input and output are empty.\n function noInputNoOutput()\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when input is empty and output is non-empty.\n function noInputSimpleOutput()\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when input is not empty but output is empty.\n function simpleInputNoOutput(uint256)\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when both input and output are non-empty.\n function simpleInputSimpleOutput(uint256)\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when the input and output are complex.\n function complexInputComplexOutput(ComplexInput memory complexInput)\n public\n pure\n returns (ComplexOutput memory)\n {\n return ComplexOutput({\n input: complexInput,\n lorem: hex'12345678',\n ipsum: hex'87654321',\n dolor: \"amet\"\n });\n }\n\n /// @dev Tests decoding when the input and output are complex and have more than one argument.\n function multiInputMultiOutput(\n uint256,\n bytes memory,\n string memory\n )\n public\n pure\n returns (\n bytes memory,\n bytes memory,\n string memory\n )\n {\n return (\n hex'12345678',\n hex'87654321',\n \"amet\"\n );\n }\n\n // end tests for `decodeTransactionData`, `decodeReturnData`\n}\n" + "AbiGenDummy.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma experimental ABIEncoderV2;\n\npragma solidity ^0.5.5;\n\n\ncontract AbiGenDummy\n{\n\n uint256 constant internal SOME_CONSTANT = 1234;\n string constant internal REVERT_REASON = \"REVERT_WITH_CONSTANT\";\n string constant internal REQUIRE_REASON = \"REQUIRE_WITH_CONSTANT\";\n\n function simplePureFunction ()\n public\n pure\n returns (uint256 result)\n {\n return 1;\n }\n\n function simplePureFunctionWithInput (uint256 x)\n public\n pure\n returns (uint256 sum)\n {\n return 1 + x;\n }\n\n function pureFunctionWithConstant ()\n public\n pure\n returns (uint256 someConstant)\n {\n return SOME_CONSTANT;\n }\n\n function simpleRevert ()\n public\n pure\n {\n revert(\"SIMPLE_REVERT\");\n }\n\n function revertWithConstant ()\n public\n pure\n {\n revert(REVERT_REASON);\n }\n\n function simpleRequire ()\n public\n pure\n {\n require(0 > 1, \"SIMPLE_REQUIRE\");\n }\n\n function requireWithConstant ()\n public\n pure\n {\n require(0 > 1, REQUIRE_REASON);\n }\n\n /// @dev test that devdocs will be generated and\n /// that multiline devdocs will look okay\n /// @param hash description of some hash. Let's make this line super long to demonstrate hanging indents for method params. It has to be more than one hundred twenty columns.\n /// @param v some v, recovery id\n /// @param r ECDSA r output\n /// @param s ECDSA s output\n /// @return the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.\n function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)\n public\n pure\n returns (address signerAddress)\n {\n bytes memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, hash));\n return ecrecover(prefixedHash, v, r, s);\n }\n\n // test: generated code should normalize address inputs to lowercase\n // add extra inputs to make sure it works with address in any position\n function withAddressInput(address x, uint256 a, uint256 b, address y, uint256 c)\n public\n pure\n returns (address z)\n {\n return x;\n }\n\n function acceptsBytes(bytes memory a) public pure {}\n\n /// @dev a method that accepts an array of bytes\n /// @param a the array of bytes being accepted\n function acceptsAnArrayOfBytes(bytes[] memory a) public pure {}\n\n struct Struct {\n bytes someBytes;\n uint32 anInteger;\n bytes[] aDynamicArrayOfBytes;\n string aString;\n }\n\n function structInput(Struct memory s) public pure {}\n\n /// @dev a method that returns a struct\n /// @return a Struct struct\n function structOutput() public pure returns(Struct memory s) {\n bytes[] memory byteArray = new bytes[](2);\n byteArray[0] = \"0x123\";\n byteArray[1] = \"0x321\";\n\n return Struct({\n someBytes: \"0x123\",\n anInteger: 5,\n aDynamicArrayOfBytes: byteArray,\n aString: \"abc\"\n });\n }\n\n function methodReturningArrayOfStructs() public pure returns(Struct[] memory) {}\n\n struct NestedStruct {\n Struct innerStruct;\n string description;\n }\n\n function nestedStructInput(NestedStruct memory n) public pure {}\n function nestedStructOutput() public pure returns(NestedStruct memory) {}\n\n struct StructNotDirectlyUsedAnywhere {\n uint256 aField;\n }\n\n struct NestedStructWithInnerStructNotUsedElsewhere {\n StructNotDirectlyUsedAnywhere innerStruct;\n }\n\n function methodUsingNestedStructWithInnerStructNotUsedElsewhere()\n public pure returns(NestedStructWithInnerStructNotUsedElsewhere memory)\n {}\n\n uint someState;\n function nonPureMethod() public returns(uint) { return someState += 1; }\n function nonPureMethodThatReturnsNothing() public { someState += 1; }\n\n function methodReturningMultipleValues()\n public pure returns (uint256, string memory)\n {\n return (1, \"hello\");\n }\n\n function overloadedMethod(int a) public pure {}\n function overloadedMethod(string memory a) public pure {}\n\n\n event Withdrawal(address indexed _owner, uint _value);\n\n function withdraw(uint wad) public {\n emit Withdrawal(msg.sender, wad);\n }\n\n event SimpleEvent(bytes someBytes, string someString);\n\n function emitSimpleEvent() public {\n emit SimpleEvent(\n hex'12345678',\n \"lorem\"\n );\n }\n\n // begin tests for `decodeTransactionData`, `decodeReturnData`\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexInput {\n uint256 foo;\n bytes bar;\n string car;\n }\n\n /// @dev complex input is dynamic and more difficult to decode than simple input.\n struct ComplexOutput {\n ComplexInput input;\n bytes lorem;\n bytes ipsum;\n string dolor;\n }\n\n /// @dev Tests decoding when both input and output are empty.\n function noInputNoOutput()\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when input is empty and output is non-empty.\n function noInputSimpleOutput()\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when input is not empty but output is empty.\n function simpleInputNoOutput(uint256)\n public\n pure\n {\n // NOP\n require(true == true);\n }\n\n /// @dev Tests decoding when both input and output are non-empty.\n function simpleInputSimpleOutput(uint256)\n public\n pure\n returns (uint256)\n {\n return 1991;\n }\n\n /// @dev Tests decoding when the input and output are complex.\n function complexInputComplexOutput(ComplexInput memory complexInput)\n public\n pure\n returns (ComplexOutput memory)\n {\n return ComplexOutput({\n input: complexInput,\n lorem: hex'12345678',\n ipsum: hex'87654321',\n dolor: \"amet\"\n });\n }\n\n /// @dev Tests decoding when the input and output are complex and have more than one argument.\n function multiInputMultiOutput(\n uint256,\n bytes memory,\n string memory\n )\n public\n pure\n returns (\n bytes memory,\n bytes memory,\n string memory\n )\n {\n return (\n hex'12345678',\n hex'87654321',\n \"amet\"\n );\n }\n\n // end tests for `decodeTransactionData`, `decodeReturnData`\n}\n" }, - "sourceTreeHashHex": "0x326738f7809f2f704e9d78167b15da864e2c3468e3a7edc6a8a5d89662d73b20", + "sourceTreeHashHex": "0x99694ecb2e7ed146b4d0030335f82b2190ee0f4b2639514f3aebdd99ae2decf0", "compiler": { "name": "solc", - "version": "soljson-v0.5.12+commit.7709ece9.js", + "version": "soljson-v0.5.11+commit.c082d0b4.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json index eb060bc079..047fc3ea79 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/LibDummy.json @@ -9,14 +9,14 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032", - "opcodes": "PUSH1 0x55 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY 0xc7 DIFFICULTY 0x2e PUSH21 0x86017ED5720D9DA5F4E361BEAC78B78C346709EBCA GASLIMIT PUSH31 0xEC00558064736F6C634300050C003200000000000000000000000000000000 ", + "object": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b14322cd05aa1dcae66812e472d3ab85cced78118ea7f9a5098d073b2accc45964736f6c634300050a0032", + "opcodes": "PUSH1 0x55 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xb1 NUMBER 0x22 0xcd SDIV 0xaa SAR 0xca 0xe6 PUSH9 0x12E472D3AB85CCED78 GT DUP15 0xa7 0xf9 0xa5 MULMOD DUP14 SMOD EXTCODESIZE 0x2a 0xcc 0xc4 MSIZE PUSH5 0x736F6C6343 STOP SDIV EXP STOP ORIGIN ", "sourceMap": "606:385:1:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032", - "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLDATACOPY 0xc7 DIFFICULTY 0x2e PUSH21 0x86017ED5720D9DA5F4E361BEAC78B78C346709EBCA GASLIMIT PUSH31 0xEC00558064736F6C634300050C003200000000000000000000000000000000 ", + "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72305820b14322cd05aa1dcae66812e472d3ab85cced78118ea7f9a5098d073b2accc45964736f6c634300050a0032", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xb1 NUMBER 0x22 0xcd SDIV 0xaa SAR 0xca 0xe6 PUSH9 0x12E472D3AB85CCED78 GT DUP15 0xa7 0xf9 0xa5 MULMOD DUP14 SMOD EXTCODESIZE 0x2a 0xcc 0xc4 MSIZE PUSH5 0x736F6C6343 STOP SDIV EXP STOP ORIGIN ", "sourceMap": "606:385:1:-;;;;;;;;" } } @@ -29,10 +29,10 @@ "sourceCodes": { "LibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\n\nlibrary LibDummy {\n\n using LibDummy for uint256;\n uint256 constant internal SOME_CONSTANT = 1234;\n\n function addOne (uint256 x)\n internal\n pure\n returns (uint256 sum)\n {\n return x + 1;\n }\n\n function addConstant (uint256 x)\n internal\n pure\n returns (uint256 someConstant)\n {\n return x + SOME_CONSTANT;\n }\n}\n" }, - "sourceTreeHashHex": "0xd7314c6b96d3195f1d6823802c5a01b0090fe630f4908495ba19d9c298b3ded1", + "sourceTreeHashHex": "0xe9654f3d694bd3513dddbcc0ccd7a75739bf63dc92b974e163f191122416fdb6", "compiler": { "name": "solc", - "version": "soljson-v0.5.12+commit.7709ece9.js", + "version": "soljson-v0.5.10+commit.5a6ea5b1.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json b/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json index d91fd00da2..b020c5e896 100644 --- a/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json +++ b/packages/abi-gen/test-cli/fixtures/artifacts/TestLibDummy.json @@ -7,7 +7,6 @@ "constant": true, "inputs": [ { - "internalType": "uint256", "name": "x", "type": "uint256" } @@ -15,7 +14,6 @@ "name": "publicAddConstant", "outputs": [ { - "internalType": "uint256", "name": "result", "type": "uint256" } @@ -28,7 +26,6 @@ "constant": true, "inputs": [ { - "internalType": "uint256", "name": "x", "type": "uint256" } @@ -36,7 +33,6 @@ "name": "publicAddOne", "outputs": [ { - "internalType": "uint256", "name": "result", "type": "uint256" } @@ -52,14 +48,14 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b5060d78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xD7 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xe2 PUSH27 0x1E15A4D00B0A4F69DEDD0DD86BD421688814D0CB18D3442EFB8E48 0xc0 PUSH28 0xE564736F6C634300050C003200000000000000000000000000000000 ", + "object": "0x608060405234801561001057600080fd5b5060d78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xD7 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xdd 0xb7 KECCAK256 0xd1 0x4b CALLVALUE PUSH10 0x4DAAEFEBCBD729AF6AE0 0x4f LOG2 0x23 0x24 DUP2 DUP2 0x2d 0xd8 REVERT 0xe6 RETURNDATASIZE PUSH11 0x4C32C164736F6C63430005 EXP STOP ORIGIN ", "sourceMap": "632:346:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:346:2;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xe2 PUSH27 0x1E15A4D00B0A4F69DEDD0DD86BD421688814D0CB18D3442EFB8E48 0xc0 PUSH28 0xE564736F6C634300050C003200000000000000000000000000000000 ", + "object": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x22935E92 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x2B82FDF0 EQ PUSH1 0x63 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x4B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x51 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x95 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x86 DUP3 PUSH1 0x9C JUMP JUMPDEST PUSH2 0x4D2 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 ADD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723058 KECCAK256 0xdd 0xb7 KECCAK256 0xd1 0x4b CALLVALUE PUSH10 0x4DAAEFEBCBD729AF6AE0 0x4f LOG2 0x23 0x24 DUP2 DUP2 0x2d 0xd8 REVERT 0xe6 RETURNDATASIZE PUSH11 0x4C32C164736F6C63430005 EXP STOP ORIGIN ", "sourceMap": "632:346:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;632:346:2;;;;;;;;;;;;;;;;;;;;;;;;833:143;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;833:143:2;;:::i;:::-;;;;;;;;;;;;;;;;694:133;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;694:133:2;;:::i;833:143::-;917:14;954:15;:1;:13;:15::i;:::-;947:22;833:143;-1:-1:-1;;833:143:2:o;694:133::-;773:14;810:10;:1;:8;:10::i;842:147:1:-;704:4;965:17;;842:147::o;715:121::-;828:1;824:5;;715:121::o" } } @@ -76,10 +72,10 @@ "TestLibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\nimport \"./LibDummy.sol\";\n\n\ncontract TestLibDummy {\n\n using LibDummy for uint256;\n\n function publicAddOne (uint256 x)\n public\n pure\n returns (uint256 result)\n {\n return x.addOne();\n }\n\n function publicAddConstant (uint256 x)\n public\n pure\n returns (uint256 result)\n {\n return x.addConstant();\n }\n}\n", "LibDummy.sol": "/*\n\n Copyright 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.5;\n\n\nlibrary LibDummy {\n\n using LibDummy for uint256;\n uint256 constant internal SOME_CONSTANT = 1234;\n\n function addOne (uint256 x)\n internal\n pure\n returns (uint256 sum)\n {\n return x + 1;\n }\n\n function addConstant (uint256 x)\n internal\n pure\n returns (uint256 someConstant)\n {\n return x + SOME_CONSTANT;\n }\n}\n" }, - "sourceTreeHashHex": "0xd7efa9dfeb2bbdec2bead8b892d1288c1398b34216d26c6a48bffb25c692bbc0", + "sourceTreeHashHex": "0xca99c7d7de9db975842de61e6ec01debdada66cf91d28fc3f2983de3011560dc", "compiler": { "name": "solc", - "version": "soljson-v0.5.12+commit.7709ece9.js", + "version": "soljson-v0.5.10+commit.5a6ea5b1.js", "settings": { "optimizer": { "enabled": true, diff --git a/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol b/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol index b0da9a192a..ed867231f7 100644 --- a/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol +++ b/packages/abi-gen/test-cli/fixtures/contracts/AbiGenDummy.sol @@ -27,7 +27,6 @@ contract AbiGenDummy uint256 constant internal SOME_CONSTANT = 1234; string constant internal REVERT_REASON = "REVERT_WITH_CONSTANT"; string constant internal REQUIRE_REASON = "REQUIRE_WITH_CONSTANT"; - mapping (uint256 => uint256) public someMapping; function simplePureFunction () public @@ -189,14 +188,6 @@ contract AbiGenDummy ); } - function nonPureFunction (uint256 id, uint256 someValue) - public - returns (uint256 result) - { - someMapping[id] = someValue + 1; - return someMapping[id]; - } - // begin tests for `decodeTransactionData`, `decodeReturnData` /// @dev complex input is dynamic and more difficult to decode than simple input. struct ComplexInput { diff --git a/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py b/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py index 1f55f9e7f9..e215b5f7cc 100644 --- a/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py +++ b/packages/abi-gen/test-cli/output/python/abi_gen_dummy/__init__.py @@ -40,7 +40,7 @@ class AbiGenDummyValidator( # type: ignore """No-op input validator.""" -class Tuple0xf95128ef(TypedDict): +class Tuple0x246f9407(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -56,14 +56,10 @@ class Tuple0xf95128ef(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - foo: int - - bar: bytes - - car: str + aField: int -class Tuple0xa057bf41(TypedDict): +class Tuple0x1b9da225(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -79,16 +75,10 @@ class Tuple0xa057bf41(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - input: Tuple0xf95128ef - - lorem: bytes - - ipsum: bytes - - dolor: str + innerStruct: Tuple0x246f9407 -class Tuple0x246f9407(TypedDict): +class Tuple0xcf8ad995(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -104,10 +94,16 @@ class Tuple0x246f9407(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - aField: int + someBytes: bytes + anInteger: int -class Tuple0x1b9da225(TypedDict): + aDynamicArrayOfBytes: List[bytes] + + aString: str + + +class Tuple0xc9bdd2d5(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -123,10 +119,12 @@ class Tuple0x1b9da225(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - innerStruct: Tuple0x246f9407 + innerStruct: Tuple0xcf8ad995 + description: str -class Tuple0xcf8ad995(TypedDict): + +class Tuple0xf95128ef(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -142,16 +140,14 @@ class Tuple0xcf8ad995(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - someBytes: bytes - - anInteger: int + foo: int - aDynamicArrayOfBytes: List[bytes] + bar: bytes - aString: str + car: str -class Tuple0xc9bdd2d5(TypedDict): +class Tuple0xa057bf41(TypedDict): """Python representation of a tuple or struct. Solidity compiler output does not include the names of structs that appear @@ -167,9 +163,53 @@ class Tuple0xc9bdd2d5(TypedDict): accomplished via `str.encode("utf_8")`:code: """ - innerStruct: Tuple0xcf8ad995 + input: Tuple0xf95128ef - description: str + lorem: bytes + + ipsum: bytes + + dolor: str + + +class SimpleRequireMethod(ContractMethod): + """Various interfaces to the simpleRequire method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def call(self, tx_params: Optional[TxParams] = None) -> None: + """Execute underlying contract method via eth_call. + + :param tx_params: transaction parameters + + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().call(tx_params.as_dict()) + + def send_transaction( + self, tx_params: Optional[TxParams] = None + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + :param tx_params: transaction parameters + + """ + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().transact(tx_params.as_dict()) + + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + """Estimate gas consumption of method call.""" + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method().estimateGas(tx_params.as_dict()) class AcceptsAnArrayOfBytesMethod(ContractMethod): @@ -235,8 +275,8 @@ def estimate_gas( return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class AcceptsBytesMethod(ContractMethod): - """Various interfaces to the acceptsBytes method.""" +class SimpleInputSimpleOutputMethod(ContractMethod): + """Various interfaces to the simpleInputSimpleOutput method.""" def __init__( self, @@ -249,47 +289,54 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: bytes): - """Validate the inputs to the acceptsBytes method.""" + def validate_and_normalize_inputs(self, index_0: int): + """Validate the inputs to the simpleInputSimpleOutput method.""" self.validator.assert_valid( - method_name="acceptsBytes", parameter_name="a", argument_value=a + method_name="simpleInputSimpleOutput", + parameter_name="index_0", + argument_value=index_0, ) - a = bytes.fromhex(a.decode("utf-8")) - return a + # safeguard against fractional inputs + index_0 = int(index_0) + return index_0 - def call(self, a: bytes, tx_params: Optional[TxParams] = None) -> None: + def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. + Tests decoding when both input and output are non-empty. + :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method(index_0).call(tx_params.as_dict()) def send_transaction( - self, a: bytes, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when both input and output are non-empty. + :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method(index_0).transact(tx_params.as_dict()) def estimate_gas( - self, a: bytes, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) -class ComplexInputComplexOutputMethod(ContractMethod): - """Various interfaces to the complexInputComplexOutput method.""" +class WithdrawMethod(ContractMethod): + """Various interfaces to the withdraw method.""" def __init__( self, @@ -302,64 +349,49 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, complex_input: Tuple0xf95128ef): - """Validate the inputs to the complexInputComplexOutput method.""" + def validate_and_normalize_inputs(self, wad: int): + """Validate the inputs to the withdraw method.""" self.validator.assert_valid( - method_name="complexInputComplexOutput", - parameter_name="complexInput", - argument_value=complex_input, + method_name="withdraw", parameter_name="wad", argument_value=wad ) - return complex_input + # safeguard against fractional inputs + wad = int(wad) + return wad def call( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, - ) -> Tuple0xa057bf41: + self, wad: int, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. - Tests decoding when the input and output are complex. - :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ - (complex_input) = self.validate_and_normalize_inputs(complex_input) + (wad) = self.validate_and_normalize_inputs(wad) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).call(tx_params.as_dict()) + return self.underlying_method(wad).call(tx_params.as_dict()) def send_transaction( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, + self, wad: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when the input and output are complex. - :param tx_params: transaction parameters - """ - (complex_input) = self.validate_and_normalize_inputs(complex_input) + (wad) = self.validate_and_normalize_inputs(wad) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).transact( - tx_params.as_dict() - ) + return self.underlying_method(wad).transact(tx_params.as_dict()) def estimate_gas( - self, - complex_input: Tuple0xf95128ef, - tx_params: Optional[TxParams] = None, + self, wad: int, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (complex_input) = self.validate_and_normalize_inputs(complex_input) + (wad) = self.validate_and_normalize_inputs(wad) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(complex_input).estimateGas( - tx_params.as_dict() - ) + return self.underlying_method(wad).estimateGas(tx_params.as_dict()) -class EcrecoverFnMethod(ContractMethod): - """Various interfaces to the ecrecoverFn method.""" +class MultiInputMultiOutputMethod(ContractMethod): + """Various interfaces to the multiInputMultiOutput method.""" def __init__( self, @@ -373,65 +405,166 @@ def __init__( self.underlying_method = contract_function def validate_and_normalize_inputs( - self, _hash: bytes, v: int, r: bytes, s: bytes + self, index_0: int, index_1: bytes, index_2: str ): - """Validate the inputs to the ecrecoverFn method.""" - self.validator.assert_valid( - method_name="ecrecoverFn", - parameter_name="hash", - argument_value=_hash, - ) + """Validate the inputs to the multiInputMultiOutput method.""" self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="v", argument_value=v + method_name="multiInputMultiOutput", + parameter_name="index_0", + argument_value=index_0, ) + # safeguard against fractional inputs + index_0 = int(index_0) self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="r", argument_value=r + method_name="multiInputMultiOutput", + parameter_name="index_1", + argument_value=index_1, ) + index_1 = bytes.fromhex(index_1.decode("utf-8")) self.validator.assert_valid( - method_name="ecrecoverFn", parameter_name="s", argument_value=s + method_name="multiInputMultiOutput", + parameter_name="index_2", + argument_value=index_2, ) - return (_hash, v, r, s) + return (index_0, index_1, index_2) def call( self, - _hash: bytes, - v: int, - r: bytes, - s: bytes, + index_0: int, + index_1: bytes, + index_2: str, tx_params: Optional[TxParams] = None, - ) -> str: + ) -> Tuple[bytes, bytes, str]: """Execute underlying contract method via eth_call. - test that devdocs will be generated and that multiline devdocs will - look okay + Tests decoding when the input and output are complex and have more than + one argument. - :param hash: description of some hash. Let's make this line super long - to demonstrate hanging indents for method params. It has to be more - than one hundred twenty columns. - :param r: ECDSA r output - :param s: ECDSA s output - :param v: some v, recovery id :param tx_params: transaction parameters - :returns: the signerAddress that created this signature. this line too - is super long in order to demonstrate the proper hanging - indentation in generated code. + """ - (_hash, v, r, s) = self.validate_and_normalize_inputs(_hash, v, r, s) + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(_hash, v, r, s).call(tx_params.as_dict()) + return self.underlying_method(index_0, index_1, index_2).call( + tx_params.as_dict() + ) def send_transaction( self, - _hash: bytes, - v: int, - r: bytes, - s: bytes, + index_0: int, + index_1: bytes, + index_2: str, tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - test that devdocs will be generated and that multiline devdocs will - look okay + Tests decoding when the input and output are complex and have more than + one argument. + + :param tx_params: transaction parameters + + """ + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(index_0, index_1, index_2).transact( + tx_params.as_dict() + ) + + def estimate_gas( + self, + index_0: int, + index_1: bytes, + index_2: str, + tx_params: Optional[TxParams] = None, + ) -> int: + """Estimate gas consumption of method call.""" + (index_0, index_1, index_2) = self.validate_and_normalize_inputs( + index_0, index_1, index_2 + ) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(index_0, index_1, index_2).estimateGas( + tx_params.as_dict() + ) + + +class EcrecoverFnMethod(ContractMethod): + """Various interfaces to the ecrecoverFn method.""" + + def __init__( + self, + provider: BaseProvider, + contract_address: str, + contract_function: ContractFunction, + validator: Validator = None, + ): + """Persist instance data.""" + super().__init__(provider, contract_address, validator) + self.underlying_method = contract_function + + def validate_and_normalize_inputs( + self, _hash: bytes, v: int, r: bytes, s: bytes + ): + """Validate the inputs to the ecrecoverFn method.""" + self.validator.assert_valid( + method_name="ecrecoverFn", + parameter_name="hash", + argument_value=_hash, + ) + self.validator.assert_valid( + method_name="ecrecoverFn", parameter_name="v", argument_value=v + ) + self.validator.assert_valid( + method_name="ecrecoverFn", parameter_name="r", argument_value=r + ) + self.validator.assert_valid( + method_name="ecrecoverFn", parameter_name="s", argument_value=s + ) + return (_hash, v, r, s) + + def call( + self, + _hash: bytes, + v: int, + r: bytes, + s: bytes, + tx_params: Optional[TxParams] = None, + ) -> str: + """Execute underlying contract method via eth_call. + + test that devdocs will be generated and that multiline devdocs will + look okay + + :param hash: description of some hash. Let's make this line super long + to demonstrate hanging indents for method params. It has to be more + than one hundred twenty columns. + :param r: ECDSA r output + :param s: ECDSA s output + :param v: some v, recovery id + :param tx_params: transaction parameters + :returns: the signerAddress that created this signature. this line too + is super long in order to demonstrate the proper hanging + indentation in generated code. + """ + (_hash, v, r, s) = self.validate_and_normalize_inputs(_hash, v, r, s) + tx_params = super().normalize_tx_params(tx_params) + return self.underlying_method(_hash, v, r, s).call(tx_params.as_dict()) + + def send_transaction( + self, + _hash: bytes, + v: int, + r: bytes, + s: bytes, + tx_params: Optional[TxParams] = None, + ) -> Union[HexBytes, bytes]: + """Execute underlying contract method via eth_sendTransaction. + + test that devdocs will be generated and that multiline devdocs will + look okay :param hash: description of some hash. Let's make this line super long to demonstrate hanging indents for method params. It has to be more @@ -466,8 +599,8 @@ def estimate_gas( ) -class EmitSimpleEventMethod(ContractMethod): - """Various interfaces to the emitSimpleEvent method.""" +class AcceptsBytesMethod(ContractMethod): + """Various interfaces to the acceptsBytes method.""" def __init__( self, @@ -480,35 +613,47 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: + def validate_and_normalize_inputs(self, a: bytes): + """Validate the inputs to the acceptsBytes method.""" + self.validator.assert_valid( + method_name="acceptsBytes", parameter_name="a", argument_value=a + ) + a = bytes.fromhex(a.decode("utf-8")) + return a + + def call(self, a: bytes, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, a: bytes, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters + """ + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, a: bytes, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class MethodReturningArrayOfStructsMethod(ContractMethod): - """Various interfaces to the methodReturningArrayOfStructs method.""" +class NoInputSimpleOutputMethod(ContractMethod): + """Various interfaces to the noInputSimpleOutput method.""" def __init__( self, @@ -521,11 +666,11 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> List[Tuple0xcf8ad995]: + def call(self, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. + Tests decoding when input is empty and output is non-empty. + :param tx_params: transaction parameters """ @@ -537,6 +682,8 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when input is empty and output is non-empty. + :param tx_params: transaction parameters """ @@ -549,8 +696,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class MethodReturningMultipleValuesMethod(ContractMethod): - """Various interfaces to the methodReturningMultipleValues method.""" +class RevertWithConstantMethod(ContractMethod): + """Various interfaces to the revertWithConstant method.""" def __init__( self, @@ -563,7 +710,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple[int, str]: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -589,10 +736,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( - ContractMethod -): - """Various interfaces to the methodUsingNestedStructWithInnerStructNotUsedElsewhere method.""" +class SimpleRevertMethod(ContractMethod): + """Various interfaces to the simpleRevert method.""" def __init__( self, @@ -605,7 +750,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0x1b9da225: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -631,8 +776,10 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class MultiInputMultiOutputMethod(ContractMethod): - """Various interfaces to the multiInputMultiOutput method.""" +class MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( + ContractMethod +): + """Various interfaces to the methodUsingNestedStructWithInnerStructNotUsedElsewhere method.""" def __init__( self, @@ -645,95 +792,34 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs( - self, index_0: int, index_1: bytes, index_2: str - ): - """Validate the inputs to the multiInputMultiOutput method.""" - self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_0", - argument_value=index_0, - ) - # safeguard against fractional inputs - index_0 = int(index_0) - self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_1", - argument_value=index_1, - ) - index_1 = bytes.fromhex(index_1.decode("utf-8")) - self.validator.assert_valid( - method_name="multiInputMultiOutput", - parameter_name="index_2", - argument_value=index_2, - ) - return (index_0, index_1, index_2) - - def call( - self, - index_0: int, - index_1: bytes, - index_2: str, - tx_params: Optional[TxParams] = None, - ) -> Tuple[bytes, bytes, str]: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0x1b9da225: """Execute underlying contract method via eth_call. - Tests decoding when the input and output are complex and have more than - one argument. - :param tx_params: transaction parameters """ - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).call( - tx_params.as_dict() - ) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, - index_0: int, - index_1: bytes, - index_2: str, - tx_params: Optional[TxParams] = None, + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when the input and output are complex and have more than - one argument. - :param tx_params: transaction parameters """ - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).transact( - tx_params.as_dict() - ) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, - index_0: int, - index_1: bytes, - index_2: str, - tx_params: Optional[TxParams] = None, - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (index_0, index_1, index_2) = self.validate_and_normalize_inputs( - index_0, index_1, index_2 - ) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0, index_1, index_2).estimateGas( - tx_params.as_dict() - ) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NestedStructInputMethod(ContractMethod): - """Various interfaces to the nestedStructInput method.""" +class NestedStructOutputMethod(ContractMethod): + """Various interfaces to the nestedStructOutput method.""" def __init__( self, @@ -746,50 +832,34 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, n: Tuple0xc9bdd2d5): - """Validate the inputs to the nestedStructInput method.""" - self.validator.assert_valid( - method_name="nestedStructInput", - parameter_name="n", - argument_value=n, - ) - return n - - def call( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None - ) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xc9bdd2d5: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(n).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NestedStructOutputMethod(ContractMethod): - """Various interfaces to the nestedStructOutput method.""" +class RequireWithConstantMethod(ContractMethod): + """Various interfaces to the requireWithConstant method.""" def __init__( self, @@ -802,7 +872,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xc9bdd2d5: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -828,8 +898,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class NoInputNoOutputMethod(ContractMethod): - """Various interfaces to the noInputNoOutput method.""" +class WithAddressInputMethod(ContractMethod): + """Various interfaces to the withAddressInput method.""" def __init__( self, @@ -842,38 +912,102 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: - """Execute underlying contract method via eth_call. + def validate_and_normalize_inputs( + self, x: str, a: int, b: int, y: str, c: int + ): + """Validate the inputs to the withAddressInput method.""" + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="x", + argument_value=x, + ) + x = self.validate_and_checksum_address(x) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="a", + argument_value=a, + ) + # safeguard against fractional inputs + a = int(a) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="b", + argument_value=b, + ) + # safeguard against fractional inputs + b = int(b) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="y", + argument_value=y, + ) + y = self.validate_and_checksum_address(y) + self.validator.assert_valid( + method_name="withAddressInput", + parameter_name="c", + argument_value=c, + ) + # safeguard against fractional inputs + c = int(c) + return (x, a, b, y, c) - Tests decoding when both input and output are empty. + def call( + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, + ) -> str: + """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when both input and output are empty. - :param tx_params: transaction parameters """ + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).transact( + tx_params.as_dict() + ) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, + x: str, + a: int, + b: int, + y: str, + c: int, + tx_params: Optional[TxParams] = None, + ) -> int: """Estimate gas consumption of method call.""" + (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(x, a, b, y, c).estimateGas( + tx_params.as_dict() + ) -class NoInputSimpleOutputMethod(ContractMethod): - """Various interfaces to the noInputSimpleOutput method.""" +class StructInputMethod(ContractMethod): + """Various interfaces to the structInput method.""" def __init__( self, @@ -886,38 +1020,48 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> int: - """Execute underlying contract method via eth_call. + def validate_and_normalize_inputs(self, s: Tuple0xcf8ad995): + """Validate the inputs to the structInput method.""" + self.validator.assert_valid( + method_name="structInput", parameter_name="s", argument_value=s + ) + return s - Tests decoding when input is empty and output is non-empty. + def call( + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + ) -> None: + """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ + (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(s).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when input is empty and output is non-empty. - :param tx_params: transaction parameters """ + (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(s).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (s) = self.validate_and_normalize_inputs(s) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(s).estimateGas(tx_params.as_dict()) -class NonPureFunctionMethod(ContractMethod): - """Various interfaces to the nonPureFunction method.""" +class NonPureMethodMethod(ContractMethod): + """Various interfaces to the nonPureMethod method.""" def __init__( self, @@ -930,64 +1074,35 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, _id: int, some_value: int): - """Validate the inputs to the nonPureFunction method.""" - self.validator.assert_valid( - method_name="nonPureFunction", - parameter_name="id", - argument_value=_id, - ) - # safeguard against fractional inputs - _id = int(_id) - self.validator.assert_valid( - method_name="nonPureFunction", - parameter_name="someValue", - argument_value=some_value, - ) - # safeguard against fractional inputs - some_value = int(some_value) - return (_id, some_value) - def call( - self, _id: int, some_value: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[int, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters :returns: the return value of the underlying method. """ - (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(_id, some_value).call( - tx_params.as_dict() - ) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, _id: int, some_value: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(_id, some_value).transact( - tx_params.as_dict() - ) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, _id: int, some_value: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (_id, some_value) = self.validate_and_normalize_inputs(_id, some_value) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(_id, some_value).estimateGas( - tx_params.as_dict() - ) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class NonPureMethodMethod(ContractMethod): - """Various interfaces to the nonPureMethod method.""" +class ComplexInputComplexOutputMethod(ContractMethod): + """Various interfaces to the complexInputComplexOutput method.""" def __init__( self, @@ -1000,35 +1115,64 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function + def validate_and_normalize_inputs(self, complex_input: Tuple0xf95128ef): + """Validate the inputs to the complexInputComplexOutput method.""" + self.validator.assert_valid( + method_name="complexInputComplexOutput", + parameter_name="complexInput", + argument_value=complex_input, + ) + return complex_input + def call( - self, tx_params: Optional[TxParams] = None - ) -> Union[int, Union[HexBytes, bytes]]: + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, + ) -> Tuple0xa057bf41: """Execute underlying contract method via eth_call. + Tests decoding when the input and output are complex. + :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(complex_input).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when the input and output are complex. + :param tx_params: transaction parameters + """ + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(complex_input).transact( + tx_params.as_dict() + ) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, + complex_input: Tuple0xf95128ef, + tx_params: Optional[TxParams] = None, + ) -> int: """Estimate gas consumption of method call.""" + (complex_input) = self.validate_and_normalize_inputs(complex_input) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(complex_input).estimateGas( + tx_params.as_dict() + ) -class NonPureMethodThatReturnsNothingMethod(ContractMethod): - """Various interfaces to the nonPureMethodThatReturnsNothing method.""" +class NoInputNoOutputMethod(ContractMethod): + """Various interfaces to the noInputNoOutput method.""" def __init__( self, @@ -1041,13 +1185,13 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call( - self, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: + def call(self, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. + Tests decoding when both input and output are empty. + :param tx_params: transaction parameters - :returns: the return value of the underlying method. + """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().call(tx_params.as_dict()) @@ -1057,7 +1201,10 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when both input and output are empty. + :param tx_params: transaction parameters + """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().transact(tx_params.as_dict()) @@ -1068,8 +1215,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class OverloadedMethod2Method(ContractMethod): - """Various interfaces to the overloadedMethod method.""" +class SimplePureFunctionWithInputMethod(ContractMethod): + """Various interfaces to the simplePureFunctionWithInput method.""" def __init__( self, @@ -1082,48 +1229,50 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: str): - """Validate the inputs to the overloadedMethod method.""" + def validate_and_normalize_inputs(self, x: int): + """Validate the inputs to the simplePureFunctionWithInput method.""" self.validator.assert_valid( - method_name="overloadedMethod", - parameter_name="a", - argument_value=a, + method_name="simplePureFunctionWithInput", + parameter_name="x", + argument_value=x, ) - return a + # safeguard against fractional inputs + x = int(x) + return x - def call(self, a: str, tx_params: Optional[TxParams] = None) -> None: + def call(self, x: int, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method(x).call(tx_params.as_dict()) def send_transaction( - self, a: str, tx_params: Optional[TxParams] = None + self, x: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (a) = self.validate_and_normalize_inputs(a) + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method(x).transact(tx_params.as_dict()) def estimate_gas( - self, a: str, tx_params: Optional[TxParams] = None + self, x: int, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) + (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method(x).estimateGas(tx_params.as_dict()) -class OverloadedMethod1Method(ContractMethod): - """Various interfaces to the overloadedMethod method.""" +class NonPureMethodThatReturnsNothingMethod(ContractMethod): + """Various interfaces to the nonPureMethodThatReturnsNothing method.""" def __init__( self, @@ -1136,48 +1285,35 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, a: int): - """Validate the inputs to the overloadedMethod method.""" - self.validator.assert_valid( - method_name="overloadedMethod", - parameter_name="a", - argument_value=a, - ) - return a - - def call(self, a: int, tx_params: Optional[TxParams] = None) -> None: + def call( + self, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, a: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters - """ - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, a: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(a).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class PureFunctionWithConstantMethod(ContractMethod): - """Various interfaces to the pureFunctionWithConstant method.""" +class SimplePureFunctionMethod(ContractMethod): + """Various interfaces to the simplePureFunction method.""" def __init__( self, @@ -1216,8 +1352,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class RequireWithConstantMethod(ContractMethod): - """Various interfaces to the requireWithConstant method.""" +class NestedStructInputMethod(ContractMethod): + """Various interfaces to the nestedStructInput method.""" def __init__( self, @@ -1230,34 +1366,50 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def validate_and_normalize_inputs(self, n: Tuple0xc9bdd2d5): + """Validate the inputs to the nestedStructInput method.""" + self.validator.assert_valid( + method_name="nestedStructInput", + parameter_name="n", + argument_value=n, + ) + return n + + def call( + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + ) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(n).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(n).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, n: Tuple0xc9bdd2d5, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (n) = self.validate_and_normalize_inputs(n) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(n).estimateGas(tx_params.as_dict()) -class RevertWithConstantMethod(ContractMethod): - """Various interfaces to the revertWithConstant method.""" +class MethodReturningMultipleValuesMethod(ContractMethod): + """Various interfaces to the methodReturningMultipleValues method.""" def __init__( self, @@ -1270,7 +1422,7 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple[int, str]: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters @@ -1296,8 +1448,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimpleInputNoOutputMethod(ContractMethod): - """Various interfaces to the simpleInputNoOutput method.""" +class MethodReturningArrayOfStructsMethod(ContractMethod): + """Various interfaces to the methodReturningArrayOfStructs method.""" def __init__( self, @@ -1310,54 +1462,36 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, index_0: int): - """Validate the inputs to the simpleInputNoOutput method.""" - self.validator.assert_valid( - method_name="simpleInputNoOutput", - parameter_name="index_0", - argument_value=index_0, - ) - # safeguard against fractional inputs - index_0 = int(index_0) - return index_0 - - def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> None: + def call( + self, tx_params: Optional[TxParams] = None + ) -> List[Tuple0xcf8ad995]: """Execute underlying contract method via eth_call. - Tests decoding when input is not empty but output is empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, index_0: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when input is not empty but output is empty. - :param tx_params: transaction parameters """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, index_0: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimpleInputSimpleOutputMethod(ContractMethod): - """Various interfaces to the simpleInputSimpleOutput method.""" +class EmitSimpleEventMethod(ContractMethod): + """Various interfaces to the emitSimpleEvent method.""" def __init__( self, @@ -1370,54 +1504,35 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, index_0: int): - """Validate the inputs to the simpleInputSimpleOutput method.""" - self.validator.assert_valid( - method_name="simpleInputSimpleOutput", - parameter_name="index_0", - argument_value=index_0, - ) - # safeguard against fractional inputs - index_0 = int(index_0) - return index_0 - - def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: + def call( + self, tx_params: Optional[TxParams] = None + ) -> Union[None, Union[HexBytes, bytes]]: """Execute underlying contract method via eth_call. - Tests decoding when both input and output are non-empty. - :param tx_params: transaction parameters - + :returns: the return value of the underlying method. """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, index_0: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - Tests decoding when both input and output are non-empty. - :param tx_params: transaction parameters - """ - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, index_0: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimplePureFunctionMethod(ContractMethod): - """Various interfaces to the simplePureFunction method.""" +class StructOutputMethod(ContractMethod): + """Various interfaces to the structOutput method.""" def __init__( self, @@ -1430,11 +1545,13 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> int: + def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xcf8ad995: """Execute underlying contract method via eth_call. - :param tx_params: transaction parameters + a method that returns a struct + :param tx_params: transaction parameters + :returns: a Struct struct """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().call(tx_params.as_dict()) @@ -1444,8 +1561,10 @@ def send_transaction( ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. - :param tx_params: transaction parameters + a method that returns a struct + :param tx_params: transaction parameters + :returns: a Struct struct """ tx_params = super().normalize_tx_params(tx_params) return self.underlying_method().transact(tx_params.as_dict()) @@ -1456,8 +1575,8 @@ def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimplePureFunctionWithInputMethod(ContractMethod): - """Various interfaces to the simplePureFunctionWithInput method.""" +class PureFunctionWithConstantMethod(ContractMethod): + """Various interfaces to the pureFunctionWithConstant method.""" def __init__( self, @@ -1470,50 +1589,34 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, x: int): - """Validate the inputs to the simplePureFunctionWithInput method.""" - self.validator.assert_valid( - method_name="simplePureFunctionWithInput", - parameter_name="x", - argument_value=x, - ) - # safeguard against fractional inputs - x = int(x) - return x - - def call(self, x: int, tx_params: Optional[TxParams] = None) -> int: + def call(self, tx_params: Optional[TxParams] = None) -> int: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).call(tx_params.as_dict()) + return self.underlying_method().call(tx_params.as_dict()) def send_transaction( - self, x: int, tx_params: Optional[TxParams] = None + self, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).transact(tx_params.as_dict()) + return self.underlying_method().transact(tx_params.as_dict()) - def estimate_gas( - self, x: int, tx_params: Optional[TxParams] = None - ) -> int: + def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: """Estimate gas consumption of method call.""" - (x) = self.validate_and_normalize_inputs(x) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x).estimateGas(tx_params.as_dict()) + return self.underlying_method().estimateGas(tx_params.as_dict()) -class SimpleRequireMethod(ContractMethod): - """Various interfaces to the simpleRequire method.""" +class SimpleInputNoOutputMethod(ContractMethod): + """Various interfaces to the simpleInputNoOutput method.""" def __init__( self, @@ -1526,130 +1629,54 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def call(self, tx_params: Optional[TxParams] = None) -> None: + def validate_and_normalize_inputs(self, index_0: int): + """Validate the inputs to the simpleInputNoOutput method.""" + self.validator.assert_valid( + method_name="simpleInputNoOutput", + parameter_name="index_0", + argument_value=index_0, + ) + # safeguard against fractional inputs + index_0 = int(index_0) + return index_0 + + def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. + Tests decoding when input is not empty but output is empty. + :param tx_params: transaction parameters """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) + return self.underlying_method(index_0).call(tx_params.as_dict()) def send_transaction( - self, tx_params: Optional[TxParams] = None + self, index_0: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. + Tests decoding when input is not empty but output is empty. + :param tx_params: transaction parameters """ + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) + return self.underlying_method(index_0).transact(tx_params.as_dict()) - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: + def estimate_gas( + self, index_0: int, tx_params: Optional[TxParams] = None + ) -> int: """Estimate gas consumption of method call.""" + (index_0) = self.validate_and_normalize_inputs(index_0) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) - + return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) -class SimpleRevertMethod(ContractMethod): - """Various interfaces to the simpleRevert method.""" - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def call(self, tx_params: Optional[TxParams] = None) -> None: - """Execute underlying contract method via eth_call. - - :param tx_params: transaction parameters - - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) - - def send_transaction( - self, tx_params: Optional[TxParams] = None - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - :param tx_params: transaction parameters - - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) - - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: - """Estimate gas consumption of method call.""" - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) - - -class SomeMappingMethod(ContractMethod): - """Various interfaces to the someMapping method.""" - - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def validate_and_normalize_inputs(self, index_0: int): - """Validate the inputs to the someMapping method.""" - self.validator.assert_valid( - method_name="someMapping", - parameter_name="index_0", - argument_value=index_0, - ) - # safeguard against fractional inputs - index_0 = int(index_0) - return index_0 - - def call(self, index_0: int, tx_params: Optional[TxParams] = None) -> int: - """Execute underlying contract method via eth_call. - - :param tx_params: transaction parameters - - """ - (index_0) = self.validate_and_normalize_inputs(index_0) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).call(tx_params.as_dict()) - - def send_transaction( - self, index_0: int, tx_params: Optional[TxParams] = None - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - :param tx_params: transaction parameters - - """ - (index_0) = self.validate_and_normalize_inputs(index_0) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).transact(tx_params.as_dict()) - - def estimate_gas( - self, index_0: int, tx_params: Optional[TxParams] = None - ) -> int: - """Estimate gas consumption of method call.""" - (index_0) = self.validate_and_normalize_inputs(index_0) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(index_0).estimateGas(tx_params.as_dict()) - - -class StructInputMethod(ContractMethod): - """Various interfaces to the structInput method.""" +class OverloadedMethod2Method(ContractMethod): + """Various interfaces to the overloadedMethod method.""" def __init__( self, @@ -1662,92 +1689,48 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs(self, s: Tuple0xcf8ad995): - """Validate the inputs to the structInput method.""" + def validate_and_normalize_inputs(self, a: str): + """Validate the inputs to the overloadedMethod method.""" self.validator.assert_valid( - method_name="structInput", parameter_name="s", argument_value=s + method_name="overloadedMethod", + parameter_name="a", + argument_value=a, ) - return s + return a - def call( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None - ) -> None: + def call(self, a: str, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (s) = self.validate_and_normalize_inputs(s) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + self, a: str, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (s) = self.validate_and_normalize_inputs(s) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) def estimate_gas( - self, s: Tuple0xcf8ad995, tx_params: Optional[TxParams] = None + self, a: str, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (s) = self.validate_and_normalize_inputs(s) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(s).estimateGas(tx_params.as_dict()) - - -class StructOutputMethod(ContractMethod): - """Various interfaces to the structOutput method.""" - - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def call(self, tx_params: Optional[TxParams] = None) -> Tuple0xcf8ad995: - """Execute underlying contract method via eth_call. - - a method that returns a struct - - :param tx_params: transaction parameters - :returns: a Struct struct - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().call(tx_params.as_dict()) - - def send_transaction( - self, tx_params: Optional[TxParams] = None - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - a method that returns a struct - - :param tx_params: transaction parameters - :returns: a Struct struct - """ - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().transact(tx_params.as_dict()) - - def estimate_gas(self, tx_params: Optional[TxParams] = None) -> int: - """Estimate gas consumption of method call.""" + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method().estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) -class WithAddressInputMethod(ContractMethod): - """Various interfaces to the withAddressInput method.""" +class OverloadedMethod1Method(ContractMethod): + """Various interfaces to the overloadedMethod method.""" def __init__( self, @@ -1760,153 +1743,44 @@ def __init__( super().__init__(provider, contract_address, validator) self.underlying_method = contract_function - def validate_and_normalize_inputs( - self, x: str, a: int, b: int, y: str, c: int - ): - """Validate the inputs to the withAddressInput method.""" - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="x", - argument_value=x, - ) - x = self.validate_and_checksum_address(x) + def validate_and_normalize_inputs(self, a: int): + """Validate the inputs to the overloadedMethod method.""" self.validator.assert_valid( - method_name="withAddressInput", + method_name="overloadedMethod", parameter_name="a", argument_value=a, ) - # safeguard against fractional inputs - a = int(a) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="b", - argument_value=b, - ) - # safeguard against fractional inputs - b = int(b) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="y", - argument_value=y, - ) - y = self.validate_and_checksum_address(y) - self.validator.assert_valid( - method_name="withAddressInput", - parameter_name="c", - argument_value=c, - ) - # safeguard against fractional inputs - c = int(c) - return (x, a, b, y, c) + return a - def call( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, - ) -> str: + def call(self, a: int, tx_params: Optional[TxParams] = None) -> None: """Execute underlying contract method via eth_call. :param tx_params: transaction parameters """ - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).call(tx_params.as_dict()) + return self.underlying_method(a).call(tx_params.as_dict()) def send_transaction( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, + self, a: int, tx_params: Optional[TxParams] = None ) -> Union[HexBytes, bytes]: """Execute underlying contract method via eth_sendTransaction. :param tx_params: transaction parameters """ - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).transact( - tx_params.as_dict() - ) - - def estimate_gas( - self, - x: str, - a: int, - b: int, - y: str, - c: int, - tx_params: Optional[TxParams] = None, - ) -> int: - """Estimate gas consumption of method call.""" - (x, a, b, y, c) = self.validate_and_normalize_inputs(x, a, b, y, c) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(x, a, b, y, c).estimateGas( - tx_params.as_dict() - ) - - -class WithdrawMethod(ContractMethod): - """Various interfaces to the withdraw method.""" - - def __init__( - self, - provider: BaseProvider, - contract_address: str, - contract_function: ContractFunction, - validator: Validator = None, - ): - """Persist instance data.""" - super().__init__(provider, contract_address, validator) - self.underlying_method = contract_function - - def validate_and_normalize_inputs(self, wad: int): - """Validate the inputs to the withdraw method.""" - self.validator.assert_valid( - method_name="withdraw", parameter_name="wad", argument_value=wad - ) - # safeguard against fractional inputs - wad = int(wad) - return wad - - def call( - self, wad: int, tx_params: Optional[TxParams] = None - ) -> Union[None, Union[HexBytes, bytes]]: - """Execute underlying contract method via eth_call. - - :param tx_params: transaction parameters - :returns: the return value of the underlying method. - """ - (wad) = self.validate_and_normalize_inputs(wad) - tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).call(tx_params.as_dict()) - - def send_transaction( - self, wad: int, tx_params: Optional[TxParams] = None - ) -> Union[HexBytes, bytes]: - """Execute underlying contract method via eth_sendTransaction. - - :param tx_params: transaction parameters - """ - (wad) = self.validate_and_normalize_inputs(wad) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).transact(tx_params.as_dict()) + return self.underlying_method(a).transact(tx_params.as_dict()) def estimate_gas( - self, wad: int, tx_params: Optional[TxParams] = None + self, a: int, tx_params: Optional[TxParams] = None ) -> int: """Estimate gas consumption of method call.""" - (wad) = self.validate_and_normalize_inputs(wad) + (a) = self.validate_and_normalize_inputs(a) tx_params = super().normalize_tx_params(tx_params) - return self.underlying_method(wad).estimateGas(tx_params.as_dict()) + return self.underlying_method(a).estimateGas(tx_params.as_dict()) # pylint: disable=too-many-public-methods,too-many-instance-attributes @@ -1917,44 +1791,24 @@ class AbiGenDummy: which can be accomplished via `str.encode("utf_8")`:code:. """ - accepts_an_array_of_bytes: AcceptsAnArrayOfBytesMethod - """Constructor-initialized instance of - :class:`AcceptsAnArrayOfBytesMethod`. - """ - - accepts_bytes: AcceptsBytesMethod - """Constructor-initialized instance of - :class:`AcceptsBytesMethod`. - """ - - complex_input_complex_output: ComplexInputComplexOutputMethod - """Constructor-initialized instance of - :class:`ComplexInputComplexOutputMethod`. - """ - - ecrecover_fn: EcrecoverFnMethod - """Constructor-initialized instance of - :class:`EcrecoverFnMethod`. - """ - - emit_simple_event: EmitSimpleEventMethod + simple_require: SimpleRequireMethod """Constructor-initialized instance of - :class:`EmitSimpleEventMethod`. + :class:`SimpleRequireMethod`. """ - method_returning_array_of_structs: MethodReturningArrayOfStructsMethod + accepts_an_array_of_bytes: AcceptsAnArrayOfBytesMethod """Constructor-initialized instance of - :class:`MethodReturningArrayOfStructsMethod`. + :class:`AcceptsAnArrayOfBytesMethod`. """ - method_returning_multiple_values: MethodReturningMultipleValuesMethod + simple_input_simple_output: SimpleInputSimpleOutputMethod """Constructor-initialized instance of - :class:`MethodReturningMultipleValuesMethod`. + :class:`SimpleInputSimpleOutputMethod`. """ - method_using_nested_struct_with_inner_struct_not_used_elsewhere: MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod + withdraw: WithdrawMethod """Constructor-initialized instance of - :class:`MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod`. + :class:`WithdrawMethod`. """ multi_input_multi_output: MultiInputMultiOutputMethod @@ -1962,104 +1816,104 @@ class AbiGenDummy: :class:`MultiInputMultiOutputMethod`. """ - nested_struct_input: NestedStructInputMethod + ecrecover_fn: EcrecoverFnMethod """Constructor-initialized instance of - :class:`NestedStructInputMethod`. + :class:`EcrecoverFnMethod`. """ - nested_struct_output: NestedStructOutputMethod + accepts_bytes: AcceptsBytesMethod """Constructor-initialized instance of - :class:`NestedStructOutputMethod`. + :class:`AcceptsBytesMethod`. """ - no_input_no_output: NoInputNoOutputMethod + no_input_simple_output: NoInputSimpleOutputMethod """Constructor-initialized instance of - :class:`NoInputNoOutputMethod`. + :class:`NoInputSimpleOutputMethod`. """ - no_input_simple_output: NoInputSimpleOutputMethod + revert_with_constant: RevertWithConstantMethod """Constructor-initialized instance of - :class:`NoInputSimpleOutputMethod`. + :class:`RevertWithConstantMethod`. """ - non_pure_function: NonPureFunctionMethod + simple_revert: SimpleRevertMethod """Constructor-initialized instance of - :class:`NonPureFunctionMethod`. + :class:`SimpleRevertMethod`. """ - non_pure_method: NonPureMethodMethod + method_using_nested_struct_with_inner_struct_not_used_elsewhere: MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod """Constructor-initialized instance of - :class:`NonPureMethodMethod`. + :class:`MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod`. """ - non_pure_method_that_returns_nothing: NonPureMethodThatReturnsNothingMethod + nested_struct_output: NestedStructOutputMethod """Constructor-initialized instance of - :class:`NonPureMethodThatReturnsNothingMethod`. + :class:`NestedStructOutputMethod`. """ - overloaded_method2: OverloadedMethod2Method + require_with_constant: RequireWithConstantMethod """Constructor-initialized instance of - :class:`OverloadedMethod2Method`. + :class:`RequireWithConstantMethod`. """ - overloaded_method1: OverloadedMethod1Method + with_address_input: WithAddressInputMethod """Constructor-initialized instance of - :class:`OverloadedMethod1Method`. + :class:`WithAddressInputMethod`. """ - pure_function_with_constant: PureFunctionWithConstantMethod + struct_input: StructInputMethod """Constructor-initialized instance of - :class:`PureFunctionWithConstantMethod`. + :class:`StructInputMethod`. """ - require_with_constant: RequireWithConstantMethod + non_pure_method: NonPureMethodMethod """Constructor-initialized instance of - :class:`RequireWithConstantMethod`. + :class:`NonPureMethodMethod`. """ - revert_with_constant: RevertWithConstantMethod + complex_input_complex_output: ComplexInputComplexOutputMethod """Constructor-initialized instance of - :class:`RevertWithConstantMethod`. + :class:`ComplexInputComplexOutputMethod`. """ - simple_input_no_output: SimpleInputNoOutputMethod + no_input_no_output: NoInputNoOutputMethod """Constructor-initialized instance of - :class:`SimpleInputNoOutputMethod`. + :class:`NoInputNoOutputMethod`. """ - simple_input_simple_output: SimpleInputSimpleOutputMethod + simple_pure_function_with_input: SimplePureFunctionWithInputMethod """Constructor-initialized instance of - :class:`SimpleInputSimpleOutputMethod`. + :class:`SimplePureFunctionWithInputMethod`. """ - simple_pure_function: SimplePureFunctionMethod + non_pure_method_that_returns_nothing: NonPureMethodThatReturnsNothingMethod """Constructor-initialized instance of - :class:`SimplePureFunctionMethod`. + :class:`NonPureMethodThatReturnsNothingMethod`. """ - simple_pure_function_with_input: SimplePureFunctionWithInputMethod + simple_pure_function: SimplePureFunctionMethod """Constructor-initialized instance of - :class:`SimplePureFunctionWithInputMethod`. + :class:`SimplePureFunctionMethod`. """ - simple_require: SimpleRequireMethod + nested_struct_input: NestedStructInputMethod """Constructor-initialized instance of - :class:`SimpleRequireMethod`. + :class:`NestedStructInputMethod`. """ - simple_revert: SimpleRevertMethod + method_returning_multiple_values: MethodReturningMultipleValuesMethod """Constructor-initialized instance of - :class:`SimpleRevertMethod`. + :class:`MethodReturningMultipleValuesMethod`. """ - some_mapping: SomeMappingMethod + method_returning_array_of_structs: MethodReturningArrayOfStructsMethod """Constructor-initialized instance of - :class:`SomeMappingMethod`. + :class:`MethodReturningArrayOfStructsMethod`. """ - struct_input: StructInputMethod + emit_simple_event: EmitSimpleEventMethod """Constructor-initialized instance of - :class:`StructInputMethod`. + :class:`EmitSimpleEventMethod`. """ struct_output: StructOutputMethod @@ -2067,14 +1921,24 @@ class AbiGenDummy: :class:`StructOutputMethod`. """ - with_address_input: WithAddressInputMethod + pure_function_with_constant: PureFunctionWithConstantMethod """Constructor-initialized instance of - :class:`WithAddressInputMethod`. + :class:`PureFunctionWithConstantMethod`. """ - withdraw: WithdrawMethod + simple_input_no_output: SimpleInputNoOutputMethod """Constructor-initialized instance of - :class:`WithdrawMethod`. + :class:`SimpleInputNoOutputMethod`. + """ + + overloaded_method2: OverloadedMethod2Method + """Constructor-initialized instance of + :class:`OverloadedMethod2Method`. + """ + + overloaded_method1: OverloadedMethod1Method + """Constructor-initialized instance of + :class:`OverloadedMethod1Method`. """ def __init__( @@ -2103,6 +1967,10 @@ def __init__( abi=AbiGenDummy.abi(), ).functions + self.simple_require = SimpleRequireMethod( + provider, contract_address, functions.simpleRequire, validator + ) + self.accepts_an_array_of_bytes = AcceptsAnArrayOfBytesMethod( provider, contract_address, @@ -2110,14 +1978,21 @@ def __init__( validator, ) - self.accepts_bytes = AcceptsBytesMethod( - provider, contract_address, functions.acceptsBytes, validator + self.simple_input_simple_output = SimpleInputSimpleOutputMethod( + provider, + contract_address, + functions.simpleInputSimpleOutput, + validator, ) - self.complex_input_complex_output = ComplexInputComplexOutputMethod( + self.withdraw = WithdrawMethod( + provider, contract_address, functions.withdraw, validator + ) + + self.multi_input_multi_output = MultiInputMultiOutputMethod( provider, contract_address, - functions.complexInputComplexOutput, + functions.multiInputMultiOutput, validator, ) @@ -2125,22 +2000,23 @@ def __init__( provider, contract_address, functions.ecrecoverFn, validator ) - self.emit_simple_event = EmitSimpleEventMethod( - provider, contract_address, functions.emitSimpleEvent, validator + self.accepts_bytes = AcceptsBytesMethod( + provider, contract_address, functions.acceptsBytes, validator ) - self.method_returning_array_of_structs = MethodReturningArrayOfStructsMethod( + self.no_input_simple_output = NoInputSimpleOutputMethod( provider, contract_address, - functions.methodReturningArrayOfStructs, + functions.noInputSimpleOutput, validator, ) - self.method_returning_multiple_values = MethodReturningMultipleValuesMethod( - provider, - contract_address, - functions.methodReturningMultipleValues, - validator, + self.revert_with_constant = RevertWithConstantMethod( + provider, contract_address, functions.revertWithConstant, validator + ) + + self.simple_revert = SimpleRevertMethod( + provider, contract_address, functions.simpleRevert, validator ) self.method_using_nested_struct_with_inner_struct_not_used_elsewhere = MethodUsingNestedStructWithInnerStructNotUsedElsewhereMethod( @@ -2150,38 +2026,45 @@ def __init__( validator, ) - self.multi_input_multi_output = MultiInputMultiOutputMethod( + self.nested_struct_output = NestedStructOutputMethod( + provider, contract_address, functions.nestedStructOutput, validator + ) + + self.require_with_constant = RequireWithConstantMethod( provider, contract_address, - functions.multiInputMultiOutput, + functions.requireWithConstant, validator, ) - self.nested_struct_input = NestedStructInputMethod( - provider, contract_address, functions.nestedStructInput, validator + self.with_address_input = WithAddressInputMethod( + provider, contract_address, functions.withAddressInput, validator ) - self.nested_struct_output = NestedStructOutputMethod( - provider, contract_address, functions.nestedStructOutput, validator + self.struct_input = StructInputMethod( + provider, contract_address, functions.structInput, validator ) - self.no_input_no_output = NoInputNoOutputMethod( - provider, contract_address, functions.noInputNoOutput, validator + self.non_pure_method = NonPureMethodMethod( + provider, contract_address, functions.nonPureMethod, validator ) - self.no_input_simple_output = NoInputSimpleOutputMethod( + self.complex_input_complex_output = ComplexInputComplexOutputMethod( provider, contract_address, - functions.noInputSimpleOutput, + functions.complexInputComplexOutput, validator, ) - self.non_pure_function = NonPureFunctionMethod( - provider, contract_address, functions.nonPureFunction, validator + self.no_input_no_output = NoInputNoOutputMethod( + provider, contract_address, functions.noInputNoOutput, validator ) - self.non_pure_method = NonPureMethodMethod( - provider, contract_address, functions.nonPureMethod, validator + self.simple_pure_function_with_input = SimplePureFunctionWithInputMethod( + provider, + contract_address, + functions.simplePureFunctionWithInput, + validator, ) self.non_pure_method_that_returns_nothing = NonPureMethodThatReturnsNothingMethod( @@ -2191,91 +2074,64 @@ def __init__( validator, ) - self.overloaded_method2 = OverloadedMethod2Method( - provider, contract_address, functions.overloadedMethod, validator + self.simple_pure_function = SimplePureFunctionMethod( + provider, contract_address, functions.simplePureFunction, validator ) - self.overloaded_method1 = OverloadedMethod1Method( - provider, contract_address, functions.overloadedMethod, validator + self.nested_struct_input = NestedStructInputMethod( + provider, contract_address, functions.nestedStructInput, validator ) - self.pure_function_with_constant = PureFunctionWithConstantMethod( + self.method_returning_multiple_values = MethodReturningMultipleValuesMethod( provider, contract_address, - functions.pureFunctionWithConstant, + functions.methodReturningMultipleValues, validator, ) - self.require_with_constant = RequireWithConstantMethod( + self.method_returning_array_of_structs = MethodReturningArrayOfStructsMethod( provider, contract_address, - functions.requireWithConstant, + functions.methodReturningArrayOfStructs, validator, ) - self.revert_with_constant = RevertWithConstantMethod( - provider, contract_address, functions.revertWithConstant, validator + self.emit_simple_event = EmitSimpleEventMethod( + provider, contract_address, functions.emitSimpleEvent, validator ) - self.simple_input_no_output = SimpleInputNoOutputMethod( - provider, - contract_address, - functions.simpleInputNoOutput, - validator, + self.struct_output = StructOutputMethod( + provider, contract_address, functions.structOutput, validator ) - self.simple_input_simple_output = SimpleInputSimpleOutputMethod( + self.pure_function_with_constant = PureFunctionWithConstantMethod( provider, contract_address, - functions.simpleInputSimpleOutput, + functions.pureFunctionWithConstant, validator, ) - self.simple_pure_function = SimplePureFunctionMethod( - provider, contract_address, functions.simplePureFunction, validator - ) - - self.simple_pure_function_with_input = SimplePureFunctionWithInputMethod( + self.simple_input_no_output = SimpleInputNoOutputMethod( provider, contract_address, - functions.simplePureFunctionWithInput, + functions.simpleInputNoOutput, validator, ) - self.simple_require = SimpleRequireMethod( - provider, contract_address, functions.simpleRequire, validator - ) - - self.simple_revert = SimpleRevertMethod( - provider, contract_address, functions.simpleRevert, validator - ) - - self.some_mapping = SomeMappingMethod( - provider, contract_address, functions.someMapping, validator - ) - - self.struct_input = StructInputMethod( - provider, contract_address, functions.structInput, validator - ) - - self.struct_output = StructOutputMethod( - provider, contract_address, functions.structOutput, validator - ) - - self.with_address_input = WithAddressInputMethod( - provider, contract_address, functions.withAddressInput, validator + self.overloaded_method2 = OverloadedMethod2Method( + provider, contract_address, functions.overloadedMethod, validator ) - self.withdraw = WithdrawMethod( - provider, contract_address, functions.withdraw, validator + self.overloaded_method1 = OverloadedMethod1Method( + provider, contract_address, functions.overloadedMethod, validator ) - def get_simple_event_event( + def get_withdrawal_event( self, tx_hash: Union[HexBytes, bytes] ) -> Tuple[AttributeDict]: - """Get log entry for SimpleEvent event. + """Get log entry for Withdrawal event. - :param tx_hash: hash of transaction emitting SimpleEvent event + :param tx_hash: hash of transaction emitting Withdrawal event """ tx_receipt = self._web3_eth.getTransactionReceipt(tx_hash) return ( @@ -2283,16 +2139,16 @@ def get_simple_event_event( address=to_checksum_address(self.contract_address), abi=AbiGenDummy.abi(), ) - .events.SimpleEvent() + .events.Withdrawal() .processReceipt(tx_receipt) ) - def get_withdrawal_event( + def get_simple_event_event( self, tx_hash: Union[HexBytes, bytes] ) -> Tuple[AttributeDict]: - """Get log entry for Withdrawal event. + """Get log entry for SimpleEvent event. - :param tx_hash: hash of transaction emitting Withdrawal event + :param tx_hash: hash of transaction emitting SimpleEvent event """ tx_receipt = self._web3_eth.getTransactionReceipt(tx_hash) return ( @@ -2300,7 +2156,7 @@ def get_withdrawal_event( address=to_checksum_address(self.contract_address), abi=AbiGenDummy.abi(), ) - .events.Withdrawal() + .events.SimpleEvent() .processReceipt(tx_receipt) ) @@ -2308,7 +2164,7 @@ def get_withdrawal_event( def abi(): """Return the ABI to the underlying contract.""" return json.loads( - '[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"someBytes","type":"bytes"},{"indexed":false,"internalType":"string","name":"someString","type":"string"}],"name":"SimpleEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":true,"inputs":[{"internalType":"bytes[]","name":"a","type":"bytes[]"}],"name":"acceptsAnArrayOfBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"a","type":"bytes"}],"name":"acceptsBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"complexInput","type":"tuple"}],"name":"complexInputComplexOutput","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"input","type":"tuple"},{"internalType":"bytes","name":"lorem","type":"bytes"},{"internalType":"bytes","name":"ipsum","type":"bytes"},{"internalType":"string","name":"dolor","type":"string"}],"internalType":"struct AbiGenDummy.ComplexOutput","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ecrecoverFn","outputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"emitSimpleEvent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningArrayOfStructs","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningMultipleValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodUsingNestedStructWithInnerStructNotUsedElsewhere","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"aField","type":"uint256"}],"internalType":"struct AbiGenDummy.StructNotDirectlyUsedAnywhere","name":"innerStruct","type":"tuple"}],"internalType":"struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"},{"internalType":"bytes","name":"index_1","type":"bytes"},{"internalType":"string","name":"index_2","type":"string"}],"name":"multiInputMultiOutput","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"n","type":"tuple"}],"name":"nestedStructInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nestedStructOutput","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"someValue","type":"uint256"}],"name":"nonPureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethodThatReturnsNothing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"a","type":"string"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"int256","name":"a","type":"int256"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"pureFunctionWithConstant","outputs":[{"internalType":"uint256","name":"someConstant","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"requireWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"revertWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simplePureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"simplePureFunctionWithInput","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRequire","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRevert","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"someMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"name":"structInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"structOutput","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"x","type":"address"},{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"address","name":"y","type":"address"},{"internalType":"uint256","name":"c","type":"uint256"}],"name":"withAddressInput","outputs":[{"internalType":"address","name":"z","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]' # noqa: E501 (line-too-long) + '[{"constant":true,"inputs":[],"name":"simpleRequire","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes[]","name":"a","type":"bytes[]"}],"name":"acceptsAnArrayOfBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"},{"internalType":"bytes","name":"index_1","type":"bytes"},{"internalType":"string","name":"index_2","type":"string"}],"name":"multiInputMultiOutput","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ecrecoverFn","outputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"a","type":"bytes"}],"name":"acceptsBytes","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputSimpleOutput","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"revertWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"simpleRevert","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodUsingNestedStructWithInnerStructNotUsedElsewhere","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"aField","type":"uint256"}],"internalType":"struct AbiGenDummy.StructNotDirectlyUsedAnywhere","name":"innerStruct","type":"tuple"}],"internalType":"struct AbiGenDummy.NestedStructWithInnerStructNotUsedElsewhere","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nestedStructOutput","outputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"requireWithConstant","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"x","type":"address"},{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"},{"internalType":"address","name":"y","type":"address"},{"internalType":"uint256","name":"c","type":"uint256"}],"name":"withAddressInput","outputs":[{"internalType":"address","name":"z","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"name":"structInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"complexInput","type":"tuple"}],"name":"complexInputComplexOutput","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"foo","type":"uint256"},{"internalType":"bytes","name":"bar","type":"bytes"},{"internalType":"string","name":"car","type":"string"}],"internalType":"struct AbiGenDummy.ComplexInput","name":"input","type":"tuple"},{"internalType":"bytes","name":"lorem","type":"bytes"},{"internalType":"bytes","name":"ipsum","type":"bytes"},{"internalType":"string","name":"dolor","type":"string"}],"internalType":"struct AbiGenDummy.ComplexOutput","name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"noInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"simplePureFunctionWithInput","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"nonPureMethodThatReturnsNothing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"simplePureFunction","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"components":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"innerStruct","type":"tuple"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct AbiGenDummy.NestedStruct","name":"n","type":"tuple"}],"name":"nestedStructInput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningMultipleValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"methodReturningArrayOfStructs","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct[]","name":"","type":"tuple[]"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"emitSimpleEvent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"structOutput","outputs":[{"components":[{"internalType":"bytes","name":"someBytes","type":"bytes"},{"internalType":"uint32","name":"anInteger","type":"uint32"},{"internalType":"bytes[]","name":"aDynamicArrayOfBytes","type":"bytes[]"},{"internalType":"string","name":"aString","type":"string"}],"internalType":"struct AbiGenDummy.Struct","name":"s","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"pureFunctionWithConstant","outputs":[{"internalType":"uint256","name":"someConstant","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index_0","type":"uint256"}],"name":"simpleInputNoOutput","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"a","type":"string"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"int256","name":"a","type":"int256"}],"name":"overloadedMethod","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"someBytes","type":"bytes"},{"indexed":false,"internalType":"string","name":"someString","type":"string"}],"name":"SimpleEvent","type":"event"}]' # noqa: E501 (line-too-long) ) diff --git a/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py b/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py index 7bceee9a99..ebdd8c6c6a 100644 --- a/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py +++ b/packages/abi-gen/test-cli/output/python/test_lib_dummy/__init__.py @@ -202,7 +202,7 @@ def __init__( def abi(): """Return the ABI to the underlying contract.""" return json.loads( - '[{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"publicAddConstant","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"publicAddOne","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}]' # noqa: E501 (line-too-long) + '[{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"publicAddConstant","outputs":[{"name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint256"}],"name":"publicAddOne","outputs":[{"name":"result","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}]' # noqa: E501 (line-too-long) ) diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index 78c7a8814d..3f367fc1ee 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -19,22 +19,17 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; // tslint:enable:no-unused-variable -export type AbiGenDummyEventArgs = AbiGenDummySimpleEventEventArgs | AbiGenDummyWithdrawalEventArgs; +export type AbiGenDummyEventArgs = AbiGenDummyWithdrawalEventArgs | AbiGenDummySimpleEventEventArgs; export enum AbiGenDummyEvents { - SimpleEvent = 'SimpleEvent', Withdrawal = 'Withdrawal', -} - -export interface AbiGenDummySimpleEventEventArgs extends DecodedLogArgs { - someBytes: string; - someString: string; + SimpleEvent = 'SimpleEvent', } export interface AbiGenDummyWithdrawalEventArgs extends DecodedLogArgs { @@ -42,6 +37,11 @@ export interface AbiGenDummyWithdrawalEventArgs extends DecodedLogArgs { _value: BigNumber; } +export interface AbiGenDummySimpleEventEventArgs extends DecodedLogArgs { + someBytes: string; + someString: string; +} + /* istanbul ignore next */ // tslint:disable:no-parameter-reassignment // tslint:disable-next-line:class-name @@ -50,19 +50,14 @@ export class AbiGenDummyContract extends BaseContract { * @ignore */ public static deployedBytecode = - '0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c8063647341eb1161010f578063bb607362116100a2578063d88be12f11610071578063d88be12f146103d7578063ee8b86fb146103df578063f408fb311461028f578063fa315f9d146103f2576101ef565b8063bb6073621461038f578063bdab1688146103a5578063cd3c0b97146103ba578063d6d7618c146103c2576101ef565b80638ee52b4e116100de5780638ee52b4e1461035e5780639a3b618514610371578063a3c2f6b614610379578063ae2dae1714610381576101ef565b8063647341eb1461032057806376f15d5b1461032e5780637833bec0146103365780637a791e6e14610356576101ef565b80634582eab211610187578063586f84b211610156578063586f84b2146102db57806359c28add146102f05780635ba3c7c01461030557806363d69c881461030d576101ef565b80634582eab2146102a557806345fdbdb7146102ad5780634bb9a37b146102b557806351bd9ce7146102c8576101ef565b80633687617d116101c35780633687617d1461024d57806336b323961461026f5780633e9ef66a1461028f5780634303a5421461029d576101ef565b806209e437146101f45780630527c28f146101fe5780631310e444146102115780632e1a7d4d1461023a575b600080fd5b6101fc610400565b005b6101fc61020c366004610ce2565b61043d565b61022461021f366004610dea565b610440565b6040516102319190611419565b60405180910390f35b6101fc610248366004610dea565b610447565b61026061025b366004610f5f565b610498565b604051610231939291906111a3565b61028261027d366004610d6e565b610538565b6040516102319190611118565b6101fc61020c366004610daf565b61022461061a565b6101fc610621565b6101fc610686565b6102246102c3366004610dea565b6106b8565b6102246102d6366004610fc9565b6106ca565b6102e36106e7565b60405161023191906113a4565b6102f86106ef565b60405161023191906113af565b6101fc6106f7565b61028261031b366004610c91565b61075c565b6101fc61020c366004610f2c565b610224610765565b610349610344366004610e02565b610772565b60405161023191906112d9565b6101fc61082f565b61022461036c366004610dea565b610834565b6101fc61083a565b610224610844565b6101fc61020c366004610e9c565b610397610849565b604051610231929190611422565b6103ad610882565b6040516102319190611139565b6101fc610887565b6103ca6108be565b6040516102319190611406565b610224610a17565b6101fc6103ed366004610dea565b61020c565b6101fc61020c366004610dea565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610432906112a2565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405161048d9190611419565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020016105899291906110f6565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516105c49493929190611185565b6020604051602081039080840390855afa1580156105e6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329061126b565b60006020819052908152604090205481565b600082815260208190526040902060018201908190555b92915050565b61061e610a1d565b61061e610a35565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a000000000000000000000000000000000000000000000000000000000815261043291906004016111e5565b50929392505050565b6001805481019081905590565b61077a610a55565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b61043b565b60010190565b6001805481019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b7716040516108b4906111ff565b60405180910390a1565b6108c6610a83565b6040805160028082526060828101909352816020015b60608152602001906001900390816108dc5790505090506040518060400160405280600581526020017f30783132330000000000000000000000000000000000000000000000000000008152508160008151811061093657fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061098457fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b6040518060200160405280610a30610ab1565b905290565b6040518060400160405280610a48610a83565b8152602001606081525090565b6040518060800160405280610a68610ac4565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610af5578081fd5b8135610b08610b0382611462565b61143b565b8181529150602080830190840160005b83811015610b4557610b308760208435890101610b4f565b83526020928301929190910190600101610b18565b5050505092915050565b600082601f830112610b5f578081fd5b813567ffffffffffffffff811115610b75578182fd5b610ba660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161143b565b9150808252836020828501011115610bbd57600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610be7578081fd5b610bf1608061143b565b9050813567ffffffffffffffff80821115610c0b57600080fd5b610c1785838601610b4f565b8352610c268560208601610c7d565b60208401526040840135915080821115610c3f57600080fd5b610c4b85838601610ae5565b60408401526060840135915080821115610c6457600080fd5b50610c7184828501610b4f565b60608301525092915050565b803563ffffffff811681146106e157600080fd5b600080600080600060a08688031215610ca8578081fd5b8535610cb3816114b2565b945060208601359350604086013592506060860135610cd1816114b2565b949793965091946080013592915050565b60006020808385031215610cf4578182fd5b823567ffffffffffffffff811115610d0a578283fd5b80840185601f820112610d1b578384fd5b80359150610d2b610b0383611462565b82815283810190828501865b85811015610d6057610d4e8a888435880101610b4f565b84529286019290860190600101610d37565b509098975050505050505050565b60008060008060808587031215610d83578384fd5b84359350602085013560ff81168114610d9a578384fd5b93969395505050506040820135916060013590565b600060208284031215610dc0578081fd5b813567ffffffffffffffff811115610dd6578182fd5b610de284828501610b4f565b949350505050565b600060208284031215610dfb578081fd5b5035919050565b600060208284031215610e13578081fd5b813567ffffffffffffffff80821115610e2a578283fd5b81840160608187031215610e3c578384fd5b610e46606061143b565b925080358352602081013582811115610e5d578485fd5b610e6987828401610b4f565b602085015250604081013582811115610e80578485fd5b610e8c87828401610b4f565b6040850152509195945050505050565b600060208284031215610ead578081fd5b813567ffffffffffffffff80821115610ec4578283fd5b81840160408187031215610ed6578384fd5b610ee0604061143b565b9250803582811115610ef0578485fd5b610efc87828401610bd6565b845250602081013582811115610f10578485fd5b610f1c87828401610b4f565b6020850152509195945050505050565b600060208284031215610f3d578081fd5b813567ffffffffffffffff811115610f53578182fd5b610de284828501610bd6565b600080600060608486031215610f73578081fd5b83359250602084013567ffffffffffffffff80821115610f91578283fd5b610f9d87838801610b4f565b93506040860135915080821115610fb2578283fd5b50610fbf86828701610b4f565b9150509250925092565b60008060408385031215610fdb578182fd5b50508035926020909101359150565b60008151808452611002816020860160208601611482565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151608084526110496080850182610fea565b6020915063ffffffff828501511682860152604084015185820360408701528181518084528484019150848582028501018584018794505b828510156110cf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08683030184526110bb828251610fea565b600195909501949387019391508601611081565b506060880151955088810360608a01526110e98187610fea565b9998505050505050505050565b60008351611108818460208801611482565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080830181845280855180835283830191508192508381028201848801865b83811015610d60578583038552611173838351611034565b9487019492509086019060010161115b565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111b66060830186610fea565b82810360208401526111c88186610fea565b83810360408501526111da8186610fea565b979650505050505050565b6000602082526111f86020830184610fea565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b60006020825260a08201835160806020850152805182526020810151606060208401526113096060840182610fea565b6040830151915083810360408501526113228183610fea565b935050505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526113618383610fea565b604087015193508186820301606087015261137c8185610fea565b92505060608601519250808583030160808601525061139b8183610fea565b95945050505050565b905151815260200190565b6000602082528251604060208401526113cb6060840182611034565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261139b8183610fea565b6000602082526111f86020830184611034565b90815260200190565b600083825260406020830152610de26040830184610fea565b60405181810167ffffffffffffffff8111828210171561145a57600080fd5b604052919050565b600067ffffffffffffffff821115611478578081fd5b5060209081020190565b60005b8381101561149d578181015183820152602001611485565b838111156114ac576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461043d57600080fdfea365627a7a723158205a98646a73bbda266999b92495c98b4f927e585bf6c08197e203d8da3d3643766c6578706572696d656e74616cf564736f6c634300050c0040'; - /** - * a method that accepts an array of bytes - */ - public acceptsAnArrayOfBytes = { + '0x608060405234801561001057600080fd5b50600436106101d95760003560e01c806376f15d5b11610104578063bb607362116100a2578063d88be12f11610071578063d88be12f1461039b578063ee8b86fb146103a3578063f408fb3114610279578063fa315f9d146103b6576101d9565b8063bb60736214610353578063bdab168814610369578063cd3c0b971461037e578063d6d7618c14610386576101d9565b80638ee52b4e116100de5780638ee52b4e146103225780639a3b618514610335578063a3c2f6b61461033d578063ae2dae1714610345576101d9565b806376f15d5b146102f25780637833bec0146102fa5780637a791e6e1461031a576101d9565b80634303a5421161017c57806359c28add1161014b57806359c28add146102b45780635ba3c7c0146102c957806363d69c88146102d1578063647341eb146102e4576101d9565b80634303a542146102875780634582eab21461028f57806345fdbdb714610297578063586f84b21461029f576101d9565b80632e1a7d4d116101b85780632e1a7d4d146102245780633687617d1461023757806336b32396146102595780633e9ef66a14610279576101d9565b806209e437146101de5780630527c28f146101e85780631310e444146101fb575b600080fd5b6101e66103c4565b005b6101e66101f6366004610c7f565b610401565b61020e610209366004610d34565b610404565b60405161021b919061139a565b60405180910390f35b6101e6610232366004610d34565b61040b565b61024a610245366004610eac565b61045c565b60405161021b93929190611103565b61026c610267366004610cbc565b6104fc565b60405161021b9190611045565b6101e66101f6366004610cff565b61020e6105de565b6101e66105e5565b6101e661064a565b6102a761067c565b60405161021b9190611325565b6102bc610684565b60405161021b9190611330565b6101e661068c565b61026c6102df366004610c2d565b6106f1565b6101e66101f6366004610e77565b61020e6106fa565b61030d610308366004610d4d565b610708565b60405161021b9190611239565b6101e66107c5565b61020e610330366004610d34565b6107ca565b6101e66107d0565b61020e6107db565b6101e66101f6366004610de7565b61035b6107e0565b60405161021b9291906113a3565b610371610819565b60405161021b9190611066565b6101e661081e565b61038e610855565b60405161021b9190611387565b61020e6109ae565b6101e66103b1366004610d34565b6101f6565b6101e66101f6366004610d34565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f690611202565b60405180910390fd5b565b50565b506107c790565b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6582604051610451919061139a565b60405180910390a250565b505060408051808201825260048082527f1234567800000000000000000000000000000000000000000000000000000000602080840191909152835180850185528281527f87654321000000000000000000000000000000000000000000000000000000008183015284518086019095529184527f616d657400000000000000000000000000000000000000000000000000000000908401529093909250565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161054d929190611023565b6040516020818303038152906040528051906020012090506001818787876040516000815260200160405260405161058894939291906110e5565b6020604051602081039080840390855afa1580156105aa573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b6107c75b90565b604080518082018252601481527f5245564552545f574954485f434f4e5354414e54000000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f6906111cb565b6105e26109b4565b6105e26109cc565b604080518082018252601581527f524551554952455f574954485f434f4e5354414e540000000000000000000000602082015290517f08c379a00000000000000000000000000000000000000000000000000000000081526103f69190600401611145565b50929392505050565b600080546001019081905590565b6107106109ec565b50604080516080810182529182528051808201825260048082527f123456780000000000000000000000000000000000000000000000000000000060208381019190915280850192909252825180840184528181527f87654321000000000000000000000000000000000000000000000000000000008184015284840152825180840190935282527f616d65740000000000000000000000000000000000000000000000000000000090820152606082015290565b6103ff565b60010190565b600080546001019055565b600190565b60408051808201909152600581527f68656c6c6f0000000000000000000000000000000000000000000000000000006020820152600191565b606090565b7f61a6029a4c7ddee5824d171331eecbd015d26a271310a223718b837facb5b77160405161084b9061115f565b60405180910390a1565b61085d610a1a565b6040805160028082526060828101909352816020015b60608152602001906001900390816108735790505090506040518060400160405280600581526020017f3078313233000000000000000000000000000000000000000000000000000000815250816000815181106108cd57fe5b60200260200101819052506040518060400160405280600581526020017f30783332310000000000000000000000000000000000000000000000000000008152508160018151811061091b57fe5b6020908102919091018101919091526040805160c0810182526005608082018181527f307831323300000000000000000000000000000000000000000000000000000060a0840152825281840152808201939093528051808201909152600381527f6162630000000000000000000000000000000000000000000000000000000000918101919091526060820152905090565b6104d290565b60405180602001604052806109c7610a48565b905290565b60405180604001604052806109df610a1a565b8152602001606081525090565b60405180608001604052806109ff610a5b565b81526020016060815260200160608152602001606081525090565b604051806080016040528060608152602001600063ffffffff16815260200160608152602001606081525090565b6040518060200160405280600081525090565b60405180606001604052806000815260200160608152602001606081525090565b600082601f830112610a8c578081fd5b813567ffffffffffffffff811115610aa2578182fd5b6020610ab181828402016113bc565b828152925080830184820160005b84811015610ae857610ad6888584358a0101610af3565b83529183019190830190600101610abf565b505050505092915050565b600082601f830112610b03578081fd5b813567ffffffffffffffff811115610b19578182fd5b610b4a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016113bc565b9150808252836020828501011115610b6157600080fd5b8060208401602084013760009082016020015292915050565b600060808284031215610b8b578081fd5b610b9560806113bc565b90506000823567ffffffffffffffff80821115610bb0578283fd5b610bbc86838701610af3565b84526020850135915063ffffffff82168214610bd6578283fd5b8160208501526040850135915080821115610bef578283fd5b610bfb86838701610a7c565b60408501526060850135915080821115610c13578283fd5b50610c2085828601610af3565b6060840152505092915050565b600080600080600060a08688031215610c4557600080fd5b8535610c5081611413565b945060208601359350604086013592506060860135610c6e81611413565b949793965091946080013592915050565b600060208284031215610c9157600080fd5b813567ffffffffffffffff811115610ca857600080fd5b610cb484828501610a7c565b949350505050565b60008060008060808587031215610cd257600080fd5b84359350602085013560ff81168114610cea57600080fd5b93969395505050506040820135916060013590565b600060208284031215610d1157600080fd5b813567ffffffffffffffff811115610d2857600080fd5b610cb484828501610af3565b600060208284031215610d4657600080fd5b5035919050565b600060208284031215610d5e578081fd5b813567ffffffffffffffff80821115610d75578283fd5b81840160608187031215610d87578384fd5b610d9160606113bc565b925080358352602081013582811115610da8578485fd5b610db487828401610af3565b602085015250604081013582811115610dcb578485fd5b610dd787828401610af3565b6040850152509195945050505050565b600060208284031215610df8578081fd5b813567ffffffffffffffff80821115610e0f578283fd5b81840160408187031215610e21578384fd5b610e2b60406113bc565b9250803582811115610e3b578485fd5b610e4787828401610b7a565b845250602081013582811115610e5b578485fd5b610e6787828401610af3565b6020850152509195945050505050565b600060208284031215610e8957600080fd5b813567ffffffffffffffff811115610ea057600080fd5b610cb484828501610b7a565b600080600060608486031215610ec0578081fd5b83359250602084013567ffffffffffffffff80821115610ede578283fd5b610eea87838801610af3565b93506040860135915080821115610eff578283fd5b50610f0c86828701610af3565b9150509250925092565b60008151808452610f2e8160208601602086016113e3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000815160808452610f756080850182610f16565b6020915063ffffffff82850151168286015260408401518582036040870152818151808452848401915084858202850101858401600094505b82851015610ffc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0868303018452610fe8828251610f16565b600195909501949387019391508601610fae565b506060880151955088810360608a01526110168187610f16565b9998505050505050505050565b600083516110358184602088016113e3565b9190910191825250602001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600060208083018184528085518083526040860191506040848202870101925083870160005b828110156110d8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526110c6858351610f60565b9450928501929085019060010161108c565b5092979650505050505050565b93845260ff9290921660208401526040830152606082015260800190565b6000606082526111166060830186610f16565b82810360208401526111288186610f16565b838103604085015261113a8186610f16565b979650505050505050565b6000602082526111586020830184610f16565b9392505050565b60408082526004908201527f123456780000000000000000000000000000000000000000000000000000000060608201526080602082018190526005908201527f6c6f72656d00000000000000000000000000000000000000000000000000000060a082015260c00190565b6020808252600d908201527f53494d504c455f52455645525400000000000000000000000000000000000000604082015260600190565b6020808252600e908201527f53494d504c455f52455155495245000000000000000000000000000000000000604082015260600190565b600060208252825160806020840152805160a08401526020810151606060c0850152611269610100850182610f16565b604083015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608582030160e08601526112a48183610f16565b9250505060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160408601526112e28383610f16565b60408701519350818682030160608701526112fd8185610f16565b92505060608601519250808583030160808601525061131c8183610f16565b95945050505050565b905151815260200190565b60006020825282516040602084015261134c6060840182610f60565b602085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084820301604085015261131c8183610f16565b6000602082526111586020830184610f60565b90815260200190565b600083825260406020830152610cb46040830184610f16565b60405181810167ffffffffffffffff811182821017156113db57600080fd5b604052919050565b60005b838110156113fe5781810151838201526020016113e6565b8381111561140d576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461040157600080fdfea365627a7a723158207f0854b76fc684de0be1f1a5db2d486bc187ff28d1e99d27ca0f61b452a1942f6c6578706572696d656e74616cf564736f6c634300050b0040'; + public simpleRequire = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. - * @param a the array of bytes being accepted */ - async callAsync(a: string[], callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isArray('a', a); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -72,7 +67,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); + const encodedData = self._strictEncodeArguments('simpleRequire()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -84,7 +79,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -94,13 +89,11 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). - * @param a the array of bytes being accepted * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string[]): string { - assert.isArray('a', a); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleRequire()', []); return abiEncodedTransactionData; }, /** @@ -108,11 +101,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string[]] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string[]]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -122,20 +115,24 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); + const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public acceptsBytes = { + /** + * a method that accepts an array of bytes + */ + public acceptsAnArrayOfBytes = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. + * @param a the array of bytes being accepted */ - async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isString('a', a); + async callAsync(a: string[], callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isArray('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -145,7 +142,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); + const encodedData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -157,7 +154,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -167,12 +164,13 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). + * @param a the array of bytes being accepted * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string): string { - assert.isString('a', a); + getABIEncodedTransactionData(a: string[]): string { + assert.isArray('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]); return abiEncodedTransactionData; }, /** @@ -180,11 +178,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string] { + getABIDecodedTransactionData(callData: string): [string[]] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string[]]>(callData); return abiDecodedCallData; }, /** @@ -194,31 +192,27 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); + const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; /** - * Tests decoding when the input and output are complex. + * Tests decoding when both input and output are non-empty. */ - public complexInputComplexOutput = { + public simpleInputSimpleOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( - complexInput: { foo: BigNumber; bar: string; car: string }, + index_0: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }> { + ): Promise { + assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -228,9 +222,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('complexInputComplexOutput((uint256,bytes,string))', [ - complexInput, - ]); + const encodedData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [index_0]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -242,14 +234,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -259,129 +246,12 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(complexInput: { foo: BigNumber; bar: string; car: string }): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'complexInputComplexOutput((uint256,bytes,string))', - [complexInput], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): { foo: BigNumber; bar: string; car: string } { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<{ foo: BigNumber; bar: string; car: string }>(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData( - returnData: string, - ): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - input: { foo: BigNumber; bar: string; car: string }; - lorem: string; - ipsum: string; - dolor: string; - }>(returnData); - return abiDecodedReturnData; - }, - }; - /** - * test that devdocs will be generated and - * that multiline devdocs will look okay - */ - public ecrecoverFn = { - /** - * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an - * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. - * @param hash description of some hash. Let's make this line super long to - * demonstrate hanging indents for method params. It has to be more than - * one hundred twenty columns. - * @param v some v, recovery id - * @param r ECDSA r output - * @param s ECDSA s output - * @returns the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code. - */ - async callAsync( - hash: string, - v: number | BigNumber, - r: string, - s: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isString('hash', hash); - assert.isNumberOrBigNumber('v', v); - assert.isString('r', r); - assert.isString('s', s); - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (defaultBlock !== undefined) { - assert.isBlockParam('defaultBlock', defaultBlock); - } + getABIEncodedTransactionData(index_0: BigNumber): string { + assert.isBigNumber('index_0', index_0); const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('ecrecoverFn(bytes32,uint8,bytes32,bytes32)', [ - hash, - v, - r, - s, + const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [ + index_0, ]); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - - let rawCallResult; - try { - rawCallResult = await self._evmExecAsync(encodedDataBytes); - } catch (err) { - BaseContract._throwIfThrownErrorIsRevertError(err); - throw err; - } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @param hash description of some hash. Let's make this line super long to - * demonstrate hanging indents for method params. It has to be more than - * one hundred twenty columns. - * @param v some v, recovery id - * @param r ECDSA r output - * @param s ECDSA s output - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(hash: string, v: number | BigNumber, r: string, s: string): string { - assert.isString('hash', hash); - assert.isNumberOrBigNumber('v', v); - assert.isString('r', r); - assert.isString('s', s); - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'ecrecoverFn(bytes32,uint8,bytes32,bytes32)', - [hash, v, r, s], - ); return abiEncodedTransactionData; }, /** @@ -389,11 +259,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): string { + getABIDecodedTransactionData(callData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -401,15 +271,15 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): string { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); + const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public emitSimpleEvent = { + public withdraw = { /** * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write * Ethereum operation and will cost gas. @@ -417,11 +287,14 @@ export class AbiGenDummyContract extends BaseContract { * @returns The hash of the transaction */ async sendTransactionAsync( + wad: BigNumber, txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -435,7 +308,7 @@ export class AbiGenDummyContract extends BaseContract { } if (opts.shouldValidate) { - await self.emitSimpleEvent.callAsync(txData); + await self.withdraw.callAsync(wad, txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -449,11 +322,14 @@ export class AbiGenDummyContract extends BaseContract { * @returns A promise that resolves when the transaction is successful */ awaitTransactionSuccessAsync( + wad: BigNumber, txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); + const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { @@ -471,9 +347,10 @@ export class AbiGenDummyContract extends BaseContract { * @param txData Additional data for transaction * @returns The hash of the transaction */ - async estimateGasAsync(txData?: Partial | undefined): Promise { + async estimateGasAsync(wad: BigNumber, txData?: Partial | undefined): Promise { + assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -494,7 +371,8 @@ export class AbiGenDummyContract extends BaseContract { * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(wad: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isBigNumber('wad', wad); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -504,7 +382,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -524,7 +402,7 @@ export class AbiGenDummyContract extends BaseContract { throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -536,9 +414,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('emitSimpleEvent()', []); + getABIEncodedTransactionData(wad: BigNumber): string { + assert.isBigNumber('wad', wad); + const self = (this as any) as AbiGenDummyContract; + const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]); return abiEncodedTransactionData; }, /** @@ -546,11 +425,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [BigNumber] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); return abiDecodedCallData; }, /** @@ -560,22 +439,31 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); + const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public methodReturningArrayOfStructs = { + /** + * Tests decoding when the input and output are complex and have more than one argument. + */ + public multiInputMultiOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( + index_0: BigNumber, + index_1: string, + index_2: string, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise> { + ): Promise<[string, string, string]> { + assert.isBigNumber('index_0', index_0); + assert.isString('index_1', index_1); + assert.isString('index_2', index_2); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -585,7 +473,11 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); + const encodedData = self._strictEncodeArguments('multiInputMultiOutput(uint256,bytes,string)', [ + index_0, + index_1, + index_2, + ]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -597,11 +489,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue< - Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> - >(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<[string, string, string]>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -611,9 +501,15 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(index_0: BigNumber, index_1: string, index_2: string): string { + assert.isBigNumber('index_0', index_0); + assert.isString('index_1', index_1); + assert.isString('index_2', index_2); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'multiInputMultiOutput(uint256,bytes,string)', + [index_0, index_1, index_2], + ); return abiEncodedTransactionData; }, /** @@ -621,11 +517,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [BigNumber, string, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string, string]>(callData); return abiDecodedCallData; }, /** @@ -633,25 +529,43 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { + getABIDecodedReturnData(returnData: string): [string, string, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); + const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< - Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> - >(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string]>(returnData); return abiDecodedReturnData; }, }; - public methodReturningMultipleValues = { + /** + * test that devdocs will be generated and + * that multiline devdocs will look okay + */ + public ecrecoverFn = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. + * @param hash description of some hash. Let's make this line super long to + * demonstrate hanging indents for method params. It has to be more than + * one hundred twenty columns. + * @param v some v, recovery id + * @param r ECDSA r output + * @param s ECDSA s output + * @returns the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise<[BigNumber, string]> { + async callAsync( + hash: string, + v: number | BigNumber, + r: string, + s: string, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { + assert.isString('hash', hash); + assert.isNumberOrBigNumber('v', v); + assert.isString('r', r); + assert.isString('s', s); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -661,7 +575,12 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('methodReturningMultipleValues()', []); + const encodedData = self._strictEncodeArguments('ecrecoverFn(bytes32,uint8,bytes32,bytes32)', [ + hash, + v, + r, + s, + ]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -673,9 +592,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -683,11 +602,24 @@ export class AbiGenDummyContract extends BaseContract { * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used * to create a 0x transaction (see protocol spec for more details). + * @param hash description of some hash. Let's make this line super long to + * demonstrate hanging indents for method params. It has to be more than + * one hundred twenty columns. + * @param v some v, recovery id + * @param r ECDSA r output + * @param s ECDSA s output * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(hash: string, v: number | BigNumber, r: string, s: string): string { + assert.isString('hash', hash); + assert.isNumberOrBigNumber('v', v); + assert.isString('r', r); + assert.isString('s', s); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningMultipleValues()', []); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'ecrecoverFn(bytes32,uint8,bytes32,bytes32)', + [hash, v, r, s], + ); return abiEncodedTransactionData; }, /** @@ -695,11 +627,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -707,24 +639,22 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): [BigNumber, string] { + getABIDecodedReturnData(returnData: string): string { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); + const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public methodUsingNestedStructWithInnerStructNotUsedElsewhere = { + public acceptsBytes = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ innerStruct: { aField: BigNumber } }> { + async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isString('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -734,10 +664,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', - [], - ); + const encodedData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -749,9 +676,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -761,12 +688,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(a: string): string { + assert.isString('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', - [], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]); return abiEncodedTransactionData; }, /** @@ -774,11 +699,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); return abiDecodedCallData; }, /** @@ -786,35 +711,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): { innerStruct: { aField: BigNumber } } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); + const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>( - returnData, - ); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; /** - * Tests decoding when the input and output are complex and have more than one argument. + * Tests decoding when input is empty and output is non-empty. */ - public multiInputMultiOutput = { + public noInputSimpleOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - index_0: BigNumber, - index_1: string, - index_2: string, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<[string, string, string]> { - assert.isBigNumber('index_0', index_0); - assert.isString('index_1', index_1); - assert.isString('index_2', index_2); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -824,11 +738,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('multiInputMultiOutput(uint256,bytes,string)', [ - index_0, - index_1, - index_2, - ]); + const encodedData = self._strictEncodeArguments('noInputSimpleOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -840,9 +750,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<[string, string, string]>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -852,15 +762,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber, index_1: string, index_2: string): string { - assert.isBigNumber('index_0', index_0); - assert.isString('index_1', index_1); - assert.isString('index_2', index_2); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'multiInputMultiOutput(uint256,bytes,string)', - [index_0, index_1, index_2], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('noInputSimpleOutput()', []); return abiEncodedTransactionData; }, /** @@ -868,11 +772,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber, string, string] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string, string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -880,33 +784,21 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): [string, string, string] { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)'); + const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[string, string, string]>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nestedStructInput = { + public revertWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - n: { - innerStruct: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - }, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -916,10 +808,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'nestedStructInput(((bytes,uint32,bytes[],string),string))', - [n], - ); + const encodedData = self._strictEncodeArguments('revertWithConstant()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -931,7 +820,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -943,20 +832,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(n: { - innerStruct: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - }): string { + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'nestedStructInput(((bytes,uint32,bytes[],string),string))', - [n], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('revertWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -964,30 +842,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData( - callData: string, - ): [ - { - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - } - ] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [ - { - innerStruct: { - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }; - description: string; - } - ] - >(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -997,25 +856,19 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); + const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nestedStructOutput = { + public simpleRevert = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }> { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1025,7 +878,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nestedStructOutput()', []); + const encodedData = self._strictEncodeArguments('simpleRevert()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1037,12 +890,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1054,7 +904,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nestedStructOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleRevert()', []); return abiEncodedTransactionData; }, /** @@ -1064,7 +914,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1074,32 +924,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): { - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); + const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; - description: string; - }>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when both input and output are empty. - */ - public noInputNoOutput = { + public methodUsingNestedStructWithInnerStructNotUsedElsewhere = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ innerStruct: { aField: BigNumber } }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1109,7 +951,10 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('noInputNoOutput()', []); + const encodedData = self._strictEncodeArguments( + 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', + [], + ); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1121,9 +966,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1135,7 +980,10 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('noInputNoOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'methodUsingNestedStructWithInnerStructNotUsedElsewhere()', + [], + ); return abiEncodedTransactionData; }, /** @@ -1145,7 +993,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1155,24 +1003,29 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): { innerStruct: { aField: BigNumber } } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); + const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ innerStruct: { aField: BigNumber } }>( + returnData, + ); return abiDecodedReturnData; }, }; - /** - * Tests decoding when input is empty and output is non-empty. - */ - public noInputSimpleOutput = { + public nestedStructOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1182,7 +1035,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('noInputSimpleOutput()', []); + const encodedData = self._strictEncodeArguments('nestedStructOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1194,9 +1047,12 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1208,7 +1064,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('noInputSimpleOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nestedStructOutput()', []); return abiEncodedTransactionData; }, /** @@ -1218,7 +1074,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1228,121 +1084,29 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData( + returnData: string, + ): { + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()'); + const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + }>(returnData); return abiDecodedReturnData; }, }; - public nonPureFunction = { - /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async sendTransactionAsync( - id: BigNumber, - someValue: BigNumber, - txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, - ): Promise { - assert.isBigNumber('id', id); - assert.isBigNumber('someValue', someValue); - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - if (opts.shouldValidate) { - await self.nonPureFunction.callAsync(id, someValue, txData); - } - - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - /** - * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. - * If the transaction was mined, but reverted, an error is thrown. - * @param txData Additional data for transaction - * @param pollingIntervalMs Interval at which to poll for success - * @returns A promise that resolves when the transaction is successful - */ - awaitTransactionSuccessAsync( - id: BigNumber, - someValue: BigNumber, - txData?: Partial, - opts: TxOpts = { shouldValidate: true }, - ): PromiseWithTransactionHash { - assert.isBigNumber('id', id); - assert.isBigNumber('someValue', someValue); - const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureFunction.sendTransactionAsync(id, someValue, txData, opts); - return new PromiseWithTransactionHash( - txHashPromise, - (async (): Promise => { - // When the transaction hash resolves, wait for it to be mined. - return self._web3Wrapper.awaitTransactionSuccessAsync( - await txHashPromise, - opts.pollingIntervalMs, - opts.timeoutMs, - ); - })(), - ); - }, - /** - * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async estimateGasAsync( - id: BigNumber, - someValue: BigNumber, - txData?: Partial | undefined, - ): Promise { - assert.isBigNumber('id', id); - assert.isBigNumber('someValue', someValue); - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, + public requireWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - id: BigNumber, - someValue: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isBigNumber('id', id); - assert.isBigNumber('someValue', someValue); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1352,29 +1116,21 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [id, someValue]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; + const encodedData = self._strictEncodeArguments('requireWithConstant()', []); + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); + let rawCallResult; try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); + + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1384,14 +1140,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(id: BigNumber, someValue: BigNumber): string { - assert.isBigNumber('id', id); - assert.isBigNumber('someValue', someValue); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nonPureFunction(uint256,uint256)', [ - id, - someValue, - ]); + const abiEncodedTransactionData = self._strictEncodeArguments('requireWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -1399,11 +1150,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): BigNumber { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1411,100 +1162,119 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureFunction(uint256,uint256)'); + const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nonPureMethod = { + public withAddressInput = { /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async sendTransactionAsync( - txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an + * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas + * since they don't modify state. + */ + async callAsync( + x: string, + a: BigNumber, + b: BigNumber, + y: string, + c: BigNumber, + callData: Partial = {}, + defaultBlock?: BlockParam, ): Promise { + assert.isString('x', x); + assert.isBigNumber('a', a); + assert.isBigNumber('b', b); + assert.isString('y', y); + assert.isBigNumber('c', c); + assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ + schemas.addressSchema, + schemas.numberSchema, + schemas.jsNumber, + ]); + if (defaultBlock !== undefined) { + assert.isBlockParam('defaultBlock', defaultBlock); + } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), + const encodedData = self._strictEncodeArguments( + 'withAddressInput(address,uint256,uint256,address,uint256)', + [x.toLowerCase(), a, b, y.toLowerCase(), c], ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - if (opts.shouldValidate) { - await self.nonPureMethod.callAsync(txData); + let rawCallResult; + try { + rawCallResult = await self._evmExecAsync(encodedDataBytes); + } catch (err) { + BaseContract._throwIfThrownErrorIsRevertError(err); + throw err; } + BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + // tslint:enable boolean-naming + return result; }, /** - * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. - * If the transaction was mined, but reverted, an error is thrown. - * @param txData Additional data for transaction - * @param pollingIntervalMs Interval at which to poll for success - * @returns A promise that resolves when the transaction is successful + * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before + * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used + * to create a 0x transaction (see protocol spec for more details). + * @returns The ABI encoded transaction data as a string */ - awaitTransactionSuccessAsync( - txData?: Partial, - opts: TxOpts = { shouldValidate: true }, - ): PromiseWithTransactionHash { + getABIEncodedTransactionData(x: string, a: BigNumber, b: BigNumber, y: string, c: BigNumber): string { + assert.isString('x', x); + assert.isBigNumber('a', a); + assert.isBigNumber('b', b); + assert.isString('y', y); + assert.isBigNumber('c', c); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); - return new PromiseWithTransactionHash( - txHashPromise, - (async (): Promise => { - // When the transaction hash resolves, wait for it to be mined. - return self._web3Wrapper.awaitTransactionSuccessAsync( - await txHashPromise, - opts.pollingIntervalMs, - opts.timeoutMs, - ); - })(), + const abiEncodedTransactionData = self._strictEncodeArguments( + 'withAddressInput(address,uint256,uint256,address,uint256)', + [x.toLowerCase(), a, b, y.toLowerCase(), c], ); + return abiEncodedTransactionData; }, /** - * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. - * @param txData Additional data for transaction - * @returns The hash of the transaction + * Decode the ABI-encoded transaction data into its input arguments + * @param callData The ABI-encoded transaction data + * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - async estimateGasAsync(txData?: Partial | undefined): Promise { + getABIDecodedTransactionData(callData: string): string { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); + // tslint:disable boolean-naming + const abiDecodedCallData = abiEncoder.strictDecode(callData); + return abiDecodedCallData; + }, + /** + * Decode the ABI-encoded return data from a transaction + * @param returnData the data returned after transaction execution + * @returns An array representing the output results in order. Keynames of nested structs are preserved. + */ + getABIDecodedReturnData(returnData: string): string { + const self = (this as any) as AbiGenDummyContract; + const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); + // tslint:disable boolean-naming + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + return abiDecodedReturnData; }, + }; + public structInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + s: { someBytes: string; anInteger: number | BigNumber; aDynamicArrayOfBytes: string[]; aString: string }, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1514,29 +1284,21 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethod()', []); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; + const encodedData = self._strictEncodeArguments('structInput((bytes,uint32,bytes[],string))', [s]); + const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); + let rawCallResult; try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + rawCallResult = await self._evmExecAsync(encodedDataBytes); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1546,9 +1308,17 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(s: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethod()', []); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'structInput((bytes,uint32,bytes[],string))', + [s], + ); return abiEncodedTransactionData; }, /** @@ -1556,11 +1326,15 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData( + callData: string, + ): [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode< + [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] + >(callData); return abiDecodedCallData; }, /** @@ -1568,15 +1342,15 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); + const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public nonPureMethodThatReturnsNothing = { + public nonPureMethod = { /** * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write * Ethereum operation and will cost gas. @@ -1585,10 +1359,11 @@ export class AbiGenDummyContract extends BaseContract { */ async sendTransactionAsync( txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1602,7 +1377,7 @@ export class AbiGenDummyContract extends BaseContract { } if (opts.shouldValidate) { - await self.nonPureMethodThatReturnsNothing.callAsync(txData); + await self.nonPureMethod.callAsync(txDataWithDefaults); } const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); @@ -1617,10 +1392,11 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: TxOpts = { shouldValidate: true }, + opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); + const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( txHashPromise, (async (): Promise => { @@ -1640,7 +1416,7 @@ export class AbiGenDummyContract extends BaseContract { */ async estimateGasAsync(txData?: Partial | undefined): Promise { const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1661,7 +1437,7 @@ export class AbiGenDummyContract extends BaseContract { * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1671,7 +1447,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const encodedData = self._strictEncodeArguments('nonPureMethod()', []); const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -1691,9 +1467,9 @@ export class AbiGenDummyContract extends BaseContract { throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1705,7 +1481,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethod()', []); return abiEncodedTransactionData; }, /** @@ -1715,7 +1491,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -1725,22 +1501,33 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethod()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public overloadedMethod2 = { + /** + * Tests decoding when the input and output are complex. + */ + public complexInputComplexOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isString('a', a); + async callAsync( + complexInput: { foo: BigNumber; bar: string; car: string }, + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1750,7 +1537,9 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('overloadedMethod(string)', [a]); + const encodedData = self._strictEncodeArguments('complexInputComplexOutput((uint256,bytes,string))', [ + complexInput, + ]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1762,9 +1551,14 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -1774,10 +1568,12 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: string): string { - assert.isString('a', a); + getABIEncodedTransactionData(complexInput: { foo: BigNumber; bar: string; car: string }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(string)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'complexInputComplexOutput((uint256,bytes,string))', + [complexInput], + ); return abiEncodedTransactionData; }, /** @@ -1785,11 +1581,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [string] { + getABIDecodedTransactionData(callData: string): { foo: BigNumber; bar: string; car: string } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode<{ foo: BigNumber; bar: string; car: string }>(callData); return abiDecodedCallData; }, /** @@ -1797,22 +1593,31 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData( + returnData: string, + ): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); + const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + input: { foo: BigNumber; bar: string; car: string }; + lorem: string; + ipsum: string; + dolor: string; + }>(returnData); return abiDecodedReturnData; }, }; - public overloadedMethod1 = { + /** + * Tests decoding when both input and output are empty. + */ + public noInputNoOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(a: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isBigNumber('a', a); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1822,7 +1627,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); + const encodedData = self._strictEncodeArguments('noInputNoOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1834,7 +1639,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1846,10 +1651,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(a: BigNumber): string { - assert.isBigNumber('a', a); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); + const abiEncodedTransactionData = self._strictEncodeArguments('noInputNoOutput()', []); return abiEncodedTransactionData; }, /** @@ -1857,11 +1661,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber] { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1871,19 +1675,20 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); + const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public pureFunctionWithConstant = { + public simplePureFunctionWithInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(x: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isBigNumber('x', x); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -1893,7 +1698,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('pureFunctionWithConstant()', []); + const encodedData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -1905,7 +1710,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1917,9 +1722,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(x: BigNumber): string { + assert.isBigNumber('x', x); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('pureFunctionWithConstant()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); return abiEncodedTransactionData; }, /** @@ -1927,11 +1733,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -1941,13 +1747,94 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public requireWithConstant = { + public nonPureMethodThatReturnsNothing = { + /** + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async sendTransactionAsync( + txData?: Partial | undefined, + opts: SendTransactionOpts = { shouldValidate: true }, + ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + if (opts.shouldValidate) { + await self.nonPureMethodThatReturnsNothing.callAsync(txDataWithDefaults); + } + + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + /** + * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. + * If the transaction was mined, but reverted, an error is thrown. + * @param txData Additional data for transaction + * @param pollingIntervalMs Interval at which to poll for success + * @returns A promise that resolves when the transaction is successful + */ + awaitTransactionSuccessAsync( + txData?: Partial, + opts: SendTransactionOpts = { shouldValidate: true }, + ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as AbiGenDummyContract; + const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); + return new PromiseWithTransactionHash( + txHashPromise, + (async (): Promise => { + // When the transaction hash resolves, wait for it to be mined. + return self._web3Wrapper.awaitTransactionSuccessAsync( + await txHashPromise, + opts.pollingIntervalMs, + opts.timeoutMs, + ); + })(), + ); + }, + /** + * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async estimateGasAsync(txData?: Partial | undefined): Promise { + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -1963,19 +1850,27 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('requireWithConstant()', []); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - + const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; let rawCallResult; try { - rawCallResult = await self._evmExecAsync(encodedDataBytes); + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -1989,7 +1884,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('requireWithConstant()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); return abiEncodedTransactionData; }, /** @@ -1999,7 +1894,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2011,19 +1906,19 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('requireWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public revertWithConstant = { + public simplePureFunction = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2033,7 +1928,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('revertWithConstant()', []); + const encodedData = self._strictEncodeArguments('simplePureFunction()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2045,9 +1940,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2059,7 +1954,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('revertWithConstant()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunction()', []); return abiEncodedTransactionData; }, /** @@ -2069,7 +1964,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2079,29 +1974,33 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('revertWithConstant()'); + const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when input is not empty but output is empty. - */ - public simpleInputNoOutput = { + public nestedStructInput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ async callAsync( - index_0: BigNumber, + n: { + innerStruct: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + }, callData: Partial = {}, defaultBlock?: BlockParam, ): Promise { - assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2111,7 +2010,10 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); + const encodedData = self._strictEncodeArguments( + 'nestedStructInput(((bytes,uint32,bytes[],string),string))', + [n], + ); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2123,7 +2025,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -2135,10 +2037,20 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); + getABIEncodedTransactionData(n: { + innerStruct: { + someBytes: string; + anInteger: number | BigNumber; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + }): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); + const abiEncodedTransactionData = self._strictEncodeArguments( + 'nestedStructInput(((bytes,uint32,bytes[],string),string))', + [n], + ); return abiEncodedTransactionData; }, /** @@ -2146,11 +2058,30 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): [BigNumber] { + getABIDecodedTransactionData( + callData: string, + ): [ + { + innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }; + description: string; + } + ] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); + const abiDecodedCallData = abiEncoder.strictDecode< + [ + { + innerStruct: { + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }; + description: string; + } + ] + >(callData); return abiDecodedCallData; }, /** @@ -2160,27 +2091,19 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * Tests decoding when both input and output are non-empty. - */ - public simpleInputSimpleOutput = { + public methodReturningMultipleValues = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - index_0: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isBigNumber('index_0', index_0); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise<[BigNumber, string]> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2190,7 +2113,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [index_0]); + const encodedData = self._strictEncodeArguments('methodReturningMultipleValues()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2202,9 +2125,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2214,12 +2137,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputSimpleOutput(uint256)', [ - index_0, - ]); + const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningMultipleValues()', []); return abiEncodedTransactionData; }, /** @@ -2227,11 +2147,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): BigNumber { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2239,21 +2159,24 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): [BigNumber, string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<[BigNumber, string]>(returnData); return abiDecodedReturnData; }, }; - public simplePureFunction = { + public methodReturningArrayOfStructs = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2263,7 +2186,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simplePureFunction()', []); + const encodedData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2275,9 +2198,11 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue< + Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> + >(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2289,7 +2214,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunction()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []); return abiEncodedTransactionData; }, /** @@ -2299,7 +2224,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2309,22 +2234,106 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData( + returnData: string, + ): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunction()'); + const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue< + Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> + >(returnData); return abiDecodedReturnData; }, }; - public simplePureFunctionWithInput = { + public emitSimpleEvent = { + /** + * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write + * Ethereum operation and will cost gas. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async sendTransactionAsync( + txData?: Partial | undefined, + opts: SendTransactionOpts = { shouldValidate: true }, + ): Promise { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + if (opts.shouldValidate) { + await self.emitSimpleEvent.callAsync(txDataWithDefaults); + } + + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + /** + * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. + * If the transaction was mined, but reverted, an error is thrown. + * @param txData Additional data for transaction + * @param pollingIntervalMs Interval at which to poll for success + * @returns A promise that resolves when the transaction is successful + */ + awaitTransactionSuccessAsync( + txData?: Partial, + opts: SendTransactionOpts = { shouldValidate: true }, + ): PromiseWithTransactionHash { + assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); + const self = (this as any) as AbiGenDummyContract; + const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); + return new PromiseWithTransactionHash( + txHashPromise, + (async (): Promise => { + // When the transaction hash resolves, wait for it to be mined. + return self._web3Wrapper.awaitTransactionSuccessAsync( + await txHashPromise, + opts.pollingIntervalMs, + opts.timeoutMs, + ); + })(), + ); + }, + /** + * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. + * @param txData Additional data for transaction + * @returns The hash of the transaction + */ + async estimateGasAsync(txData?: Partial | undefined): Promise { + const self = (this as any) as AbiGenDummyContract; + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + if (txDataWithDefaults.from !== undefined) { + txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); + } + + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(x: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isBigNumber('x', x); + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2334,21 +2343,29 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); - const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); - + const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + callDataWithDefaults.from = callDataWithDefaults.from + ? callDataWithDefaults.from.toLowerCase() + : callDataWithDefaults.from; let rawCallResult; try { - rawCallResult = await self._evmExecAsync(encodedDataBytes); + rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); } catch (err) { BaseContract._throwIfThrownErrorIsRevertError(err); throw err; } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2358,10 +2375,9 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(x: BigNumber): string { - assert.isBigNumber('x', x); + getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]); + const abiEncodedTransactionData = self._strictEncodeArguments('emitSimpleEvent()', []); return abiEncodedTransactionData; }, /** @@ -2369,11 +2385,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): BigNumber { + getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; }, /** @@ -2381,21 +2397,28 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): BigNumber { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)'); + const abiEncoder = self._lookupAbiEncoder('emitSimpleEvent()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public simpleRequire = { + /** + * a method that returns a struct + */ + public structOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. + * @returns a Struct struct */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync( + callData: Partial = {}, + defaultBlock?: BlockParam, + ): Promise<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2405,7 +2428,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleRequire()', []); + const encodedData = self._strictEncodeArguments('structOutput()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2417,9 +2440,14 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue<{ + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }>(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2431,7 +2459,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleRequire()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('structOutput()', []); return abiEncodedTransactionData; }, /** @@ -2441,7 +2469,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2451,21 +2479,28 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData( + returnData: string, + ): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRequire()'); + const abiEncoder = self._lookupAbiEncoder('structOutput()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ + someBytes: string; + anInteger: number; + aDynamicArrayOfBytes: string[]; + aString: string; + }>(returnData); return abiDecodedReturnData; }, }; - public simpleRevert = { + public pureFunctionWithConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { + async callAsync(callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2475,7 +2510,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('simpleRevert()', []); + const encodedData = self._strictEncodeArguments('pureFunctionWithConstant()', []); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2487,9 +2522,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2501,7 +2536,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIEncodedTransactionData(): string { const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('simpleRevert()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('pureFunctionWithConstant()', []); return abiEncodedTransactionData; }, /** @@ -2511,7 +2546,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode(callData); return abiDecodedCallData; @@ -2521,15 +2556,18 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData(returnData: string): void { + getABIDecodedReturnData(returnData: string): BigNumber { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('simpleRevert()'); + const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public someMapping = { + /** + * Tests decoding when input is not empty but output is empty. + */ + public simpleInputNoOutput = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas @@ -2539,7 +2577,7 @@ export class AbiGenDummyContract extends BaseContract { index_0: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam, - ): Promise { + ): Promise { assert.isBigNumber('index_0', index_0); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, @@ -2550,90 +2588,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('someMapping(uint256)', [index_0]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; - let rawCallResult; - try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - } catch (err) { - BaseContract._throwIfThrownErrorIsRevertError(err); - throw err; - } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(index_0: BigNumber): string { - assert.isBigNumber('index_0', index_0); - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('someMapping(uint256)', [index_0]); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): BigNumber { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): BigNumber { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('someMapping(uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, - }; - public structInput = { - /** - * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an - * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. - */ - async callAsync( - s: { someBytes: string; anInteger: number | BigNumber; aDynamicArrayOfBytes: string[]; aString: string }, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (defaultBlock !== undefined) { - assert.isBlockParam('defaultBlock', defaultBlock); - } - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('structInput((bytes,uint32,bytes[],string))', [s]); + const encodedData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2645,7 +2600,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -2657,17 +2612,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(s: { - someBytes: string; - anInteger: number | BigNumber; - aDynamicArrayOfBytes: string[]; - aString: string; - }): string { + getABIEncodedTransactionData(index_0: BigNumber): string { + assert.isBigNumber('index_0', index_0); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'structInput((bytes,uint32,bytes[],string))', - [s], - ); + const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]); return abiEncodedTransactionData; }, /** @@ -2675,15 +2623,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData( - callData: string, - ): [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] { + getABIDecodedTransactionData(callData: string): [BigNumber] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode< - [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] - >(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); return abiDecodedCallData; }, /** @@ -2693,26 +2637,20 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))'); + const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - /** - * a method that returns a struct - */ - public structOutput = { + public overloadedMethod2 = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. - * @returns a Struct struct */ - async callAsync( - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> { + async callAsync(a: string, callData: Partial = {}, defaultBlock?: BlockParam): Promise { + assert.isString('a', a); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2722,7 +2660,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('structOutput()', []); + const encodedData = self._strictEncodeArguments('overloadedMethod(string)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2734,14 +2672,9 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue<{ - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }>(rawCallResult); + const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming return result; }, @@ -2751,9 +2684,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(): string { + getABIEncodedTransactionData(a: string): string { + assert.isString('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('structOutput()', []); + const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(string)', [a]); return abiEncodedTransactionData; }, /** @@ -2761,11 +2695,11 @@ export class AbiGenDummyContract extends BaseContract { * @param callData The ABI-encoded transaction data * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. */ - getABIDecodedTransactionData(callData: string): void { + getABIDecodedTransactionData(callData: string): [string] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); + const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData); return abiDecodedCallData; }, /** @@ -2773,41 +2707,22 @@ export class AbiGenDummyContract extends BaseContract { * @param returnData the data returned after transaction execution * @returns An array representing the output results in order. Keynames of nested structs are preserved. */ - getABIDecodedReturnData( - returnData: string, - ): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } { + getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('structOutput()'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)'); // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<{ - someBytes: string; - anInteger: number; - aDynamicArrayOfBytes: string[]; - aString: string; - }>(returnData); + const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; }, }; - public withAddressInput = { + public overloadedMethod1 = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas * since they don't modify state. */ - async callAsync( - x: string, - a: BigNumber, - b: BigNumber, - y: string, - c: BigNumber, - callData: Partial = {}, - defaultBlock?: BlockParam, - ): Promise { - assert.isString('x', x); + async callAsync(a: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { assert.isBigNumber('a', a); - assert.isBigNumber('b', b); - assert.isString('y', y); - assert.isBigNumber('c', c); assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ schemas.addressSchema, schemas.numberSchema, @@ -2817,10 +2732,7 @@ export class AbiGenDummyContract extends BaseContract { assert.isBlockParam('defaultBlock', defaultBlock); } const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments( - 'withAddressInput(address,uint256,uint256,address,uint256)', - [x.toLowerCase(), a, b, y.toLowerCase(), c], - ); + const encodedData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); const encodedDataBytes = Buffer.from(encodedData.substr(2), 'hex'); let rawCallResult; @@ -2832,178 +2744,7 @@ export class AbiGenDummyContract extends BaseContract { } BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const result = abiEncoder.strictDecodeReturnValue(rawCallResult); - // tslint:enable boolean-naming - return result; - }, - /** - * Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before - * sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used - * to create a 0x transaction (see protocol spec for more details). - * @returns The ABI encoded transaction data as a string - */ - getABIEncodedTransactionData(x: string, a: BigNumber, b: BigNumber, y: string, c: BigNumber): string { - assert.isString('x', x); - assert.isBigNumber('a', a); - assert.isBigNumber('b', b); - assert.isString('y', y); - assert.isBigNumber('c', c); - const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments( - 'withAddressInput(address,uint256,uint256,address,uint256)', - [x.toLowerCase(), a, b, y.toLowerCase(), c], - ); - return abiEncodedTransactionData; - }, - /** - * Decode the ABI-encoded transaction data into its input arguments - * @param callData The ABI-encoded transaction data - * @returns An array representing the input arguments in order. Keynames of nested structs are preserved. - */ - getABIDecodedTransactionData(callData: string): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedCallData = abiEncoder.strictDecode(callData); - return abiDecodedCallData; - }, - /** - * Decode the ABI-encoded return data from a transaction - * @param returnData the data returned after transaction execution - * @returns An array representing the output results in order. Keynames of nested structs are preserved. - */ - getABIDecodedReturnData(returnData: string): string { - const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)'); - // tslint:disable boolean-naming - const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); - return abiDecodedReturnData; - }, - }; - public withdraw = { - /** - * Sends an Ethereum transaction executing this method with the supplied parameters. This is a read/write - * Ethereum operation and will cost gas. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async sendTransactionAsync( - wad: BigNumber, - txData?: Partial | undefined, - opts: TxOpts = { shouldValidate: true }, - ): Promise { - assert.isBigNumber('wad', wad); - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - if (opts.shouldValidate) { - await self.withdraw.callAsync(wad, txData); - } - - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - /** - * Sends an Ethereum transaction and waits until the transaction has been successfully mined without reverting. - * If the transaction was mined, but reverted, an error is thrown. - * @param txData Additional data for transaction - * @param pollingIntervalMs Interval at which to poll for success - * @returns A promise that resolves when the transaction is successful - */ - awaitTransactionSuccessAsync( - wad: BigNumber, - txData?: Partial, - opts: TxOpts = { shouldValidate: true }, - ): PromiseWithTransactionHash { - assert.isBigNumber('wad', wad); - const self = (this as any) as AbiGenDummyContract; - const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); - return new PromiseWithTransactionHash( - txHashPromise, - (async (): Promise => { - // When the transaction hash resolves, wait for it to be mined. - return self._web3Wrapper.awaitTransactionSuccessAsync( - await txHashPromise, - opts.pollingIntervalMs, - opts.timeoutMs, - ); - })(), - ); - }, - /** - * Estimates the gas cost of sending an Ethereum transaction calling this method with these arguments. - * @param txData Additional data for transaction - * @returns The hash of the transaction - */ - async estimateGasAsync(wad: BigNumber, txData?: Partial | undefined): Promise { - assert.isBigNumber('wad', wad); - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - if (txDataWithDefaults.from !== undefined) { - txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); - } - - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - /** - * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an - * Ethereum transaction to this method, given the current state of the blockchain. Calls do not cost gas - * since they don't modify state. - */ - async callAsync(wad: BigNumber, callData: Partial = {}, defaultBlock?: BlockParam): Promise { - assert.isBigNumber('wad', wad); - assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ - schemas.addressSchema, - schemas.numberSchema, - schemas.jsNumber, - ]); - if (defaultBlock !== undefined) { - assert.isBlockParam('defaultBlock', defaultBlock); - } - const self = (this as any) as AbiGenDummyContract; - const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - callDataWithDefaults.from = callDataWithDefaults.from - ? callDataWithDefaults.from.toLowerCase() - : callDataWithDefaults.from; - let rawCallResult; - try { - rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - } catch (err) { - BaseContract._throwIfThrownErrorIsRevertError(err); - throw err; - } - BaseContract._throwIfCallResultIsRevertError(rawCallResult); - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming const result = abiEncoder.strictDecodeReturnValue(rawCallResult); // tslint:enable boolean-naming @@ -3015,10 +2756,10 @@ export class AbiGenDummyContract extends BaseContract { * to create a 0x transaction (see protocol spec for more details). * @returns The ABI encoded transaction data as a string */ - getABIEncodedTransactionData(wad: BigNumber): string { - assert.isBigNumber('wad', wad); + getABIEncodedTransactionData(a: BigNumber): string { + assert.isBigNumber('a', a); const self = (this as any) as AbiGenDummyContract; - const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]); + const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(int256)', [a]); return abiEncodedTransactionData; }, /** @@ -3028,7 +2769,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedTransactionData(callData: string): [BigNumber] { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData); return abiDecodedCallData; @@ -3040,7 +2781,7 @@ export class AbiGenDummyContract extends BaseContract { */ getABIDecodedReturnData(returnData: string): void { const self = (this as any) as AbiGenDummyContract; - const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)'); + const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)'); // tslint:disable boolean-naming const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue(returnData); return abiDecodedReturnData; @@ -3117,40 +2858,13 @@ export class AbiGenDummyContract extends BaseContract { public static ABI(): ContractAbi { const abi = [ { - anonymous: false, - inputs: [ - { - name: 'someBytes', - type: 'bytes', - indexed: false, - }, - { - name: 'someString', - type: 'string', - indexed: false, - }, - ], - name: 'SimpleEvent', - outputs: [], - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - name: '_owner', - type: 'address', - indexed: true, - }, - { - name: '_value', - type: 'uint256', - indexed: false, - }, - ], - name: 'Withdrawal', + constant: true, + inputs: [], + name: 'simpleRequire', outputs: [], - type: 'event', + payable: false, + stateMutability: 'pure', + type: 'function', }, { constant: true, @@ -3170,75 +2884,64 @@ export class AbiGenDummyContract extends BaseContract { constant: true, inputs: [ { - name: 'a', - type: 'bytes', + name: 'index_0', + type: 'uint256', + }, + ], + name: 'simpleInputSimpleOutput', + outputs: [ + { + name: '', + type: 'uint256', }, ], - name: 'acceptsBytes', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - constant: true, + constant: false, inputs: [ { - name: 'complexInput', - type: 'tuple', - components: [ - { - name: 'foo', - type: 'uint256', - }, - { - name: 'bar', - type: 'bytes', - }, - { - name: 'car', - type: 'string', - }, - ], + name: 'wad', + type: 'uint256', }, ], - name: 'complexInputComplexOutput', - outputs: [ + name: 'withdraw', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: '', - type: 'tuple', - components: [ - { - name: 'input', - type: 'tuple', - components: [ - { - name: 'foo', - type: 'uint256', - }, - { - name: 'bar', - type: 'bytes', - }, - { - name: 'car', - type: 'string', - }, - ], - }, - { - name: 'lorem', - type: 'bytes', - }, - { - name: 'ipsum', - type: 'bytes', - }, - { - name: 'dolor', - type: 'string', - }, - ], + name: 'index_0', + type: 'uint256', + }, + { + name: 'index_1', + type: 'bytes', + }, + { + name: 'index_2', + type: 'string', + }, + ], + name: 'multiInputMultiOutput', + outputs: [ + { + name: '', + type: 'bytes', + }, + { + name: '', + type: 'bytes', + }, + { + name: '', + type: 'string', }, ], payable: false, @@ -3276,43 +2979,16 @@ export class AbiGenDummyContract extends BaseContract { stateMutability: 'pure', type: 'function', }, - { - constant: false, - inputs: [], - name: 'emitSimpleEvent', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, { constant: true, - inputs: [], - name: 'methodReturningArrayOfStructs', - outputs: [ + inputs: [ { - name: '', - type: 'tuple[]', - components: [ - { - name: 'someBytes', - type: 'bytes', - }, - { - name: 'anInteger', - type: 'uint32', - }, - { - name: 'aDynamicArrayOfBytes', - type: 'bytes[]', - }, - { - name: 'aString', - type: 'string', - }, - ], + name: 'a', + type: 'bytes', }, ], + name: 'acceptsBytes', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3320,16 +2996,12 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'methodReturningMultipleValues', + name: 'noInputSimpleOutput', outputs: [ { name: '', type: 'uint256', }, - { - name: '', - type: 'string', - }, ], payable: false, stateMutability: 'pure', @@ -3338,69 +3010,28 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'methodUsingNestedStructWithInnerStructNotUsedElsewhere', - outputs: [ - { - name: '', - type: 'tuple', - components: [ - { - name: 'innerStruct', - type: 'tuple', - components: [ - { - name: 'aField', - type: 'uint256', - }, - ], - }, - ], - }, - ], + name: 'revertWithConstant', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { constant: true, - inputs: [ - { - name: 'index_0', - type: 'uint256', - }, - { - name: 'index_1', - type: 'bytes', - }, - { - name: 'index_2', - type: 'string', - }, - ], - name: 'multiInputMultiOutput', - outputs: [ - { - name: '', - type: 'bytes', - }, - { - name: '', - type: 'bytes', - }, - { - name: '', - type: 'string', - }, - ], + inputs: [], + name: 'simpleRevert', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { constant: true, - inputs: [ + inputs: [], + name: 'methodUsingNestedStructWithInnerStructNotUsedElsewhere', + outputs: [ { - name: 'n', + name: '', type: 'tuple', components: [ { @@ -3408,32 +3039,14 @@ export class AbiGenDummyContract extends BaseContract { type: 'tuple', components: [ { - name: 'someBytes', - type: 'bytes', - }, - { - name: 'anInteger', - type: 'uint32', - }, - { - name: 'aDynamicArrayOfBytes', - type: 'bytes[]', - }, - { - name: 'aString', - type: 'string', + name: 'aField', + type: 'uint256', }, ], }, - { - name: 'description', - type: 'string', - }, ], }, ], - name: 'nestedStructInput', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3483,7 +3096,7 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'noInputNoOutput', + name: 'requireWithConstant', outputs: [], payable: false, stateMutability: 'pure', @@ -3491,74 +3104,35 @@ export class AbiGenDummyContract extends BaseContract { }, { constant: true, - inputs: [], - name: 'noInputSimpleOutput', - outputs: [ + inputs: [ { - name: '', - type: 'uint256', + name: 'x', + type: 'address', }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: false, - inputs: [ { - name: 'id', + name: 'a', type: 'uint256', }, { - name: 'someValue', + name: 'b', type: 'uint256', }, - ], - name: 'nonPureFunction', - outputs: [ { - name: 'result', - type: 'uint256', + name: 'y', + type: 'address', }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'nonPureMethod', - outputs: [ { - name: '', + name: 'c', type: 'uint256', }, ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'nonPureMethodThatReturnsNothing', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ + name: 'withAddressInput', + outputs: [ { - name: 'a', - type: 'string', + name: 'z', + type: 'address', }, ], - name: 'overloadedMethod', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3567,75 +3141,107 @@ export class AbiGenDummyContract extends BaseContract { constant: true, inputs: [ { - name: 'a', - type: 'int256', - }, - ], - name: 'overloadedMethod', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'pureFunctionWithConstant', - outputs: [ - { - name: 'someConstant', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'requireWithConstant', + name: 's', + type: 'tuple', + components: [ + { + name: 'someBytes', + type: 'bytes', + }, + { + name: 'anInteger', + type: 'uint32', + }, + { + name: 'aDynamicArrayOfBytes', + type: 'bytes[]', + }, + { + name: 'aString', + type: 'string', + }, + ], + }, + ], + name: 'structInput', outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - constant: true, + constant: false, inputs: [], - name: 'revertWithConstant', - outputs: [], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [ + name: 'nonPureMethod', + outputs: [ { - name: 'index_0', + name: '', type: 'uint256', }, ], - name: 'simpleInputNoOutput', - outputs: [], payable: false, - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', }, { constant: true, inputs: [ { - name: 'index_0', - type: 'uint256', + name: 'complexInput', + type: 'tuple', + components: [ + { + name: 'foo', + type: 'uint256', + }, + { + name: 'bar', + type: 'bytes', + }, + { + name: 'car', + type: 'string', + }, + ], }, ], - name: 'simpleInputSimpleOutput', + name: 'complexInputComplexOutput', outputs: [ { name: '', - type: 'uint256', + type: 'tuple', + components: [ + { + name: 'input', + type: 'tuple', + components: [ + { + name: 'foo', + type: 'uint256', + }, + { + name: 'bar', + type: 'bytes', + }, + { + name: 'car', + type: 'string', + }, + ], + }, + { + name: 'lorem', + type: 'bytes', + }, + { + name: 'ipsum', + type: 'bytes', + }, + { + name: 'dolor', + type: 'string', + }, + ], }, ], payable: false, @@ -3645,13 +3251,8 @@ export class AbiGenDummyContract extends BaseContract { { constant: true, inputs: [], - name: 'simplePureFunction', - outputs: [ - { - name: 'result', - type: 'uint256', - }, - ], + name: 'noInputNoOutput', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', @@ -3676,19 +3277,24 @@ export class AbiGenDummyContract extends BaseContract { type: 'function', }, { - constant: true, + constant: false, inputs: [], - name: 'simpleRequire', + name: 'nonPureMethodThatReturnsNothing', outputs: [], payable: false, - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', }, { constant: true, inputs: [], - name: 'simpleRevert', - outputs: [], + name: 'simplePureFunction', + outputs: [ + { + name: 'result', + type: 'uint256', + }, + ], payable: false, stateMutability: 'pure', type: 'function', @@ -3697,27 +3303,70 @@ export class AbiGenDummyContract extends BaseContract { constant: true, inputs: [ { - name: 'index_0', - type: 'uint256', + name: 'n', + type: 'tuple', + components: [ + { + name: 'innerStruct', + type: 'tuple', + components: [ + { + name: 'someBytes', + type: 'bytes', + }, + { + name: 'anInteger', + type: 'uint32', + }, + { + name: 'aDynamicArrayOfBytes', + type: 'bytes[]', + }, + { + name: 'aString', + type: 'string', + }, + ], + }, + { + name: 'description', + type: 'string', + }, + ], }, ], - name: 'someMapping', + name: 'nestedStructInput', + outputs: [], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [], + name: 'methodReturningMultipleValues', outputs: [ { name: '', type: 'uint256', }, + { + name: '', + type: 'string', + }, ], payable: false, - stateMutability: 'view', + stateMutability: 'pure', type: 'function', }, { constant: true, - inputs: [ + inputs: [], + name: 'methodReturningArrayOfStructs', + outputs: [ { - name: 's', - type: 'tuple', + name: '', + type: 'tuple[]', components: [ { name: 'someBytes', @@ -3738,12 +3387,19 @@ export class AbiGenDummyContract extends BaseContract { ], }, ], - name: 'structInput', - outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, + { + constant: false, + inputs: [], + name: 'emitSimpleEvent', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', + }, { constant: true, inputs: [], @@ -3778,52 +3434,95 @@ export class AbiGenDummyContract extends BaseContract { }, { constant: true, - inputs: [ - { - name: 'x', - type: 'address', - }, + inputs: [], + name: 'pureFunctionWithConstant', + outputs: [ { - name: 'a', + name: 'someConstant', type: 'uint256', }, + ], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: 'b', + name: 'index_0', type: 'uint256', }, + ], + name: 'simpleInputNoOutput', + outputs: [], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: 'y', - type: 'address', - }, - { - name: 'c', - type: 'uint256', + name: 'a', + type: 'string', }, ], - name: 'withAddressInput', - outputs: [ + name: 'overloadedMethod', + outputs: [], + payable: false, + stateMutability: 'pure', + type: 'function', + }, + { + constant: true, + inputs: [ { - name: 'z', - type: 'address', + name: 'a', + type: 'int256', }, ], + name: 'overloadedMethod', + outputs: [], payable: false, stateMutability: 'pure', type: 'function', }, { - constant: false, + anonymous: false, inputs: [ { - name: 'wad', + name: '_owner', + type: 'address', + indexed: true, + }, + { + name: '_value', type: 'uint256', + indexed: false, }, ], - name: 'withdraw', + name: 'Withdrawal', outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + name: 'someBytes', + type: 'bytes', + indexed: false, + }, + { + name: 'someString', + type: 'string', + indexed: false, + }, + ], + name: 'SimpleEvent', + outputs: [], + type: 'event', }, ] as ContractAbi; return abi; diff --git a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts index 7be2642d3b..eb76f86572 100644 --- a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -31,8 +31,7 @@ export class LibDummyContract extends BaseContract { /** * @ignore */ - public static deployedBytecode = - '0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582037c7442e7486017ed5720d9da5f4e361beac78b78c346709ebca457eec00558064736f6c634300050c0032'; + public static deployedBytecode: string | undefined; public static async deployFrom0xArtifactAsync( artifact: ContractArtifact | SimpleContractArtifact, supportedProvider: SupportedProvider, diff --git a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts index a6125918c7..f466f2aef7 100644 --- a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts @@ -18,7 +18,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SimpleContractArtifact, TxOpts } from '@0x/types'; +import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -32,7 +32,7 @@ export class TestLibDummyContract extends BaseContract { * @ignore */ public static deployedBytecode = - '0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72315820e27a1e15a4d00b0a4f69dedd0dd86bd421688814d0cb18d3442efb8e48c07be564736f6c634300050c0032'; + '0x6080604052348015600f57600080fd5b506004361060325760003560e01c806322935e921460375780632b82fdf0146063575b600080fd5b605160048036036020811015604b57600080fd5b5035607d565b60408051918252519081900360200190f35b605160048036036020811015607757600080fd5b5035608c565b60006086826095565b92915050565b6000608682609c565b6104d20190565b6001019056fea265627a7a72305820ddb720d14b34694daaefebcbd729af6ae04fa2232481812dd8fde63d6a4c32c164736f6c634300050a0032'; public publicAddConstant = { /** * Sends a read-only call to the contract method. Returns the result that would happen if one were to send an diff --git a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts index 382f247b15..6b4a5bbb17 100644 --- a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts +++ b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts @@ -276,6 +276,13 @@ describe('AbiGenDummy Contract', () => { expect(decodedOutput, 'decoded output').to.be.deep.equal(output); }); }); + describe('awaitTransactionSuccessAsync', async () => { + it('should successfully call the non pure function', async () => { + expect( + abiGenDummy.nonPureMethod.awaitTransactionSuccessAsync({}, { pollingIntervalMs: 300, timeoutMs: 10 }), + ).to.be.fulfilled(''); + }); + }); }); describe('Lib dummy contract', () => { diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 8698bc403d..d12d404df4 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -154,7 +154,7 @@ export { SignedZeroExTransaction, SimpleEvmOutput, SimpleEvmBytecodeOutput, - TxOpts, + SendTransactionOpts, EIP712DomainWithDefaultSchema, EventCallback, DecodedLogEvent, diff --git a/packages/json-schemas/schemas/send_transaction_opts_schema.json b/packages/json-schemas/schemas/send_transaction_opts_schema.json new file mode 100644 index 0000000000..bbe0bd672e --- /dev/null +++ b/packages/json-schemas/schemas/send_transaction_opts_schema.json @@ -0,0 +1,15 @@ +{ + "id": "/sendTransactionOptsSchema", + "properties": { + "shouldValidate": { + "type": "boolean" + }, + "timeoutMs": { + "type": "number" + }, + "pollingIntervalMs": { + "type": "number" + } + }, + "type": "object" +} diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 7c05322fd9..1e38023b49 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -37,6 +37,7 @@ import * as relayerApiOrdersChannelUpdateSchema from '../schemas/relayer_api_ord import * as relayerApiOrdersResponseSchema from '../schemas/relayer_api_orders_response_schema.json'; import * as relayerApiOrdersSchema from '../schemas/relayer_api_orders_schema.json'; import * as requestOptsSchema from '../schemas/request_opts_schema.json'; +import * as sendTransactionOptsSchema from '../schemas/send_transaction_opts_schema.json'; import * as signedOrderSchema from '../schemas/signed_order_schema.json'; import * as signedOrdersSchema from '../schemas/signed_orders_schema.json'; import * as tokenSchema from '../schemas/token_schema.json'; @@ -72,6 +73,7 @@ export const schemas = { orderBookRequestSchema, orderConfigRequestSchema, assetPairsRequestOptsSchema, + sendTransactionOptsSchema, txDataSchema, paginatedCollectionSchema, relayerApiErrorResponseSchema, diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json index 84cd571ffb..39ce4467c4 100644 --- a/packages/json-schemas/tsconfig.json +++ b/packages/json-schemas/tsconfig.json @@ -39,6 +39,7 @@ "./schemas/relayer_api_orders_channel_update_response_schema.json", "./schemas/relayer_api_orders_response_schema.json", "./schemas/relayer_api_orders_schema.json", + "./schemas/send_transaction_opts_schema.json", "./schemas/signed_orders_schema.json", "./schemas/token_schema.json", "./schemas/js_number_schema.json", diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index e3610676f8..b55abd4cdf 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -671,10 +671,12 @@ export interface Type { } /** - * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before + * * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default=true. + * * pollingIntervalMs: Used with `awaitTransactionSuccessAsync` to determine polling interval in milliseconds + * * timeoutMs: Used with `awaitTransactionSuccessAsync` to determine timeout in milliseconds */ -export interface TxOpts { +export interface SendTransactionOpts { shouldValidate?: boolean; pollingIntervalMs?: number; timeoutMs?: number; From 95c5a4ab3b547b1641da7f4ddbda6e9adba367ef Mon Sep 17 00:00:00 2001 From: xianny Date: Tue, 8 Oct 2019 15:39:00 -0700 Subject: [PATCH 6/8] remove sendTransactionOptsSchema --- .../generated-wrappers/asset_proxy_owner.ts | 20 ------ .../src/generated-wrappers/coordinator.ts | 4 -- .../coordinator_registry.ts | 2 - .../src/generated-wrappers/dev_utils.ts | 6 -- .../generated-wrappers/dummy_erc20_token.ts | 12 ---- .../generated-wrappers/dummy_erc721_token.ts | 16 ----- .../src/generated-wrappers/dutch_auction.ts | 8 --- .../src/generated-wrappers/erc1155_proxy.ts | 10 --- .../src/generated-wrappers/erc20_proxy.ts | 8 --- .../src/generated-wrappers/erc20_token.ts | 6 -- .../src/generated-wrappers/erc721_proxy.ts | 8 --- .../src/generated-wrappers/erc721_token.ts | 10 --- .../src/generated-wrappers/exchange.ts | 62 ------------------- .../src/generated-wrappers/forwarder.ts | 10 --- .../src/generated-wrappers/i_asset_proxy.ts | 2 - .../generated-wrappers/multi_asset_proxy.ts | 10 --- .../src/generated-wrappers/weth9.ts | 10 --- .../src/generated-wrappers/zrx_token.ts | 6 -- .../TypeScript/partials/method_tx.handlebars | 2 - .../output/typescript/abi_gen_dummy.ts | 8 --- .../schemas/send_transaction_opts_schema.json | 15 ----- packages/json-schemas/src/schemas.ts | 2 - packages/json-schemas/tsconfig.json | 1 - 23 files changed, 238 deletions(-) delete mode 100644 packages/json-schemas/schemas/send_transaction_opts_schema.json diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index f7a84b2953..c47907843c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -176,7 +176,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('addOwner(address)', [owner.toLowerCase()]); @@ -212,7 +211,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.addOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); @@ -326,7 +324,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required]); @@ -362,7 +359,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.changeRequirement.sendTransactionAsync(_required, txData, opts); @@ -481,7 +477,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked]); @@ -518,7 +513,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.changeTimeLock.sendTransactionAsync(_secondsTimeLocked, txData, opts); @@ -641,7 +635,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId]); @@ -677,7 +670,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.confirmTransaction.sendTransactionAsync(transactionId, txData, opts); @@ -901,7 +893,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId]); @@ -937,7 +928,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.executeTransaction.sendTransactionAsync(transactionId, txData, opts); @@ -1542,7 +1532,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); assert.isString('destination', destination); @@ -1599,7 +1588,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); assert.isString('destination', destination); @@ -1775,7 +1763,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner.toLowerCase()]); @@ -1811,7 +1798,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.removeOwner.sendTransactionAsync(owner.toLowerCase(), txData, opts); @@ -1929,7 +1915,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); assert.isString('newOwner', newOwner); const self = (this as any) as AssetProxyOwnerContract; @@ -1971,7 +1956,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('owner', owner); assert.isString('newOwner', newOwner); const self = (this as any) as AssetProxyOwnerContract; @@ -2154,7 +2138,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId]); @@ -2190,7 +2173,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; const txHashPromise = self.revokeConfirmation.sendTransactionAsync(transactionId, txData, opts); @@ -2357,7 +2339,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('destination', destination); assert.isBigNumber('value', value); assert.isString('data', data); @@ -2403,7 +2384,6 @@ export class AssetProxyOwnerContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('destination', destination); assert.isBigNumber('value', value); assert.isString('data', data); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 28de394895..5c03e87e9a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -222,8 +222,6 @@ export class CoordinatorContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds); @@ -290,8 +288,6 @@ export class CoordinatorContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 63e1c7b07b..4320ee6f0c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -60,7 +60,6 @@ export class CoordinatorRegistryContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint]); @@ -96,7 +95,6 @@ export class CoordinatorRegistryContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; const txHashPromise = self.setCoordinatorEndpoint.sendTransactionAsync(coordinatorEndpoint, txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index fb9d25c229..bce15d477e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -1815,8 +1815,6 @@ export class DevUtilsContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); const self = (this as any) as DevUtilsContract; @@ -1881,8 +1879,6 @@ export class DevUtilsContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); const self = (this as any) as DevUtilsContract; @@ -2108,7 +2104,6 @@ export class DevUtilsContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -2175,7 +2170,6 @@ export class DevUtilsContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index 1a5146e3f6..833937590a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -169,7 +169,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -211,7 +210,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -447,7 +445,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('mint(uint256)', [_value]); @@ -483,7 +480,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; const txHashPromise = self.mint.sendTransactionAsync(_value, txData, opts); @@ -685,7 +681,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_target', _target); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -727,7 +722,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_target', _target); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -958,7 +952,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -997,7 +990,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -1131,7 +1123,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1177,7 +1168,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1331,7 +1321,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1366,7 +1355,6 @@ export class DummyERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index 05e88a7e15..f3bf65437a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -82,7 +82,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -124,7 +123,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -320,7 +318,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -359,7 +356,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -604,7 +600,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -643,7 +638,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as DummyERC721TokenContract; @@ -921,7 +915,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -967,7 +960,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1136,7 +1128,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1186,7 +1177,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1357,7 +1347,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as DummyERC721TokenContract; @@ -1399,7 +1388,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as DummyERC721TokenContract; @@ -1593,7 +1581,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1639,7 +1626,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1792,7 +1778,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1827,7 +1812,6 @@ export class DummyERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index 38c19954f5..68111ecd97 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -61,8 +61,6 @@ export class DutchAuctionContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - const self = (this as any) as DutchAuctionContract; const encodedData = self._strictEncodeArguments( 'getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', @@ -113,8 +111,6 @@ export class DutchAuctionContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - const self = (this as any) as DutchAuctionContract; const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( @@ -344,8 +340,6 @@ export class DutchAuctionContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); const self = (this as any) as DutchAuctionContract; @@ -419,8 +413,6 @@ export class DutchAuctionContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); const self = (this as any) as DutchAuctionContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index 7b8a7985ff..4d8eb603b7 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -69,7 +69,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -105,7 +104,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -446,7 +444,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -482,7 +479,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -600,7 +596,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC1155ProxyContract; @@ -642,7 +637,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC1155ProxyContract; @@ -794,7 +788,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -846,7 +839,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -1016,7 +1008,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1051,7 +1042,6 @@ export class ERC1155ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index e0edaab784..8c87145313 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -69,7 +69,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -105,7 +104,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -269,7 +267,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -305,7 +302,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -466,7 +462,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC20ProxyContract; @@ -508,7 +503,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC20ProxyContract; @@ -782,7 +776,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -817,7 +810,6 @@ export class ERC20ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index b3a7d0deaa..cb4e0244bd 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -70,7 +70,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -112,7 +111,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -303,7 +301,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -349,7 +346,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -562,7 +558,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; @@ -601,7 +596,6 @@ export class ERC20TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ERC20TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index 0cb27e8053..de5c833215 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -69,7 +69,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -105,7 +104,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -269,7 +267,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -305,7 +302,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -466,7 +462,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC721ProxyContract; @@ -508,7 +503,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as ERC721ProxyContract; @@ -782,7 +776,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -817,7 +810,6 @@ export class ERC721ProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index 1baf2d322f..ec71b4501f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -82,7 +82,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as ERC721TokenContract; @@ -124,7 +123,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); const self = (this as any) as ERC721TokenContract; @@ -485,7 +483,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -531,7 +528,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -700,7 +696,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -750,7 +745,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -921,7 +915,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as ERC721TokenContract; @@ -963,7 +956,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); const self = (this as any) as ERC721TokenContract; @@ -1114,7 +1106,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -1160,7 +1151,6 @@ export class ERC721TokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 7086e0f2e1..6671031e86 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -281,7 +281,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( @@ -335,7 +334,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; const txHashPromise = self.batchCancelOrders.sendTransactionAsync(orders, txData, opts); @@ -523,7 +521,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; @@ -572,7 +569,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); const self = (this as any) as ExchangeContract; @@ -763,7 +759,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -829,7 +824,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1074,7 +1068,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1135,7 +1128,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1380,7 +1372,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1446,7 +1437,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); assert.isArray('signatures', signatures); @@ -1711,7 +1701,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -1797,7 +1786,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2140,7 +2128,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2226,7 +2213,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); assert.isArray('leftSignatures', leftSignatures); @@ -2543,8 +2529,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes))', @@ -2597,8 +2581,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData, opts); return new PromiseWithTransactionHash( @@ -2773,7 +2755,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('cancelOrdersUpTo(uint256)', [targetOrderEpoch]); @@ -2810,7 +2791,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, txData, opts); @@ -3032,8 +3012,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('signature', signature); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments( @@ -3080,8 +3058,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('signature', signature); const self = (this as any) as ExchangeContract; const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction, signature, txData, opts); @@ -3259,8 +3235,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3319,8 +3293,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3552,8 +3524,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3612,8 +3582,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -4228,7 +4196,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4293,7 +4260,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4532,7 +4498,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4597,7 +4562,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4835,7 +4799,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -4900,7 +4863,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5139,7 +5101,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5204,7 +5165,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isArray('signatures', signatures); @@ -5461,8 +5421,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5544,8 +5502,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5872,8 +5828,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -5955,8 +5909,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); - assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); const self = (this as any) as ExchangeContract; @@ -6341,7 +6293,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('hash', hash); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('preSign(bytes32)', [hash]); @@ -6377,7 +6328,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('hash', hash); const self = (this as any) as ExchangeContract; const txHashPromise = self.preSign.sendTransactionAsync(hash, txData, opts); @@ -6631,7 +6581,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -6667,7 +6616,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); @@ -6788,7 +6736,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('setProtocolFeeCollectorAddress(address)', [ @@ -6827,7 +6774,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeCollectorAddress.sendTransactionAsync( @@ -6961,7 +6907,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('setProtocolFeeMultiplier(uint256)', [ @@ -6999,7 +6944,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; const txHashPromise = self.setProtocolFeeMultiplier.sendTransactionAsync( @@ -7133,7 +7077,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); const self = (this as any) as ExchangeContract; @@ -7175,7 +7118,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); const self = (this as any) as ExchangeContract; @@ -7329,7 +7271,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); assert.isArray('toAddresses', toAddresses); @@ -7387,7 +7328,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); assert.isArray('toAddresses', toAddresses); @@ -7615,7 +7555,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -7650,7 +7589,6 @@ export class ExchangeContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index e3a28b3adf..75fae4b0ac 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -52,7 +52,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('approveMakerAssetProxy(bytes)', [assetData]); @@ -88,7 +87,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; const txHashPromise = self.approveMakerAssetProxy.sendTransactionAsync(assetData, txData, opts); @@ -230,7 +228,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); assert.isArray('signatures', signatures); @@ -305,7 +302,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); assert.isArray('signatures', signatures); @@ -563,7 +559,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('signatures', signatures); assert.isBigNumber('feePercentage', feePercentage); @@ -634,7 +629,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isArray('orders', orders); assert.isArray('signatures', signatures); assert.isBigNumber('feePercentage', feePercentage); @@ -896,7 +890,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -931,7 +924,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); @@ -1048,7 +1040,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); const self = (this as any) as ForwarderContract; @@ -1087,7 +1078,6 @@ export class ForwarderContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); const self = (this as any) as ForwarderContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index c63ac01674..de5639e6cc 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -54,7 +54,6 @@ export class IAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); @@ -104,7 +103,6 @@ export class IAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetData', assetData); assert.isString('from', from); assert.isString('to', to); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index a1f2e4c22e..583601cadb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -120,7 +120,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target.toLowerCase()]); @@ -156,7 +155,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.addAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -373,7 +371,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target.toLowerCase()]); @@ -409,7 +406,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.removeAuthorizedAddress.sendTransactionAsync(target.toLowerCase(), txData, opts); @@ -570,7 +566,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as MultiAssetProxyContract; @@ -612,7 +607,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('target', target); assert.isBigNumber('index', index); const self = (this as any) as MultiAssetProxyContract; @@ -844,7 +838,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy.toLowerCase()]); @@ -880,7 +873,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxy.toLowerCase(), txData, opts); @@ -1043,7 +1035,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner.toLowerCase()]); @@ -1078,7 +1069,6 @@ export class MultiAssetProxyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; const txHashPromise = self.transferOwnership.sendTransactionAsync(newOwner.toLowerCase(), txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 4d1f4d27a6..aa6a3d5941 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -124,7 +124,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -161,7 +160,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('guy', guy); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -325,7 +323,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('src', src); assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -368,7 +365,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('src', src); assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -512,7 +508,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); @@ -547,7 +542,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); @@ -789,7 +783,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -826,7 +819,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('dst', dst); assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -944,7 +936,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as WETH9Contract; const encodedData = self._strictEncodeArguments('deposit()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -977,7 +968,6 @@ export class WETH9Contract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as WETH9Contract; const txHashPromise = self.deposit.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index d95f93b9fd..1fc1d1056e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -108,7 +108,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -148,7 +147,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -328,7 +326,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -374,7 +371,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_from', _from); assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -663,7 +659,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; @@ -700,7 +695,6 @@ export class ZRXTokenContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isString('_to', _to); assert.isBigNumber('_value', _value); const self = (this as any) as ZRXTokenContract; diff --git a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars index 5d051a7d86..f542a21f18 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars @@ -10,7 +10,6 @@ async sendTransactionAsync( txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); {{#each inputs}} {{#assertionType name type}}{{/assertionType}} {{/each}} @@ -53,7 +52,6 @@ awaitTransactionSuccessAsync( txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); {{#each inputs}} {{#assertionType name type}}{{/assertionType}} {{/each}} diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index 3f367fc1ee..d4d24310cb 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -291,7 +291,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad]); @@ -326,7 +325,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.withdraw.sendTransactionAsync(wad, txData, opts); @@ -1361,7 +1359,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('nonPureMethod()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -1394,7 +1391,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( @@ -1764,7 +1760,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -1797,7 +1792,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( @@ -2257,7 +2251,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial | undefined, opts: SendTransactionOpts = { shouldValidate: true }, ): Promise { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const encodedData = self._strictEncodeArguments('emitSimpleEvent()', []); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( @@ -2290,7 +2283,6 @@ export class AbiGenDummyContract extends BaseContract { txData?: Partial, opts: SendTransactionOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { - assert.doesConformToSchema('opts', opts, schemas.sendTransactionOptsSchema); const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); return new PromiseWithTransactionHash( diff --git a/packages/json-schemas/schemas/send_transaction_opts_schema.json b/packages/json-schemas/schemas/send_transaction_opts_schema.json deleted file mode 100644 index bbe0bd672e..0000000000 --- a/packages/json-schemas/schemas/send_transaction_opts_schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "/sendTransactionOptsSchema", - "properties": { - "shouldValidate": { - "type": "boolean" - }, - "timeoutMs": { - "type": "number" - }, - "pollingIntervalMs": { - "type": "number" - } - }, - "type": "object" -} diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 1e38023b49..7c05322fd9 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -37,7 +37,6 @@ import * as relayerApiOrdersChannelUpdateSchema from '../schemas/relayer_api_ord import * as relayerApiOrdersResponseSchema from '../schemas/relayer_api_orders_response_schema.json'; import * as relayerApiOrdersSchema from '../schemas/relayer_api_orders_schema.json'; import * as requestOptsSchema from '../schemas/request_opts_schema.json'; -import * as sendTransactionOptsSchema from '../schemas/send_transaction_opts_schema.json'; import * as signedOrderSchema from '../schemas/signed_order_schema.json'; import * as signedOrdersSchema from '../schemas/signed_orders_schema.json'; import * as tokenSchema from '../schemas/token_schema.json'; @@ -73,7 +72,6 @@ export const schemas = { orderBookRequestSchema, orderConfigRequestSchema, assetPairsRequestOptsSchema, - sendTransactionOptsSchema, txDataSchema, paginatedCollectionSchema, relayerApiErrorResponseSchema, diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json index 39ce4467c4..84cd571ffb 100644 --- a/packages/json-schemas/tsconfig.json +++ b/packages/json-schemas/tsconfig.json @@ -39,7 +39,6 @@ "./schemas/relayer_api_orders_channel_update_response_schema.json", "./schemas/relayer_api_orders_response_schema.json", "./schemas/relayer_api_orders_schema.json", - "./schemas/send_transaction_opts_schema.json", "./schemas/signed_orders_schema.json", "./schemas/token_schema.json", "./schemas/js_number_schema.json", From 805c9bced141314d1696973c348bc620e3d81ad6 Mon Sep 17 00:00:00 2001 From: xianny Date: Thu, 10 Oct 2019 13:36:16 -0700 Subject: [PATCH 7/8] Tweaks after review * Create `AwaitTransactionSuccessOpts` type with default timeoutMs value * Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback` from `@0x/base-contract` * Better comments --- contracts/asset-proxy/test/authorizable.ts | 90 +++----------- contracts/asset-proxy/test/erc1155_proxy.ts | 91 +++++---------- contracts/asset-proxy/test/proxies.ts | 110 ++++-------------- .../asset-proxy/test/utils/erc20_wrapper.ts | 18 +-- .../asset-proxy/test/utils/erc721_wrapper.ts | 42 ++----- .../erc1155/test/utils/erc1155_wrapper.ts | 12 +- contracts/exchange/test/match_orders.ts | 74 ++++-------- .../utils/fill_order_combinatorial_utils.ts | 72 ++++-------- contracts/utils/test/authorizable.ts | 75 +++--------- contracts/utils/test/ownable.ts | 2 +- packages/0x.js/src/index.ts | 1 + .../generated-wrappers/asset_proxy_owner.ts | 28 +++-- .../src/generated-wrappers/coordinator.ts | 10 +- .../coordinator_registry.ts | 10 +- .../src/generated-wrappers/dev_utils.ts | 12 +- .../generated-wrappers/dummy_erc20_token.ts | 20 ++-- .../generated-wrappers/dummy_erc721_token.ts | 24 ++-- .../src/generated-wrappers/dutch_auction.ts | 12 +- .../src/generated-wrappers/erc1155_proxy.ts | 18 ++- .../src/generated-wrappers/erc20_proxy.ts | 16 ++- .../src/generated-wrappers/erc20_token.ts | 14 ++- .../src/generated-wrappers/erc721_proxy.ts | 16 ++- .../src/generated-wrappers/erc721_token.ts | 18 ++- .../generated-wrappers/eth_balance_checker.ts | 8 +- .../src/generated-wrappers/exchange.ts | 58 ++++----- .../src/generated-wrappers/forwarder.ts | 18 ++- .../src/generated-wrappers/i_asset_proxy.ts | 10 +- .../src/generated-wrappers/i_validator.ts | 8 +- .../src/generated-wrappers/i_wallet.ts | 8 +- .../generated-wrappers/multi_asset_proxy.ts | 18 ++- .../src/generated-wrappers/order_validator.ts | 8 +- .../generated-wrappers/static_call_proxy.ts | 8 +- .../src/generated-wrappers/weth9.ts | 18 ++- .../src/generated-wrappers/zrx_token.ts | 14 ++- packages/abi-gen/src/index.ts | 2 +- .../templates/TypeScript/contract.handlebars | 2 +- .../partials/method_abi_helper.handlebars | 1 + .../TypeScript/partials/method_tx.handlebars | 2 +- .../output/typescript/abi_gen_dummy.ts | 16 ++- .../test-cli/output/typescript/lib_dummy.ts | 8 +- .../output/typescript/test_lib_dummy.ts | 8 +- packages/base-contract/CHANGELOG.json | 4 + .../base-contract/src/subscription_manager.ts | 6 +- packages/base-contract/src/types.ts | 15 +-- packages/contract-wrappers/src/index.ts | 1 + packages/types/CHANGELOG.json | 2 +- packages/types/src/index.ts | 66 +++++++---- 47 files changed, 492 insertions(+), 602 deletions(-) diff --git a/contracts/asset-proxy/test/authorizable.ts b/contracts/asset-proxy/test/authorizable.ts index 85e1201933..4a7794734c 100644 --- a/contracts/asset-proxy/test/authorizable.ts +++ b/contracts/asset-proxy/test/authorizable.ts @@ -1,11 +1,4 @@ -import { - chaiSetup, - constants, - expectTransactionFailedAsync, - provider, - txDefaults, - web3Wrapper, -} from '@0x/contracts-test-utils'; +import { chaiSetup, expectTransactionFailedAsync, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils'; import { BlockchainLifecycle } from '@0x/dev-utils'; import { RevertReason } from '@0x/types'; import { BigNumber } from '@0x/utils'; @@ -60,21 +53,13 @@ describe('Authorizable', () => { }); it('should allow owner to add an authorized address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.true(); }); it('should revert if owner attempts to authorize a duplicate address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); return expectTransactionFailedAsync( authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }), RevertReason.TargetAlreadyAuthorized, @@ -84,11 +69,7 @@ describe('Authorizable', () => { describe('removeAuthorizedAddress', () => { it('should revert if not called by owner', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); await expectTransactionFailedAsync( authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner }), RevertReason.OnlyContractOwner, @@ -96,16 +77,8 @@ describe('Authorizable', () => { }); it('should allow owner to remove an authorized address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); + await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); }); @@ -122,11 +95,7 @@ describe('Authorizable', () => { describe('removeAuthorizedAddressAtIndex', () => { it('should revert if not called by owner', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(0); await expectTransactionFailedAsync( authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, { @@ -137,11 +106,7 @@ describe('Authorizable', () => { }); it('should revert if index is >= authorities.length', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(1); return expectTransactionFailedAsync( authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, { @@ -164,16 +129,8 @@ describe('Authorizable', () => { it('should revert if address at index does not match target', async () => { const address1 = address; const address2 = notOwner; - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address1, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address2, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address1, { from: owner }); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address2, { from: owner }); const address1Index = new BigNumber(0); return expectTransactionFailedAsync( authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address2, address1Index, { @@ -184,18 +141,11 @@ describe('Authorizable', () => { }); it('should allow owner to remove an authorized address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(0); - await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync( - address, - index, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync(address, index, { + from: owner, + }); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); }); @@ -205,19 +155,11 @@ describe('Authorizable', () => { it('should return all authorized addresses', async () => { const initial = await authorizable.getAuthorizedAddresses.callAsync(); expect(initial).to.have.length(0); - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const afterAdd = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterAdd).to.have.length(1); expect(afterAdd).to.include(address); - await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const afterRemove = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterRemove).to.have.length(0); }); diff --git a/contracts/asset-proxy/test/erc1155_proxy.ts b/contracts/asset-proxy/test/erc1155_proxy.ts index f5484574c1..c06f351e23 100644 --- a/contracts/asset-proxy/test/erc1155_proxy.ts +++ b/contracts/asset-proxy/test/erc1155_proxy.ts @@ -72,16 +72,8 @@ describe('ERC1155Proxy', () => { const usedAddresses = ([owner, notAuthorized, authorized, spender, receiver] = _.slice(accounts, 0, 5)); erc1155ProxyWrapper = new ERC1155ProxyWrapper(provider, usedAddresses, owner); erc1155Proxy = await erc1155ProxyWrapper.deployProxyAsync(); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - authorized, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - erc1155Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(authorized, { from: owner }); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(erc1155Proxy.address, { from: owner }); // deploy & configure ERC1155 tokens and receiver [erc1155Wrapper] = await erc1155ProxyWrapper.deployDummyContractsAsync(); erc1155Contract = erc1155Wrapper.getContract(); @@ -696,25 +688,18 @@ describe('ERC1155Proxy', () => { const tokenUri = ''; for (const tokenToCreate of tokensToCreate) { // create token - await erc1155Wrapper.getContract().createWithType.awaitTransactionSuccessAsync( - tokenToCreate, - tokenUri, - { + await erc1155Wrapper + .getContract() + .createWithType.awaitTransactionSuccessAsync(tokenToCreate, tokenUri, { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); // mint balance for spender - await erc1155Wrapper.getContract().mintFungible.awaitTransactionSuccessAsync( - tokenToCreate, - [spender], - [spenderInitialBalance], - { + await erc1155Wrapper + .getContract() + .mintFungible.awaitTransactionSuccessAsync(tokenToCreate, [spender], [spenderInitialBalance], { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); } ///// Step 2/5 ///// // Check balances before transfer @@ -805,25 +790,18 @@ describe('ERC1155Proxy', () => { const tokenUri = ''; for (const tokenToCreate of tokensToCreate) { // create token - await erc1155Wrapper.getContract().createWithType.awaitTransactionSuccessAsync( - tokenToCreate, - tokenUri, - { + await erc1155Wrapper + .getContract() + .createWithType.awaitTransactionSuccessAsync(tokenToCreate, tokenUri, { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); // mint balance for spender - await erc1155Wrapper.getContract().mintFungible.awaitTransactionSuccessAsync( - tokenToCreate, - [spender], - [spenderInitialBalance], - { + await erc1155Wrapper + .getContract() + .mintFungible.awaitTransactionSuccessAsync(tokenToCreate, [spender], [spenderInitialBalance], { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); } ///// Step 2/5 ///// // Check balances before transfer @@ -937,25 +915,18 @@ describe('ERC1155Proxy', () => { const tokenUri = ''; for (const tokenToCreate of tokensToCreate) { // create token - await erc1155Wrapper.getContract().createWithType.awaitTransactionSuccessAsync( - tokenToCreate, - tokenUri, - { + await erc1155Wrapper + .getContract() + .createWithType.awaitTransactionSuccessAsync(tokenToCreate, tokenUri, { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); // mint balance for spender - await erc1155Wrapper.getContract().mintFungible.awaitTransactionSuccessAsync( - tokenToCreate, - [spender], - [spenderInitialBalance], - { + await erc1155Wrapper + .getContract() + .mintFungible.awaitTransactionSuccessAsync(tokenToCreate, [spender], [spenderInitialBalance], { from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + }); } ///// Step 2/5 ///// // Check balances before transfer @@ -1667,13 +1638,9 @@ describe('ERC1155Proxy', () => { it('should propagate revert reason from erc1155 contract failure', async () => { // disable transfers const shouldRejectTransfer = true; - await erc1155Receiver.setRejectTransferFlag.awaitTransactionSuccessAsync( - shouldRejectTransfer, - { - from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc1155Receiver.setRejectTransferFlag.awaitTransactionSuccessAsync(shouldRejectTransfer, { + from: owner, + }); // setup test parameters const tokenHolders = [spender, receiverContract]; const tokensToTransfer = fungibleTokens.slice(0, 1); diff --git a/contracts/asset-proxy/test/proxies.ts b/contracts/asset-proxy/test/proxies.ts index 7a885742c8..20a00b98e3 100644 --- a/contracts/asset-proxy/test/proxies.ts +++ b/contracts/asset-proxy/test/proxies.ts @@ -105,64 +105,24 @@ describe('Asset Transfer Proxies', () => { ); // Configure ERC20Proxy - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - authorized, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(authorized, { from: owner }); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { from: owner }); // Configure ERC721Proxy - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - authorized, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(authorized, { from: owner }); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { from: owner }); // Configure ERC115Proxy erc1155ProxyWrapper = new ERC1155ProxyWrapper(provider, usedAddresses, owner); erc1155Proxy = await erc1155ProxyWrapper.deployProxyAsync(); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - authorized, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(authorized, { from: owner }); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { from: owner }); // Configure MultiAssetProxy - await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - authorized, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc20Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc721Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc1155Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync(authorized, { from: owner }); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, { from: owner }); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc721Proxy.address, { from: owner }); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc1155Proxy.address, { from: owner }); // Deploy and configure ERC20 tokens const numDummyErc20ToDeploy = 2; @@ -192,19 +152,13 @@ describe('Asset Transfer Proxies', () => { ); await erc20Wrapper.setBalancesAndAllowancesAsync(); - await noReturnErc20Token.setBalance.awaitTransactionSuccessAsync( - fromAddress, - constants.INITIAL_ERC20_BALANCE, - { - from: owner, - }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await noReturnErc20Token.setBalance.awaitTransactionSuccessAsync(fromAddress, constants.INITIAL_ERC20_BALANCE, { + from: owner, + }); await noReturnErc20Token.approve.awaitTransactionSuccessAsync( erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multipleReturnErc20Token.setBalance.awaitTransactionSuccessAsync( fromAddress, @@ -212,13 +166,11 @@ describe('Asset Transfer Proxies', () => { { from: owner, }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await multipleReturnErc20Token.approve.awaitTransactionSuccessAsync( erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); // Deploy and configure ERC721 tokens and receiver @@ -407,12 +359,9 @@ describe('Asset Transfer Proxies', () => { toAddress, amount, ); - await erc20TokenA.approve.awaitTransactionSuccessAsync( - erc20Proxy.address, - allowance, - { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc20TokenA.approve.awaitTransactionSuccessAsync(erc20Proxy.address, allowance, { + from: fromAddress, + }); const erc20Balances = await erc20Wrapper.getBalancesAsync(); // Perform a transfer; expect this to fail. await expectTransactionFailedAsync( @@ -439,12 +388,9 @@ describe('Asset Transfer Proxies', () => { toAddress, amount, ); - await noReturnErc20Token.approve.awaitTransactionSuccessAsync( - erc20Proxy.address, - allowance, - { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await noReturnErc20Token.approve.awaitTransactionSuccessAsync(erc20Proxy.address, allowance, { + from: fromAddress, + }); const initialFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress); const initialToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress); // Perform a transfer; expect this to fail. @@ -680,19 +626,13 @@ describe('Asset Transfer Proxies', () => { const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId); expect(ownerFromAsset).to.be.equal(fromAddress); // Remove blanket transfer approval for fromAddress. - await erc721TokenA.setApprovalForAll.awaitTransactionSuccessAsync( - erc721Proxy.address, - false, - { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc721TokenA.setApprovalForAll.awaitTransactionSuccessAsync(erc721Proxy.address, false, { + from: fromAddress, + }); // Remove token transfer approval for fromAddress. - await erc721TokenA.approve.awaitTransactionSuccessAsync( - constants.NULL_ADDRESS, - erc721AFromTokenId, - { from: fromAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc721TokenA.approve.awaitTransactionSuccessAsync(constants.NULL_ADDRESS, erc721AFromTokenId, { + from: fromAddress, + }); // Perform a transfer; expect this to fail. const amount = new BigNumber(1); const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData( diff --git a/contracts/asset-proxy/test/utils/erc20_wrapper.ts b/contracts/asset-proxy/test/utils/erc20_wrapper.ts index 6f3ee95bbe..2076040bd8 100644 --- a/contracts/asset-proxy/test/utils/erc20_wrapper.ts +++ b/contracts/asset-proxy/test/utils/erc20_wrapper.ts @@ -70,13 +70,11 @@ export class ERC20Wrapper { tokenOwnerAddress, constants.INITIAL_ERC20_BALANCE, { from: this._contractOwnerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); await dummyTokenContract.approve.awaitTransactionSuccessAsync( (this._proxyContract as ERC20ProxyContract).address, constants.INITIAL_ERC20_ALLOWANCE, { from: tokenOwnerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } } @@ -88,12 +86,9 @@ export class ERC20Wrapper { } public async setBalanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise { const tokenContract = this._getTokenContractFromAssetData(assetData); - await tokenContract.setBalance.awaitTransactionSuccessAsync( - userAddress, - amount, - { from: this._contractOwnerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.setBalance.awaitTransactionSuccessAsync(userAddress, amount, { + from: this._contractOwnerAddress, + }); } public async getProxyAllowanceAsync(userAddress: string, assetData: string): Promise { const tokenContract = this._getTokenContractFromAssetData(assetData); @@ -104,12 +99,7 @@ export class ERC20Wrapper { public async setAllowanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise { const tokenContract = this._getTokenContractFromAssetData(assetData); const proxyAddress = (this._proxyContract as ERC20ProxyContract).address; - await tokenContract.approve.awaitTransactionSuccessAsync( - proxyAddress, - amount, - { from: userAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.approve.awaitTransactionSuccessAsync(proxyAddress, amount, { from: userAddress }); } public async getBalancesAsync(): Promise { this._validateDummyTokenContractsExistOrThrow(); diff --git a/contracts/asset-proxy/test/utils/erc721_wrapper.ts b/contracts/asset-proxy/test/utils/erc721_wrapper.ts index 91fd2b6832..e2ae988930 100644 --- a/contracts/asset-proxy/test/utils/erc721_wrapper.ts +++ b/contracts/asset-proxy/test/utils/erc721_wrapper.ts @@ -93,22 +93,14 @@ export class ERC721Wrapper { ): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); const proxyAddress = (this._proxyContract as ERC721ProxyContract).address; - await tokenContract.setApprovalForAll.awaitTransactionSuccessAsync( - proxyAddress, - isApproved, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.setApprovalForAll.awaitTransactionSuccessAsync(proxyAddress, isApproved, { + from: ownerAddress, + }); } public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId); - await tokenContract.approve.awaitTransactionSuccessAsync( - to, - tokenId, - { from: tokenOwner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.approve.awaitTransactionSuccessAsync(to, tokenId, { from: tokenOwner }); } public async transferFromAsync( tokenAddress: string, @@ -117,31 +109,19 @@ export class ERC721Wrapper { userAddress: string, ): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); - await tokenContract.transferFrom.awaitTransactionSuccessAsync( - currentOwner, - userAddress, - tokenId, - { from: currentOwner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.transferFrom.awaitTransactionSuccessAsync(currentOwner, userAddress, tokenId, { + from: currentOwner, + }); } public async mintAsync(tokenAddress: string, tokenId: BigNumber, userAddress: string): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); - await tokenContract.mint.awaitTransactionSuccessAsync( - userAddress, - tokenId, - { from: this._contractOwnerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.mint.awaitTransactionSuccessAsync(userAddress, tokenId, { + from: this._contractOwnerAddress, + }); } public async burnAsync(tokenAddress: string, tokenId: BigNumber, owner: string): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); - await tokenContract.burn.awaitTransactionSuccessAsync( - owner, - tokenId, - { from: this._contractOwnerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await tokenContract.burn.awaitTransactionSuccessAsync(owner, tokenId, { from: this._contractOwnerAddress }); } public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise { const tokenContract = this._getTokenContractFromAssetData(tokenAddress); diff --git a/contracts/erc1155/test/utils/erc1155_wrapper.ts b/contracts/erc1155/test/utils/erc1155_wrapper.ts index edb2fb0c07..984935db17 100644 --- a/contracts/erc1155/test/utils/erc1155_wrapper.ts +++ b/contracts/erc1155/test/utils/erc1155_wrapper.ts @@ -1,4 +1,4 @@ -import { constants, LogDecoder } from '@0x/contracts-test-utils'; +import { LogDecoder } from '@0x/contracts-test-utils'; import { BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; @@ -100,7 +100,6 @@ export class Erc1155Wrapper { beneficiaries, tokenAmountsAsArray, { from: this._contractOwner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, ); } public async mintNonFungibleTokensAsync(beneficiaries: string[]): Promise<[BigNumber, BigNumber[]]> { @@ -114,12 +113,9 @@ export class Erc1155Wrapper { // tslint:disable-next-line no-unnecessary-type-assertion const createFungibleTokenLog = tx.logs[0] as LogWithDecodedArgs; const token = createFungibleTokenLog.args.id; - await this._erc1155Contract.mintNonFungible.awaitTransactionSuccessAsync( - token, - beneficiaries, - { from: this._contractOwner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await this._erc1155Contract.mintNonFungible.awaitTransactionSuccessAsync(token, beneficiaries, { + from: this._contractOwner, + }); const encodedNftIds: BigNumber[] = []; const nftIdBegin = 1; const nftIdEnd = beneficiaries.length + 1; diff --git a/contracts/exchange/test/match_orders.ts b/contracts/exchange/test/match_orders.ts index 89c69c5154..c2d1a09bb3 100644 --- a/contracts/exchange/test/match_orders.ts +++ b/contracts/exchange/test/match_orders.ts @@ -141,56 +141,30 @@ describe('matchOrders', () => { await exchangeWrapper.registerAssetProxyAsync(erc1155Proxy.address, owner); await exchangeWrapper.registerAssetProxyAsync(multiAssetProxyContract.address, owner); // Authorize proxies. - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchange.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchange.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchange.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxyContract.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchange.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxyContract.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxyContract.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxyContract.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( - erc20Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( - erc721Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync( - erc1155Proxy.address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchange.address, { from: owner }); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchange.address, { from: owner }); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchange.address, { from: owner }); + await multiAssetProxyContract.addAuthorizedAddress.awaitTransactionSuccessAsync(exchange.address, { + from: owner, + }); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxyContract.address, { + from: owner, + }); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxyContract.address, { + from: owner, + }); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxyContract.address, { + from: owner, + }); + await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, { + from: owner, + }); + await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync(erc721Proxy.address, { + from: owner, + }); + await multiAssetProxyContract.registerAssetProxy.awaitTransactionSuccessAsync(erc1155Proxy.address, { + from: owner, + }); // Set default addresses defaultERC20MakerAssetAddress = erc20Tokens[0].address; diff --git a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts index 258a1b6188..bee9116bc4 100644 --- a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts +++ b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts @@ -123,65 +123,37 @@ export async function fillOrderCombinatorialUtilsFactoryAsync( await exchangeWrapper.registerAssetProxyAsync(erc1155Proxy.address, ownerAddress); await exchangeWrapper.registerAssetProxyAsync(multiAssetProxy.address, ownerAddress); - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchangeContract.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchangeContract.address, { + from: ownerAddress, + }); - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchangeContract.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchangeContract.address, { + from: ownerAddress, + }); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchangeContract.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchangeContract.address, { + from: ownerAddress, + }); - await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - exchangeContract.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await multiAssetProxy.addAuthorizedAddress.awaitTransactionSuccessAsync(exchangeContract.address, { + from: ownerAddress, + }); - await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc20Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { from: ownerAddress }); - await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc721Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { + from: ownerAddress, + }); - await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync( - multiAssetProxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await erc1155Proxy.addAuthorizedAddress.awaitTransactionSuccessAsync(multiAssetProxy.address, { + from: ownerAddress, + }); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc20Proxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address, { from: ownerAddress }); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc721Proxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc721Proxy.address, { from: ownerAddress }); - await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync( - erc1155Proxy.address, - { from: ownerAddress }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await multiAssetProxy.registerAssetProxy.awaitTransactionSuccessAsync(erc1155Proxy.address, { from: ownerAddress }); const orderFactory = new OrderFactoryFromScenario( userAddresses, diff --git a/contracts/utils/test/authorizable.ts b/contracts/utils/test/authorizable.ts index 4c89cc7d6c..b2a1a46876 100644 --- a/contracts/utils/test/authorizable.ts +++ b/contracts/utils/test/authorizable.ts @@ -63,11 +63,7 @@ describe('Authorizable', () => { }); it('should revert if owner attempts to authorize a duplicate address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const expectedError = new AuthorizableRevertErrors.TargetAlreadyAuthorizedError(address); const tx = authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }); return expect(tx).to.revertWith(expectedError); @@ -76,27 +72,15 @@ describe('Authorizable', () => { describe('removeAuthorizedAddress', () => { it('should revert if not called by owner', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner); const tx = authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner }); return expect(tx).to.revertWith(expectedError); }); it('should allow owner to remove an authorized address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); + await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); }); @@ -110,11 +94,7 @@ describe('Authorizable', () => { describe('removeAuthorizedAddressAtIndex', () => { it('should revert if not called by owner', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(0); const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner); const tx = authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, { @@ -124,11 +104,7 @@ describe('Authorizable', () => { }); it('should revert if index is >= authorities.length', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(1); const expectedError = new AuthorizableRevertErrors.IndexOutOfBoundsError(index, index); const tx = authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, { @@ -149,16 +125,8 @@ describe('Authorizable', () => { it('should revert if address at index does not match target', async () => { const address1 = address; const address2 = notOwner; - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address1, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address2, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address1, { from: owner }); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address2, { from: owner }); const address1Index = new BigNumber(0); const expectedError = new AuthorizableRevertErrors.AuthorizedAddressMismatchError(address1, address2); const tx = authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address2, address1Index, { @@ -168,18 +136,11 @@ describe('Authorizable', () => { }); it('should allow owner to remove an authorized address', async () => { - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const index = new BigNumber(0); - await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync( - address, - index, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.removeAuthorizedAddressAtIndex.awaitTransactionSuccessAsync(address, index, { + from: owner, + }); const isAuthorized = await authorizable.authorized.callAsync(address); expect(isAuthorized).to.be.false(); }); @@ -189,19 +150,11 @@ describe('Authorizable', () => { it('should return all authorized addresses', async () => { const initial = await authorizable.getAuthorizedAddresses.callAsync(); expect(initial).to.have.length(0); - await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.addAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const afterAdd = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterAdd).to.have.length(1); expect(afterAdd).to.include(address); - await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync( - address, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ); + await authorizable.removeAuthorizedAddress.awaitTransactionSuccessAsync(address, { from: owner }); const afterRemove = await authorizable.getAuthorizedAddresses.callAsync(); expect(afterRemove).to.have.length(0); }); diff --git a/contracts/utils/test/ownable.ts b/contracts/utils/test/ownable.ts index f3453e7772..fcd7d38b54 100644 --- a/contracts/utils/test/ownable.ts +++ b/contracts/utils/test/ownable.ts @@ -41,7 +41,7 @@ describe('Ownable', () => { }); }); - describe('transferOwnership', () => { + describe.only('transferOwnership', () => { it('should revert if the specified new owner is the zero address', async () => { const expectedError = new OwnableRevertErrors.TransferOwnerToZeroError(); const tx = ownable.transferOwnership.sendTransactionAsync(constants.NULL_ADDRESS, { from: owner }); diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 92e4a02152..291ab39c5b 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -83,6 +83,7 @@ export { SimpleEvmOutput, SimpleEvmBytecodeOutput, EIP712DomainWithDefaultSchema, + AwaitTransactionSuccessOpts, SendTransactionOpts, EventCallback, IndexedFilterValues, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index c47907843c..f8b93a6d1c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -209,7 +215,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; @@ -357,7 +363,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _required: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; @@ -511,7 +517,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _secondsTimeLocked: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; @@ -668,7 +674,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -926,7 +932,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -1586,7 +1592,7 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); @@ -1796,7 +1802,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; @@ -1954,7 +1960,7 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('owner', owner); assert.isString('newOwner', newOwner); @@ -2171,7 +2177,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -2382,7 +2388,7 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('destination', destination); assert.isBigNumber('value', value); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 5c03e87e9a..7218a68ef3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -286,7 +292,7 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 4320ee6f0c..82d2190b8f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -93,7 +99,7 @@ export class CoordinatorRegistryContract extends BaseContract { awaitTransactionSuccessAsync( coordinatorEndpoint: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index bce15d477e..646063a9bc 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -1877,7 +1883,7 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -2168,7 +2174,7 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index 833937590a..5cd60be81f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -208,7 +214,7 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -478,7 +484,7 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -720,7 +726,7 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_target', _target); assert.isBigNumber('_value', _value); @@ -988,7 +994,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1166,7 +1172,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1353,7 +1359,7 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index f3bf65437a..d7b7796da2 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -121,7 +127,7 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -354,7 +360,7 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); @@ -636,7 +642,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -958,7 +964,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1175,7 +1181,7 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1386,7 +1392,7 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1624,7 +1630,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1810,7 +1816,7 @@ export class DummyERC721TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index 68111ecd97..29875d4d84 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -109,7 +115,7 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as DutchAuctionContract; const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData, opts); @@ -411,7 +417,7 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index 4d8eb603b7..d770b1fafb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -102,7 +108,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; @@ -477,7 +483,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; @@ -635,7 +641,7 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -837,7 +843,7 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); @@ -1040,7 +1046,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index 8c87145313..ef9858c593 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -102,7 +108,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; @@ -300,7 +306,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; @@ -501,7 +507,7 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -808,7 +814,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index cb4e0244bd..970e7a2f2c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -109,7 +115,7 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -344,7 +350,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -594,7 +600,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index de5c833215..f30193b23a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -102,7 +108,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; @@ -300,7 +306,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; @@ -501,7 +507,7 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -808,7 +814,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index ec71b4501f..cb5a80ad7f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -121,7 +127,7 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -526,7 +532,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -743,7 +749,7 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -954,7 +960,7 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1149,7 +1155,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts index 3aad36e73d..ef8097adfd 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/eth_balance_checker.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 6671031e86..28b9c1ea20 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -332,7 +338,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; @@ -567,7 +573,7 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); @@ -822,7 +828,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1126,7 +1132,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1435,7 +1441,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1784,7 +1790,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2211,7 +2217,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2579,7 +2585,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData, opts); @@ -2789,7 +2795,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( targetOrderEpoch: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; @@ -3056,7 +3062,7 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3291,7 +3297,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -3580,7 +3586,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -4258,7 +4264,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4560,7 +4566,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4861,7 +4867,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5163,7 +5169,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5500,7 +5506,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -5907,7 +5913,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -6326,7 +6332,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( hash: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('hash', hash); const self = (this as any) as ExchangeContract; @@ -6614,7 +6620,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; @@ -6772,7 +6778,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeCollector: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; @@ -6942,7 +6948,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; @@ -7116,7 +7122,7 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); @@ -7326,7 +7332,7 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); @@ -7587,7 +7593,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 75fae4b0ac..7bbbce118c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -85,7 +91,7 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( assetData: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; @@ -300,7 +306,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); @@ -627,7 +633,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('signatures', signatures); @@ -922,7 +928,7 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; @@ -1076,7 +1082,7 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index de5639e6cc..b21e3dbf0c 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -101,7 +107,7 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index d673b4fb61..a1a699fde1 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 45676b311f..29a1001c9b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index 583601cadb..f96f8ed875 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -153,7 +159,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; @@ -404,7 +410,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; @@ -605,7 +611,7 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -871,7 +877,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; @@ -1067,7 +1073,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index 2811567a2a..9b3d0f6b4e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts index 2187973f03..e1298600cb 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/static_call_proxy.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index aa6a3d5941..41a588b616 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -158,7 +164,7 @@ export class WETH9Contract extends BaseContract { guy: string, wad: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('guy', guy); assert.isBigNumber('wad', wad); @@ -363,7 +369,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('src', src); assert.isString('dst', dst); @@ -540,7 +546,7 @@ export class WETH9Contract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -817,7 +823,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -966,7 +972,7 @@ export class WETH9Contract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as WETH9Contract; const txHashPromise = self.deposit.sendTransactionAsync(txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 1fc1d1056e..37a7a85e16 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -145,7 +151,7 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -369,7 +375,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -693,7 +699,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index 143ec23924..f9793aa5d6 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -45,7 +45,7 @@ const args = yargs demandOption: true, }) .option('debug', { - describe: 'Enable debug functions', + describe: 'Includes debug functions in the wrappers such as `getABIDecodedTransactionData`', type: 'boolean', }) .option('partials', { diff --git a/packages/abi-gen/templates/TypeScript/contract.handlebars b/packages/abi-gen/templates/TypeScript/contract.handlebars index afaef02a50..2c84f35692 100644 --- a/packages/abi-gen/templates/TypeScript/contract.handlebars +++ b/packages/abi-gen/templates/TypeScript/contract.handlebars @@ -20,7 +20,7 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { AwaitTransactionSuccessOpts, EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars index ad7f26ed82..9fee7996f7 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_abi_helper.handlebars @@ -1,3 +1,4 @@ +{{!-- if ((NOT constant) AND (NOT debug)), to avoid repetition bbecause we use all 3 functions if (debug) --}} {{^if constant~}} {{^if debug~}} /** diff --git a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars index f542a21f18..bc1f8716cd 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars @@ -50,7 +50,7 @@ opts: SendTransactionOpts = { shouldValidate: true }, awaitTransactionSuccessAsync( {{> typed_params inputs=inputs}} txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { {{#each inputs}} {{#assertionType name type}}{{/assertionType}} diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index d4d24310cb..b3fdf4b524 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -19,7 +19,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; @@ -323,7 +329,7 @@ export class AbiGenDummyContract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; @@ -1389,7 +1395,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); @@ -1790,7 +1796,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); @@ -2281,7 +2287,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: SendTransactionOpts = { shouldValidate: true }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); diff --git a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts index eb76f86572..bc01ce2d03 100644 --- a/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/lib_dummy.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts index f466f2aef7..edc8830abc 100644 --- a/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/test_lib_dummy.ts @@ -18,7 +18,13 @@ import { SupportedProvider, } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils'; -import { EventCallback, IndexedFilterValues, SendTransactionOpts, SimpleContractArtifact } from '@0x/types'; +import { + AwaitTransactionSuccessOpts, + EventCallback, + IndexedFilterValues, + SendTransactionOpts, + SimpleContractArtifact, +} from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { assert } from '@0x/assert'; import * as ethers from 'ethers'; diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index f404e717ae..c691b66589 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -5,6 +5,10 @@ { "note": "Make `evmExecAsync` protected and rename to `_evmExecAsync`", "pr": 2243 + }, + { + "note": "Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback`", + "pr": 2243 } ] }, diff --git a/packages/base-contract/src/subscription_manager.ts b/packages/base-contract/src/subscription_manager.ts index f6949d4f47..9f0bdd6cc2 100644 --- a/packages/base-contract/src/subscription_manager.ts +++ b/packages/base-contract/src/subscription_manager.ts @@ -13,7 +13,9 @@ import { import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream'; import * as _ from 'lodash'; -import { EventCallback, IndexedFilterValues, SubscriptionErrors } from './types'; +import { EventCallback, IndexedFilterValues } from '@0x/types'; + +import { SubscriptionErrors } from './types'; import { filterUtils } from './utils/filter_utils'; const DEFAULT_BLOCK_POLLING_INTERVAL = 1000; @@ -80,7 +82,7 @@ export class SubscriptionManager; + this._filterCallbacks[filterToken] = callback as EventCallback; // tslint:disable-line:no-unnecessary-type-assertion return filterToken; } public async getLogsAsync( diff --git a/packages/base-contract/src/types.ts b/packages/base-contract/src/types.ts index 28048b7af1..5414dd2090 100644 --- a/packages/base-contract/src/types.ts +++ b/packages/base-contract/src/types.ts @@ -1,15 +1,6 @@ -import { ContractEventArg, DecodedLogArgs, LogEntryEvent, LogWithDecodedArgs } from 'ethereum-types'; +import { LogEntryEvent } from 'ethereum-types'; export type LogEvent = LogEntryEvent; -export interface DecodedLogEvent { - isRemoved: boolean; - log: LogWithDecodedArgs; -} - -export type EventCallback = ( - err: null | Error, - log?: DecodedLogEvent, -) => void; export interface ContractEvent { logIndex: number; @@ -27,7 +18,3 @@ export enum SubscriptionErrors { SubscriptionNotFound = 'SUBSCRIPTION_NOT_FOUND', SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT', } - -export interface IndexedFilterValues { - [index: string]: ContractEventArg; -} diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index d12d404df4..96d46327cd 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -154,6 +154,7 @@ export { SignedZeroExTransaction, SimpleEvmOutput, SimpleEvmBytecodeOutput, + AwaitTransactionSuccessOpts, SendTransactionOpts, EIP712DomainWithDefaultSchema, EventCallback, diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index c4282c0aa4..5c9a0722f3 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -3,7 +3,7 @@ "version": "2.5.0-beta.1", "changes": [ { - "note": "Add `TxOpts` type for contract wrappers", + "note": "Add `SendTransactionOpts` and `AwaitTransactionSuccessOpts` types for contract wrappers", "pr": 2243 } ] diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index b55abd4cdf..ceac35918c 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -754,27 +754,6 @@ export interface Stats { orderCount: number; } -export interface SimpleContractArtifact { - schemaVersion: string; - contractName: string; - compilerOutput: SimpleStandardContractOutput; - networks: ContractNetworks; -} - -export interface SimpleStandardContractOutput { - abi: ContractAbi; - evm: SimpleEvmOutput; - devdoc?: DevdocOutput; -} - -export interface SimpleEvmOutput { - bytecode: SimpleEvmBytecodeOutput; -} - -export interface SimpleEvmBytecodeOutput { - object: string; -} - export interface DutchAuctionDetails { beginTimeSeconds: BigNumber; endTimeSeconds: BigNumber; @@ -874,3 +853,48 @@ export type EventCallback = ( export interface IndexedFilterValues { [index: string]: ContractEventArg; } + +/* Begin types for @0x/abi-gen-wrappers + * Allow these types to be imported when needed instead of having to import + * the whole package, which is large + */ + +/** + * Used with `sendTransactionAsync` + * * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before + * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default=true. + */ +export interface SendTransactionOpts { + shouldValidate?: boolean; +} + +/** + * Used with `awaitTransactionSuccessAsync` + * * pollingIntervalMs: Determine polling intervals in milliseconds + * * timeoutMs: Determines timeout in milliseconds + */ +export interface AwaitTransactionSuccessOpts extends SendTransactionOpts { + pollingIntervalMs?: number; + timeoutMs?: number; +} + +export interface SimpleContractArtifact { + schemaVersion: string; + contractName: string; + compilerOutput: SimpleStandardContractOutput; + networks: ContractNetworks; +} + +export interface SimpleStandardContractOutput { + abi: ContractAbi; + evm: SimpleEvmOutput; + devdoc?: DevdocOutput; +} + +export interface SimpleEvmOutput { + bytecode: SimpleEvmBytecodeOutput; +} + +export interface SimpleEvmBytecodeOutput { + object: string; +} From 37505450a40570414c239957267f3adc0a87425d Mon Sep 17 00:00:00 2001 From: xianny Date: Tue, 15 Oct 2019 16:33:34 -0700 Subject: [PATCH 8/8] remove default value for timeoutMs; default pollingIntervalMs is provided in web3wrapper --- contracts/exchange/src/wrapper_interfaces.ts | 10 +- contracts/utils/test/ownable.ts | 17 +-- .../generated-wrappers/asset_proxy_owner.ts | 40 +++---- .../src/generated-wrappers/coordinator.ts | 4 +- .../coordinator_registry.ts | 4 +- .../src/generated-wrappers/dev_utils.ts | 8 +- .../generated-wrappers/dummy_erc20_token.ts | 24 ++--- .../generated-wrappers/dummy_erc721_token.ts | 32 +++--- .../src/generated-wrappers/dutch_auction.ts | 8 +- .../src/generated-wrappers/erc1155_proxy.ts | 20 ++-- .../src/generated-wrappers/erc20_proxy.ts | 16 +-- .../src/generated-wrappers/erc20_token.ts | 12 +-- .../src/generated-wrappers/erc721_proxy.ts | 16 +-- .../src/generated-wrappers/erc721_token.ts | 20 ++-- .../src/generated-wrappers/exchange.ts | 100 +++++++++--------- .../src/generated-wrappers/forwarder.ts | 20 ++-- .../src/generated-wrappers/i_asset_proxy.ts | 4 +- .../generated-wrappers/multi_asset_proxy.ts | 20 ++-- .../src/generated-wrappers/weth9.ts | 20 ++-- .../src/generated-wrappers/zrx_token.ts | 12 +-- .../TypeScript/partials/method_tx.handlebars | 4 +- .../output/typescript/abi_gen_dummy.ts | 16 +-- .../test/abi_gen_dummy_test.ts | 2 +- 23 files changed, 215 insertions(+), 214 deletions(-) diff --git a/contracts/exchange/src/wrapper_interfaces.ts b/contracts/exchange/src/wrapper_interfaces.ts index 27d05bfdd5..8ccfd2d301 100644 --- a/contracts/exchange/src/wrapper_interfaces.ts +++ b/contracts/exchange/src/wrapper_interfaces.ts @@ -1,5 +1,5 @@ import { PromiseWithTransactionHash } from '@0x/base-contract'; -import { SendTransactionOpts } from '@0x/types'; +import { AwaitTransactionSuccessOpts } from '@0x/types'; import { BlockParam, CallData, TransactionReceiptWithDecodedLogs, TxData } from 'ethereum-types'; // Generated Wrapper Interfaces @@ -8,7 +8,7 @@ export interface AssetProxyDispatcher { awaitTransactionSuccessAsync: ( assetProxy: string, txData?: Partial, - txOpts?: SendTransactionOpts, + txOpts?: AwaitTransactionSuccessOpts, ) => PromiseWithTransactionHash; }; getAssetProxy: { @@ -21,14 +21,14 @@ export interface Authorizable extends Ownable { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - txOpts?: SendTransactionOpts, + txOpts?: AwaitTransactionSuccessOpts, ) => PromiseWithTransactionHash; }; removeAuthorizedAddress: { awaitTransactionSuccessAsync: ( target: string, txData?: Partial, - txOpts?: SendTransactionOpts, + txOpts?: AwaitTransactionSuccessOpts, ) => PromiseWithTransactionHash; }; authorized: { @@ -41,7 +41,7 @@ export interface Ownable { awaitTransactionSuccessAsync: ( newOwner: string, txData?: Partial, - txOpts?: SendTransactionOpts, + txOpts?: AwaitTransactionSuccessOpts, ) => PromiseWithTransactionHash; }; owner: { diff --git a/contracts/utils/test/ownable.ts b/contracts/utils/test/ownable.ts index fcd7d38b54..c3b96a9485 100644 --- a/contracts/utils/test/ownable.ts +++ b/contracts/utils/test/ownable.ts @@ -41,7 +41,7 @@ describe('Ownable', () => { }); }); - describe.only('transferOwnership', () => { + describe('transferOwnership', () => { it('should revert if the specified new owner is the zero address', async () => { const expectedError = new OwnableRevertErrors.TransferOwnerToZeroError(); const tx = ownable.transferOwnership.sendTransactionAsync(constants.NULL_ADDRESS, { from: owner }); @@ -49,15 +49,16 @@ describe('Ownable', () => { }); it('should transfer ownership if the specified new owner is not the zero address', async () => { - expect( - ownable.transferOwnership.awaitTransactionSuccessAsync( + ownable.transferOwnership + .awaitTransactionSuccessAsync( nonOwner, { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ), - ).to.be.fulfilled(''); - const updatedOwner = await ownable.owner.callAsync(); - expect(updatedOwner).to.be.eq(nonOwner); + { pollingIntervalMs: constants.AWAIT_TRANSACTION_MINED_MS }, + ) + .then(async () => { + const updatedOwner = await ownable.owner.callAsync(); + expect(updatedOwner).to.be.eq(nonOwner); + }); }); }); }); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index f8b93a6d1c..1e6aee0d1a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -197,7 +197,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.addOwner.callAsync(owner, txDataWithDefaults); } @@ -215,7 +215,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; @@ -345,7 +345,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.changeRequirement.callAsync(_required, txDataWithDefaults); } @@ -363,7 +363,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _required: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_required', _required); const self = (this as any) as AssetProxyOwnerContract; @@ -498,7 +498,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.changeTimeLock.callAsync(_secondsTimeLocked, txDataWithDefaults); } @@ -517,7 +517,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( _secondsTimeLocked: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_secondsTimeLocked', _secondsTimeLocked); const self = (this as any) as AssetProxyOwnerContract; @@ -656,7 +656,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.confirmTransaction.callAsync(transactionId, txDataWithDefaults); } @@ -674,7 +674,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -914,7 +914,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.executeTransaction.callAsync(transactionId, txDataWithDefaults); } @@ -932,7 +932,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -1561,7 +1561,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.registerFunctionCall.callAsync( hasCustomTimeLock, functionSelector, @@ -1592,7 +1592,7 @@ export class AssetProxyOwnerContract extends BaseContract { destination: string, newSecondsTimeLocked: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBoolean('hasCustomTimeLock', hasCustomTimeLock); assert.isString('functionSelector', functionSelector); @@ -1784,7 +1784,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeOwner.callAsync(owner, txDataWithDefaults); } @@ -1802,7 +1802,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( owner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); const self = (this as any) as AssetProxyOwnerContract; @@ -1940,7 +1940,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.replaceOwner.callAsync(owner, newOwner, txDataWithDefaults); } @@ -1960,7 +1960,7 @@ export class AssetProxyOwnerContract extends BaseContract { owner: string, newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('owner', owner); assert.isString('newOwner', newOwner); @@ -2159,7 +2159,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.revokeConfirmation.callAsync(transactionId, txDataWithDefaults); } @@ -2177,7 +2177,7 @@ export class AssetProxyOwnerContract extends BaseContract { awaitTransactionSuccessAsync( transactionId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('transactionId', transactionId); const self = (this as any) as AssetProxyOwnerContract; @@ -2366,7 +2366,7 @@ export class AssetProxyOwnerContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.submitTransaction.callAsync(destination, value, data, txDataWithDefaults); } @@ -2388,7 +2388,7 @@ export class AssetProxyOwnerContract extends BaseContract { value: BigNumber, data: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('destination', destination); assert.isBigNumber('value', value); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts index 7218a68ef3..56348dfb51 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator.ts @@ -255,7 +255,7 @@ export class CoordinatorContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.executeTransaction.callAsync( transaction, txOrigin, @@ -292,7 +292,7 @@ export class CoordinatorContract extends BaseContract { approvalExpirationTimeSeconds: BigNumber[], approvalSignatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('txOrigin', txOrigin); assert.isString('transactionSignature', transactionSignature); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts index 82d2190b8f..f76b2ed8a3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/coordinator_registry.ts @@ -81,7 +81,7 @@ export class CoordinatorRegistryContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setCoordinatorEndpoint.callAsync(coordinatorEndpoint, txDataWithDefaults); } @@ -99,7 +99,7 @@ export class CoordinatorRegistryContract extends BaseContract { awaitTransactionSuccessAsync( coordinatorEndpoint: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('coordinatorEndpoint', coordinatorEndpoint); const self = (this as any) as CoordinatorRegistryContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts index 646063a9bc..0f25b73cce 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dev_utils.ts @@ -1840,7 +1840,7 @@ export class DevUtilsContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.getSimulatedOrderTransferResults.callAsync( order, takerAddress, @@ -1883,7 +1883,7 @@ export class DevUtilsContract extends BaseContract { takerAddress: string, takerAssetFillAmount: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('takerAddress', takerAddress); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -2130,7 +2130,7 @@ export class DevUtilsContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.getSimulatedOrdersTransferResults.callAsync( orders, takerAddresses, @@ -2174,7 +2174,7 @@ export class DevUtilsContract extends BaseContract { takerAddresses: string[], takerAssetFillAmounts: BigNumber[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAddresses', takerAddresses); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index 5cd60be81f..6821ab56f8 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -194,7 +194,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(_spender, _value, txDataWithDefaults); } @@ -214,7 +214,7 @@ export class DummyERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -466,7 +466,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.mint.callAsync(_value, txDataWithDefaults); } @@ -484,7 +484,7 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('_value', _value); const self = (this as any) as DummyERC20TokenContract; @@ -706,7 +706,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setBalance.callAsync(_target, _value, txDataWithDefaults); } @@ -726,7 +726,7 @@ export class DummyERC20TokenContract extends BaseContract { _target: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_target', _target); assert.isBigNumber('_value', _value); @@ -974,7 +974,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transfer.callAsync(_to, _value, txDataWithDefaults); } @@ -994,7 +994,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); @@ -1150,7 +1150,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } @@ -1172,7 +1172,7 @@ export class DummyERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1342,7 +1342,7 @@ export class DummyERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -1359,7 +1359,7 @@ export class DummyERC20TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC20TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index d7b7796da2..8e78e37b76 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -107,7 +107,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(_approved, _tokenId, txDataWithDefaults); } @@ -127,7 +127,7 @@ export class DummyERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -340,7 +340,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.burn.callAsync(_owner, _tokenId, txDataWithDefaults); } @@ -360,7 +360,7 @@ export class DummyERC721TokenContract extends BaseContract { _owner: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_owner', _owner); assert.isBigNumber('_tokenId', _tokenId); @@ -622,7 +622,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.mint.callAsync(_to, _tokenId, txDataWithDefaults); } @@ -642,7 +642,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_tokenId', _tokenId); @@ -942,7 +942,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txDataWithDefaults); } @@ -964,7 +964,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1157,7 +1157,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txDataWithDefaults); } @@ -1181,7 +1181,7 @@ export class DummyERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1372,7 +1372,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setApprovalForAll.callAsync(_operator, _approved, txDataWithDefaults); } @@ -1392,7 +1392,7 @@ export class DummyERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1608,7 +1608,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(_from, _to, _tokenId, txDataWithDefaults); } @@ -1630,7 +1630,7 @@ export class DummyERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -1799,7 +1799,7 @@ export class DummyERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -1816,7 +1816,7 @@ export class DummyERC721TokenContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as DummyERC721TokenContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts index 29875d4d84..7111992209 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts @@ -84,7 +84,7 @@ export class DutchAuctionContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.getAuctionDetails.callAsync(order, txDataWithDefaults); } @@ -115,7 +115,7 @@ export class DutchAuctionContract extends BaseContract { takerAssetData: string; }, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as DutchAuctionContract; const txHashPromise = self.getAuctionDetails.sendTransactionAsync(order, txData, opts); @@ -365,7 +365,7 @@ export class DutchAuctionContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.matchOrders.callAsync(buyOrder, sellOrder, buySignature, sellSignature, txDataWithDefaults); } @@ -417,7 +417,7 @@ export class DutchAuctionContract extends BaseContract { buySignature: string, sellSignature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('buySignature', buySignature); assert.isString('sellSignature', sellSignature); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts index d770b1fafb..8fe2202022 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc1155_proxy.ts @@ -90,7 +90,7 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -108,7 +108,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; @@ -465,7 +465,7 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -483,7 +483,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC1155ProxyContract; @@ -621,7 +621,7 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } @@ -641,7 +641,7 @@ export class ERC1155ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -817,7 +817,7 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(assetData, from, to, amount, txDataWithDefaults); } @@ -843,7 +843,7 @@ export class ERC1155ProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); @@ -1029,7 +1029,7 @@ export class ERC1155ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -1046,7 +1046,7 @@ export class ERC1155ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC1155ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index ef9858c593..59ae25dd46 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -90,7 +90,7 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -108,7 +108,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; @@ -288,7 +288,7 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -306,7 +306,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC20ProxyContract; @@ -487,7 +487,7 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } @@ -507,7 +507,7 @@ export class ERC20ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -797,7 +797,7 @@ export class ERC20ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -814,7 +814,7 @@ export class ERC20ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC20ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index 970e7a2f2c..1cc9c8e0d0 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -95,7 +95,7 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(_spender, _value, txDataWithDefaults); } @@ -115,7 +115,7 @@ export class ERC20TokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -328,7 +328,7 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } @@ -350,7 +350,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -580,7 +580,7 @@ export class ERC20TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transfer.callAsync(_to, _value, txDataWithDefaults); } @@ -600,7 +600,7 @@ export class ERC20TokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index f30193b23a..9f3d13bc8a 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -90,7 +90,7 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -108,7 +108,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; @@ -288,7 +288,7 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -306,7 +306,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as ERC721ProxyContract; @@ -487,7 +487,7 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } @@ -507,7 +507,7 @@ export class ERC721ProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -797,7 +797,7 @@ export class ERC721ProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -814,7 +814,7 @@ export class ERC721ProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ERC721ProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index cb5a80ad7f..883ba300c3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -107,7 +107,7 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(_approved, _tokenId, txDataWithDefaults); } @@ -127,7 +127,7 @@ export class ERC721TokenContract extends BaseContract { _approved: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_approved', _approved); assert.isBigNumber('_tokenId', _tokenId); @@ -510,7 +510,7 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.safeTransferFrom1.callAsync(_from, _to, _tokenId, txDataWithDefaults); } @@ -532,7 +532,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -725,7 +725,7 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.safeTransferFrom2.callAsync(_from, _to, _tokenId, _data, txDataWithDefaults); } @@ -749,7 +749,7 @@ export class ERC721TokenContract extends BaseContract { _tokenId: BigNumber, _data: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -940,7 +940,7 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setApprovalForAll.callAsync(_operator, _approved, txDataWithDefaults); } @@ -960,7 +960,7 @@ export class ERC721TokenContract extends BaseContract { _operator: string, _approved: boolean, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_operator', _operator); assert.isBoolean('_approved', _approved); @@ -1133,7 +1133,7 @@ export class ERC721TokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(_from, _to, _tokenId, txDataWithDefaults); } @@ -1155,7 +1155,7 @@ export class ERC721TokenContract extends BaseContract { _to: string, _tokenId: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 28b9c1ea20..64458c76b3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -305,7 +305,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchCancelOrders.callAsync(orders, txDataWithDefaults); } @@ -338,7 +338,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }>, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); const self = (this as any) as ExchangeContract; @@ -546,7 +546,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchExecuteTransactions.callAsync(transactions, signatures, txDataWithDefaults); } @@ -573,7 +573,7 @@ export class ExchangeContract extends BaseContract { }>, signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('transactions', transactions); assert.isArray('signatures', signatures); @@ -785,7 +785,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchFillOrKillOrders.callAsync( orders, takerAssetFillAmounts, @@ -828,7 +828,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1094,7 +1094,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchFillOrders.callAsync(orders, takerAssetFillAmounts, signatures, txDataWithDefaults); } @@ -1132,7 +1132,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1398,7 +1398,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchFillOrdersNoThrow.callAsync( orders, takerAssetFillAmounts, @@ -1441,7 +1441,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmounts: BigNumber[], signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('takerAssetFillAmounts', takerAssetFillAmounts); @@ -1728,7 +1728,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchMatchOrders.callAsync( leftOrders, rightOrders, @@ -1790,7 +1790,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2155,7 +2155,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.batchMatchOrdersWithMaximalFill.callAsync( leftOrders, rightOrders, @@ -2217,7 +2217,7 @@ export class ExchangeContract extends BaseContract { leftSignatures: string[], rightSignatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('leftOrders', leftOrders); assert.isArray('rightOrders', rightOrders); @@ -2552,7 +2552,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.cancelOrder.callAsync(order, txDataWithDefaults); } @@ -2585,7 +2585,7 @@ export class ExchangeContract extends BaseContract { takerFeeAssetData: string; }, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as ExchangeContract; const txHashPromise = self.cancelOrder.sendTransactionAsync(order, txData, opts); @@ -2776,7 +2776,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.cancelOrdersUpTo.callAsync(targetOrderEpoch, txDataWithDefaults); } @@ -2795,7 +2795,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( targetOrderEpoch: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('targetOrderEpoch', targetOrderEpoch); const self = (this as any) as ExchangeContract; @@ -3036,7 +3036,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.executeTransaction.callAsync(transaction, signature, txDataWithDefaults); } @@ -3062,7 +3062,7 @@ export class ExchangeContract extends BaseContract { }, signature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('signature', signature); const self = (this as any) as ExchangeContract; @@ -3260,7 +3260,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.fillOrKillOrder.callAsync(order, takerAssetFillAmount, signature, txDataWithDefaults); } @@ -3297,7 +3297,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -3549,7 +3549,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.fillOrder.callAsync(order, takerAssetFillAmount, signature, txDataWithDefaults); } @@ -3586,7 +3586,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); assert.isString('signature', signature); @@ -4222,7 +4222,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketBuyOrdersFillOrKill.callAsync( orders, makerAssetFillAmount, @@ -4264,7 +4264,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4524,7 +4524,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketBuyOrdersNoThrow.callAsync( orders, makerAssetFillAmount, @@ -4566,7 +4566,7 @@ export class ExchangeContract extends BaseContract { makerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount); @@ -4825,7 +4825,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketSellOrdersFillOrKill.callAsync( orders, takerAssetFillAmount, @@ -4867,7 +4867,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5127,7 +5127,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketSellOrdersNoThrow.callAsync( orders, takerAssetFillAmount, @@ -5169,7 +5169,7 @@ export class ExchangeContract extends BaseContract { takerAssetFillAmount: BigNumber, signatures: string[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('takerAssetFillAmount', takerAssetFillAmount); @@ -5446,7 +5446,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.matchOrders.callAsync( leftOrder, rightOrder, @@ -5506,7 +5506,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -5853,7 +5853,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.matchOrdersWithMaximalFill.callAsync( leftOrder, rightOrder, @@ -5913,7 +5913,7 @@ export class ExchangeContract extends BaseContract { leftSignature: string, rightSignature: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('leftSignature', leftSignature); assert.isString('rightSignature', rightSignature); @@ -6314,7 +6314,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.preSign.callAsync(hash, txDataWithDefaults); } @@ -6332,7 +6332,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( hash: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('hash', hash); const self = (this as any) as ExchangeContract; @@ -6602,7 +6602,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.registerAssetProxy.callAsync(assetProxy, txDataWithDefaults); } @@ -6620,7 +6620,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as ExchangeContract; @@ -6759,7 +6759,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setProtocolFeeCollectorAddress.callAsync(updatedProtocolFeeCollector, txDataWithDefaults); } @@ -6778,7 +6778,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeCollector: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('updatedProtocolFeeCollector', updatedProtocolFeeCollector); const self = (this as any) as ExchangeContract; @@ -6930,7 +6930,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setProtocolFeeMultiplier.callAsync(updatedProtocolFeeMultiplier, txDataWithDefaults); } @@ -6948,7 +6948,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( updatedProtocolFeeMultiplier: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('updatedProtocolFeeMultiplier', updatedProtocolFeeMultiplier); const self = (this as any) as ExchangeContract; @@ -7102,7 +7102,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.setSignatureValidatorApproval.callAsync(validatorAddress, approval, txDataWithDefaults); } @@ -7122,7 +7122,7 @@ export class ExchangeContract extends BaseContract { validatorAddress: string, approval: boolean, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('validatorAddress', validatorAddress); assert.isBoolean('approval', approval); @@ -7298,7 +7298,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.simulateDispatchTransferFromCalls.callAsync( assetData, fromAddresses, @@ -7332,7 +7332,7 @@ export class ExchangeContract extends BaseContract { toAddresses: string[], amounts: BigNumber[], txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('assetData', assetData); assert.isArray('fromAddresses', fromAddresses); @@ -7576,7 +7576,7 @@ export class ExchangeContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -7593,7 +7593,7 @@ export class ExchangeContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ExchangeContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 7bbbce118c..33a486db3b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -73,7 +73,7 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approveMakerAssetProxy.callAsync(assetData, txDataWithDefaults); } @@ -91,7 +91,7 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( assetData: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); const self = (this as any) as ForwarderContract; @@ -256,7 +256,7 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketBuyOrdersWithEth.callAsync( orders, makerAssetBuyAmount, @@ -306,7 +306,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isBigNumber('makerAssetBuyAmount', makerAssetBuyAmount); @@ -586,7 +586,7 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.marketSellOrdersWithEth.callAsync( orders, signatures, @@ -633,7 +633,7 @@ export class ForwarderContract extends BaseContract { feePercentage: BigNumber, feeRecipient: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isArray('orders', orders); assert.isArray('signatures', signatures); @@ -911,7 +911,7 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -928,7 +928,7 @@ export class ForwarderContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as ForwarderContract; @@ -1062,7 +1062,7 @@ export class ForwarderContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.withdrawAsset.callAsync(assetData, amount, txDataWithDefaults); } @@ -1082,7 +1082,7 @@ export class ForwarderContract extends BaseContract { assetData: string, amount: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isBigNumber('amount', amount); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts index b21e3dbf0c..30aed03216 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_asset_proxy.ts @@ -83,7 +83,7 @@ export class IAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(assetData, from, to, amount, txDataWithDefaults); } @@ -107,7 +107,7 @@ export class IAssetProxyContract extends BaseContract { to: string, amount: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetData', assetData); assert.isString('from', from); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts index f96f8ed875..33b681ef8b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts @@ -141,7 +141,7 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.addAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -159,7 +159,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; @@ -392,7 +392,7 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddress.callAsync(target, txDataWithDefaults); } @@ -410,7 +410,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( target: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); const self = (this as any) as MultiAssetProxyContract; @@ -591,7 +591,7 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.removeAuthorizedAddressAtIndex.callAsync(target, index, txDataWithDefaults); } @@ -611,7 +611,7 @@ export class MultiAssetProxyContract extends BaseContract { target: string, index: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('target', target); assert.isBigNumber('index', index); @@ -859,7 +859,7 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.registerAssetProxy.callAsync(assetProxy, txDataWithDefaults); } @@ -877,7 +877,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( assetProxy: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('assetProxy', assetProxy); const self = (this as any) as MultiAssetProxyContract; @@ -1056,7 +1056,7 @@ export class MultiAssetProxyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferOwnership.callAsync(newOwner, txDataWithDefaults); } @@ -1073,7 +1073,7 @@ export class MultiAssetProxyContract extends BaseContract { awaitTransactionSuccessAsync( newOwner: string, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('newOwner', newOwner); const self = (this as any) as MultiAssetProxyContract; diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 41a588b616..8b9f28a6b3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -146,7 +146,7 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(guy, wad, txDataWithDefaults); } @@ -164,7 +164,7 @@ export class WETH9Contract extends BaseContract { guy: string, wad: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('guy', guy); assert.isBigNumber('wad', wad); @@ -350,7 +350,7 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(src, dst, wad, txDataWithDefaults); } @@ -369,7 +369,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('src', src); assert.isString('dst', dst); @@ -529,7 +529,7 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.withdraw.callAsync(wad, txDataWithDefaults); } @@ -546,7 +546,7 @@ export class WETH9Contract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as WETH9Contract; @@ -805,7 +805,7 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transfer.callAsync(dst, wad, txDataWithDefaults); } @@ -823,7 +823,7 @@ export class WETH9Contract extends BaseContract { dst: string, wad: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('dst', dst); assert.isBigNumber('wad', wad); @@ -956,7 +956,7 @@ export class WETH9Contract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.deposit.callAsync(txDataWithDefaults); } @@ -972,7 +972,7 @@ export class WETH9Contract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as WETH9Contract; const txHashPromise = self.deposit.sendTransactionAsync(txData, opts); diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 37a7a85e16..0eb90329e6 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -133,7 +133,7 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.approve.callAsync(_spender, _value, txDataWithDefaults); } @@ -151,7 +151,7 @@ export class ZRXTokenContract extends BaseContract { _spender: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_spender', _spender); assert.isBigNumber('_value', _value); @@ -353,7 +353,7 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transferFrom.callAsync(_from, _to, _value, txDataWithDefaults); } @@ -375,7 +375,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_from', _from); assert.isString('_to', _to); @@ -681,7 +681,7 @@ export class ZRXTokenContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.transfer.callAsync(_to, _value, txDataWithDefaults); } @@ -699,7 +699,7 @@ export class ZRXTokenContract extends BaseContract { _to: string, _value: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isString('_to', _to); assert.isBigNumber('_value', _value); diff --git a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars index bc1f8716cd..de4e7eb324 100644 --- a/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars +++ b/packages/abi-gen/templates/TypeScript/partials/method_tx.handlebars @@ -27,7 +27,7 @@ opts: SendTransactionOpts = { shouldValidate: true }, txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.{{languageSpecificName}}.callAsync( {{#each inputs~}} {{name}}, @@ -50,7 +50,7 @@ opts: SendTransactionOpts = { shouldValidate: true }, awaitTransactionSuccessAsync( {{> typed_params inputs=inputs}} txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { {{#each inputs}} {{#assertionType name type}}{{/assertionType}} diff --git a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts index b3fdf4b524..8b626041d0 100644 --- a/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts +++ b/packages/abi-gen/test-cli/output/typescript/abi_gen_dummy.ts @@ -312,7 +312,7 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.withdraw.callAsync(wad, txDataWithDefaults); } @@ -329,7 +329,7 @@ export class AbiGenDummyContract extends BaseContract { awaitTransactionSuccessAsync( wad: BigNumber, txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { assert.isBigNumber('wad', wad); const self = (this as any) as AbiGenDummyContract; @@ -1379,7 +1379,7 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.nonPureMethod.callAsync(txDataWithDefaults); } @@ -1395,7 +1395,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethod.sendTransactionAsync(txData, opts); @@ -1780,7 +1780,7 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.nonPureMethodThatReturnsNothing.callAsync(txDataWithDefaults); } @@ -1796,7 +1796,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.nonPureMethodThatReturnsNothing.sendTransactionAsync(txData, opts); @@ -2271,7 +2271,7 @@ export class AbiGenDummyContract extends BaseContract { txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase(); } - if (opts.shouldValidate) { + if (opts.shouldValidate !== false) { await self.emitSimpleEvent.callAsync(txDataWithDefaults); } @@ -2287,7 +2287,7 @@ export class AbiGenDummyContract extends BaseContract { */ awaitTransactionSuccessAsync( txData?: Partial, - opts: AwaitTransactionSuccessOpts = { shouldValidate: true, timeoutMs: 0 }, + opts: AwaitTransactionSuccessOpts = { shouldValidate: true }, ): PromiseWithTransactionHash { const self = (this as any) as AbiGenDummyContract; const txHashPromise = self.emitSimpleEvent.sendTransactionAsync(txData, opts); diff --git a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts index 6b4a5bbb17..948f909c7a 100644 --- a/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts +++ b/packages/abi-gen/test-cli/test_typescript/test/abi_gen_dummy_test.ts @@ -279,7 +279,7 @@ describe('AbiGenDummy Contract', () => { describe('awaitTransactionSuccessAsync', async () => { it('should successfully call the non pure function', async () => { expect( - abiGenDummy.nonPureMethod.awaitTransactionSuccessAsync({}, { pollingIntervalMs: 300, timeoutMs: 10 }), + abiGenDummy.nonPureMethod.awaitTransactionSuccessAsync({}, { pollingIntervalMs: 10, timeoutMs: 100 }), ).to.be.fulfilled(''); }); });