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.customContractCalls (
ContractCall[] | CustomCosmosContractCall[]
, optional): Custom contract calls to be included in the route.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.bypassGuardrails (boolean): This allows you to waive Squid's slippage guardrails and perform any route with slippage. NOTE: If this param is set to true, the integrator is liable for any loss of funds during the route.
Last updated