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.
optimism_syncStatus
Get the synchronization status.
optimism_rollupConfig
Get the rollup configuration parameters.
optimism_version
Get the software version.
At the moment, building from source will not give you the correct version, but our docker images will.
opp2p
Theopp2p
namespace handles peer interactions.