mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
make sure code exists when tracking it
This commit is contained in:
parent
4af36ce1e4
commit
3d672a0f63
@ -4,11 +4,11 @@
|
|||||||
"networkId": "",
|
"networkId": "",
|
||||||
"contracts": {
|
"contracts": {
|
||||||
"5a52b16abb7dfccfc675550d0daba1683a3cf7e80fb5f0e199301f7dd57237fb": {
|
"5a52b16abb7dfccfc675550d0daba1683a3cf7e80fb5f0e199301f7dd57237fb": {
|
||||||
"address": "0x94ba5dc1241a41a13a2c62e7a65c7c455dae5380",
|
"address": "0x9b7d9cfed1dcc25ffa10cabf09ed69107634bcc7",
|
||||||
"name": "SimpleStorage"
|
"name": "SimpleStorage"
|
||||||
},
|
},
|
||||||
"708fa6b699f419627ab3c4c2d9c82f8f1a6fab03c122d0a9ee55d2d0d0ad1e4b": {
|
"708fa6b699f419627ab3c4c2d9c82f8f1a6fab03c122d0a9ee55d2d0d0ad1e4b": {
|
||||||
"address": "0x57df57939ddf112aeaa4232d9e2ad20de40e9fb7",
|
"address": "0x3134e7b4b2bf08f50b299ad35a2271c6f5ebed5b",
|
||||||
"name": "token"
|
"name": "token"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,11 @@ var Deploy = function(options) {
|
|||||||
|
|
||||||
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
||||||
var self = this;
|
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 (trackedContract && this.web3.eth.getCode(trackedContract.address) !== "0x") {
|
||||||
if (trackedChain) {
|
self.logger.info(contract.className + " already deployed " + trackedContract.address);
|
||||||
self.logger.info(contract.className + " already deployed " + trackedChain.address);
|
contract.deployedAddress = trackedContract.address;
|
||||||
contract.deployedAddress = trackedChain.address;
|
|
||||||
self.logger.contractsState(self.contractsManager.contractsState());
|
self.logger.contractsState(self.contractsManager.contractsState());
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user