Route Request Parameters
const params = {
fromChain: number | string; //the chainID assets are being bridged FROM
toChain: number | string; //the chainID assets are being bridged TO
fromToken: string; //the asset address being swapped FROM, "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" for native assets
toToken: string; // The asset address being swapped TO, "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" for native assets
fromAmount: string; // The unadjusted decimal amount of assets to send. Mutually exclusive with toAmount.
toAmount: string; // The unadjusted decimal amount of assets to receive (exact output). Mutually exclusive with fromAmount. Requires ExactOutputRouting feature flag.
fromAddress: string; // The address FROM which assets are being sent to be bridged
toAddress: string; // The address TO which bridged assets will be sent to
slippage: number; //OPTIONAL, If set it determines the max slippage across the route (0.01-99.99) 1 = 1% slippage.
quoteOnly: boolean; //OPTIONAL, If true, returns only a quote for the route. Omits transaction data needed for execution. Defaults to false
overrideGasRefundAddress: string; //OPTIONAL, For Axelar transactions, refund gas to a gas sponsor address on source chain
preHook: Hook; //OPTIONAL, Contract calls to execute on the source chain before bridging
postHook: Hook; //OPTIONAL, Contract calls to execute on the destination chain after bridging
};
Parameter Summaries
Parameter
Type
Required
Description
Last updated