Comment on page
rollup_gasPrices
Returns the L1 and L2 gas prices that are being used by the Sequencer to calculate fees.
The
rollup_gasPrices
is an Optimism-specific call, used to retrieve the L1 and L2 gas prices currently used by the Sequencer to calculate fees.none
l1GasPrice
:QUANTITY
- L1 gas price in wei that the Sequencer will use to estimate the L1 portion of fees (calldata costs).l2GasPrice
:QUANTITY
- L2 gas price in wei that the Sequencer will use to estimate the L2 portion of fees (execution costs).
Request
curl https://optimism-mainnet.blastapi.io/<project-id>
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"rollup_gasPrices","params":[],"id":1}'
Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"l1GasPrice": "0x55a4755d6",
"l2GasPrice": "0xf4240"
}
}
Last modified 1yr ago