fund account only in dev
This commit is contained in:
parent
a1e3c741a0
commit
09cdab7e2b
|
@ -12,6 +12,7 @@ class Provider {
|
||||||
this.accountsConfig = options.accountsConfig;
|
this.accountsConfig = options.accountsConfig;
|
||||||
this.web3Endpoint = options.web3Endpoint;
|
this.web3Endpoint = options.web3Endpoint;
|
||||||
this.logger = options.logger;
|
this.logger = options.logger;
|
||||||
|
this.isDev = options.isDev;
|
||||||
this.engine = new ProviderEngine();
|
this.engine = new ProviderEngine();
|
||||||
this.asyncMethods = {};
|
this.asyncMethods = {};
|
||||||
}
|
}
|
||||||
|
@ -38,6 +39,9 @@ class Provider {
|
||||||
if (!self.accounts.length) {
|
if (!self.accounts.length) {
|
||||||
return next(NO_ACCOUNTS);
|
return next(NO_ACCOUNTS);
|
||||||
}
|
}
|
||||||
|
if (!self.isDev) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
async.each(self.accounts, (account, eachCb) => {
|
async.each(self.accounts, (account, eachCb) => {
|
||||||
fundAccount(self.web3, account.address, eachCb);
|
fundAccount(self.web3, account.address, eachCb);
|
||||||
}, next);
|
}, next);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Engine {
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (this.interceptLogs || this.interceptLogs === undefined) {
|
if (this.interceptLogs || this.interceptLogs === undefined) {
|
||||||
this.doInterceptLogs();
|
// this.doInterceptLogs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,6 +284,7 @@ class Engine {
|
||||||
web3: this.web3,
|
web3: this.web3,
|
||||||
accountsConfig: this.config.contractsConfig.deployment.accounts,
|
accountsConfig: this.config.contractsConfig.deployment.accounts,
|
||||||
logger: this.logger,
|
logger: this.logger,
|
||||||
|
isDev: this.isDev,
|
||||||
web3Endpoint
|
web3Endpoint
|
||||||
};
|
};
|
||||||
provider = new Provider(providerOptions);
|
provider = new Provider(providerOptions);
|
||||||
|
|
Loading…
Reference in New Issue