Optimism
Ethereum API Methods
This page provides a comprehensive list of all supported Ethereum API methods. Each method includes information about its purpose and usage. For detailed information about a specific method, click on its name to view the complete documentation.
Core Ethereum Methods (eth_)
These methods provide core functionality for interacting with the Ethereum blockchain.
eth_chainIdReturns the EIP-155 chain ID of the network the endpoint is serving. Use it to confirm a wallet is connected to the chain you expect.
eth_blockNumberReturns the height of the most recent block. The simplest possible health check for an EVM endpoint.
eth_getBlockByNumberReturns the full block (header + transactions) for a given block number or tag. The canonical "give me block N" call.
eth_getBalanceReturns the native-token balance of an account at the requested block. The canonical "how much ETH does this address hold?" call.
eth_gasPriceReturns the node's suggested legacy gas price in wei. On EIP-1559 chains, prefer eth_feeHistory or eth_maxPriorityFeePerGas.
eth_callExecute a message call against the EVM without writing to the chain. The workhorse method for reading contract state.
eth_getLogsRetrieve event logs matching a filter. The right call for indexers, analytics, and any backfill that doesn't need real-time subscriptions.
eth_sendRawTransactionBroadcast a signed transaction to the network. The only way to write to an EVM chain through a stateless RPC.
eth_estimateGasLearn how to use the eth_estimateGas method to calculate the estimated gas required for Ethereum transactions. Includes parameters, examples, and best practices.
eth_feeHistoryLearn how to use the eth_feeHistory method to retrieve historical gas fee information from the Ethereum blockchain. Includes examples of fee analysis and percentile calculations.
eth_getBlockByHashLearn how to use the eth_getBlockByHash method to fetch detailed information about Ethereum blocks using their hash. Includes transaction details and block properties.
eth_getBlockReceiptsLearn how to use the eth_getBlockReceipts method to retrieve complete transaction receipt data for an entire Ethereum block. Includes field documentation and usage examples.
eth_getBlockTransactionCountByHashLearn how to use the eth_getBlockTransactionCountByHash method to retrieve the number of transactions in an Ethereum block identified by its hash.
eth_getBlockTransactionCountByNumberLearn how to use the eth_getBlockTransactionCountByNumber method to retrieve the number of transactions in an Ethereum block identified by its number.
eth_getCodeLearn how to use the eth_getCode method to retrieve compiled bytecode from Ethereum smart contracts. Includes examples for bytecode verification and analysis.
eth_getFilterChangesLearn how to efficiently poll for new blockchain events using eth_getFilterChanges - essential for monitoring smart contract activity, token transfers, and blockchain state changes.
eth_getFilterLogsLearn how to use eth_getFilterLogs to fetch all historical logs matching a filter's criteria in one request - essential for event analysis and initial data loading in dApps.
eth_getProofLearn how to use the eth_getProof method to retrieve cryptographic proofs for account and storage data on the Ethereum blockchain. Includes verification examples.
eth_getStorageAtLearn how to use the eth_getStorageAt method to access raw storage data from Ethereum smart contracts. Includes storage layout explanations and practical examples.
eth_getTransactionByBlockHashAndIndexLearn how to use the eth_getTransactionByBlockHashAndIndex method to get transaction information using a block hash and transaction index position.
eth_getTransactionByBlockNumberAndIndexLearn how to use the eth_getTransactionByBlockNumberAndIndex method to fetch transaction details using a block number and index position in the Ethereum blockchain.
eth_getTransactionByHashLearn how to use the eth_getTransactionByHash method to fetch detailed transaction information using a transaction hash. Includes examples for various transaction types.
eth_getTransactionCountLearn how to use the eth_getTransactionCount method to retrieve the number of transactions sent from an Ethereum address, also known as the nonce.
eth_getTransactionReceiptLearn how to use the eth_getTransactionReceipt method to fetch transaction execution results, including status, gas used, logs, and contract deployment information.
eth_getUncleByBlockHashAndIndexLearn how to use the eth_getUncleByBlockHashAndIndex method to fetch uncle (ommer) block information using a block hash and uncle index.
eth_getUncleByBlockNumberAndIndexLearn how to use the eth_getUncleByBlockNumberAndIndex method to fetch uncle (ommer) block information using a block number and uncle index.
eth_getUncleCountByBlockHashLearn how to use the eth_getUncleCountByBlockHash method to retrieve the number of uncle blocks in a specified block on the Ethereum blockchain.
eth_getUncleCountByBlockNumberLearn how to use the eth_getUncleCountByBlockNumber method to retrieve the number of uncle blocks in a specified block height on the Ethereum blockchain.
eth_maxPriorityFeePerGasLearn how to use the eth_maxPriorityFeePerGas method to retrieve the current recommended priority fee (tip) needed for transaction inclusion on the Ethereum network.
eth_newBlockFilterLearn how to use eth_newBlockFilter to monitor new blocks on the Ethereum blockchain - essential for tracking transaction confirmations, syncing applications, and building real-time blockchain explorers.
eth_newFilterLearn how to use eth_newFilter to create filters for Ethereum event logs - the key to monitoring smart contract events, tracking token transfers, and building real-time blockchain applications.
eth_newPendingTransactionFilterLearn how to use eth_newPendingTransactionFilter to monitor the Ethereum mempool in real-time - essential for transaction tracking, gas price optimization, and market analysis.
eth_subscribeLearn how to use the eth_subscribe method to receive real-time notifications about blockchain events including new blocks, pending transactions, logs, and synchronization status via WebSocket connections.
eth_syncingLearn how to use eth_syncing to check if your Ethereum node is currently synchronizing with the blockchain network, track sync progress, and understand different synchronization states.
eth_uninstallFilterLearn how to use eth_uninstallFilter to clean up unused filters in Ethereum - avoid resource leaks and optimize node performance by properly removing filters that are no longer needed.
eth_unsubscribeLearn how to use the eth_unsubscribe method to cancel WebSocket-based subscriptions to Ethereum blockchain events and efficiently manage connection resources.
Debug Methods (debug_)
These methods are used for debugging and analyzing blockchain data in detail.
debug_getBadBlocksLearn how to use the debug_getBadBlocks method to retrieve, analyze, and understand invalid blocks detected by your Ethereum node, essential for network operators and investigators of consensus issues.
debug_storageRangeAtLearn how to use the debug_storageRangeAt method to inspect and retrieve contract storage data within a specified range for comprehensive smart contract debugging, state analysis, and contract auditing on Ethereum.
debug_traceBlockLearn how to use the debug_traceBlock method to obtain comprehensive trace information for all transactions in an Ethereum block, providing deep visibility into opcode execution for advanced debugging and analysis.
debug_traceBlockByHashLearn how to use the debug_traceBlockByHash method to retrieve detailed opcode-level execution traces for all transactions in a specific Ethereum block identified by its hash, essential for debugging and analyzing complex blockchain behavior.
debug_traceBlockByNumberLearn how to use the debug_traceBlockByNumber method to obtain a full trace of all invoked opcodes of all transactions included in a specific Ethereum block identified by its number.
debug_traceCallLearn how to use the debug_traceCall method to simulate and trace contract calls with opcode-level details, allowing deep inspection of EVM execution for debugging and analysis without affecting the blockchain.
debug_traceTransactionLearn how to use the debug_traceTransaction method to get opcode-level execution details for any historical transaction, with exact reproduction of the original blockchain state for accurate debugging and analysis.
Trace Methods (trace_)
These methods provide detailed transaction and block trace information.
trace_blockLearn how to use the trace_block method to retrieve comprehensive execution traces for all transactions in a specified Ethereum block, providing detailed insight into smart contract interactions.
trace_callLearn how to use the trace_call method to simulate transaction execution and trace the call without modifying the blockchain state. Perfect for smart contract testing and debugging.
trace_filterLearn how to use the trace_filter method to effectively search for and filter transaction traces based on multiple criteria, including address, block range, and more.
trace_replayBlockTransactionsLearn how to use the trace_replayBlockTransactions method to replay all transactions in a block with trace information for detailed analysis and debugging.
trace_replayTransactionLearn how to use the trace_replayTransaction method to replay a transaction with detailed traces and state changes for comprehensive debugging and analysis.
trace_transactionLearn how to use the trace_transaction method to retrieve detailed execution trace information for a specific transaction by its hash.
Network Methods (net_)
These methods provide information about the network status and connections.
net_listeningLearn how to use the net_listening method to check whether your Ethereum node is actively listening for network connections and troubleshoot connectivity issues.
net_peerCountLearn how to use the net_peerCount method to check how many peers are connected to your Ethereum node, monitor network health, and diagnose connectivity issues.
net_versionLearn how to use the net_version method to identify which Ethereum network your client is connected to, including mainnet, testnets, and other EVM-compatible networks.
Transaction Pool Methods (txpool_)
These methods allow inspection of the transaction pool status.
txpool_inspectLearn how to use the txpool_inspect method to get a human-readable overview of pending and queued transactions in your Ethereum node's mempool for monitoring and diagnostics.
txpool_statusLearn how to use the txpool_status method to monitor pending and queued transactions in your Ethereum node's mempool, check network congestion, and optimize gas price strategies.
Web3 Utility Methods (web3_)
Basic web3 utility methods for general blockchain interaction.
web3_clientVersionLearn how to use the web3_clientVersion method to identify which Ethereum client software and version your node is running, useful for debugging and compatibility checks.
web3_sha3Learn how to use the web3_sha3 method to generate Keccak-256 hashes for various Ethereum operations including function signatures, event topics, and blockchain data verification.