DyDxWithdraw

Description

Withdraw tokens from DyDx

Notes

User withdraws tokens from the DyDx protocol

Action ID

0x63e4c7d0

SDK Action

const dyDxWithdrawAction = new dfs.actions.dydx.DyDxWithdrawAction(
    tokenAddr,
    amount,
    to
);

Action Type

STANDARD_ACTION

Input Parameters

    /// @param tokenAddr Address of the token to be withdrawn
    /// @param amount Amount of tokens to be withdrawn -> send type(uint).max for whole amount
    /// @param to Where the withdrawn tokens will be sent
    struct Params {
        address tokenAddr;
        uint256 amount;
        address to;
    }

Return Value

return bytes32(withdrawnAmount);

Events and Logs

emit ActionEvent("DyDxWithdraw", logData);
logger.logActionDirectEvent("DyDxWithdraw", logData);
bytes memory logData = abi.encode(params);

Last updated

Was this helpful?