aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/callAsync.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract_templates/partials/callAsync.handlebars')
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index 88cc49ffa..93d347145 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -7,6 +7,7 @@ async callAsync(
{{^this.payable}}
txData: TxData = {},
{{/this.payable}}
+ defaultBlock?: Web3.BlockParam,
): Promise<{{> return_type outputs=outputs}}> {
const self = this as {{contractName}}Contract;
const inputAbi = _.find(this.abi, {name: '{{this.name}}'}).inputs;
@@ -19,7 +20,7 @@ async callAsync(
data: encodedData,
}
)
- const rawCallResult = await self._web3Wrapper.callAsync(callData);
+ const rawCallResult = await self._web3Wrapper.callAsync(callData, defaultBlock);
const outputAbi = _.find(this.abi, {name: '{{this.name}}'}).outputs as Web3.DataItem[];
const outputParamsTypes = _.map(outputAbi, 'type');
let resultArray = ethersContracts.Interface.decodeParams(outputParamsTypes, rawCallResult) as any;