RetireICRFacet

Git Source

Inherits: ReentrancyGuard

Functions

icrRetireExactCarbon

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

The transactions will revert otherwise.

Redeems ICR credit directly

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

Parameters

NameTypeDescription
projectTokenaddressProject token address
tokenIduint256Token ID for project to retire
amountuint256Amounts of underlying tokens to redeem
retiringEntityStringstringString description for 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 tokenId,
    uint256 retiredAmount
);