Skip to main content

rollup_gasPrices RPC Method

Loading...

Updated on
May 06, 2026

rollup_gasPrices RPC Method

After the Bedrock upgrade it is recommended to use

eth_gasPrice

instead of rollup_gasPrices since the fees for both Layer 1 (L1) and Layer 2 (L2) are now consolidated and returned as a single value.

Parameters

This method does not accept any parameters

Returns

object
object
Loading...
l1GasPrice
Loading...
l2GasPrice
Loading...
Request
1
curl -X POST "https://docs-demo.optimism.quiknode.pro/" \
2
-H "Content-Type: application/json" \
3
-d '{
4
"jsonrpc": "2.0",
5
"method": "rollup_gasPrices",
6
"params": [],
7
"id": 1
8
}'
1
curl -X POST "https://docs-demo.optimism.quiknode.pro/" \
2
-H "Content-Type: application/json" \
3
-d '{
4
"jsonrpc": "2.0",
5
"method": "rollup_gasPrices",
6
"params": [],
7
"id": 1
8
}'
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"l1GasPrice": "0x3b9aca00",
6
"l2GasPrice": "0x3b9aca00"
7
}
8
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"l1GasPrice": "0x3b9aca00",
6
"l2GasPrice": "0x3b9aca00"
7
}
8
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free