# Smart Contract Suite

**1. ThalloBridgeRegistry.sol**

Smart contract responsible for:

* Creating projects on-chain
* Creating vintages on-chain. Creating a vintage on-chain means deploying a new Thallo Carbon Credit (TCC) ERC20 contract.

#### 2. ThalloBridgeEvents.sol

The primary smart contract for interacting with and viewing events that happen on the bridge.

* Issues Vintage Tokens. Create ERC20 tokens from underlying carbon credits.
* Finalize Retirement. Store information related to carbon credit retirement on-chain and mint a proof of retirement NFT to the user.
* Detokenization (Finalize Uncustody). Burn ERC20 credits that have been detokenized and returned to the user on the underlying carbon credit registry.
* Audit and view the bridge events logs. Every action taken on the Thallo bridge is stored and can easily be retrieved and viewed with a one click function for each project and vintage. The audit log shows issuance, retirements, and detokenization. The log also contains the information associated with these events such as serial numbers on the underlying registries. The function also confirms that all the data logged matches the current outstanding supply of tokens.&#x20;

$$
TotalSupply = Issuance - Retirement - Detokenization
$$

#### 3. TCC.sol

Fungible ERC20 smart contract. There is a different contract for each specific project and vintage year combination. The TCC contract contains the logic to:

* Request retirement of tokenized carbon credits&#x20;
* Request detokenization of tokenized carbon credits

#### 4. ThalloProofOfRetirement.sol

Responsible for creating and storing information for Proof-of-Retirement NFTs. Proof-of-Retirement NFTs are created when a user retires carbon credits on Thallo's platform.


---

# Agent Instructions: 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:

```
GET https://docs.thallo.io/bridge-core/smart-contract-suite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
