mirror of https://github.com/embarklabs/embark.git
set gas limit through event
This commit is contained in:
parent
89a0729002
commit
499a3b5609
|
@ -10,7 +10,6 @@ class ContractDeployer {
|
||||||
this.logger = options.logger;
|
this.logger = options.logger;
|
||||||
this.events = options.events;
|
this.events = options.events;
|
||||||
this.plugins = options.plugins;
|
this.plugins = options.plugins;
|
||||||
this.gasLimit = options.gasLimit;
|
|
||||||
|
|
||||||
self.events.setCommandHandler('deploy:contract', (contract, cb) => {
|
self.events.setCommandHandler('deploy:contract', (contract, cb) => {
|
||||||
self.checkAndDeployContract(contract, null, cb);
|
self.checkAndDeployContract(contract, null, cb);
|
||||||
|
|
|
@ -18,6 +18,10 @@ class DeployManager {
|
||||||
this.deployOnlyOnConfig = false;
|
this.deployOnlyOnConfig = false;
|
||||||
this.onlyCompile = options.onlyCompile !== undefined ? options.onlyCompile : false;
|
this.onlyCompile = options.onlyCompile !== undefined ? options.onlyCompile : false;
|
||||||
|
|
||||||
|
this.events.setCommandHandler('deploy:setGasLimit', (gasLimit) => {
|
||||||
|
self.gasLimit = gasLimit;
|
||||||
|
});
|
||||||
|
|
||||||
this.events.setCommandHandler('deploy:contracts', (cb) => {
|
this.events.setCommandHandler('deploy:contracts', (cb) => {
|
||||||
self.deployContracts(cb);
|
self.deployContracts(cb);
|
||||||
});
|
});
|
||||||
|
|
|
@ -119,8 +119,7 @@ class Test {
|
||||||
trackContracts: false
|
trackContracts: false
|
||||||
//ipcRole: 'client' // disabled for now due to issues with ipc file
|
//ipcRole: 'client' // disabled for now due to issues with ipc file
|
||||||
});
|
});
|
||||||
this.engine.deployManager.gasLimit = 6000000;
|
this.events.request('deploy:setGasLimit', 6000000);
|
||||||
this.engine.contractsManager.gasLimit = 6000000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init(callback) {
|
init(callback) {
|
||||||
|
|
Loading…
Reference in New Issue