V2 - Diamond

The second version of the KlimaDAO retirement tooling is an implementation of an EIP-2535 multi-facet proxy that allows for a unified experience against one contract address while utilizing logic from multiple other contracts. In addition, the Generalized Retirement developer experience is made more intuitive as certain parameters were abstracted away.

All facets and internal libraries share a common storage space using the AppStorage pattern.

Main diamond contract is deployed to 0x8cE54d9625371fb2a068986d32C85De8E6e995f8 on Polygon.

There are currently two main types of facets within the Diamond.

  • Generalized Retirement

  • Bridge Specific Tooling

The General Retirement functions should be sufficient for all retirement calls. However, Bridge Specific Tooling becomes useful for Redeem functions and allows for explicit specification of the retiringEntityString , set by default to "KlimaDAO Retirement Aggregator".

All retirement transactions initiated through this contract emit the following event.

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

Last updated