Skip to main content

zks_estimateGasL1ToL2 RPC Method

Returns an estimate of the gas required for a L1 to L2 transaction.

Updated on
Feb 17, 2026

Parameters

transaction
object
REQUIRED

The transaction object

from
string
REQUIRED

The address from which the transaction is sent

to
string
REQUIRED

The address to which the transaction is addressed

data
string

The data associated with the transaction

Returns

result

The estimate of the gas required for a L1 to L2 transaction

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": "0x54797c"
5
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": "0x54797c"
5
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free