Route Request Parameters
Building with Squid, fundamentally starts with requesting a route.
The getRoute
type is used to define the parameters required for bridging assets between different blockchain networks.
Parameter Summaries
fromChain (
number | string
): The chain ID of the network from which assets are being bridged.toChain (
number | string
): The chain ID of the network to which assets are being bridged.fromToken (
string
): The address of the asset being swapped from. Use "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" for native assets.toToken (
string
): The address of the asset being swapped to. Use "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" for native assets.fromAmount (
string
): The unadjusted decimal amount of assets being transferred.fromAddress (
string
): The address from which assets are being sent for bridging.toAddress (
string
): The address to which bridged assets will be sent.slippage (
number
, optional): Maximum allowable slippage across the route (range: 0.01-99.99). A value of 1 represents 1% slippage.quoteOnly (
boolean
, optional): If true, only a quote for the route is returned without transaction data needed for execution. Defaults to false.enableExpress (
boolean
, optional): Utilizes Axelar's Express message passing for a small fee to expedite the cross-chain transaction. Defaults to true.customContractCalls (
ContractCall[] | CustomCosmosContractCall[]
, optional): Custom contract calls to be included in the route.prefer (
string[]
, optional): Prefers routes from the specified DEXs. Only supported on EVM chains.receiveGasOnDestination (
boolean
, optional): Determines whether to receive gas on the destination chain.collectFees (
{ integratorAddress: string; fee: number; }
, optional): Specifies the integrator's address to receive the fee and the fee amount in basis points (e.g., 50 = 0.05%). There is a soft limit of 1% fee per transaction.fallbackAddresses (
{ coinType: number; address: string; }[]
, optional): For Cosmos routes where the source or destination chains are not of coinType 118. Requires an array of objects containing an address and its associated coin type.
Last updated