💿CompV3Withdraw

Description

Action ID: 0xc0072381

Withdraw a token from CompoundV3

SDK Action

    const compV3WithdrawAction = new dfs.actions.compoundV3.CompoundV3WithdrawAction(
        market,
        to,
        asset,
        amount,
    );

Contract

This is a DFS STANDARD_ACTION.

Send type(uint).max withdraws the whole balance from Comet

Input:

    /// @param market Main Comet proxy contract that is different for each compound market
    /// @param to The recipient address
    /// @param asset Token address of the asset to withdraw
    /// @param amount The quantity to withdraw
    struct Params {
        address market;
        address to;
        address asset;
        uint256 amount;
    }

Return value:

return bytes32(withdrawAmount);

Events:

emit ActionEvent("CompV3Withdraw", logData);

logger.logActionDirectEvent("CompV3Withdraw", logData);

bytes memory logData = abi.encode(_market, _to, _asset, _amount)

Last updated