Optimism API Methods
Supported Networks:
- Optimism Mainnet (
OPTM) - Optimism Testnet (
OPTMS)
Supported Interfaces:
- JSON-RPC/HTTP
- JSON-RPC/WEBSOCKET
JSON-RPC
Chain & Node
eth_chainIdnet_versionnet_listeningnet_peerCountrpc_modulesweb3_clientVersionweb3_sha3eth_protocolVersioneth_syncing
Blocks
eth_blockNumbereth_getBlockByNumbereth_getBlockByHasheth_getBlockReceiptseth_getBlockTransactionCountByNumbereth_getBlockTransactionCountByHasheth_getUncleCountByBlockNumbereth_getUncleCountByBlockHasheth_getUncleByBlockNumberAndIndexeth_getUncleByBlockHashAndIndex
Transactions — Read
eth_getTransactionByHasheth_getTransactionByBlockNumberAndIndexeth_getTransactionByBlockHashAndIndexeth_getTransactionReceipt
Transactions — Write
eth_sendRawTransactioneth_signTransactioneth_sendTransactioneth_sign
Accounts & State
eth_accountseth_getBalanceeth_getTransactionCounteth_getStorageAteth_getCodeeth_getProof
Execution (EVM)
eth_calleth_estimateGaseth_createAccessList
Filters, Logs & Subscriptions
eth_newFiltereth_newBlockFiltereth_newPendingTransactionFiltereth_getFilterChangeseth_getFilterLogseth_uninstallFiltereth_getLogseth_subscribeeth_unsubscribe
Gas & Fees
eth_gasPriceeth_feeHistoryeth_maxPriorityFeePerGas
Mining / Work & Hashrate (legacy compatibility)
eth_coinbaseeth_miningeth_hashrateeth_getWork
Compilers (legacy compatibility)
eth_getCompilerseth_compileLLL
Network-specific (Optimism)
eth_getBlockRangerollup_gasPricesrollup_getInfo
Add-Ons:
bundler
eth_sendUserOperationeth_estimateUserOperationGaseth_getUserOperationByHasheth_getUserOperationReceipteth_supportedEntryPoints
debug
debug_getBadBlocksdebug_getRawBlockdebug_getRawHeaderdebug_getRawReceiptsdebug_getRawTransactiondebug_storageRangeAtdebug_traceBlockdebug_traceBlockByHashdebug_traceBlockByNumberdebug_traceCalldebug_traceTransaction
trace
trace_calltrace_blocktrace_gettrace_filtertrace_transactiontrace_rawTransactiontrace_replayBlockTransactionstrace_replayTransaction