remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/libs/remix-simulator/bin/ethsim

41 lines
1.0 KiB

7 years ago
#!/usr/bin/env node
const program = require('commander')
const version = require('../package.json').version
program
.command('version')
.description("outputs version number")
.action(() => {
console.log(version)
process.exit(0)
})
program
.command('help')
.description("outputs usage information")
.action(() => {
program.help()
process.exit(0)
})
program
.command('start')
.option('-p, --port [port]', 'specify port', 8545)
.option('-b, --ip [host]', 'specify host', '127.0.0.1')
.option('-c, --coinbase [coinbase]', 'specify coinbase', '0x0000000000000000000000000000000000000000')
.option('--rpc', 'run rpc server only', true)
.option('--details', 'display payloads for every requests and their responses', false)
.action(() => {
const Server = require('../src/server')
const server = new Server({
coinbase: program.coinbase,
rpc: program.rpc,
logDetails: program.details
})
server.start(program.host, program.port)
})
program.parse(process.argv)
7 years ago