From 4d52d8357542b97bd762f898af2f0eef015d6c99 Mon Sep 17 00:00:00 2001 From: xianny Date: Thu, 10 Oct 2019 13:36:16 -0700 Subject: [PATCH] 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 | 81 +++---------- 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 | 10 +- 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 | 10 +- .../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 +- .../base-contract/src/subscription_manager.ts | 6 +- packages/base-contract/src/types.ts | 15 +-- packages/types/CHANGELOG.json | 2 +- packages/types/src/index.ts | 66 +++++++---- 44 files changed, 486 insertions(+), 599 deletions(-) diff --git a/contracts/asset-proxy/test/authorizable.ts b/contracts/asset-proxy/test/authorizable.ts index 85e1201933..05d6b51b51 100644 --- a/contracts/asset-proxy/test/authorizable.ts +++ b/contracts/asset-proxy/test/authorizable.ts @@ -60,21 +60,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 +76,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 +84,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 +102,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 +113,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 +136,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 +148,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 +162,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..4e8cf7d13f 100644 --- a/contracts/erc1155/test/utils/erc1155_wrapper.ts +++ b/contracts/erc1155/test/utils/erc1155_wrapper.ts @@ -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..09bcd6050e 100644 --- a/contracts/utils/test/ownable.ts +++ b/contracts/utils/test/ownable.ts @@ -49,13 +49,9 @@ describe('Ownable', () => { }); it('should transfer ownership if the specified new owner is not the zero address', async () => { - expect( - ownable.transferOwnership.awaitTransactionSuccessAsync( - nonOwner, - { from: owner }, - { timeoutMs: constants.AWAIT_TRANSACTION_MINED_MS }, - ), - ).to.be.fulfilled(''); + expect(ownable.transferOwnership.awaitTransactionSuccessAsync(nonOwner, { from: owner })).to.be.fulfilled( + '', + ); 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 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/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/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; +}