aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/tx.handlebars
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-28 17:05:36 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-04-02 17:34:29 +0800
commit4d9029bb0e3b215efdf165704c80d3bacef0e85a (patch)
tree8f699dcd0a7b5fba3c31c065a62d640407bba8c3 /packages/contract_templates/partials/tx.handlebars
parentbc49dde4d5d24b9a8b01459bde061f9b23fb5898 (diff)
downloaddexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.gz
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.bz2
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.lz
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.xz
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.tar.zst
dexon-sol-tools-4d9029bb0e3b215efdf165704c80d3bacef0e85a.zip
Add metacoin example project
Diffstat (limited to 'packages/contract_templates/partials/tx.handlebars')
-rw-r--r--packages/contract_templates/partials/tx.handlebars12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract_templates/partials/tx.handlebars
index f76de3a70..41ba6d3f7 100644
--- a/packages/contract_templates/partials/tx.handlebars
+++ b/packages/contract_templates/partials/tx.handlebars
@@ -8,9 +8,9 @@ public {{this.name}} = {
txData: Partial<TxData> = {},
{{/this.payable}}
): Promise<string> {
- const self = this as {{contractName}}Contract;
+ const self = this as any as {{contractName}}Contract;
const inputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).inputs;
- [{{> params inputs=inputs}}] = BaseContract._transformABIData(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
+ [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
const encodedData = self._ethersInterface.functions.{{this.name}}(
{{> params inputs=inputs}}
).data
@@ -31,9 +31,9 @@ public {{this.name}} = {
{{> typed_params inputs=inputs}}
txData: Partial<TxData> = {},
): Promise<number> {
- const self = this as {{contractName}}Contract;
+ const self = this as any as {{contractName}}Contract;
const inputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).inputs;
- [{{> params inputs=inputs}}] = BaseContract._transformABIData(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(this));
+ [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(this));
const encodedData = self._ethersInterface.functions.{{this.name}}(
{{> params inputs=inputs}}
).data
@@ -49,9 +49,9 @@ public {{this.name}} = {
getABIEncodedTransactionData(
{{> typed_params inputs=inputs}}
): string {
- const self = this as {{contractName}}Contract;
+ const self = this as any as {{contractName}}Contract;
const inputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).inputs;
- [{{> params inputs=inputs}}] = BaseContract._transformABIData(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
+ [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
const abiEncodedTransactionData = self._ethersInterface.functions.{{this.name}}(
{{> params inputs=inputs}}
).data