Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CrossChainTrade Abstract

Abstract class for all cross chain providers' trades.

Hierarchy

Index

Properties

feeInfo: FeeInfo

Swap fee information.

Token to sell with input amount.

gasData: GasData

Gas fee info in source blockchain.

itType: ItType

Token to get with output amount.

toTokenAmountMin: BigNumber

Minimum amount of output token user will get.

type: "RUBIC" | "CELER" | "SYMBIOSIS" | "LIFI" | "DEBRIDGE" | "VIA" | "RANGO"

Type of calculated cross chain trade.

Accessors

  • get estimatedGas(): null | BigNumber

Methods

  • encodeApprove(tokenAddress: string, spenderAddress: string, value: BigNumber | "infinity", options?: TransactionOptions): Promise<TransactionConfig>
  • Build encoded approve transaction config.

    Parameters

    • tokenAddress: string

      Address of the smart-contract corresponding to the token.

    • spenderAddress: string

      Wallet or contract address to approve.

    • value: BigNumber | "infinity"

      Token amount to approve in wei.

    • options: TransactionOptions = {}

    Returns Promise<TransactionConfig>

    Encoded approve transaction config.

  • getContractParams(options: { fromAddress?: string; receiverAddress?: string }): Promise<ContractParams>
  • needApprove(): Promise<boolean>
  • checkReceiverAddress(receiverAddress: undefined | string, toBlockchain?: BlockchainName): void

Generated using TypeDoc