Use
eth_gasPrice
instead of rollup_gasPrices
for the L2 gas price.
For the L1 gas price, you can call the GasPriceOracle
’s l1BaseFee
function.
If you want to estimate the cost of a transaction, you can use the SDK.op-node
op-node
implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node. The following RPC methods are broken down by namespace.
The following examples show you how to make requests with curl
and cast
.
Protip: piping these commands in to
jq
will give you nicely formatted JSON responses.$ cast rpc optimism_syncStatus --rpc-url http://localhost:9545 | jq
optimism
Optimism specific rollup methods.optimism_outputAtBlock
Get the output root at a specific block.
This method is documented in the specifications.
- curl
- cast
optimism_syncStatus
Get the synchronization status.
- curl
- cast
optimism_rollupConfig
Get the rollup configuration parameters.
- curl
- cast
optimism_version
Get the software version.
At the moment, building from source will not give you the correct version, but our docker images will.
- curl
- cast
opp2p
Theopp2p
namespace handles peer interactions.
opp2p_self
Returns your node’s information.
- curl
- cast
opp2p_peers
Returns a list of your node’s peers.
- curl
- cast
opp2p_peerStats
Returns your peer stats.
- curl
- cast
opp2p_discoveryTable
Returns your peer discovery table.
- curl
- cast
opp2p_blockPeer
Blocks a peer.
- curl
- cast
opp2p_unblockPeer
Unblocks a peer.
- curl
- cast
opp2p_listBlockedPeers
Returns a list of your blocked peers.
- curl
- cast
opp2p_blockAddr
Blocks ip address.
- curl
- cast
opp2p_unblockAddr
Unblocks ip address.
- curl
- cast
opp2p_listBlockedAddrs
Returns a list of blocked ip addresses.
- curl
- cast
opp2p_blockSubnet
Blocks subnet.
- curl
- cast
opp2p_unblockSubnet
Unblocks subnet.
- curl
- cast
opp2p_listBlockedSubnets
Returns list of blocked subnets.
- curl
- cast
opp2p_protectPeer
Protect peer.
- curl
- cast
opp2p_unprotectPeer
Unprotect peer.
- curl
- cast
opp2p_connectPeer
Connect peer.
- curl
- cast
opp2p_disconnectPeer
Disconnect peer.
- curl
- cast
admin
todo: add admin namespace descriptionadmin_resetDerivationPipeline
Resets the derivation pipeline.
- curl
- cast
admin_startSequencer
Starts the sequencer.
- curl
- cast
admin_stopSequencer
Stops sequencer.
- curl
- cast
admin_sequencerActive
Returns the status of the sequencer. This endpoint provides real-time information about whether the sequencer is actively processing transactions.
- curl
- cast
Execution clients
The OP Stack supports multiple execution client implementations. Each client implements the execution layer with minimal changes for a secure Ethereum-equivalent application environment.- op-geth
- Nethermind
op-geth
op-geth
is the original execution client for the OP Stack, based on the Go Ethereum (Geth) implementation.The execution engine’s RPC interface is identical to the upstream Geth RPC interface. The responses are nearly identical too, except we also include the L1 gas usage and price information.