diff options
Diffstat (limited to 'packages/abi-gen-templates/partials/callAsync.handlebars')
-rw-r--r-- | packages/abi-gen-templates/partials/callAsync.handlebars | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/abi-gen-templates/partials/callAsync.handlebars b/packages/abi-gen-templates/partials/callAsync.handlebars index 37b50307c..ab9f2c21c 100644 --- a/packages/abi-gen-templates/partials/callAsync.handlebars +++ b/packages/abi-gen-templates/partials/callAsync.handlebars @@ -16,6 +16,8 @@ async callAsync( const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}'); - const resultArray = abiEncoder.decodeReturnValuesAsArrayOrNull(rawCallResult); - return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}}; + // tslint:disable boolean-naming + const result = abiEncoder.strictDecodeReturnValue<{{> return_type outputs=outputs}}>(rawCallResult); + // tslint:enable boolean-naming + return result; }, |