From f854f3ee2bd74bbb61ed465099168b4d391f92c8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 10 May 2018 15:20:00 +0200 Subject: Remove unused deployer docs configs --- packages/contract_templates/contract.handlebars | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/contract_templates/contract.handlebars') 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, + txDefaults: Partial, {{> 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, + txDefaults: Partial, {{> 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) { - super("{{contractName}}", abi, address, provider, defaults); + constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { + super("{{contractName}}", abi, address, provider, txDefaults); classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); } } // tslint:disable:max-file-line-count -- cgit v1.2.3