move fuzer & gasEstimator to profiler module

This commit is contained in:
Iuri Matias 2018-07-07 16:30:47 +03:00
parent d40ae2f374
commit 20f782607c
4 changed files with 2 additions and 23 deletions

View File

@ -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});

View File

@ -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;

View File

@ -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) {

View File

@ -1,5 +1,5 @@
const asciiTable = require('ascii-table');
const GasEstimator = require('../gasEstimator');
const GasEstimator = require('./gasEstimator.js');
class Profiler {
constructor(embark) {