Optimism (OP)
Optimism Network API Reference for efficient interaction with OP nodes, enabling scalable, low-cost transactions and fast finality through Layer 2 solutions on the Ethereum blockchain.
Optimism is a Layer 2 scaling solution for Ethereum that uses Optimistic Rollup technology to achieve high throughput and low transaction costs while inheriting Ethereum's security. Developed by the Optimism Collective, it enables near-instant transactions by executing them off-chain and posting compressed transaction data to Ethereum mainnet. The network is EVM-equivalent, meaning existing Ethereum smart contracts and tools work seamlessly without modification.
Key Features
EVM Equivalence: Full compatibility with Ethereum Virtual Machine, allowing direct deployment of existing Solidity contracts
Optimistic Rollups: Transactions are assumed valid by default, with a 7-day challenge period for fraud proofs
Low Transaction Fees: Fees typically 10-100x lower than Ethereum mainnet
Fast Transactions: Near-instant transaction confirmations (~2 second block time)
Ethereum Security: Inherits security from Ethereum L1 through data availability and fraud proofs
OP Token: Native governance token for the Optimism Collective
Superchain Vision: Part of the broader Superchain ecosystem with shared security and interoperability
Bedrock Upgrade: Latest architecture providing improved performance and EVM equivalence
Developer-Friendly: Compatible with MetaMask, Hardhat, Foundry, and all standard Ethereum tools
Network Information
Network Name
Optimism Mainnet
Chain ID
10
Native Currency
ETH
Decimals
18
Block Time
~2 seconds
Consensus
Optimistic Rollup
EVM Compatible
Yes (EVM Equivalent)
L1 Settlement
Ethereum Mainnet
Base URL
Supported Networks
Mainnet
10
✅
✅
✅
✅
Sepolia Testnet
11155420
✅
✅
✅
❌
Quickstart
Available API Methods
Account/State Methods
eth_accounts
Returns addresses owned by client
eth_getBalance
Returns the ETH balance of an address
eth_getStorageAt
Returns the value at a storage position
eth_getCode
Returns the bytecode at an address
eth_getProof
Returns account and storage Merkle proofs
eth_call
Executes a call without creating a transaction
Block Methods
eth_blockNumber
Returns the current block number
eth_getBlockByHash
Returns block information by hash
eth_getBlockByNumber
Returns block information by number
eth_getBlockTransactionCountByHash
Returns transaction count in a block by hash
eth_getBlockTransactionCountByNumber
Returns transaction count in a block by number
Transaction Methods
eth_sendRawTransaction
Submits a signed transaction to the network
eth_getTransactionByHash
Returns transaction details by hash
eth_getTransactionByBlockHashAndIndex
Returns transaction by block hash and index
eth_getTransactionByBlockNumberAndIndex
Returns transaction by block number and index
eth_getTransactionCount
Returns the nonce (transaction count) for an address
eth_getTransactionReceipt
Returns the receipt of a mined transaction
Gas Methods
eth_gasPrice
Returns the current L2 gas price in wei
eth_estimateGas
Estimates gas needed for a transaction
Filter Methods
eth_getLogs
Returns logs matching filter criteria
eth_newFilter
Creates a new log filter
eth_newBlockFilter
Creates a filter for new blocks
eth_newPendingTransactionFilter
Creates a filter for pending transactions
eth_getFilterChanges
Returns filter changes since last poll
eth_getFilterLogs
Returns all logs matching filter
eth_uninstallFilter
Removes an existing filter
Subscription Methods (WebSocket)
eth_subscribe
Creates a subscription for events
eth_unsubscribe
Cancels an existing subscription
Uncle Methods
eth_getUncleByBlockHashAndIndex
Returns uncle block by hash and index
eth_getUncleByBlockNumberAndIndex
Returns uncle block by number and index
eth_getUncleCountByBlockHash
Returns uncle count in a block by hash
eth_getUncleCountByBlockNumber
Returns uncle count in a block by number
Network/Chain Methods
eth_chainId
Returns the chain ID (10)
eth_syncing
Returns sync status of the node
net_version
Returns the network ID
net_listening
Returns listening status
net_peerCount
Returns number of connected peers
web3_clientVersion
Returns the client version
web3_sha3
Returns Keccak-256 hash of data
rpc_modules
Returns enabled RPC modules
Support
For technical support and questions:
Support: support@getblock.io
See Also
Last updated
Was this helpful?