Skip to main content

zks_estimateGasL1ToL2 RPC Method

Loading...

Updated on
Feb 17, 2026

zks_estimateGasL1ToL2 RPC Method

Parameters

transaction
object
REQUIRED
Loading...
from
string
REQUIRED
Loading...
to
string
REQUIRED
Loading...
data
string
Loading...

Returns

result
Loading...
Request
1
curl -X POST "https://docs-demo.zksync-mainnet.quiknode.pro/" \
2
-H "Content-Type: application/json" \
3
-d '{
4
"jsonrpc": "2.0",
5
"method": "zks_estimateGasL1ToL2",
6
"params": [
7
{
8
"from": "0x1111111111111111111111111111111111111111",
9
"to": "0x2222222222222222222222222222222222222222",
10
"data": "0xffffffff"
11
}
12
],
13
"id": 1
14
}'
1
curl -X POST "https://docs-demo.zksync-mainnet.quiknode.pro/" \
2
-H "Content-Type: application/json" \
3
-d '{
4
"jsonrpc": "2.0",
5
"method": "zks_estimateGasL1ToL2",
6
"params": [
7
{
8
"from": "0x1111111111111111111111111111111111111111",
9
"to": "0x2222222222222222222222222222222222222222",
10
"data": "0xffffffff"
11
}
12
],
13
"id": 1
14
}'
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