Revoke an Attestation
Revoking an Attestation is straightforward. To revoke an Attestation that was previously created in the registry, you need to call the revoke
function on the Portal that first issued the attestation. The revoke
method is:
The Attestation registry will check that the Portal actually allows revocations, as defined when the portal was first registered. If a Portal was registered with the revocable
property set to false
then it will reject any attempt to revoke an existing Attestation.
Lifecycle Hook
You can also place custom logic in the _onRevoke
lifecycle hook to run any additional verification before the revocation takes place, or perform any other action that you wish.
By default, via the _onRevoke
hook, only the owner of the Portal can revoke an Attestation
Verification Checks
Note that you can't revoke an Attestation made by another Portal, even if that Portal allows revocation. The full list of verification checks that the attestation registry makes before revocation an attestation are as follows:
Checks that the attestation being revoked exists (is registered).
Checks that it is not already revoked.
Checks that the Portal revoking the attestation initially created it.
Checks that the portal through which the attestation was issued actually allows revocations.
Once all these verification checks have passed, the Attestation can be flagged as revoked in the registry.
Bulk revocation
A Portal also exposes a bulkRevoke
function, to revoke multiple Attestations at once, to save on gas fees. The bulkRevoke
function is:
The _onBulkRevoke
hook lets you add some custom logic to this workflow
Last updated