> For the complete documentation index, see [llms.txt](https://docs.metalex.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metalex.tech/building-on-the-protocol/reference.md).

# Reference

Contract APIs, roles, events and deployed addresses

Look up contract functions, access rules, events, errors and addresses here. The [guides](/building-on-the-protocol/how-to.md) show how to put them together.

> **The contract source is authoritative.** These pages follow the `develop` branch of [`cybercorps-contracts`](https://github.com/MetaLex-Tech/cybercorps-contracts), where `CyberCorp`, `IssuanceManager`, `DealManager`, `RoundManager`, `LedgerEntryToken` and `CyberScrip` all report `DEPLOY_VERSION` `"5"`. Companies that have not upgraded run v4 components (`"4"`, with `IssuanceManager` at `"4.1"` and `DealManager` at `"4.0.1"`), and the pages mark v4 differences wherever an integrator can meet both. `CyberShares` and `SafeCertificateConverter` are partly stubbed, as their pages say. Check the `.sol` source before relying on an exact signature, and treat the code in the guides as an outline of each flow that you verify against the source before use.

## Contents

| Page                                                                               | What it covers                                                                            |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Core contracts](/building-on-the-protocol/reference/contracts.md)                 | Every contract and its role, with a page per contract.                                    |
| [Factories](/building-on-the-protocol/reference/factories.md)                      | `CyberCorpFactory`, its sub-factories and the specialised factories.                      |
| [Certificate extensions](/building-on-the-protocol/reference/extensions.md)        | Per-security-type metadata contracts and how their scopes merge.                          |
| [Hooks](/building-on-the-protocol/reference/hooks.md)                              | Transfer-restriction hooks and the LiquiLeX fee hook.                                     |
| [Conditions](/building-on-the-protocol/reference/conditions.md)                    | The `ICondition` and `ISecondaryTradingCondition` interfaces and the built-in conditions. |
| [Access control (BorgAuth)](/building-on-the-protocol/reference/access-control.md) | The numeric role model and the levels the protocol assigns.                               |
| [Upgrade model](/building-on-the-protocol/reference/upgrade-model.md)              | UUPS and beacon proxies, co-approval, versions in production.                             |
| [Agreement templates](/building-on-the-protocol/reference/templates.md)            | The `/templates` library and custom templates.                                            |
| [Security types](/building-on-the-protocol/reference/security-types.md)            | The `SecurityClass`, `SecuritySeries` and `SecurityStatus` enums.                         |
| [Deployments](/building-on-the-protocol/reference/deployments.md)                  | Contract addresses by chain.                                                              |
| [Glossary](/building-on-the-protocol/reference/glossary.md)                        | Protocol and app terms.                                                                   |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.metalex.tech/building-on-the-protocol/reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
