aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-19 14:01:48 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commite4551c8f6037302124cae4cda51b8f7624ade687 (patch)
tree7878caf2441e72bd5e8147db44bc0d3426407e34
parent2f1454e90e5fd7d85c4deb3a8c674043e8a14564 (diff)
downloaddexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.gz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.bz2
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.lz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.xz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.zst
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.zip
Works for almost all tests
-rw-r--r--contracts/protocol/test/asset_proxy/proxies.ts17
-rw-r--r--contracts/protocol/test/exchange/internal.ts1
-rw-r--r--contracts/protocol/test/utils/erc721_wrapper.ts4
-rw-r--r--packages/abi-gen-templates/partials/callAsync.handlebars8
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts214
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts109
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts130
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts64
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts56
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts64
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts87
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts330
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts60
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts12
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts10
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts70
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts86
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts74
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/method.ts6
19 files changed, 323 insertions, 1079 deletions
diff --git a/contracts/protocol/test/asset_proxy/proxies.ts b/contracts/protocol/test/asset_proxy/proxies.ts
index b2e7f5afb..650594c12 100644
--- a/contracts/protocol/test/asset_proxy/proxies.ts
+++ b/contracts/protocol/test/asset_proxy/proxies.ts
@@ -78,7 +78,6 @@ describe('Asset Transfer Proxies', () => {
await blockchainLifecycle.revertAsync();
});
before(async () => {
- console.log('1');
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, notAuthorized, authorized, fromAddress, toAddress] = _.slice(accounts, 0, 5));
@@ -94,7 +93,6 @@ describe('Asset Transfer Proxies', () => {
txDefaults,
);
- console.log('2');
// Configure ERC20Proxy
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
@@ -102,7 +100,6 @@ describe('Asset Transfer Proxies', () => {
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('3');
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
from: owner,
@@ -110,7 +107,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('4');
// Configure ERC721Proxy
await web3Wrapper.awaitTransactionSuccessAsync(
@@ -120,7 +116,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('5');
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
from: owner,
@@ -128,7 +123,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('6');
// Configure MultiAssetProxy
await web3Wrapper.awaitTransactionSuccessAsync(
@@ -138,7 +132,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('7');
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
from: owner,
@@ -146,7 +139,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('8');
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
from: owner,
@@ -154,7 +146,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('9');
// Deploy and configure ERC20 tokens
const numDummyErc20ToDeploy = 2;
@@ -181,14 +172,12 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
- console.log('10');
await erc20Wrapper.setBalancesAndAllowancesAsync();
await web3Wrapper.awaitTransactionSuccessAsync(
await noReturnErc20Token.setBalance.sendTransactionAsync(fromAddress, constants.INITIAL_ERC20_BALANCE),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('11');
await web3Wrapper.awaitTransactionSuccessAsync(
await noReturnErc20Token.approve.sendTransactionAsync(
erc20Proxy.address,
@@ -197,7 +186,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('12');
await web3Wrapper.awaitTransactionSuccessAsync(
await multipleReturnErc20Token.setBalance.sendTransactionAsync(
fromAddress,
@@ -205,7 +193,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('13');
await web3Wrapper.awaitTransactionSuccessAsync(
await multipleReturnErc20Token.approve.sendTransactionAsync(
erc20Proxy.address,
@@ -214,7 +201,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('14');
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
@@ -223,12 +209,9 @@ describe('Asset Transfer Proxies', () => {
provider,
txDefaults,
);
- console.log('15');
await erc721Wrapper.setBalancesAndAllowancesAsync();
- console.log('16');
const erc721Balances = await erc721Wrapper.getBalancesAsync();
- console.log('17');
erc721AFromTokenId = erc721Balances[fromAddress][erc721TokenA.address][0];
erc721BFromTokenId = erc721Balances[fromAddress][erc721TokenB.address][0];
});
diff --git a/contracts/protocol/test/exchange/internal.ts b/contracts/protocol/test/exchange/internal.ts
index 225890f02..ffe1f8a55 100644
--- a/contracts/protocol/test/exchange/internal.ts
+++ b/contracts/protocol/test/exchange/internal.ts
@@ -451,7 +451,6 @@ describe.skip('Exchange core internal functions', () => {
makerFeePaid: new BigNumber(0),
takerFeePaid: new BigNumber(0),
};
- //console.log(`EMPTY ORDER:\n ${JSON.stringify(emptySignedOrder, null ,4)}`);
await web3Wrapper.awaitTransactionSuccessAsync(
await testExchange.publicUpdateFilledState.sendTransactionAsync(
orderUtils.getOrderWithoutExchangeAddress(emptySignedOrder),
diff --git a/contracts/protocol/test/utils/erc721_wrapper.ts b/contracts/protocol/test/utils/erc721_wrapper.ts
index 138fccf6f..1f658ce86 100644
--- a/contracts/protocol/test/utils/erc721_wrapper.ts
+++ b/contracts/protocol/test/utils/erc721_wrapper.ts
@@ -102,15 +102,12 @@ export class ERC721Wrapper {
public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId);
- console.log('a');
- console.log(to, ':', tokenId, ':', tokenOwner);
await this._web3Wrapper.awaitTransactionSuccessAsync(
await tokenContract.approve.sendTransactionAsync(to, tokenId, {
from: tokenOwner,
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('b');
}
public async transferFromAsync(
tokenAddress: string,
@@ -147,7 +144,6 @@ export class ERC721Wrapper {
public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise<string> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const owner = await tokenContract.ownerOf.callAsync(tokenId);
- console.log(`OWNER OF = ${owner}`);
return owner;
}
public async isOwnerAsync(userAddress: string, tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
diff --git a/packages/abi-gen-templates/partials/callAsync.handlebars b/packages/abi-gen-templates/partials/callAsync.handlebars
index 5b56be52e..d4fb772c7 100644
--- a/packages/abi-gen-templates/partials/callAsync.handlebars
+++ b/packages/abi-gen-templates/partials/callAsync.handlebars
@@ -5,8 +5,6 @@ async callAsync(
): Promise<{{> return_type outputs=outputs}}> {
const self = this as any as {{contractName}}Contract;
const functionSignature = '{{this.functionSignature}}';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([{{> params inputs=inputs}}]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -19,10 +17,6 @@ async callAsync(
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- {{#if hasReturnValue}}
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}};
- {{else}}
- return;
- {{/if}}
},
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 762de0dcb..4257004fd 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
@@ -106,10 +106,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'owners(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -123,8 +119,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public removeOwner = {
@@ -187,10 +183,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'removeOwner(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([owner
]);
@@ -204,7 +196,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public revokeConfirmation = {
@@ -267,10 +260,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'revokeConfirmation(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -284,7 +273,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public isOwner = {
@@ -296,10 +286,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'isOwner(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -313,8 +299,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public confirmations = {
@@ -327,12 +313,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'confirmations(uint256,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0,
- index_1
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
- index_1
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0,
index_1
@@ -347,8 +327,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public executeRemoveAuthorizedAddressAtIndex = {
@@ -411,10 +391,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'executeRemoveAuthorizedAddressAtIndex(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -428,7 +404,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public secondsTimeLocked = {
@@ -439,8 +416,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'secondsTimeLocked()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -453,8 +428,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getTransactionCount = {
@@ -467,12 +442,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'getTransactionCount(bool,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [pending,
- executed
- ] = BaseContract._formatABIDataItemList(inputAbi, [pending,
- executed
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([pending,
executed
@@ -487,8 +456,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public registerAssetProxy = {
@@ -559,12 +528,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'registerAssetProxy(address,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [assetProxyContract,
- isRegistered
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxyContract,
- isRegistered
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([assetProxyContract,
isRegistered
@@ -579,7 +542,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public addOwner = {
@@ -642,10 +606,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'addOwner(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([owner
]);
@@ -659,7 +619,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public isConfirmed = {
@@ -671,10 +632,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'isConfirmed(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -688,8 +645,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public changeTimeLock = {
@@ -752,10 +709,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'changeTimeLock(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_secondsTimeLocked
- ] = BaseContract._formatABIDataItemList(inputAbi, [_secondsTimeLocked
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_secondsTimeLocked
]);
@@ -769,7 +722,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public isAssetProxyRegistered = {
@@ -781,10 +735,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'isAssetProxyRegistered(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -798,8 +748,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getConfirmationCount = {
@@ -811,10 +761,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'getConfirmationCount(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -828,8 +774,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transactions = {
@@ -841,10 +787,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'transactions(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -858,8 +800,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getOwners = {
@@ -870,8 +812,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'getOwners()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -884,8 +824,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getTransactionIds = {
@@ -900,16 +840,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'getTransactionIds(uint256,uint256,bool,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [from,
- to,
- pending,
- executed
- ] = BaseContract._formatABIDataItemList(inputAbi, [from,
- to,
- pending,
- executed
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([from,
to,
@@ -926,8 +856,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getConfirmations = {
@@ -939,10 +869,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'getConfirmations(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -956,8 +882,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transactionCount = {
@@ -968,8 +894,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'transactionCount()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -982,8 +906,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public changeRequirement = {
@@ -1046,10 +970,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'changeRequirement(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_required
- ] = BaseContract._formatABIDataItemList(inputAbi, [_required
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_required
]);
@@ -1063,7 +983,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public confirmTransaction = {
@@ -1126,10 +1047,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'confirmTransaction(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -1143,7 +1060,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public submitTransaction = {
@@ -1222,14 +1140,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'submitTransaction(address,uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [destination,
- value,
- data
- ] = BaseContract._formatABIDataItemList(inputAbi, [destination,
- value,
- data
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([destination,
value,
@@ -1245,8 +1155,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public confirmationTimes = {
@@ -1258,10 +1168,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'confirmationTimes(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -1275,8 +1181,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public MAX_OWNER_COUNT = {
@@ -1287,8 +1193,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'MAX_OWNER_COUNT()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1301,8 +1205,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public required = {
@@ -1313,8 +1217,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'required()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1327,8 +1229,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public replaceOwner = {
@@ -1399,12 +1301,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'replaceOwner(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [owner,
- newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [owner,
- newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([owner,
newOwner
@@ -1419,7 +1315,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public executeTransaction = {
@@ -1482,10 +1379,6 @@ export class AssetProxyOwnerContract extends BaseContract {
> {
const self = this as any as AssetProxyOwnerContract;
const functionSignature = 'executeTransaction(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [transactionId
- ] = BaseContract._formatABIDataItemList(inputAbi, [transactionId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([transactionId
]);
@@ -1499,7 +1392,8 @@ export class AssetProxyOwnerContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
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 b9d1a3371..6df58be56 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
@@ -44,8 +44,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'name()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -58,8 +56,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public approve = {
@@ -130,12 +128,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_spender,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_spender,
_value
@@ -150,8 +142,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public totalSupply = {
@@ -162,8 +154,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'totalSupply()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -176,8 +166,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferFrom = {
@@ -256,14 +246,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -279,8 +261,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public decimals = {
@@ -291,8 +273,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'decimals()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -305,8 +285,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -318,10 +298,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner
]);
@@ -335,8 +311,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public owner = {
@@ -347,8 +323,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -361,8 +335,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public symbol = {
@@ -373,8 +347,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'symbol()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -387,8 +359,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public mint = {
@@ -451,10 +423,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'mint(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_value
]);
@@ -468,7 +436,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public transfer = {
@@ -539,12 +508,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'transfer(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_to,
_value
@@ -559,8 +522,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public allowance = {
@@ -573,12 +536,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'allowance(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _spender
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _spender
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_spender
@@ -593,8 +550,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public setBalance = {
@@ -665,12 +622,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'setBalance(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_target,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_target,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_target,
_value
@@ -685,7 +636,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public transferOwnership = {
@@ -748,10 +700,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -765,7 +713,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public MAX_MINT_AMOUNT = {
@@ -776,8 +725,6 @@ export class DummyERC20TokenContract extends BaseContract {
> {
const self = this as any as DummyERC20TokenContract;
const functionSignature = 'MAX_MINT_AMOUNT()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -790,8 +737,8 @@ export class DummyERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts
index ee1ffe60d..7ac08e61f 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
@@ -52,8 +52,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'name()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -66,8 +64,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getApproved = {
@@ -79,10 +77,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'getApproved(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_tokenId
]);
@@ -96,8 +90,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public approve = {
@@ -168,12 +162,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_approved,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_approved,
_tokenId
@@ -188,7 +176,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public transferFrom = {
@@ -267,14 +256,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -290,7 +271,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public mint = {
@@ -361,12 +343,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'mint(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_to,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_to,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_to,
_tokenId
@@ -381,7 +357,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public safeTransferFrom1 = {
@@ -460,14 +437,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -483,7 +452,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public ownerOf = {
@@ -495,10 +465,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'ownerOf(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_tokenId
]);
@@ -512,8 +478,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -525,10 +491,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner
]);
@@ -542,8 +504,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public owner = {
@@ -554,8 +516,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -568,8 +528,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public symbol = {
@@ -580,8 +540,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'symbol()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -594,8 +552,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public burn = {
@@ -666,12 +624,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'burn(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_tokenId
@@ -686,7 +638,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public setApprovalForAll = {
@@ -757,12 +710,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'setApprovalForAll(address,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_operator,
- _approved
- ] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
- _approved
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_operator,
_approved
@@ -777,7 +724,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public safeTransferFrom2 = {
@@ -864,16 +812,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId,
- _data
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId,
- _data
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -890,7 +828,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public isApprovedForAll = {
@@ -903,12 +842,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'isApprovedForAll(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _operator
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _operator
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_operator
@@ -923,8 +856,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferOwnership = {
@@ -987,10 +920,6 @@ export class DummyERC721TokenContract extends BaseContract {
> {
const self = this as any as DummyERC721TokenContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -1004,7 +933,8 @@ export class DummyERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
index dc47a116e..8f910eaf9 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
@@ -94,10 +94,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'addAuthorizedAddress(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target
- ] = BaseContract._formatABIDataItemList(inputAbi, [target
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target
]);
@@ -111,7 +107,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public authorities = {
@@ -123,10 +120,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'authorities(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -140,8 +133,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public removeAuthorizedAddress = {
@@ -204,10 +197,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'removeAuthorizedAddress(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target
- ] = BaseContract._formatABIDataItemList(inputAbi, [target
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target
]);
@@ -221,7 +210,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public owner = {
@@ -232,8 +222,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -246,8 +234,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public removeAuthorizedAddressAtIndex = {
@@ -318,12 +306,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'removeAuthorizedAddressAtIndex(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target,
- index
- ] = BaseContract._formatABIDataItemList(inputAbi, [target,
- index
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target,
index
@@ -338,7 +320,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getProxyId = {
@@ -349,8 +332,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'getProxyId()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -363,8 +344,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public authorized = {
@@ -376,10 +357,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'authorized(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -393,8 +370,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getAuthorizedAddresses = {
@@ -405,8 +382,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'getAuthorizedAddresses()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -419,8 +394,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferOwnership = {
@@ -483,10 +458,6 @@ export class ERC20ProxyContract extends BaseContract {
> {
const self = this as any as ERC20ProxyContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -500,7 +471,8 @@ export class ERC20ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
index 83f5437df..b9aa50429 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
@@ -104,12 +104,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_spender,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_spender,
_value
@@ -124,8 +118,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public totalSupply = {
@@ -136,8 +130,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'totalSupply()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -150,8 +142,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferFrom = {
@@ -230,14 +222,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -253,8 +237,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -266,10 +250,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner
]);
@@ -283,8 +263,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transfer = {
@@ -355,12 +335,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'transfer(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_to,
_value
@@ -375,8 +349,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public allowance = {
@@ -389,12 +363,6 @@ export class ERC20TokenContract extends BaseContract {
> {
const self = this as any as ERC20TokenContract;
const functionSignature = 'allowance(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _spender
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _spender
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_spender
@@ -409,8 +377,8 @@ export class ERC20TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
index ae746d4d0..5ff11f35f 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
@@ -94,10 +94,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'addAuthorizedAddress(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target
- ] = BaseContract._formatABIDataItemList(inputAbi, [target
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target
]);
@@ -111,7 +107,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public authorities = {
@@ -123,10 +120,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'authorities(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -140,8 +133,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public removeAuthorizedAddress = {
@@ -204,10 +197,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'removeAuthorizedAddress(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target
- ] = BaseContract._formatABIDataItemList(inputAbi, [target
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target
]);
@@ -221,7 +210,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public owner = {
@@ -232,8 +222,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -246,8 +234,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public removeAuthorizedAddressAtIndex = {
@@ -318,12 +306,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'removeAuthorizedAddressAtIndex(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target,
- index
- ] = BaseContract._formatABIDataItemList(inputAbi, [target,
- index
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target,
index
@@ -338,7 +320,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getProxyId = {
@@ -349,8 +332,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'getProxyId()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -363,8 +344,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public authorized = {
@@ -376,10 +357,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'authorized(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -393,8 +370,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getAuthorizedAddresses = {
@@ -405,8 +382,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'getAuthorizedAddresses()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -419,8 +394,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferOwnership = {
@@ -483,10 +458,6 @@ export class ERC721ProxyContract extends BaseContract {
> {
const self = this as any as ERC721ProxyContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -500,7 +471,8 @@ export class ERC721ProxyContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
index 7205b7bf2..83951cef8 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
@@ -53,10 +53,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'getApproved(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_tokenId
]);
@@ -70,8 +66,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public approve = {
@@ -142,12 +138,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_approved,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_approved,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_approved,
_tokenId
@@ -162,7 +152,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public transferFrom = {
@@ -241,14 +232,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -264,7 +247,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public safeTransferFrom1 = {
@@ -343,14 +327,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -366,7 +342,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public ownerOf = {
@@ -378,10 +355,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'ownerOf(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [_tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_tokenId
]);
@@ -395,8 +368,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -408,10 +381,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner
]);
@@ -425,8 +394,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public setApprovalForAll = {
@@ -497,12 +466,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'setApprovalForAll(address,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_operator,
- _approved
- ] = BaseContract._formatABIDataItemList(inputAbi, [_operator,
- _approved
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_operator,
_approved
@@ -517,7 +480,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public safeTransferFrom2 = {
@@ -604,16 +568,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'safeTransferFrom(address,address,uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _tokenId,
- _data
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _tokenId,
- _data
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -630,7 +584,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public isApprovedForAll = {
@@ -643,12 +598,6 @@ export class ERC721TokenContract extends BaseContract {
> {
const self = this as any as ERC721TokenContract;
const functionSignature = 'isApprovedForAll(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _operator
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _operator
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_operator
@@ -663,8 +612,8 @@ export class ERC721TokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
index e7abd970c..f4cdeaaf9 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
@@ -79,10 +79,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'filled(bytes32)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -96,8 +92,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public batchFillOrders = {
@@ -176,14 +172,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
@@ -199,8 +187,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public cancelled = {
@@ -212,10 +200,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'cancelled(bytes32)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -229,8 +213,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public preSign = {
@@ -309,14 +293,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'preSign(bytes32,address,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([hash,
signerAddress,
@@ -332,7 +308,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public matchOrders = {
@@ -419,16 +396,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ] = BaseContract._formatABIDataItemList(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([leftOrder,
rightOrder,
@@ -445,8 +412,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public fillOrderNoThrow = {
@@ -525,14 +492,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
@@ -548,8 +507,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public assetProxies = {
@@ -561,10 +520,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'assetProxies(bytes4)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -578,8 +533,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public batchCancelOrders = {
@@ -642,10 +597,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders
]);
@@ -659,7 +610,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public batchFillOrKillOrders = {
@@ -738,14 +690,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
@@ -761,8 +705,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public cancelOrdersUpTo = {
@@ -825,10 +769,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'cancelOrdersUpTo(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [targetOrderEpoch
- ] = BaseContract._formatABIDataItemList(inputAbi, [targetOrderEpoch
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([targetOrderEpoch
]);
@@ -842,7 +782,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public batchFillOrdersNoThrow = {
@@ -921,14 +862,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
@@ -944,8 +877,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getAssetProxy = {
@@ -957,10 +890,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'getAssetProxy(bytes4)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [assetProxyId
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxyId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([assetProxyId
]);
@@ -974,8 +903,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transactions = {
@@ -987,10 +916,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'transactions(bytes32)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -1004,8 +929,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public fillOrKillOrder = {
@@ -1084,14 +1009,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
@@ -1107,8 +1024,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public setSignatureValidatorApproval = {
@@ -1179,12 +1096,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'setSignatureValidatorApproval(address,bool)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [validatorAddress,
- approval
- ] = BaseContract._formatABIDataItemList(inputAbi, [validatorAddress,
- approval
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([validatorAddress,
approval
@@ -1199,7 +1110,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public allowedValidators = {
@@ -1212,12 +1124,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'allowedValidators(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0,
- index_1
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
- index_1
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0,
index_1
@@ -1232,8 +1138,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public marketSellOrders = {
@@ -1312,14 +1218,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
@@ -1335,8 +1233,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getOrdersInfo = {
@@ -1348,10 +1246,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders
]);
@@ -1365,8 +1259,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public preSigned = {
@@ -1379,12 +1273,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'preSigned(bytes32,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0,
- index_1
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
- index_1
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0,
index_1
@@ -1399,8 +1287,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public owner = {
@@ -1411,8 +1299,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1425,8 +1311,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public isValidSignature = {
@@ -1440,14 +1326,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'isValidSignature(bytes32,address,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([hash,
signerAddress,
@@ -1463,8 +1341,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public marketBuyOrdersNoThrow = {
@@ -1543,14 +1421,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
@@ -1566,8 +1436,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public fillOrder = {
@@ -1646,14 +1516,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
@@ -1669,8 +1531,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public executeTransaction = {
@@ -1757,16 +1619,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'executeTransaction(uint256,address,bytes,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [salt,
- signerAddress,
- data,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([salt,
signerAddress,
@@ -1783,7 +1635,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public registerAssetProxy = {
@@ -1846,10 +1699,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'registerAssetProxy(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [assetProxy
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxy
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([assetProxy
]);
@@ -1863,7 +1712,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getOrderInfo = {
@@ -1875,10 +1725,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order
- ] = BaseContract._formatABIDataItemList(inputAbi, [order
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order
]);
@@ -1892,8 +1738,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public cancelOrder = {
@@ -1956,10 +1802,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order
- ] = BaseContract._formatABIDataItemList(inputAbi, [order
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order
]);
@@ -1973,7 +1815,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public orderEpoch = {
@@ -1986,12 +1829,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'orderEpoch(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0,
- index_1
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
- index_1
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0,
index_1
@@ -2006,8 +1843,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public ZRX_ASSET_DATA = {
@@ -2018,8 +1855,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'ZRX_ASSET_DATA()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -2032,8 +1867,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public marketSellOrdersNoThrow = {
@@ -2112,14 +1947,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
@@ -2135,8 +1962,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public EIP712_DOMAIN_HASH = {
@@ -2147,8 +1974,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'EIP712_DOMAIN_HASH()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -2161,8 +1986,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public marketBuyOrders = {
@@ -2241,14 +2066,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
@@ -2264,8 +2081,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public currentContextAddress = {
@@ -2276,8 +2093,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'currentContextAddress()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -2290,8 +2105,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferOwnership = {
@@ -2354,10 +2169,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -2371,7 +2182,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public VERSION = {
@@ -2382,8 +2194,6 @@ export class ExchangeContract extends BaseContract {
> {
const self = this as any as ExchangeContract;
const functionSignature = 'VERSION()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -2396,8 +2206,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
index c2f7835eb..d0797eccd 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
@@ -123,22 +123,6 @@ export class ForwarderContract extends BaseContract {
> {
const self = this as any as ForwarderContract;
const functionSignature = 'marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- makerAssetFillAmount,
- signatures,
- feeOrders,
- feeSignatures,
- feePercentage,
- feeRecipient
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures,
- feeOrders,
- feeSignatures,
- feePercentage,
- feeRecipient
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
@@ -158,8 +142,8 @@ export class ForwarderContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public withdrawAsset = {
@@ -230,12 +214,6 @@ export class ForwarderContract extends BaseContract {
> {
const self = this as any as ForwarderContract;
const functionSignature = 'withdrawAsset(bytes,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [assetData,
- amount
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetData,
- amount
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([assetData,
amount
@@ -250,7 +228,8 @@ export class ForwarderContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public owner = {
@@ -261,8 +240,6 @@ export class ForwarderContract extends BaseContract {
> {
const self = this as any as ForwarderContract;
const functionSignature = 'owner()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -275,8 +252,8 @@ export class ForwarderContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public marketSellOrdersWithEth = {
@@ -379,20 +356,6 @@ export class ForwarderContract extends BaseContract {
> {
const self = this as any as ForwarderContract;
const functionSignature = 'marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- signatures,
- feeOrders,
- feeSignatures,
- feePercentage,
- feeRecipient
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- signatures,
- feeOrders,
- feeSignatures,
- feePercentage,
- feeRecipient
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
signatures,
@@ -411,8 +374,8 @@ export class ForwarderContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public transferOwnership = {
@@ -475,10 +438,6 @@ export class ForwarderContract extends BaseContract {
> {
const self = this as any as ForwarderContract;
const functionSignature = 'transferOwnership(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([newOwner
]);
@@ -492,7 +451,8 @@ export class ForwarderContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public static async deployFrom0xArtifactAsync(
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 60423a0b9..cabaeeb98 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts
@@ -26,14 +26,6 @@ export class IValidatorContract extends BaseContract {
> {
const self = this as any as IValidatorContract;
const functionSignature = 'isValidSignature(bytes32,address,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([hash,
signerAddress,
@@ -49,8 +41,8 @@ export class IValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
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 5e70cedad..9d54ca0c1 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts
@@ -25,12 +25,6 @@ export class IWalletContract extends BaseContract {
> {
const self = this as any as IWalletContract;
const functionSignature = 'isValidSignature(bytes32,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [hash,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signature
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([hash,
signature
@@ -45,8 +39,8 @@ export class IWalletContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
index b1d0d3be5..5740af4ab 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
@@ -25,12 +25,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getOrderAndTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order,
- takerAddress
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAddress
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order,
takerAddress
@@ -45,8 +39,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getBalanceAndAllowance = {
@@ -59,12 +53,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getBalanceAndAllowance(address,bytes)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target,
- assetData
- ] = BaseContract._formatABIDataItemList(inputAbi, [target,
- assetData
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target,
assetData
@@ -79,8 +67,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getOrdersAndTradersInfo = {
@@ -93,12 +81,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getOrdersAndTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAddresses
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAddresses
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAddresses
@@ -113,8 +95,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getTradersInfo = {
@@ -127,12 +109,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getTradersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [orders,
- takerAddresses
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAddresses
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([orders,
takerAddresses
@@ -147,8 +123,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getERC721TokenOwner = {
@@ -161,12 +137,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getERC721TokenOwner(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [token,
- tokenId
- ] = BaseContract._formatABIDataItemList(inputAbi, [token,
- tokenId
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([token,
tokenId
@@ -181,8 +151,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public getBalancesAndAllowances = {
@@ -195,12 +165,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getBalancesAndAllowances(address,bytes[])';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [target,
- assetData
- ] = BaseContract._formatABIDataItemList(inputAbi, [target,
- assetData
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([target,
assetData
@@ -215,8 +179,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public getTraderInfo = {
@@ -229,12 +193,6 @@ export class OrderValidatorContract extends BaseContract {
> {
const self = this as any as OrderValidatorContract;
const functionSignature = 'getTraderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [order,
- takerAddress
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAddress
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([order,
takerAddress
@@ -249,8 +207,8 @@ export class OrderValidatorContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
index ed590d3ca..773ecb9d3 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
@@ -58,8 +58,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'name()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -72,8 +70,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public approve = {
@@ -144,12 +142,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [guy,
- wad
- ] = BaseContract._formatABIDataItemList(inputAbi, [guy,
- wad
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([guy,
wad
@@ -164,8 +156,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public totalSupply = {
@@ -176,8 +168,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'totalSupply()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -190,8 +180,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferFrom = {
@@ -270,14 +260,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [src,
- dst,
- wad
- ] = BaseContract._formatABIDataItemList(inputAbi, [src,
- dst,
- wad
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([src,
dst,
@@ -293,8 +275,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public withdraw = {
@@ -357,10 +339,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'withdraw(uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [wad
- ] = BaseContract._formatABIDataItemList(inputAbi, [wad
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([wad
]);
@@ -374,7 +352,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public decimals = {
@@ -385,8 +364,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'decimals()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -399,8 +376,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -412,10 +389,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0
]);
@@ -429,8 +402,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public symbol = {
@@ -441,8 +414,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'symbol()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -455,8 +426,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transfer = {
@@ -527,12 +498,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'transfer(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [dst,
- wad
- ] = BaseContract._formatABIDataItemList(inputAbi, [dst,
- wad
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([dst,
wad
@@ -547,8 +512,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public deposit = {
@@ -603,8 +568,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'deposit()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -617,7 +580,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- return;
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray;
},
};
public allowance = {
@@ -630,12 +594,6 @@ export class WETH9Contract extends BaseContract {
> {
const self = this as any as WETH9Contract;
const functionSignature = 'allowance(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [index_0,
- index_1
- ] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
- index_1
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([index_0,
index_1
@@ -650,8 +608,8 @@ export class WETH9Contract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
index 026a25165..afa80f368 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
@@ -44,8 +44,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'name()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -58,8 +56,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public approve = {
@@ -130,12 +128,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'approve(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_spender,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_spender,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_spender,
_value
@@ -150,8 +142,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public totalSupply = {
@@ -162,8 +154,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'totalSupply()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -176,8 +166,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transferFrom = {
@@ -256,14 +246,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'transferFrom(address,address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_from,
- _to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_from,
- _to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_from,
_to,
@@ -279,8 +261,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public decimals = {
@@ -291,8 +273,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'decimals()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -305,8 +285,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public balanceOf = {
@@ -318,10 +298,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'balanceOf(address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner
]);
@@ -335,8 +311,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public symbol = {
@@ -347,8 +323,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'symbol()';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -361,8 +335,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public transfer = {
@@ -433,12 +407,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'transfer(address,uint256)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_to,
- _value
- ] = BaseContract._formatABIDataItemList(inputAbi, [_to,
- _value
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_to,
_value
@@ -453,8 +421,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public allowance = {
@@ -467,12 +435,6 @@ export class ZRXTokenContract extends BaseContract {
> {
const self = this as any as ZRXTokenContract;
const functionSignature = 'allowance(address,address)';
- const inputAbi = self._lookupAbi(functionSignature).inputs;
- [_owner,
- _spender
- ] = BaseContract._formatABIDataItemList(inputAbi, [_owner,
- _spender
- ], BaseContract._bigNumberToString.bind(self));
const abiEncoder = self._lookupAbiEncoder(functionSignature);
const encodedData = abiEncoder.encode([_owner,
_spender
@@ -487,8 +449,8 @@ export class ZRXTokenContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true});
- return resultArray[0];
+ let resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult);
+ return resultArray[0];
},
};
public static async deployFrom0xArtifactAsync(
diff --git a/packages/utils/src/abi_encoder/evm_data_types/method.ts b/packages/utils/src/abi_encoder/evm_data_types/method.ts
index c777902e8..bae0fdb5d 100644
--- a/packages/utils/src/abi_encoder/evm_data_types/method.ts
+++ b/packages/utils/src/abi_encoder/evm_data_types/method.ts
@@ -51,6 +51,12 @@ export class MethodDataType extends AbstractSetDataType {
return returnValuesAsArray;
}
+ public decodeReturnValuesAsArrayOrNull(returndata: string, rules?: DecodingRules): any {
+ const returnValuesAsArray = this.decodeReturnValuesAsArray(returndata, rules);
+ const returnValue = _.isEmpty(returnValuesAsArray) ? [] : returnValuesAsArray;
+ return returnValue;
+ }
+
public getSignature(): string {
return this._methodSignature;
}