Parameters
chainId
string
default:"11124"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_estimateGasL1ToL2"
required
JSON-RPC method name.
Positional parameters for zks_estimateGasL1ToL2:
Returns
The estimated gas required for a L1 to L2 transaction, in hexadecimal format. Example: “0x25f64db”.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=11124 \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "zks_estimateGasL1ToL2",
"params": [
{
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"data": "0xffffffff"
}
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x25f64db"
}