mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-04 11:24:22 +00:00
Merge pull request #422 from 3esmit/patch-1
Initialize web3 provider before deployAll
This commit is contained in:
commit
a967b304e3
@ -41,18 +41,27 @@ var Test = function(options) {
|
||||
});
|
||||
|
||||
this.web3 = new Web3();
|
||||
};
|
||||
|
||||
Test.prototype.deployAll = function(contractsConfig, cb) {
|
||||
var self = this;
|
||||
|
||||
|
||||
if (this.simOptions.node) {
|
||||
this.web3.setProvider(new this.web3.providers.HttpProvider(this.simOptions.node));
|
||||
} else {
|
||||
this.sim = getSimulator();
|
||||
this.web3.setProvider(this.sim.provider(this.simOptions));
|
||||
}
|
||||
};
|
||||
|
||||
Test.prototype.getAccounts = function(cb) {
|
||||
this.web3.eth.getAccounts(function(err, accounts) {
|
||||
if (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
cb(accounts);
|
||||
});
|
||||
};
|
||||
|
||||
Test.prototype.deployAll = function(contractsConfig, cb) {
|
||||
var self = this;
|
||||
|
||||
async.waterfall([
|
||||
function getConfig(callback) {
|
||||
let _versions_default = self.engine.config.contractsConfig.versions;
|
||||
|
Loading…
x
Reference in New Issue
Block a user