🦄UniWithdraw

Description

Action ID: 0x3af50783

Network mainnet: (Deployed address | Code)

Withdraws liquidity to uniswap

SDK Action

    const uniWithdrawAction = new dfs.actions.uniswap.UniswapWithdrawAction(...uniObj);

Contract

This is a DFS STANDARD_ACTION.

The address from which we're pulling LP tokens must approve proxy

If liquidity to be withdrawn amount is uint.max pull whole LP token balance from _from

Input:

    /// @param tokenA The address of the A token in pool
    /// @param tokenB The address of the B token in pool
    /// @param liquidity The amount of liquidity tokens to remove.
    /// @param to The address that will receive LP tokens
    /// @param from The address from which we're pulling A and B tokens
    /// @param amountAMin The minimum amount of tokenA that must be received for the transaction not to revert.
    /// @param amountBMin The minimum amount of tokenB that must be received for the transaction not to revert.
    /// @param deadline Unix timestamp after which the transaction will revert.
    struct UniWithdrawData {
        address tokenA;
        address tokenB;
        uint256 liquidity;
        address to;
        address from;
        uint256 amountAMin;
        uint256 amountBMin;
        uint256 deadline;
    }

Return value:

return bytes32(liqAmount);

Events:

emit ActionEvent("UniWithdraw", logData);

logger.logActionDirectEvent("UniWithdraw", logData);

bytes memory logData = abi.encode(_uniData, amountA, amountB)

Last updated