mirror of https://github.com/embarklabs/embark.git
fix using deployedAddress instead of address
This commit is contained in:
parent
aa04279a6f
commit
91b8033ab5
|
@ -66,6 +66,8 @@ class Test {
|
|||
trackContracts: false
|
||||
});
|
||||
this.engine.startService("codeGenerator");
|
||||
}
|
||||
|
||||
init(callback) {
|
||||
const self = this;
|
||||
this.engine.contractsManager.build(() => {
|
||||
|
@ -73,7 +75,6 @@ class Test {
|
|||
callback();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onReady(callback) {
|
||||
if (this.ready) {
|
||||
|
@ -86,7 +87,8 @@ class Test {
|
|||
|
||||
config(options, callback) {
|
||||
if (!callback) {
|
||||
callback = function () {};
|
||||
callback = function () {
|
||||
};
|
||||
}
|
||||
if (!options.contracts) {
|
||||
throw new Error(__('No contracts specified in the options'));
|
||||
|
@ -122,9 +124,7 @@ class Test {
|
|||
self.engine.contractsManager.gasLimit = 6000000;
|
||||
self.engine.deployManager.fatalErrors = true;
|
||||
self.engine.deployManager.deployOnlyOnConfig = true;
|
||||
self.engine.events.request('deploy:contracts', (err) => {
|
||||
next(err);
|
||||
});
|
||||
self.engine.events.request('deploy:contracts', next);
|
||||
},
|
||||
function getAccounts(next) {
|
||||
self.web3.eth.getAccounts(function (err, accounts) {
|
||||
|
@ -142,18 +142,18 @@ class Test {
|
|||
if (!self.contracts[contractName]) {
|
||||
self.contracts[contractName] = {};
|
||||
}
|
||||
Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.address,
|
||||
Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.deployedAddress,
|
||||
{from: self.web3.eth.defaultAccount, gas: 6000000}));
|
||||
eachCb();
|
||||
}, next);
|
||||
}
|
||||
], function (err) {
|
||||
if (err) {
|
||||
if (err) {
|
||||
console.log(__('terminating due to error'));
|
||||
return callback(err);
|
||||
}
|
||||
}
|
||||
callback();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
require(module) {
|
||||
|
|
Loading…
Reference in New Issue