move fuzer & gasEstimator to profiler module
This commit is contained in:
parent
2424408b18
commit
d5278b41de
|
@ -189,7 +189,6 @@ class Engine {
|
|||
this.registerModule('solidity', {ipc: this.ipc, useDashboard: this.useDashboard});
|
||||
this.registerModule('vyper');
|
||||
this.registerModule('profiler');
|
||||
this.registerModule('fuzzer');
|
||||
this.registerModule('deploytracker');
|
||||
this.registerModule('specialconfigs');
|
||||
this.registerModule('console_listener', {ipc: this.ipc});
|
||||
|
|
|
@ -7,8 +7,6 @@ class ContractFuzzer {
|
|||
this.embark = embark;
|
||||
this.logger = embark.logger;
|
||||
this.events = embark.events;
|
||||
|
||||
this.registerConsoleCommand();
|
||||
}
|
||||
|
||||
// main function to call, takes in iteration number and a contract and returns a map object
|
||||
|
@ -90,24 +88,6 @@ class ContractFuzzer {
|
|||
generateRandomAddress() {
|
||||
return utils.randomHex(20);
|
||||
}
|
||||
|
||||
registerConsoleCommand() {
|
||||
const self = this;
|
||||
self.embark.registerConsoleCommand((cmd, _options) => {
|
||||
let splitCmd = cmd.split(' ');
|
||||
let cmdName = splitCmd[0];
|
||||
let contractName = splitCmd[1];
|
||||
let iterations = splitCmd[2] === undefined ? 1 : splitCmd[2];
|
||||
if (cmdName === 'fuzz') {
|
||||
self.events.request('contracts:contract', contractName, (contract) => {
|
||||
self.logger.info("-- fuzzed vals for " + contractName);
|
||||
this.generateFuzz(iterations, contract);
|
||||
});
|
||||
return "";
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContractFuzzer;
|
|
@ -1,7 +1,7 @@
|
|||
/*global web3*/
|
||||
const async = require('async');
|
||||
const _ = require('underscore');
|
||||
const ContractFuzzer = require('../fuzzer');
|
||||
const ContractFuzzer = require('./fuzzer.js');
|
||||
|
||||
class GasEstimator {
|
||||
constructor(embark) {
|
|
@ -1,5 +1,5 @@
|
|||
const asciiTable = require('ascii-table');
|
||||
const GasEstimator = require('../gasEstimator');
|
||||
const GasEstimator = require('./gasEstimator.js');
|
||||
|
||||
class Profiler {
|
||||
constructor(embark) {
|
||||
|
|
Loading…
Reference in New Issue