aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-27 09:04:19 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-28 04:07:06 +0800
commitef40cb96876cb77e897be441ceff1ca1521dc682 (patch)
tree8f9588a1e615c7c6289c0a433b9c17d82e10f57b /packages/contract_templates
parent758604fc1ab1fecf1303eef9dfb81192957e495e (diff)
downloaddexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar.gz
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar.bz2
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar.lz
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar.xz
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.tar.zst
dexon-sol-tools-ef40cb96876cb77e897be441ceff1ca1521dc682.zip
Add txData to async calls
Diffstat (limited to 'packages/contract_templates')
-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;