Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniswapV2AbstractTrade Abstract

Hierarchy

Index

Properties

deadlineMinutes: number

Deadline for transaction in minutes.

exact: Exact

Defines, whether to call 'exactInput' or 'exactOutput' method.

Token to sell with input amount.

gasFeeInfo: null | GasFeeInfo

Gas fee info, including gas limit and gas price.

path: readonly Token[]

Path, through which tokens will be converted.

slippageTolerance: number

Slippage tolerance. Can be mutated after calculation, except for Zrx.

Token to get with output amount.

Accessors

  • get priceImpact(): null | number
  • set settings(value: { deadlineMinutes?: number; slippageTolerance?: number }): void
  • get type(): "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "BABY_SWAP" | "BALANCER" | "BEAM_SWAP" | "BI_SWAP" | "CREMA_FINANCE" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "HONEY_SWAP" | "JET_SWAP" | "JOE" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PARA_SWAP" | "POLYDEX" | "QUICK_SWAP" | "RAYDIUM" | "REF_FINANCE" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "STELLA_SWAP" | "SUSHI_SWAP" | "TRISOLARIS" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VVS_FINANCE" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "ZAPPY" | "ZIP_SWAP" | "ZRX" | "AURORA_SWAP" | "JUPITER" | "REN_BTC"
  • Returns "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "BABY_SWAP" | "BALANCER" | "BEAM_SWAP" | "BI_SWAP" | "CREMA_FINANCE" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "HONEY_SWAP" | "JET_SWAP" | "JOE" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PARA_SWAP" | "POLYDEX" | "QUICK_SWAP" | "RAYDIUM" | "REF_FINANCE" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "STELLA_SWAP" | "SUSHI_SWAP" | "TRISOLARIS" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VVS_FINANCE" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "ZAPPY" | "ZIP_SWAP" | "ZRX" | "AURORA_SWAP" | "JUPITER" | "REN_BTC"

  • get type(): "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "BABY_SWAP" | "BALANCER" | "BEAM_SWAP" | "BI_SWAP" | "CREMA_FINANCE" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "HONEY_SWAP" | "JET_SWAP" | "JOE" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PARA_SWAP" | "POLYDEX" | "QUICK_SWAP" | "RAYDIUM" | "REF_FINANCE" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "STELLA_SWAP" | "SUSHI_SWAP" | "TRISOLARIS" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VVS_FINANCE" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "ZAPPY" | "ZIP_SWAP" | "ZRX" | "AURORA_SWAP" | "JUPITER" | "REN_BTC"
  • Returns "ACRYPTOS" | "ALDRIN_EXCHANGE" | "ALGEBRA" | "ANNEX" | "APE_SWAP" | "ARTH_SWAP" | "BABY_SWAP" | "BALANCER" | "BEAM_SWAP" | "BI_SWAP" | "CREMA_FINANCE" | "CRONA_SWAP" | "CROPPER_FINANCE" | "CROW_FI" | "CRO_DEX" | "CURVE" | "DEFI_PLAZA" | "DEFI_SWAP" | "DFYN" | "DODO" | "DYSTOPIA" | "HONEY_SWAP" | "JET_SWAP" | "JOE" | "J_SWAP" | "KYBER_SWAP" | "LUA_SWAP" | "MAVERICK" | "MDEX" | "MESH_SWAP" | "MM_FINANCE" | "MOJITO_SWAP" | "ONE_INCH" | "ONE_MOON" | "ONE_SOL" | "OOLONG_SWAP" | "OPEN_OCEAN" | "ORCA_SWAP" | "OSMOSIS_SWAP" | "PANCAKE_SWAP" | "PANGOLIN" | "PARA_SWAP" | "POLYDEX" | "QUICK_SWAP" | "RAYDIUM" | "REF_FINANCE" | "SABER_STABLE_SWAP" | "SAROS_SWAP" | "SERUM" | "SHIBA_SWAP" | "SMOOTHY" | "SOLAR_BEAM" | "SPIRIT_SWAP" | "SPL_TOKEN_SWAP" | "SPOOKY_SWAP" | "STELLA_SWAP" | "SUSHI_SWAP" | "TRISOLARIS" | "UBE_SWAP" | "UNISWAP_V2" | "UNI_SWAP_V3" | "VIPER_SWAP" | "VOLTAGE_SWAP" | "VVS_FINANCE" | "WANNA_SWAP" | "WAULT_SWAP" | "WOO_FI" | "WRAPPED" | "ZAPPY" | "ZIP_SWAP" | "ZRX" | "AURORA_SWAP" | "JUPITER" | "REN_BTC"

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.

  • needApprove(fromAddress?: string): Promise<boolean>
  • callForRoutes(blockchain: BlockchainName, exact: Exact, routesMethodArguments: [string, string[]][]): Promise<ContractMulticallResponse<{ amounts: string[] }>[]>

Generated using TypeDoc