Portals are the entry point into the registry for attestations. All attestations are made through portals. A portal is normally associated with a specific issuer, who would create a portal specifically to issue their attestations with, but portals can also be open to allow anyone to use.
A portal is a smart contract that executes specific verification logic through a chain of modules that attestations run through before being issued to the registry. Portals also have metadata associated with them and can optionally execute lifecycle hooks.
All portals contain certain metadata associated with them when they are registered:
Field | Type | Description |
---|---|---|
id | address | The portal ID (the address of portal contract) |
ownerAddress | address | The address of this portal’s owner |
modules | address[] | Addresses of modules implemented by the portal |
isRevocable | bool | Whether attestations issued can be revoked |
name | string | (required) A descriptive name for the module |
description | string (URI) | (optionally) A link to documentation about the module, its intended use, etc. |
ownerName | string | The name of this portal’s owner |
Each portal can specify optional lifecycle hooks that are executed at specific points in an attestation lifecycle. Hooks are specific functions called at specific points, which include:
- onAttest - executed just before an attestation is first created
- onReplace - executed just before an attestation is replaced by another attestation
- onRevoke - executed when an attestation is first revoked
- onBulkAttest - executed when attestations are created in bulk
- onBulkRevoke - executed when attestations are revoked in bulk
It is worth noting that the portal contract is entirely under the issuer's control and that the issuer is free to add any logic they want to the portal and customize it in any way!
To find out how to create a portal, see the Create a Portal page for more information.