aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen-templates/partials/callAsync.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/abi-gen-templates/partials/callAsync.handlebars')
-rw-r--r--packages/abi-gen-templates/partials/callAsync.handlebars8
1 files changed, 1 insertions, 7 deletions
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}}
},