diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-30 14:31:34 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-30 14:31:34 +0800 |
commit | de7470d936ae800adb45752bc36c8325845c8896 (patch) | |
tree | d644c402f1f10794dd15aba7e4a9223b46b1832e /packages/contract_templates/contract.handlebars | |
parent | b9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc (diff) | |
parent | ac14dd2b29b42ef4d2a46db9b70d4d30cf9bd40f (diff) | |
download | dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.gz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.bz2 dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.lz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.xz dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.zst dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.zip |
merge development
Diffstat (limited to 'packages/contract_templates/contract.handlebars')
-rw-r--r-- | packages/contract_templates/contract.handlebars | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 466893aa7..9ae39f44f 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -65,10 +65,12 @@ export class {{contractName}}Contract extends BaseContract { [{{> params inputs=ctor.inputs}}], BaseContract._bigNumberToString, ); - const txData = ethers.Contract.getDeployTransaction(bytecode, abi, {{> params inputs=ctor.inputs}}); + const iface = new ethers.Interface(abi); + const deployInfo = iface.deployFunction; + const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); const web3Wrapper = new Web3Wrapper(provider); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - txData, + {data: txData}, txDefaults, web3Wrapper.estimateGasAsync.bind(web3Wrapper), ); |