aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/contract.handlebars
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-09-27 18:47:00 +0800
committerGitHub <noreply@github.com>2018-09-27 18:47:00 +0800
commit9160cd4983d20a00ce7852d78c0a345720efd8e1 (patch)
tree39b0a21f8be47f978431d68457c8a8e9c3874e6f /packages/contract_templates/contract.handlebars
parent70e412e3758616f1923b76e62b06a008c734e262 (diff)
parent63d79faa85df1cc090837fc49befb5076b50203b (diff)
downloaddexon-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/contract.handlebars')
-rw-r--r--packages/contract_templates/contract.handlebars6
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),
);