RetireCarbonmarkFacet

Git Source

Inherits: ReentrancyGuard

Functions

retireCarbonmarkListing

Retires an exact amount of carbon using default redemption

function retireCarbonmarkListing(
    ICarbonmark.CreditListing memory listing,
    uint256 maxAmountIn,
    uint256 retireAmount,
    string memory retiringEntityString,
    address beneficiaryAddress,
    string memory beneficiaryString,
    string memory retirementMessage,
    LibTransfer.From fromMode
) external payable nonReentrant returns (uint256 retirementIndex);

Parameters

NameTypeDescription
listingICarbonmark.CreditListing
maxAmountInuint256Maximum amount of USDC tokens to spend for this retirement
retireAmountuint256The amount of carbon to retire
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 poolToken,
    uint256 retiredAmount
);