> For the complete documentation index, see [llms.txt](https://docs.klimadao.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.klimadao.finance/developers/contracts/retirement/v2-diamond.md).

# V2 - Diamond

The second version of the KlimaDAO retirement tooling is an implementation of an [EIP-2535](https://eips.ethereum.org/EIPS/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](/developers/contracts/retirement/v2-diamond/generalized-retirement.md) 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.

* View on [Louper](https://louper.dev/diamond/0x8cE54d9625371fb2a068986d32C85De8E6e995f8?network=polygon)
* View on [Polygonscan](https://polygonscan.com/address/0x8ce54d9625371fb2a068986d32c85de8e6e995f8)

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.&#x20;

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

<table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>carbonBridge</td><td>LibRetire.CarbonBridge</td><td><p>This enum is used for the source of the carbon retired.</p><pre class="language-solidity"><code class="lang-solidity">0 = TOUCAN
1 = MOSS
2 = C3
</code></pre></td></tr><tr><td>retiringAddress</td><td>Address</td><td>Address calling the retirement. Currently the <code>msg.sender</code> value for the retiring transaction.</td></tr><tr><td>retiringEntityString</td><td>String</td><td>String representation of the retiring entity calling the transaction.</td></tr><tr><td>beneficiaryAddress</td><td>Address</td><td>Address for the beneficiary of the retirement. Any NFT certificates created during the retirement will be sent to this address.</td></tr><tr><td>beneficiaryString</td><td>string</td><td>String representation of the beneficiary.</td></tr><tr><td>retirementMessage</td><td>string</td><td>Specific message related to this retirement.</td></tr><tr><td>carbonPool</td><td>address</td><td>Carbon pool token used to retire. If none, the zero address is used.</td></tr><tr><td>carbonToken</td><td>address</td><td>The token address for the specific carbon project token being retired. If none, the zero address is used.</td></tr><tr><td>retiredAmount</td><td>uint256</td><td>Amount of carbon retired. This uses the token's native decimals.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.klimadao.finance/developers/contracts/retirement/v2-diamond.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
