JSON-RPC API
The JSON-RPC is a stateless, lightweight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic because the concepts can be used within the same process, over sockets, HTTP, or in various message-passing environments. It uses JSON (RFC 4627) as data format.
This page deals with the JSON-RPC API used by EVM execution clients.
JSON-RPC Methods According to Ethereum Client API
Method | Description | Status |
---|---|---|
eth_accounts | Returns a list of addresses owned by client | ✅ |
eth_blockNumber | Returns the number of most recent block. | ✅ |
eth_call | Executes a new message call immediately without creating a transaction on the blockchain | ✅ |
eth_chainId | Returns the chain ID of the current network | ✅ |
eth_coinbase | Returns the client Coinbase address (Response is always the Common Address of the IOTA EVM) | ✅ |
eth_estimateGas | Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. | ✅ |
eth_gasPrice | Returns the current price per gas in wei | ✅ |
eth_getBalance | Returns the balance of the account of given address | ✅ |
eth_getBlockByHash | Returns information about a block by hash | ✅ |
eth_getBlockByNumber | Returns information about a block by number | ✅ |
eth_getBlockReceipts | Returns the receipts of a block by number or hash | ✅ |
eth_getBlockTransactionCountByHash | Returns the number of transactions in a block from a block matching the given block hash | ✅ |
eth_getBlockTransactionCountByNumber | Returns the number of transactions in a block matching the given block number | ✅ |
eth_getCode | Returns code at a given address | ✅ |
eth_getCompilers | Returns a list of available compilers in the client (Response is always empty on IOTA EVM). | ✅ |
eth_getFilterChanges | Polling method for a filter, which returns an array of logs which occurred since last poll | ❌ |
eth_getFilterLogs | Returns an array of all logs matching filter with given id. Can compute the same results with an eth_getLogs call | ❌ |
eth_getLogs | Anytime a transaction is mined, we can see event logs for that transaction by making a request to eth_getLogs and then take actions based off those results | ✅ |
eth_getStorageAt | Returns the value from a storage position at a given address | ✅ |
eth_getTransactionByBlockHashAndIndex | Returns information about a transaction by block hash and transaction index position | ✅ |
eth_getTransactionByBlockNumberAndIndex | Returns information about a transaction by block number and transaction index position | ✅ |
eth_getTransactionByHash | Returns the information about a transaction requested by transaction hash | ✅ |
eth_getTransactionCount | Returns the number of transactions sent from an address | ✅ |
eth_getTransactionReceipt | Returns the receipt of a transaction by transaction hash | ✅ |
eth_getUncleByBlockHashAndIndex | Returns information about a uncle of a block by hash and uncle index position (Response is always null on IOTA EVM) | ✅ |
eth_getUncleByBlockNumberAndIndex | Returns information about a uncle of a block by number and uncle index position (Response is always null on IOTA EVM) | ✅ |
eth_getUncleCountByBlockHash | Returns the number of uncles in a block from a block matching the given block hash (Response is always 0x0 on IOTA EVM) | ✅ |
eth_getUncleCountByBlockNumber | Returns the number of uncles in a block from a block matching the given block number (Response is always 0x0 on IOTA EVM) | ✅ |
eth_hashrate | Returns the number of hashes per second that the node is mining with (Response is always 0 on IOTA EVM) | ✅ |
eth_mining | Returns whether the client is actively mining new blocks (Response is always false on IOTA EVM) | ✅ |
eth_newBlockFilter | Creates a filter in the node, to notify when a new block arrives | ❌ |
eth_newFilter | Creates a filter object, based on filter options, to notify when the state changes (logs) | ❌ |
eth_newPendingTransactionFilter | Creates a filter in the node, to notify when new pending transactions arrive | ❌ |
eth_protocolVersion | Returns the current Ethereum protocol version | ✅ |
eth_sendRawTransaction | Submits a raw transaction | ✅ |
eth_sendTransaction | Signs and submits a transaction | ✅ |
eth_sign | Returns an EIP-191 signature over the provided data. | ✅ |
eth_signTransaction | Signs and submits a transaction | ✅ |
eth_subscribe | Creates a new subscription for particular events. The node returns a subscription ID. For each event that matches the subscription, a notification with relevant data is sent together with the subscription ID. Supported events are newHeads and logs |