# Attestation Mechanism

We support peer to peer message attestation with customized identity roles with realtime roles validity check through EAS resolver, our design is compatible with existing EAS mechanism.

## Attestation Types

**Message Attestation with Customized Identity Roles:**

* **Badgeholders**
* **Delegates**
* **Delegators**

## Workflow

1. Users submit attestations through the passport frontend or directly through the smart contract on Optimism at our EAS schema contract.
2. The EAS schema contract calls the role resolver contract.
3. The role resolver contract calls the customized role validity checker for each customized role.
   1. Badgeholders are identified by on-chain badgeholder attestation (<https://optimism.easscan.org/schema/view/0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b>) from OP Foundation attestor addresses (0x621477dBA416E12df7FF0d48E14c4D20DC85D7D9, 0xE4553b743E74dA3424Ac51f8C1E586fd43aE226F)

      \*\*Users must also submit the badgeholder attestation id as a reference. The attestation is only valid for the latest RetroPGF round.
   2. Delegates and Delegators are identified by OP token contract (<https://optimistic.etherscan.io/token/0x4200000000000000000000000000000000000042>) inside `getVotes` and `delegates` view functions
4. If the resolver returns true, then emit the attestation. The transaction is completed per user perspective.
5. Curia Indexer picks up all attestations for the schema.
6. The attestation can be viewed through the passport frontend in both the attester and attested address.

## Schema Definitions

* The attester and attested are already included in EAS attestation info by default so we omit this in the data part.
* Data part: `{role: uint256, title:string, message: string, ref: bytes}`

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfOv9_B1rH94vvR8Btty6pFOoGMKqdoO71xBPjqcehJKecaG5xBKZt_Dh4TXSGaDhGpNmOvkG1k9PvTtl0dU-1ECTY1juQyCTte4q295Mqat5KJqirggAbaDDsaB9YPjWhuR-6aVAuDak65e1C6tLd4TwQ?key=ZaMqDdf-yVYtZfRrrXONgw" alt=""><figcaption></figcaption></figure>


---

# 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.oppassport.xyz/endorsement-attestation/attestation-mechanism.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.
