aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/callAsync.handlebars
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-04 08:39:55 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-04-10 08:22:58 +0800
commit61fc3346c2fe2adc33dfe84aa50780d61e10efdf (patch)
tree1f5ab2cddf7093db8f8fb419ef70da66a9997c7b /packages/contract_templates/partials/callAsync.handlebars
parent073bf738ddb271b6b4158798baf4cac3cb0608e9 (diff)
downloaddexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.gz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.bz2
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.lz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.xz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.zst
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.zip
Updated deployer to accept a list of contract directories as input. Contract directories are namespaced to a void clashes. Also in this commit is a fix for overloading contract functions.
Diffstat (limited to 'packages/contract_templates/partials/callAsync.handlebars')
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index 8de69203e..a6f4abdf2 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -5,9 +5,9 @@ async callAsync(
defaultBlock?: BlockParam,
): Promise<{{> return_type outputs=outputs}}> {
const self = this as any as {{contractName}}Contract;
- const inputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).inputs;
+ const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
- const encodedData = self._ethersInterface.functions.{{this.name}}(
+ const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
{{> params inputs=inputs}}
).data;
const callDataWithDefaults = await self._applyDefaultsToTxDataAsync(