Skip to content

Schema Creation

To limit which attestations are created, check the supplied attestation data in a custom schema hook. If the data meets your requirements, the attestation is created; if the hook reverts, it is not.

First, define the schema data. For this tutorial, it includes only a number:

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

You must supply your schema hook's address when you create the schema, so build the schema hook next.