aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract_templates/partials')
-rw-r--r--packages/contract_templates/partials/tx.handlebars4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract_templates/partials/tx.handlebars
index 347a482d6..d517a9f7f 100644
--- a/packages/contract_templates/partials/tx.handlebars
+++ b/packages/contract_templates/partials/tx.handlebars
@@ -32,6 +32,8 @@ public {{this.name}} = {
txData: TxData = {},
): Promise<number> {
const self = this as {{contractName}}Contract;
+ const inputAbi = _.find(this.abi, {name: '{{this.name}}'}).inputs;
+ [{{> params inputs=inputs}}] = BaseContract._transformABIData(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(this));
const encodedData = this._ethersInterface.functions.{{this.name}}(
{{> params inputs=inputs}}
).data
@@ -49,6 +51,8 @@ public {{this.name}} = {
txData: TxData = {},
): string {
const self = this as {{contractName}}Contract;
+ const inputAbi = _.find(this.abi, {name: '{{this.name}}'}).inputs;
+ [{{> params inputs=inputs}}] = BaseContract._transformABIData(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(this));
const abiEncodedTransactionData = this._ethersInterface.functions.{{this.name}}(
{{> params inputs=inputs}}
).data