Schema Creation

To limit which attestations are created, we want to check the supplied attestation data using a custom schema hook. If our hook's code reverts, the attestation will not be created. If the attestation data meets our requirements, the hook will allow the attestation to be created.

First, we need to define our schema data. For this tutorial, the schema data will only include a number. Our schema looks like the following:

[
  {
    "name": "threshold",
    "type": "uint256"
  }
]

Your schema hook's address must be supplied when you create a schema. Now that you know what the schema's data looks like, let's build our schema hook.

Last updated

Logo

Copyright Sign 2021-2024