diff options
Diffstat (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts')
-rw-r--r-- | packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts | 72 |
1 files changed, 18 insertions, 54 deletions
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 dd8c2041e..026a25165 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -58,12 +58,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'name'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public approve = { @@ -154,12 +150,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'approve'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public totalSupply = { @@ -184,12 +176,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'totalSupply'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public transferFrom = { @@ -291,12 +279,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'transferFrom'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public decimals = { @@ -321,12 +305,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'decimals'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public balanceOf = { @@ -355,12 +335,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'balanceOf'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public symbol = { @@ -385,12 +361,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'symbol'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public transfer = { @@ -481,12 +453,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'transfer'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public allowance = { @@ -519,12 +487,8 @@ export class ZRXTokenContract extends BaseContract { ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - const decodingRules = {structsAsObjects: false}; - let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules); - const outputAbi = (_.find(self.abi, {name: 'allowance'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray[0]; + let resultArray = abiEncoder.decodeReturnValuesAsArray(rawCallResult, {structsAsObjects: true}); + return resultArray[0]; }, }; public static async deployFrom0xArtifactAsync( |