github trufflesuite/ganache v7.0.3

latest releases: v7.9.2, ganache@7.9.2, v7.9.1...
2 years ago

 New Features   Fixes   Changelog   Known Issues   Future Plans 


We have three new RPC methods and two bug fixes in this release! Thank you to our issue reporter (@robmcl4) and contributors (@rmeissner and @anticlimactic) on this release, we really appreciate it!

We've changed 11 files across 5 merged pull requests, tallying 2874 additions and 24 deletions, since our last release.


New Features

feat: add methods to modify account (#2337)

This PR adds the evm_setAccountBalance, evm_setAccountCode, and evm_setAccountStorageAt RPC methods. Just as their names suggest, these methods let you set the balance, code, and storage (at a specified slot) for an account.

evm_setAccountBalance:

const balance = "0x3e8";
const [address] = await provider.request({ method: "eth_accounts", params: [] });
const result = await provider.send("evm_setAccountBalance", [address, balance] );
console.log(result);

evm_setAccountCode:

const data = "0xbaddad42";
const [address] = await provider.request({ method: "eth_accounts", params: [] });
const result = await provider.send("evm_setAccountCode", [address, data] );
console.log(result);

evm_setAccountStorageAt:

const slot = "0x0000000000000000000000000000000000000000000000000000000000000005";
const data = "0xbaddad42";
const [address] = await provider.request({ method: "eth_accounts", params: [] });
const result = await provider.send("evm_setAccountStorageAt", [address, slot, data] );
console.log(result);

Thanks again to @rmeissner for his awesome work on this PR!

back to top


Fixes

  • fix: serialize eth_subscribe log data (#2331)
  • fix: allow hex string for coinbase option in cli (#2405)

fix: serialize eth_subscribe log data (#2331)

A previous PR (#2331) fixed how we emit logs on eth_subscribe for EIP-1193 "message" event types, but unintentionally broke those messages for the legacy "data" event types. For those of you still using the legacy event types (cough cough Truffle), this fix should get those events working again.

back to fixes

fix: allow hex string for coinbase option in cli (#2405)

The miner.coinbase option allows you to specify the address to which mining rewards will go as a either a string representing the hex-encoded address or a number representing the index of the account returned by eth_accounts. However, a hex address sent with this option was incorrectly interpreted as a (verrrrrry large) number, causing a startup error. This fix correctly parses the argument so that the option can be used as expected.

back to fixes

back to top


Changelog

back to top


Known Issues

Top Priority:

  • Shutting down the Ganache Server v7.0.0 (#2185)
  • A rejected transaction should possibly be added back into the pool (#2176)
  • Ganache v7.0.0 - typings are broken (#2134)
  • Ganache's provider type is not compatible with Web3 (#2125)
  • ganache forking is not working as expected (#2122)
  • Node.js v12 outputs a µWS warning in the console (#2095)
  • evm_mine and miner_start don't respect --mode.instamine=eager (#2029)

Coming Soon™:

  • debug_traceTransaction may crash on Node.js v12 (#2106)
  • evm_setAccountNonce is race-conditiony (#1646)
  • Add eth_feeHistory RPC endpoint (#1470)
  • @ganache/filecoin@alpha doesn't work with ganache@alpha (#1150)
  • sort executable/pending transactions that have the same price by the time at which the transaction was submitted (#1104)
  • Add eth_createAccessList RPC method (#1056)
  • --db Option Requires Same Mnemonic and Network ID (#1030)
  • Launching ganache with fork is throwing revert errors when communicating with 3rd party contracts (#956)
  • Build a real pending block! (#772)
  • Add an upper limit to # of accounts that can be generated by ganache (#736)
  • Incorrect gas cost for SSTORE opcode when using fork feature (#625)
  • Cannot get state root with uncommitted checkpoints error when starting ganache forking with infura RPC endpoint (#618)
  • System Error when sending batch request with 1 not valid item (#402)

back to top


Future Plans

  • Reduce Bundle Size (#2096)
  • Add a way to create or modify arbitrary accounts and storage (#1889)
  • Switch to esbuild to make build times faster/reasonable (#1555)
  • Accept a genesis.json file (#1042)
  • Add flag for starting ganache in detached mode (#1001)
  • Add personal_ecRecover and personal_sign (#995)
  • Support for EIP 1898- Add blockHash to JSON-RPC methods which accept a default block parameter (#973)
  • Opt-in tracking (#945)
  • Mine txs in same block with provided sorting (#899)
  • Add eip-155 support (#880)
  • Add support for debug_accountAt RPC method as implemented by Turbo-Geth (#813)
  • Support IPC endpoint (#759)
  • Enhance the database to allow for better UX and determinism (#756)
  • Create Project and set Milestones for Ganache interactive docs (#680)
  • idea: add in warning to help switch over to new "pending tx" mode (#674)
  • evm_snapshot ids should be opaque (#655)
  • Add evm_setCode and evm_setStorageAt RPC methods (#649)
  • Add support for eth_call state-overrides (#554)
  • Upgrade custom rpc method evm_mine to return the new block (#536)
  • Implement eth_getProof RPC message (#382)
  • Implement a streaming trace capability (#381)
  • Allow mining to be completely disabled on startup (#248)
  • Add support for eth_getRawTransactionByHash (#135)
  • Log contract events (#45)

back to top

Open new issues (or join our team) to influence what we gets implemented and prioritized.


💖 The Truffle Team

Don't miss a new ganache release

NewReleases is sending notifications on new releases.