Type alias QuoteResult

QuoteResult: {
    isSupported: boolean;
    steps: {
        id: number;
        createdTime: number;
        chainId: ChainId;
        swapAddress: Web3Address;
        fromToken: Web3Address;
        toToken: Web3Address;
        abi: string | unknown;
        functionName: string;
        params: (number | string | unknown)[];
        protocol: string;
        type: "direct" | "dex";
    }[];
    stepsCount: number;
    price?: string;
    minPrice?: string;
    fromTokenUsdPrice?: string;
    fromTokenAmount?: string;
    fromTokenAmountUsdValue?: string;
    toTokenUsdPrice?: string;
    toTokenAmount?: string;
    toTokenAmountUsdValue?: string;
    expectedSlippage?: string;
    minToTokenAmount?: string;
    from?: Web3Address;
    to?: Web3Address;
    data?: string;
    value?: string;
}

Type declaration

  • isSupported: boolean

    Whether the route is supported or not.

  • steps: {
        id: number;
        createdTime: number;
        chainId: ChainId;
        swapAddress: Web3Address;
        fromToken: Web3Address;
        toToken: Web3Address;
        abi: string | unknown;
        functionName: string;
        params: (number | string | unknown)[];
        protocol: string;
        type: "direct" | "dex";
    }[]

    The steps this route will take. Used to show the route breakdown.

  • stepsCount: number

    Number of steps the route will take.

  • Optional price?: string

    Expected price of toToken.

  • Optional minPrice?: string

    Minimum accepted price for a successful transaction.

  • Optional fromTokenUsdPrice?: string

    Price of fromToken in US dollars.

  • Optional fromTokenAmount?: string

    Amount of fromToken to send.

  • Optional fromTokenAmountUsdValue?: string

    Value of fromTokenAmount in US dollars.

  • Optional toTokenUsdPrice?: string

    Price of toToken in US dollars.

  • Optional toTokenAmount?: string

    Expected amount of toToken to receive.

  • Optional toTokenAmountUsdValue?: string

    Value of toTokenAmount in US dollars.

  • Optional expectedSlippage?: string

    Expected slippage calculated from fromTokenAmountUsdValue and toTokenAmountUsdValue. If the value returned is < 0, the zap is expected to result in positive slippage.

  • Optional minToTokenAmount?: string

    Minimum amount of the to token the user is willing to accept for a successful transaction.

  • Optional from?: Web3Address

    User address who should be sending the tx.

  • Optional to?: Web3Address

    Contract address where the unsigned transaction needs to be sent.

  • Optional data?: string

    Unsigned transaction data.

  • Optional value?: string

    Amount of native tokens that need to be sent.

Generated using TypeDoc