fix using deployedAddress instead of address

This commit is contained in:
Jonathan Rainville 2018-06-01 14:12:10 -04:00
parent aa04279a6f
commit 91b8033ab5
1 changed files with 9 additions and 9 deletions

View File

@ -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,7 +142,7 @@ 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);