An Ethereum simulator for aiding smart contract development.
Project description
## Ethereum Test RPC
Limited RPC client intended for use with automated testing. Uses [pythereum](https://github.com/ethereum/pyethereum) to run an Ethereum client behind the scenes without the need for mining or networking. The result is an Ethereum client that provides instant results and quick feedback during development.
### Install
Installing is easy, through pip:
` $ pip install eth-testrpc `
Or, to upgrade:
` pip install eth-testrpc --upgrade `
### Run
Installing through pip will make the testrpc command available on your machine:
` $ testrpc `
This will run testrpc on localhost:8545. You can pass through a different port (-p, –port) or domain (-d, –domain).
### Implemented methods
The RPC methods currently implemented are:
eth_coinbase
eth_accounts
eth_gasPrice
eth_blockNumber
eth_sendTransaction
eth_sendRawTransaction
eth_call
eth_getCompilers
eth_compileSolidity
eth_getCode (only supports block number “latest”)
eth_getBalance
eth_getTransactionCount
eth_getTransactionByHash
eth_getTransactionReceipt
eth_newBlockFilter
eth_newFilter
eth_getFilterChanges
eth_uninstallFilter
web3_sha3
web3_clientVersion
There’s also special non-standard methods that aren’t included within the original RPC specification:
evm_reset : No params, no return value.
evm_snapshot : No params. Returns the integer id of the snapshot created.
evm_revert : One optional param. Reverts to the snapshot id passed, or the latest snapshot.
When calling evm_reset, the testrpc will revert the state of its internal chain back to the genesis block and it will act as if no processing of transactions has taken place. Similarly, you can use evm_snapshot and evm_revert methods to save and restore the evm state as desired. Example use cases for these methods are as follows:
evm_reset : Run once at the beginning of your test suite.
evm_snapshot : Run at the beginning of each test, snapshotting the state of the evm.
evm_revert : Run at the end of each test, reverting back to a known clean state.
### Releasing a new version (for eth-testrpc developers)
So we don’t forget. :)
Install seed if you haven’t already:
` $ pip install seed `
Commit any changes you’ve made first. Then, to make the release:
` $ seed release `
Afterward, commit the changes it made for you:
` git push && git push --tags `
All done! No need to update a version number.
### License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eth-testrpc-0.1.20.tar.gz
.
File metadata
- Download URL: eth-testrpc-0.1.20.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c528ab78814a0e4f58e1ec5850b223f1a5976340867c40f7b795a71c7a179b51 |
|
MD5 | 0a1d8277bddc68b8c81acbeec71dfe29 |
|
BLAKE2b-256 | 451c4297b367e69e5dee100ee3f0fc46168cdd07a75e55d5bb8deaebd765400f |
File details
Details for the file eth_testrpc-0.1.20-py2-none-any.whl
.
File metadata
- Download URL: eth_testrpc-0.1.20-py2-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2b94b708f46ec67464f1ffd0e9ec1d7537295530822ccf6dcea06fc6c82f3e |
|
MD5 | c75ee6d35d7a2ff36c19e899b14c86a6 |
|
BLAKE2b-256 | de9a52d99ddd43c807e7d85ae4f717227010c5182d916a5223d92b0c70d26121 |