> For the complete documentation index, see [llms.txt](https://docs.minervachain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.minervachain.org/protocol/system-contracts.md). Agents can also search and read this documentation through its [MCP server](https://docs.minervachain.org/~gitbook/mcp).

# Precompiles and system contracts

Minerva reserves the precompile range `0x…4D00` to `0x…4DFF` and installs its system and bridge contracts at fixed addresses in every genesis. The addresses are the same on the mainnet, the testnet and a devnet.

## Precompiles

| Address                                      | Name                 | ABI                                                                                                                                                                    | Gas             |
| -------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| `0x0000000000000000000000000000000000004D00` | ML-DSA-65 verify     | `(bytes publicKey, bytes message, bytes context, bytes signature) → (bool valid)`                                                                                      | priced per call |
| `0x0000000000000000000000000000000000004D01` | `MINERVA_TX_CONTEXT` | `() → (address account, bytes32 keyCommitment, uint8 algorithm, uint64 policyVersion, bytes32 factorySalt)` for the native transaction being executed, zeros otherwise | 100             |

`0x…0100` is left free for RIP-7212 / EIP-7951 (secp256r1) and is not a Minerva precompile.

Calling the verifier from Solidity:

```solidity
address constant MLDSA65 = 0x0000000000000000000000000000000000004D00;

function verify(bytes memory pk, bytes memory msg_, bytes memory ctx, bytes memory sig) internal view returns (bool ok) {
    (bool success, bytes memory out) = MLDSA65.staticcall(abi.encode(pk, msg_, ctx, sig));
    require(success, "mldsa65: call failed");
    ok = abi.decode(out, (bool));
}
```

## System contracts

| Address                                      | Contract                   | Role                                                                                                                                   |
| -------------------------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `0x0000000000000000000000000000000000000201` | `SecurityModeRegistry`     | security mode label per account; writable only by the account                                                                          |
| `0x0000000000000000000000000000000000000202` | `AccountReadinessRegistry` | readiness record for `msg.sender`                                                                                                      |
| `0x0000000000000000000000000000000000000203` | `MinervaAccountFactory`    | `createAccount(bytes32 salt, bytes pqPublicKey)`; deterministic `CREATE2` deployment; returns the existing account if already deployed |
| `0x0000000000000000000000000000000000000204` | `AccountControlRegistry`   | `(commitment, algorithm, policyVersion)` and device keys per account; read by consensus                                                |
| `0x0000000000000000000000000000000000000205` | `MinervaMigrationReserve`  | the 1,000,000 MRV one-way claim programme                                                                                              |

## Bridge contracts (Minerva side)

| Address                                      | Contract                       | Role                                                                                                      |
| -------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------- |
| `0x0000000000000000000000000000000000000301` | `MinervaBridgeMessageRegistry` | outbound nonces, inbound execution and expiry records, shared across vault generations                    |
| `0x0000000000000000000000000000000000000302` | `MinervaPQGuardianVerifier`    | verifies ML-DSA-65 guardian attestations (3 guardians, threshold 2 on the mainnet) through the precompile |
| `0x0000000000000000000000000000000000000303` | `MinervaNativeBridgeVault`     | holds the bridge reserve; locks, releases, refunds, ledger                                                |

## Contract bytecode is metadata-free

The contracts are compiled with `bytecode_hash = "none"` and `cbor_metadata = false`, so a source comment edit does not change the system-contract code or the `CREATE2` account addresses. A functional change to `MinervaAccount` still changes every account address and can only ship with a new genesis.

Deployment records with code hashes per network are in `network/contracts/deployments/<profile>/deployments.json` and `bridge-deployments.json` in the network repository.


---

# 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.minervachain.org/protocol/system-contracts.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.
