Withdraw a token from Compound, burns cTokens and returns underlying tokens.
SDK Action
const compWithdrawAction = new dfs.actions.compound.CompoundWithdrawAction(
cTokenAddr,
amount,
to,
);
Contract
This is a DFS STANDARD_ACTION.
Send type(uint).max to withdraw whole balance
Input:
/// @param cTokenAddr Address of the cToken we're burning for underlying
/// @param amount Amount of underlying tokens to withdraw
/// @param to Address where to send the tokens to (can be left on proxy)
struct Params {
address cTokenAddr;
uint256 amount;
address to;
}