diff options
Diffstat (limited to 'packages/abi-gen-templates/partials/tx.handlebars')
-rw-r--r-- | packages/abi-gen-templates/partials/tx.handlebars | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/abi-gen-templates/partials/tx.handlebars b/packages/abi-gen-templates/partials/tx.handlebars index 102316b44..0f1027fae 100644 --- a/packages/abi-gen-templates/partials/tx.handlebars +++ b/packages/abi-gen-templates/partials/tx.handlebars @@ -9,8 +9,7 @@ public {{this.tsName}} = { {{/this.payable}} ): Promise<string> { const self = this as any as {{contractName}}Contract; - const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}'); - const encodedData = abiEncoder.encode([{{> params inputs=inputs}}], {optimize: false}); + const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -31,8 +30,7 @@ public {{this.tsName}} = { txData: Partial<TxData> = {}, ): Promise<number> { const self = this as any as {{contractName}}Contract; - const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}'); - const encodedData = abiEncoder.encode([{{> params inputs=inputs}}]); + const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -48,8 +46,7 @@ public {{this.tsName}} = { {{> typed_params inputs=inputs}} ): string { const self = this as any as {{contractName}}Contract; - const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}'); - const abiEncodedTransactionData = abiEncoder.encode([{{> params inputs=inputs}}]); + const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]); return abiEncodedTransactionData; }, {{> callAsync}} |