aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/callAsync.handlebars
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-09-27 17:21:47 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-09-27 17:21:47 +0800
commit60971be35af8c64e70589c0ae3bdd5739c2ceb46 (patch)
treef219d944a94b4d5468c038633563072d48f95579 /packages/contract_templates/partials/callAsync.handlebars
parentcb99ebf78aad869e61ec2ca7c48bb25178274ec5 (diff)
downloaddexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar.gz
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar.bz2
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar.lz
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar.xz
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.tar.zst
dexon-sol-tools-60971be35af8c64e70589c0ae3bdd5739c2ceb46.zip
Throw revert reasons from contract wrappers
Diffstat (limited to 'packages/contract_templates/partials/callAsync.handlebars')
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index dd1b90212..ddbbe7508 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -19,6 +19,7 @@ async callAsync(
self._web3Wrapper.getContractDefaults(),
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
+ BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
let resultArray = ethersFunction.decode(rawCallResult);
const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));