aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen-templates/partials/tx.handlebars
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-16 02:38:23 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-16 02:38:23 +0800
commit7a2b312d64994f96db75864e9a61bb319efdda3a (patch)
tree6d7b030abe774c619067ae52e0ef1cf7ebdd0963 /packages/abi-gen-templates/partials/tx.handlebars
parent64a78149aa4a35aa339fb9ef80faea613ebaeffd (diff)
parentf570f80674c22f69712c45e8e3c48e948b51f357 (diff)
downloaddexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar.gz
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar.bz2
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar.lz
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar.xz
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.tar.zst
dexon-sol-tools-7a2b312d64994f96db75864e9a61bb319efdda3a.zip
Merge branch 'development' into fix/asset-buyer/zero-amount-available-test
Diffstat (limited to 'packages/abi-gen-templates/partials/tx.handlebars')
-rw-r--r--packages/abi-gen-templates/partials/tx.handlebars13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/abi-gen-templates/partials/tx.handlebars b/packages/abi-gen-templates/partials/tx.handlebars
index b39156583..0f1027fae 100644
--- a/packages/abi-gen-templates/partials/tx.handlebars
+++ b/packages/abi-gen-templates/partials/tx.handlebars
@@ -9,10 +9,7 @@ public {{this.tsName}} = {
{{/this.payable}}
): Promise<string> {
const self = this as any as {{contractName}}Contract;
- const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
- [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]);
- const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
+ const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -33,9 +30,7 @@ public {{this.tsName}} = {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as {{contractName}}Contract;
- const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
- [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
+ const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -51,9 +46,7 @@ public {{this.tsName}} = {
{{> typed_params inputs=inputs}}
): string {
const self = this as any as {{contractName}}Contract;
- const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
- [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
+ const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]);
return abiEncodedTransactionData;
},
{{> callAsync}}