pull/4827/head
yann300 6 months ago
parent 834752c0fa
commit c635bcff9e
  1. 2
      libs/remix-simulator/bin/ethsim
  2. 6
      libs/remix-simulator/src/provider.ts

@ -36,7 +36,7 @@ program
const server = new Server({ const server = new Server({
coinbase: option.coinbase, coinbase: option.coinbase,
rpc: option.rpc, rpc: option.rpc,
logDetails: option.details details: option.details
}) })
server.start(option.ip, option.port) server.start(option.ip, option.port)
}) })

@ -35,7 +35,7 @@ export type ProviderOptions = {
nodeUrl?: string, nodeUrl?: string,
blockNumber?: number | 'latest', blockNumber?: number | 'latest',
stateDb?: State, stateDb?: State,
logDetails?: boolean details?: boolean
blocks?: string[], blocks?: string[],
coinbase?: string coinbase?: string
rpc?: boolean rpc?: boolean
@ -91,12 +91,12 @@ export class Provider {
return return
} }
const method = this.methods[payload.method] const method = this.methods[payload.method]
if (this.options.logDetails) { if (this.options.details) {
info(payload) info(payload)
} }
if (method) { if (method) {
return method.call(method, payload, (err, result) => { return method.call(method, payload, (err, result) => {
if (this.options.logDetails) { if (this.options.details) {
info(err) info(err)
info(result) info(result)
} }

Loading…
Cancel
Save