Calldata Builder
This route extends the quote endpoint to provide ready-to-use calldata for your transaction. The calldata is formatted as a hex string, which can be used directly in your transaction without additional encoding.
https://backend.gas.zip/v2/quotes/<deposit_chain>/<deposit_wei>/<outbound_chains>?to=<address>&from=<address>
Parameters
deposit_chain
: The native chain ID of the depositdeposit_wei
: The amount of native currency to deposit in weito
: The destination address that will receive the bridged fundsoutbound_chains
: Comma-separated list of native chain IDs (e.g., [42161,10] for Arbitrum and Optimism)from
: (Optional) The deposit address sending the transaction
Response
interface CalldataQuoteResponse {
calldata: string
quotes: {
chain: number
expected: string
gas: string
speed: number
usd: number
}[]
}
Example Response (Single Outbound):
{
"calldata": "0x010039",
"quotes": [
{
"chain": 42161,
"expected": "599131010000000",
"gas": "868990000000",
"speed": 7,
"usd": 2.078004
}
]
}
Example Response with Multiple Outbounds:
{
"calldata": "0x027Ed2A81B7054Dc5D393234B7a3A33B9ba125cAc900390037",
"quotes": [
{
"chain": 42161,
"expected": "5498052599999999",
"gas": "847400000000",
"speed": 7,
"usd": 19.008707498
},
{
"chain": 10,
"expected": "5498878990738999",
"gas": "21009261000",
"speed": 8,
"usd": 19.008707498
}
]
}