🛠️SendTokenAndUnwrap

Description

Action ID: 0x17782156

Helper action to send a token to the specified address and unwrap if weth address

SDK Action

const sendTokenAndUnwrapAction = new dfs.actions.basic.SendTokenAndUnwrapAction(
    tokenAddr,
    to,
    amount,
);

Contract

This is a DFS STANDARD_ACTION.

If amount is type(uint).max it will send proxy balance

If weth address is set it will unwrap by default

Input:

    /// @param tokenAddr Address of token, use 0xEeee... for eth
    /// @param to Where the tokens are sent
    /// @param amount Amount of tokens, can be type(uint).max
    struct Params {
        address tokenAddr;
        address to;
        uint256 amount;
    }

Return value:

return bytes32(inputData.amount);

Events:

Last updated