mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-26 21:51:06 +00:00
feat(@embark/deployment): output transaction hash during deployment asap
This commit is contained in:
parent
3099894ed7
commit
0bb7d6352c
@ -643,10 +643,10 @@ class BlockchainConnector {
|
||||
}).catch(cb);
|
||||
}
|
||||
|
||||
deployContractFromObject(deployContractObject, params, cb) {
|
||||
deployContractFromObject(deployContractObject, params, cb, hashCb) {
|
||||
embarkJsUtils.secureSend(this.web3, deployContractObject, {
|
||||
from: params.from, gas: params.gas, gasPrice: params.gasPrice
|
||||
}, true, cb);
|
||||
}, true, cb, hashCb);
|
||||
}
|
||||
|
||||
determineDefaultAccount(cb) {
|
||||
|
@ -282,7 +282,6 @@ class ContractDeployer {
|
||||
},
|
||||
function deployTheContract(next) {
|
||||
let estimatedCost = contract.gas * contract.gasPrice;
|
||||
self.logFunction(contract)(__("deploying") + " " + contract.className.bold.cyan + " " + __("with").green + " " + contract.gas + " " + __("gas at the price of").green + " " + contract.gasPrice + " " + __("Wei, estimated cost:").green + " " + estimatedCost + " Wei".green);
|
||||
|
||||
self.blockchain.deployContractFromObject(deployObject, {
|
||||
from: contract.deploymentAccount,
|
||||
@ -311,6 +310,8 @@ class ContractDeployer {
|
||||
return next(null, receipt);
|
||||
});
|
||||
});
|
||||
}, hash => {
|
||||
self.logFunction(contract)(__("deploying") + " " + contract.className.bold.cyan + " " + __("with").green + " " + contract.gas + " " + __("gas at the price of").green + " " + contract.gasPrice + " " + __("Wei, estimated cost:").green + " " + estimatedCost + " Wei".green + " (txHash: " + hash.bold.cyan + ")");
|
||||
});
|
||||
}
|
||||
], callback);
|
||||
|
Loading…
x
Reference in New Issue
Block a user