RetireC3C3TFacet

Git Source

Inherits: ReentrancyGuard

Functions

c3RetireExactC3T

This contract assumes that the token being provided is a raw TCO2 token.

The transactions will revert otherwise.

Redeems C3T directly

function c3RetireExactC3T(
    address carbonToken,
    uint256 amount,
    address beneficiaryAddress,
    string memory beneficiaryString,
    string memory retirementMessage,
    LibTransfer.From fromMode
) external nonReentrant returns (uint256 retirementIndex);

Parameters

NameTypeDescription
carbonTokenaddressPool token to redeem
amountuint256Amounts of underlying tokens to redeem
beneficiaryAddressaddress0x address for the beneficiary
beneficiaryStringstringString description of the beneficiary
retirementMessagestringString message for this specific retirement
fromModeLibTransfer.FromFrom Mode for transfering tokens

Returns

NameTypeDescription
retirementIndexuint256The latest retirement index for the beneficiary address

c3RetireExactC3TWithEntity

Redeems C3T directly

function c3RetireExactC3TWithEntity(
    address carbonToken,
    uint256 amount,
    string memory retiringEntityString,
    address beneficiaryAddress,
    string memory beneficiaryString,
    string memory retirementMessage,
    LibTransfer.From fromMode
) external nonReentrant returns (uint256 retirementIndex);

Parameters

NameTypeDescription
carbonTokenaddressPool token to redeem
amountuint256Amounts of underlying tokens to redeem
retiringEntityStringstringString description of the retiring entity
beneficiaryAddressaddress0x address for the beneficiary
beneficiaryStringstringString description of the beneficiary
retirementMessagestringString message for this specific retirement
fromModeLibTransfer.FromFrom Mode for transfering tokens

Returns

NameTypeDescription
retirementIndexuint256The latest retirement index for the beneficiary address

Events

CarbonRetired

event CarbonRetired(
    LibRetire.CarbonBridge carbonBridge,
    address indexed retiringAddress,
    string retiringEntityString,
    address indexed beneficiaryAddress,
    string beneficiaryString,
    string retirementMessage,
    address indexed carbonPool,
    address carbonToken,
    uint256 retiredAmount
);