make sure code exists when tracking it
This commit is contained in:
parent
4af36ce1e4
commit
3d672a0f63
|
@ -4,11 +4,11 @@
|
|||
"networkId": "",
|
||||
"contracts": {
|
||||
"5a52b16abb7dfccfc675550d0daba1683a3cf7e80fb5f0e199301f7dd57237fb": {
|
||||
"address": "0x94ba5dc1241a41a13a2c62e7a65c7c455dae5380",
|
||||
"address": "0x9b7d9cfed1dcc25ffa10cabf09ed69107634bcc7",
|
||||
"name": "SimpleStorage"
|
||||
},
|
||||
"708fa6b699f419627ab3c4c2d9c82f8f1a6fab03c122d0a9ee55d2d0d0ad1e4b": {
|
||||
"address": "0x57df57939ddf112aeaa4232d9e2ad20de40e9fb7",
|
||||
"address": "0x3134e7b4b2bf08f50b299ad35a2271c6f5ebed5b",
|
||||
"name": "token"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,12 +15,11 @@ var Deploy = function(options) {
|
|||
|
||||
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
||||
var self = this;
|
||||
var trackedChain = self.deployTracker.getContract(contract.className, contract.code, contract.args);
|
||||
var trackedContract = self.deployTracker.getContract(contract.className, contract.code, contract.args);
|
||||
|
||||
// TODO: need to also check getCode
|
||||
if (trackedChain) {
|
||||
self.logger.info(contract.className + " already deployed " + trackedChain.address);
|
||||
contract.deployedAddress = trackedChain.address;
|
||||
if (trackedContract && this.web3.eth.getCode(trackedContract.address) !== "0x") {
|
||||
self.logger.info(contract.className + " already deployed " + trackedContract.address);
|
||||
contract.deployedAddress = trackedContract.address;
|
||||
self.logger.contractsState(self.contractsManager.contractsState());
|
||||
callback();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue