mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-09 13:36:14 +00:00
set gas limit through event
This commit is contained in:
parent
49791c916a
commit
3812518268
@ -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…
x
Reference in New Issue
Block a user