JSON-RPC
JSON-RPC Requests
All clients implement an EIP-1193 compatable tevm.request()
method for handling JSON-RPC requests.
Below are all procedures implemented or planned to be implemented. 🚧 means the procedure is still under construction
Tevm methods
Tevm methods are feature-rich methods that provide a high level of control over the VM.
tevm_call
- Similar to eth call but with additional properties to control the VM executiontevm_getAccount
- gets account information such as balances contract information nonces and state roots.tevm_setAccount
- directly modifies the state of an accounttevm_dumpState
- Returns the state of the VMtevm_loadState
- Initializes the state of the VM
Eth methods
Tevm plans on implementing most of the ethereum JSON-RPC spec
- `eth_accounts’ - Uses the same test accounts ganache anvil and hardhat uses. Mnemonic: test test test test test test test test test test test junk
- `eth_call’
- `eth_chainId’
- `eth_estimateGas’
- `eth_gasPrice’
- `eth_getBalance’
- `eth_getCode’
- `eth_getStorageAt’
- `eth_getTransactionReceipt’
- `eth_sign’
- `eth_signTransaction’
- `eth_getLogs’
- `eth_coinbase’
- `eth_hashrate’
- `eth_protocolVersion’
- `eth_sendTransaction’
- `eth_sendRawTransaction’
- `eth_uninstallFilter’
- `eth_getBlockByNumber’
- `eth_getFilterChanges’
- `eth_newFilter’
- `eth_getFilterLogs’
- `eth_getBlockByHash’
- `eth_newBlockFilter’
- `eth_getTransactionCount’
- `eth_getTransactionByHash’
- `eth_newPendingTransactionFilter’
- `eth_getBlockTransactionCountByHash’
- `eth_getBlockTransactionCountByNumber’
- `eth_getTransactionByBlockHashAndIndex’
- `eth_getTransactionByBlockNumberAndIndex’
Debug methods
Anvil/Hardhat methods
Anvil/hardhat methods are provided for compatability
- `anvil_setCode’
- `anvil_setNonce’
- `anvil_setBalance’
- `anvil_setChainId’
- `anvil_mine’
- `anvil_getAutomine’ (currently always false)
- `anvil_setStorageAt’
- `anvil_reset’
- `anvil_dumpState’
- `anvil_loadState’
- `anvil_dropTransaction’ (only supports dropping unmined tx atm)
- `anvil_impersonateAccount’ (Can only impersonate one account at a time atm0
- `anvil_stopImpersonatingAccount’
Wallet methods
Tevm does not support any wallet apis at this time as it operates more like an RPC provider than a wallet node.