diff options
Diffstat (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts')
-rw-r--r-- | packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts | 56 |
1 files changed, 12 insertions, 44 deletions
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( |