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
1curl https://docs-demo.optimism.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"rollup_gasPrices","params":[],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.optimism.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"rollup_gasPrices","params":[],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free