🐔CBChickenIn

Chickens in a bond and gets back bLUSD

Description

Action chicken ins a pending bond and gets back bLUSD token in return. Action calls ChickenBondManager.chickenIn(uint256 _bondID)

SDK Action


const cbChickenInAction = new dfs.actions.chickenBonds.CBChickenInAction(
        bondID,
        to,
);

Contract

This is a standard dfs action.

to parameter can't be address(0) the action will revert

Proxy must be the owner of the bondID NFT

Input:

/// @param bondID NFT token id of the bond
/// @param to Address where to send bLUSD returned
struct Params {
    uint256 bondID;
    address to;
}

Return value:

return bytes32(bLusdAmountReceived); // amount of bLUSD

Events:

bytes memory logData = abi.encode(bLusdAmountReceived, _params.bondID, _params.to);

// event for direct call
logger.logActionDirectEvent("CBChickenIn", logData);

// event in recipe
emit ActionEvent("CBChickenIn", logData);

Last updated