💿CompBorrow

Description

Action ID: 0x82875a6c

Borrow a token from Compound

SDK Action

    const compBorrowAction = new dfs.actions.compound.CompoundBorrowAction(cTokenAddr, amount, to);

Contract

This is a DFS STANDARD_ACTION.

Input:

/// @param cTokenAddr Address of the cToken we are borrowing
/// @param amount Amount of tokens to be borrowed
/// @param to The address we are sending the borrowed tokens to
struct Params {
        address cTokenAddr;
        uint256 amount;
        address to;
    }

Return value:

return bytes32(borrowAmount);

Events:

emit ActionEvent("CompBorrow", logData);

logger.logActionDirectEvent("CompBorrow", logData);

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

Last updated