Home

Estimate L1 → L2 transaction gas

POST
https://zksync.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Sends a JSON-RPC request to estimate the gas cost for bridging a transaction from L1 to L2.

Body

application/json
jsonrpcstringrequired
methodstringrequired
paramsArray<object>required

Parameters:

  1. Call object with transaction details.
Show child attributes
fromstring

Sender address on L1

tostring

Target contract or recipient on L2

datastring

Encoded call data

valuestring

Transaction value in hex

idintegerrequired

Response

200OK

Estimated gas for L1 → L2 transaction

400Bad Request

Invalid request parameters

500Internal Server Error

Internal server error