Skip to content

Latest commit

 

History

History
78 lines (75 loc) · 17.2 KB

README.md

File metadata and controls

78 lines (75 loc) · 17.2 KB

ETH JSON-RPC

The ETH JSON-RPC (Remote Procedure Call) is a protocol that allows clients to interact with Ethereum nodes using JSON (JavaScript Object Notation) messages over HTTP or IPC (Inter-Process Communication). It provides a standardized way to communicate with the Ethereum network and perform various operations such as querying blockchain data, executing smart contracts, and managing accounts.

RPC list

namespace api supported description
web3 web3_clientVersion Returns the current client version.
web3 web3_sha3 Returns the Keccak-256 (not the standardized SHA3-256) of the given data.
net net_version Returns the current network ID.
net net_peerCount Returns the number of peers currently connected to the client.
net net_listening Returns true if the client is actively listening for network connections.
eth eth_syncing Returns an object with data about the sync status or false if not syncing.
eth eth_coinbase 🚫 Returns the client coinbase address.
eth eth_chainId Returns the chain id.
eth eth_mining 🚫 Returns true if the client is actively mining new blocks.
eth eth_hashrate 🚫 Returns the number of hashes per second that the node is mining with.
eth eth_gasPrice Returns the current price per gas in wei.
eth eth_maxPriorityFeePerGas Returns the max priority fee per gas.
eth eth_feeHistory Returns the collection of historical gas information.
eth eth_accounts Returns a list of addresses owned by the client.
eth eth_blockNumber Returns the number of the most recent block.
eth eth_getBalance Returns the balance of the account of given address.
eth eth_getStorageAt Returns the value from a storage position at a given address.
eth eth_getTransactionCount Returns the number of transactions sent from an address.
eth eth_getTransactionCountByHash Returns the number of transactions in a block from a block matching the given block hash.
eth eth_getBlockTransactionCountByNumber Returns the number of transactions in a block matching the given block number.
eth eth_getUncleCountByBlockHash 🚫 Returns the number of uncles in a block from a block matching the given block hash.
eth eth_getUncleCountByBlockNumber 🚫 Returns the number of uncles in a block from a block matching the given block number.
eth eth_getCode Returns the code at a given address.
eth eth_sign 🚫 Signs data with a given address.
eth eth_signTypedData 🚫 Signs typed data with a given address.
eth eth_fillTransaction 🚫 Fills the defaults (nonce, gas, gasPrice or 1559 fields) on a given unsigned transaction, and returns it to the caller for further processing (signing + broadcast).
eth eth_sendTransaction 🚫 Creates a new message call transaction or a contract creation if the data field contains code.
eth eth_resend 🚫 Remove the given transaction from the pool and reinsert it with the new gas price and limit.
eth eth_sendRawTransaction Sends a signed transaction to the network.
eth eth_call Executes a new message call immediately without creating a transaction on the block chain.
eth eth_estimateGas Generates an estimate of how much gas is necessary to allow the transaction to complete.
eth eth_getBlockByHash Returns information about a block by hash.
eth eth_getBlockByNumber Returns information about a block by block number.
eth eth_getBlockReceipts Returns all transaction receipts for a given block. The API credit value for this method is 20.
eth eth_getTransactionByHash Returns the information about a transaction requested by transaction hash.
eth eth_getTransactionByBlockHashAndIndex Returns the information about a transaction by block hash and transaction index position.
eth eth_getTransactionByBlockNumberAndIndex Returns the information about a transaction by block number and transaction index position.
eth eth_getRawTransactionByHash Returns the raw transaction by block number and transaction index position.
eth eth_getRawTransactionByBlockHashAndIndex Returns the raw transaction by block hash and transaction index position.
eth eth_getRawTransactionByBlockNumberAndIndex Returns the raw transaction by block number and transaction index position.
eth eth_getTransactionReceipt Returns the receipt of a transaction by transaction hash.
eth eth_getUncleByBlockHashAndIndex 🚫 Returns information about a uncle of a block by hash and uncle index position.
eth eth_getUncleByBlockNumberAndIndex 🚫 Returns information about a uncle of a block by number and uncle index position.
eth eth_getCompilers 🚫 Returns a list of available compilers.
eth eth_compileLLL 🚫 Returns compiled LLL code.
eth eth_compileSolidity 🚫 Returns compiled solidity code.
eth eth_compileSerpent 🚫 Returns compiled serpent code.
eth eth_newFilter Creates a filter object based on filter options to notify when the state changes (logs).
eth eth_newBlockFilter Creates a filter in the node to notify when a new block arrives.
eth eth_newPendingTransactionFilter Creates a filter in the node to notify when new pending transactions arrive.
eth eth_uninstallFilter Uninstalls a filter with given id.
eth eth_getFilterChanges Polling method for a filter which returns an array of logs which occurred since last poll.
eth eth_getFilterLogs Returns an array of all logs matching filter with given id.
eth eth_getLogs Returns an array of all logs matching a given filter object.
eth eth_getProof 🚫 Returns the account and storage values of the specified account including the Merkle-proof. The API credit value for this method is 20.
personal personal_importRawKey 🚫 Imports a raw key into the node's key store.
personal personal_lockAccount 🚫 Locks the account.
personal personal_unlockAccount 🚫 Unlocks the account.
personal personal_newAccount 🚫 Creates a new account.
personal personal_sendTransaction 🚫 Signs and sends a transaction.
personal personal_listAccounts 🚫 Returns all the accounts that the client controls.
debug debug_traceTransaction 🚫 Returns trace of a transaction by hash.
debug debug_traceBlockByNumber 🚫 Returns trace of a block by number.
debug debug_traceBlockByHash 🚫 Returns trace of a block by hash.
debug debug_storageRangeAt 🚫 Returns a storage range at a specific position.
debug debug_getBadBlocks 🚫 Returns list of bad blocks.
txpool txpool_content Returns all pending and queued transactions
txpool txpool_inspect Returns a textual summary of all pending and queued transactions
txpool txpool_contentFrom Retrieves the transactions contained within the txpool, returning pending and queued transactions of this address, grouped by nonce
txpool txpool_status Returns the number of transactions in pending and queued states