Abstract Readonly Abstract feeReadonly Abstract fromToken to sell with input amount.
Readonly Abstract pathReadonly Abstract slippageReadonly Abstract toToken to get with output amount.
Price impact, based on tokens' usd prices.
Minimum amount of output token user can get.
Abstract typeType of instant trade provider.
Sends approve transaction with connected wallet.
Transaction options.
If true, first allowance is checked.
Amount of tokens in approval window in spending cap field
Abstract encodeBuilds transaction config, with encoded data.
Encode transaction options.
Builds encoded approve transaction config.
Encoded approve transaction config.
Address of the smart-contract corresponding to the token.
Wallet or contract address to approve.
Token amount to approve in wei.
Additional options.
Abstract swapSends swap transaction with connected wallet. If user has not enough allowance, then approve transaction will be called first.
const onConfirm = (hash: string) => console.log(hash);
const receipt = await trades[TRADE_TYPE.UNISWAP_V2].swap({ onConfirm });
Optional options: SwapTransactionOptionsTransaction options.
Generated using TypeDoc
Abstract class for all instant trade providers' trades.