Skip to main content

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​

MethodDescriptionStatus
eth_accountsReturns a list of addresses owned by client✅
eth_blockNumberReturns the number of most recent block.✅
eth_callExecutes a new message call immediately without creating a transaction on the blockchain✅
eth_chainIdReturns the chain ID of the current network✅
eth_coinbaseReturns the client Coinbase address (Response is always the Common Address of the IOTA EVM)✅
eth_estimateGasGenerates and returns an estimate of how much gas is necessary to allow the transaction to complete.✅
eth_gasPriceReturns the current price per gas in wei✅
eth_getBalanceReturns the balance of the account of given address✅
eth_getBlockByHashReturns information about a block by hash✅
eth_getBlockByNumberReturns information about a block by number✅
eth_getBlockReceiptsReturns the receipts of a block by number or hash✅
eth_getBlockTransactionCountByHashReturns the number of transactions in a block from a block matching the given block hash✅
eth_getBlockTransactionCountByNumberReturns the number of transactions in a block matching the given block number✅
eth_getCodeReturns code at a given address✅
eth_getCompilersReturns a list of available compilers in the client (Response is always empty on IOTA EVM).✅
eth_getFilterChangesPolling method for a filter, which returns an array of logs which occurred since last poll❌
eth_getFilterLogsReturns an array of all logs matching filter with given id. Can compute the same results with an eth_getLogs call❌
eth_getLogsAnytime 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_getStorageAtReturns the value from a storage position at a given address✅
eth_getTransactionByBlockHashAndIndexReturns information about a transaction by block hash and transaction index position✅
eth_getTransactionByBlockNumberAndIndexReturns information about a transaction by block number and transaction index position✅
eth_getTransactionByHashReturns the information about a transaction requested by transaction hash✅
eth_getTransactionCountReturns the number of transactions sent from an address✅
eth_getTransactionReceiptReturns the receipt of a transaction by transaction hash✅
eth_getUncleByBlockHashAndIndexReturns information about a uncle of a block by hash and uncle index position (Response is always null on IOTA EVM)✅
eth_getUncleByBlockNumberAndIndexReturns information about a uncle of a block by number and uncle index position (Response is always null on IOTA EVM)✅
eth_getUncleCountByBlockHashReturns the number of uncles in a block from a block matching the given block hash (Response is always 0x0 on IOTA EVM)✅
eth_getUncleCountByBlockNumberReturns the number of uncles in a block from a block matching the given block number (Response is always 0x0 on IOTA EVM)✅
eth_hashrateReturns the number of hashes per second that the node is mining with (Response is always 0 on IOTA EVM)✅
eth_miningReturns whether the client is actively mining new blocks (Response is always false on IOTA EVM)✅
eth_newBlockFilterCreates a filter in the node, to notify when a new block arrives❌
eth_newFilterCreates a filter object, based on filter options, to notify when the state changes (logs)❌
eth_newPendingTransactionFilterCreates a filter in the node, to notify when new pending transactions arrive❌
eth_protocolVersionReturns the current Ethereum protocol version✅
eth_sendRawTransactionSubmits a raw transaction✅
eth_sendTransactionSigns and submits a transaction✅
eth_signReturns an EIP-191 signature over the provided data.✅
eth_signTransactionSigns and submits a transaction✅
eth_subscribeCreates 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✅
eth_syncingReturns an object with data about the sync status or false-copy (Response is always false on IOTA EVM)✅
eth_uninstallFilterUninstalls a filter with given id❌

JSON-RPC methods according to the Debug Module API​

MethodDescriptionStatus
debug_traceBlockByNumberReturns tracing results by executing all transactions in the specified block number.✅
debug_traceBlockByHashReturns tracing results by executing all transactions in the block specified by the block hash.✅
debug_traceTransactionReturns tracing results for the specified transaction.✅
debug_getRawBlockReturns an RLP-encoded block.✅

JSON-RPC methods according to the Net Module API​

MethodDescriptionStatus
net_listeningReturns true if client is actively listening for network connections (Response is always true on IOTA EVM)✅
net_peerCountReturns number of peers currently connected to the client (Response is always 0x0 on IOTA EVM)✅
net_versionReturns the current network ID.✅

JSON-RPC methods according to the Trace Module API​

MethodDescriptionStatus
trace_blockReturns traces created at given block✅

JSON-RPC methods according to the Web3 Module API​

MethodDescriptionStatus
web3_clientVersionReturns the current client version (Response is always wasp/evmproxy on IOTA EVM)✅
web3_shaReturns Keccak-256 (not the standardized SHA3-256) of the given data✅

You can find the complete set of available specs in the Ethereum API Documentation.