> For the complete documentation index, see [llms.txt](https://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/smart-contracts/reporter-registry.md).

# reporter-registry

Decides who may post to the coverage ledger, and in which role. Holds no money.

## Functions

| Function         | Parameters                                    | Returns                | Who can call            | Triggered by                                                                        |
| ---------------- | --------------------------------------------- | ---------------------- | ----------------------- | ----------------------------------------------------------------------------------- |
| `__constructor`  | `admin: Address`                              | —                      | deployer                | deployment                                                                          |
| `admin`          | —                                             | `Address`              | anyone                  | reads                                                                               |
| `set_reporter`   | `reporter: Address, role: Role, name: String` | —                      | admin                   | onboarding an auditor, transcriber or poster; also changes an existing role or name |
| `revoke`         | `reporter: Address`                           | —                      | admin                   | removing a reporter                                                                 |
| `role_of`        | `reporter: Address`                           | `Option<Role>`         | anyone                  | the ledger, on every post                                                           |
| `get_reporter`   | `reporter: Address`                           | `Option<ReporterInfo>` | anyone                  | the app's "which tier will I get?" check                                            |
| `transfer_admin` | `new_admin: Address`                          | —                      | admin **and** new admin | handover                                                                            |
| `upgrade`        | `wasm_hash: BytesN<32>`                       | —                      | admin                   | contract upgrade                                                                    |

`ReporterInfo` is `{ role, name, added_at }`. Changing a reporter's role keeps its original `added_at`.

## Errors

| Code | Name               | When                                          |
| ---- | ------------------ | --------------------------------------------- |
| 1    | `ReporterNotFound` | `revoke` on an address that is not registered |
| 2    | `InvalidName`      | `name` is empty or longer than 64 bytes       |

## Events

| Event               | Topics      | Data           |
| ------------------- | ----------- | -------------- |
| `reporter_set`      | `reporter`  | `role`, `name` |
| `reporter_revoked`  | `reporter`  | —              |
| `admin_transferred` | `new_admin` | —              |

## Example

```bash
stellar contract invoke --network testnet --source plimsoll-admin \
  --id CCZCBR7MGSW5LGIEUQR5TU5Z7JQWBDEESB3RGPTRPMCBUMOISRPY7GOB -- \
  set_reporter --reporter G... --role 1 --name "Acme Audit LLP"
```


---

# 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://plimsoll-protocol.gitbook.io/plimsoll-protocol-docs/smart-contracts/reporter-registry.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.
