iurimatias / EtherSim

EtherSim is an Ethereum RPC simulator for testing and development purposes
MIT License
59 stars 21 forks source link

Various fixes #7

Closed tcoulter closed 8 years ago

tcoulter commented 8 years ago

This PR includes various fixes from both me and @ckeenan. They include:

  1. Outputting the gas costs in the log when a contract is created
  2. Returning errors when there are vm exceptions, so you know exactly which transaction or call caused the issue
  3. Fixing a bug where block.timestamp should have been in seconds vs milliseconds (@ckeenan)
  4. Setting block headers in createBlock(), otherwise block.timestamp isn't available to ethereumjs-vm (@ckeenan)
  5. Set tx_params.from to this.coinbase if null for eth_call's (@ckeenan)
  6. Inject defaultBlock "latest" into eth_call params if it's not already there. This was missing during batched eth_calls (and needed to be fixed at the jayson level). Now batches work as expected. (@ckeenan)

See https://github.com/tcoulter/EtherSim/pull/1 for discussion of @ckeenan's work.