diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-09-27 18:47:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 18:47:00 +0800 |
commit | 9160cd4983d20a00ce7852d78c0a345720efd8e1 (patch) | |
tree | 39b0a21f8be47f978431d68457c8a8e9c3874e6f /packages/contract_templates/partials/tx.handlebars | |
parent | 70e412e3758616f1923b76e62b06a008c734e262 (diff) | |
parent | 63d79faa85df1cc090837fc49befb5076b50203b (diff) | |
download | dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar.gz dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar.bz2 dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar.lz dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar.xz dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.tar.zst dexon-sol-tools-9160cd4983d20a00ce7852d78c0a345720efd8e1.zip |
Merge pull request #1069 from 0xProject/feature/ts-ethers
Upgrade to TS version of ethers
Diffstat (limited to 'packages/contract_templates/partials/tx.handlebars')
-rw-r--r-- | packages/contract_templates/partials/tx.handlebars | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract_templates/partials/tx.handlebars index 4340d662e..b39156583 100644 --- a/packages/contract_templates/partials/tx.handlebars +++ b/packages/contract_templates/partials/tx.handlebars @@ -12,9 +12,7 @@ public {{this.tsName}} = { 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}}( - {{> params inputs=inputs}} - ).data; + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -37,9 +35,7 @@ public {{this.tsName}} = { 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}}( - {{> params inputs=inputs}} - ).data; + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( { to: self.address, @@ -57,9 +53,7 @@ public {{this.tsName}} = { 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}}( - {{> params inputs=inputs}} - ).data; + const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); return abiEncodedTransactionData; }, {{> callAsync}} |