Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 2.36 KB

portals.md

File metadata and controls

29 lines (17 loc) · 2.36 KB

Portals

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.

Portal Metadata

All portals contain certain metadata associated with them when they are registered:

FieldTypeDescription
idaddressThe portal ID (the address of portal contract)
ownerAddressaddressThe address of this portal’s owner
modulesaddress[]Addresses of modules implemented by the portal
isRevocableboolWhether attestations issued can be revoked
namestring(required) A descriptive name for the module
descriptionstring (URI)(optionally) A link to documentation about the module, its intended use, etc.
ownerNamestringThe name of this portal’s owner

Lifecycle Hooks

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

Customization

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.