10000 GitHub - area/ganache-cli at rawTx
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

area/ganache-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SYNOPSIS

Limited RPC client intended for quick testing and development. Uses ethereumjs to simulate a full client and make development of Ethereum applications much faster.

INSTALL

npm install -g ethereumjs-testrpc

USAGE

$ testrpc

IMPLEMENTED METHODS

The RPC methods currently implemented are:

  • eth_accounts
  • eth_blockNumber
  • eth_call
  • eth_coinbase
  • eth_compileSolidity
  • eth_gasPrice
  • eth_getBalance
  • eth_getBlockByNumber
  • eth_getBlockByHash
  • eth_getCode (only supports block number “latest”)
  • eth_getCompilers
  • eth_getFilterChanges
  • eth_getStorageAt
  • eth_getTransactionByHash
  • eth_getTransactionCount
  • eth_getTransactionReceipt
  • eth_hashrate
  • eth_mining
  • eth_newBlockFilter
  • eth_sendTransaction
  • eth_sendRawTransaction
  • eth_uninstallFilter
  • web3_clientVersion

There’s also special non-standard methods that aren’t included within the original RPC specification:

  • evm_snapshot : Snapshot the state of the blockchain at its current place. Takes no parameters. Returns the integer id of the snapshot created.
  • evm_revert : Revert the state of the blockchain to a previous snapshot. Takes one parameter. Reverts to the snapshot id passed, or the latest snapshot.

These methods are really powerful within automated testing frameworks. Example uses for these methods are:

  • evm_snapshot : Run at the beginning of each test or test suite, snapshotting the state of the evm.
  • evm_revert : Run at the end of each test or test suite, reverting back to a known clean state.

TESTING

Run tests via:

$ npm test

LICENSE

MPL-2.0

About

Fast Ethereum RPC client for testing and development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.4%
  • Dockerfile 3.6%
0