aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen-templates/partials/tx.handlebars
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-23 09:23:02 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commitb06f8239e1fe75703f88d34c0d225701406e28c2 (patch)
tree9beb83b64b37fb6ad67d066f089b868a8ad25fcb /packages/abi-gen-templates/partials/tx.handlebars
parent7991de9ed0b5f1e8a38097d902eae09cc6b5cf11 (diff)
downloaddexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.gz
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.bz2
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.lz
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.xz
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.tar.zst
dexon-sol-tools-b06f8239e1fe75703f88d34c0d225701406e28c2.zip
Finished porting new abi encoder to contracts
Diffstat (limited to 'packages/abi-gen-templates/partials/tx.handlebars')
-rw-r--r--packages/abi-gen-templates/partials/tx.handlebars9
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}}