Tutorial: Setting a Context for a Schema on EAS

To set a context for a schema on the EAS network, follow these steps:

Step 1: Visit the EAS Explorer

  • Go to the EAS explorer of the network where your schema exists. For example, for Optimism, visit Optimism EAS Explorer.

Step 2: Find the Schema Context

  • Look for a schema named "SCHEMA CONTEXT." This schema is used to set the context for other schemas.

Step 3: Make an Attestation

  • Once you find the "SCHEMA CONTEXT" schema, make an attestation to it. You will need to provide the schemaId and the context.

Step 4: Create a New Schema (If Needed)

  • If the "SCHEMA CONTEXT" schema does not exist on the EAS explorer of your network, create a new schema with the following details:

Decoded Schema:

BYTES32
schemaId
STRING
context

Example of Attestation:

  1. Schema ID: Enter the unique identifier of the schema you are setting the context for.
  2. Context: Provide the context information for your schema.

Step-by-Step Process:

  1. Access the EAS Explorer: Navigate to the appropriate EAS explorer for your network.
  2. Search for SCHEMA CONTEXT: Use the search function to find the "SCHEMA CONTEXT" schema.
  3. Attest to the Schema: Click on the schema and follow the prompts to make an attestation. Enter the required schemaId and context.
  4. Submit the Attestation: Review the details and submit your attestation.

By following these steps, you can successfully set a context for your schema on the EAS network. This context will be used to provide additional information about the schema and ensure it is correctly interpreted in various applications.