aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/contract.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract_templates/contract.handlebars')
-rw-r--r--packages/contract_templates/contract.handlebars5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars
index a2fb29cfc..8d0f4e184 100644
--- a/packages/contract_templates/contract.handlebars
+++ b/packages/contract_templates/contract.handlebars
@@ -71,12 +71,15 @@ export class {{contractName}}Contract extends BaseContract {
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
);
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
+ console.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionMinedAsync(txHash);
+ console.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, defaults);
+ contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}];
return contractInstance;
}
constructor(abi: ContractAbi, address: string, provider: Provider, defaults?: Partial<TxData>) {
- super(abi, address, provider, defaults);
+ super("{{contractName}}", abi, address, provider, defaults);
classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count