Optimism JSON RPC API
Introduction
Optimism is a Layer 2 scaling solution built on Ethereum that uses optimistic rollups to bundle transactions, providing faster and cheaper transactions while retaining the security of Ethereum. Optimism focuses on scalability, low gas fees, and maintaining compatibility with the Ethereum ecosystem, making it an ideal platform for decentralized applications (dApps), decentralized finance (DeFi), and NFTs.
Supported Networks
The Optimism RPC API is available for the following networks:
- Optimism Mainnet
- Optimism Sepolia Testnet
Network Details
Network | Chain ID | EVM Chain | RPC URLs |
---|---|---|---|
Optimism Mainnet | 0xa (10) | EvmChain.OPTIMISM | https://site1.moralis-nodes.com/optimism/ |
https://site2.moralis-nodes.com/optimism/ | |||
Optimism Sepolia | 0xaa37dc (11155420) | EvmChain.OPTIMISM_SEPOLIA | https://site1.moralis-nodes.com/optimism-sepolia/ |
https://site2.moralis-nodes.com/optimism-sepolia/ |
Supported RPC Methods
- eth_blockNumber
- eth_call
- eth_chainId
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getBlockReceipts
- eth_getCode
- eth_getLogs
- eth_getProof
- eth_getStorageAt
- eth_getTransactionByHash
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_getUncleByBlockHashAndIndex
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_maxPriorityFeePerGas
- eth_sendRawTransaction
Supported Extended RPC Methods
Network Support Notice
The Extended RPC APIs are only supported on the Optimism Mainnet.