diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-10 21:20:00 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-10 23:47:38 +0800 |
commit | f854f3ee2bd74bbb61ed465099168b4d391f92c8 (patch) | |
tree | d0d126e9041198dfb8d27a48a251167bf4fd4e44 /packages/contract_templates/contract.handlebars | |
parent | 1055ca6d4435c0a9b325586e4c7af3458eff273a (diff) | |
download | dexon-0x-contracts-f854f3ee2bd74bbb61ed465099168b4d391f92c8.tar.gz dexon-0x-contracts-f854f3ee2bd74bbb61ed465099168b4d391f92c8.tar.zst dexon-0x-contracts-f854f3ee2bd74bbb61ed465099168b4d391f92c8.zip |
Remove unused deployer docs configs
Diffstat (limited to 'packages/contract_templates/contract.handlebars')
-rw-r--r-- | packages/contract_templates/contract.handlebars | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 1fa9508f5..ed11ac8d2 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -43,7 +43,7 @@ export class {{contractName}}Contract extends BaseContract { public static async deployFrom0xArtifactAsync( artifact: ContractArtifact, provider: Provider, - defaults: Partial<TxData>, + txDefaults: Partial<TxData>, {{> typed_params inputs=ctor.inputs}} ): Promise<{{contractName}}Contract> { if (_.isUndefined(artifact.compilerOutput)) { @@ -51,13 +51,13 @@ export class {{contractName}}Contract extends BaseContract { } const bytecode = artifact.compilerOutput.evm.bytecode.object; const abi = artifact.compilerOutput.abi; - return {{contractName}}Contract.deployAsync(bytecode, abi, provider, defaults, {{> params inputs=ctor.inputs}}); + return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); } public static async deployAsync( bytecode: string, abi: ContractAbi, provider: Provider, - defaults: Partial<TxData>, + txDefaults: Partial<TxData>, {{> typed_params inputs=ctor.inputs}} ): Promise<{{contractName}}Contract> { const constructorAbi = BaseContract._lookupConstructorAbi(abi); @@ -70,19 +70,19 @@ export class {{contractName}}Contract extends BaseContract { const web3Wrapper = new Web3Wrapper(provider); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( txData, - defaults, + txDefaults, web3Wrapper.estimateGasAsync.bind(web3Wrapper), ); const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); logUtils.log(`transactionHash: ${txHash}`); const txReceipt = await web3Wrapper.awaitTransactionMinedAsync(txHash); logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, defaults); + const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; return contractInstance; } - constructor(abi: ContractAbi, address: string, provider: Provider, defaults?: Partial<TxData>) { - super("{{contractName}}", abi, address, provider, defaults); + constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) { + super("{{contractName}}", abi, address, provider, txDefaults); classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); } } // tslint:disable:max-file-line-count |