Optimism

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_chainId

Returns 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_blockNumber

Returns the height of the most recent block. The simplest possible health check for an EVM endpoint.

eth_getBlockByNumber

Returns the full block (header + transactions) for a given block number or tag. The canonical "give me block N" call.

eth_getBalance

Returns the native-token balance of an account at the requested block. The canonical "how much ETH does this address hold?" call.

eth_gasPrice

Returns the node's suggested legacy gas price in wei. On EIP-1559 chains, prefer eth_feeHistory or eth_maxPriorityFeePerGas.

eth_call

Execute a message call against the EVM without writing to the chain. The workhorse method for reading contract state.

eth_getLogs

Retrieve event logs matching a filter. The right call for indexers, analytics, and any backfill that doesn't need real-time subscriptions.

eth_sendRawTransaction

Broadcast a signed transaction to the network. The only way to write to an EVM chain through a stateless RPC.

eth_estimateGas

Learn how to use the eth_estimateGas method to calculate the estimated gas required for Ethereum transactions. Includes parameters, examples, and best practices.

eth_feeHistory

Learn 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_getBlockByHash

Learn how to use the eth_getBlockByHash method to fetch detailed information about Ethereum blocks using their hash. Includes transaction details and block properties.

eth_getBlockReceipts

Learn 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_getBlockTransactionCountByHash

Learn how to use the eth_getBlockTransactionCountByHash method to retrieve the number of transactions in an Ethereum block identified by its hash.

eth_getBlockTransactionCountByNumber

Learn how to use the eth_getBlockTransactionCountByNumber method to retrieve the number of transactions in an Ethereum block identified by its number.

eth_getCode

Learn how to use the eth_getCode method to retrieve compiled bytecode from Ethereum smart contracts. Includes examples for bytecode verification and analysis.

eth_getFilterChanges

Learn how to efficiently poll for new blockchain events using eth_getFilterChanges - essential for monitoring smart contract activity, token transfers, and blockchain state changes.

eth_getFilterLogs

Learn 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_getProof

Learn how to use the eth_getProof method to retrieve cryptographic proofs for account and storage data on the Ethereum blockchain. Includes verification examples.

eth_getStorageAt

Learn how to use the eth_getStorageAt method to access raw storage data from Ethereum smart contracts. Includes storage layout explanations and practical examples.

eth_getTransactionByBlockHashAndIndex

Learn how to use the eth_getTransactionByBlockHashAndIndex method to get transaction information using a block hash and transaction index position.

eth_getTransactionByBlockNumberAndIndex

Learn how to use the eth_getTransactionByBlockNumberAndIndex method to fetch transaction details using a block number and index position in the Ethereum blockchain.

eth_getTransactionByHash

Learn how to use the eth_getTransactionByHash method to fetch detailed transaction information using a transaction hash. Includes examples for various transaction types.

eth_getTransactionCount

Learn how to use the eth_getTransactionCount method to retrieve the number of transactions sent from an Ethereum address, also known as the nonce.

eth_getTransactionReceipt

Learn how to use the eth_getTransactionReceipt method to fetch transaction execution results, including status, gas used, logs, and contract deployment information.

eth_getUncleByBlockHashAndIndex

Learn how to use the eth_getUncleByBlockHashAndIndex method to fetch uncle (ommer) block information using a block hash and uncle index.

eth_getUncleByBlockNumberAndIndex

Learn how to use the eth_getUncleByBlockNumberAndIndex method to fetch uncle (ommer) block information using a block number and uncle index.

eth_getUncleCountByBlockHash

Learn how to use the eth_getUncleCountByBlockHash method to retrieve the number of uncle blocks in a specified block on the Ethereum blockchain.

eth_getUncleCountByBlockNumber

Learn how to use the eth_getUncleCountByBlockNumber method to retrieve the number of uncle blocks in a specified block height on the Ethereum blockchain.

eth_maxPriorityFeePerGas

Learn how to use the eth_maxPriorityFeePerGas method to retrieve the current recommended priority fee (tip) needed for transaction inclusion on the Ethereum network.

eth_newBlockFilter

Learn 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_newFilter

Learn 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_newPendingTransactionFilter

Learn how to use eth_newPendingTransactionFilter to monitor the Ethereum mempool in real-time - essential for transaction tracking, gas price optimization, and market analysis.

eth_subscribe

Learn 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_syncing

Learn 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_uninstallFilter

Learn 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_unsubscribe

Learn 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_getBadBlocks

Learn 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_storageRangeAt

Learn 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_traceBlock

Learn 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_traceBlockByHash

Learn 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_traceBlockByNumber

Learn 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_traceCall

Learn 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_traceTransaction

Learn 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.

Network Methods (net_)

These methods provide information about the network status and connections.

Transaction Pool Methods (txpool_)

These methods allow inspection of the transaction pool status.

Web3 Utility Methods (web3_)

Basic web3 utility methods for general blockchain interaction.

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.