EASClaimIssuer
EASClaimIssuer lets an attestation of the Ethereum Attestation Service count as a claim. The adapter is the issuer of the claim: an identity stores a record that points at the attestation, and the adapter answers isClaimValid from EAS at every check. The attester needs no ONCHAINID. The concept is in External attestations.
At a glance
Source
contracts/modules/claims/EASClaimIssuer.sol
Interface
IClaimIssuer, of which it implements the validity reads only
Deployed as
One contract per EAS deployment it reads, not upgradeable. Built with the access manager of the network, the EAS contract and the IdentityFactory
State
Per claim topic: one EAS schema and a list of accepted attesters. No claim, no key, no revocation list
The record on the identity
The Identity Owner adds the claim with addClaim on its identity, with the adapter as _issuer.
signature
The 32-byte UID of the attestation: abi.encodePacked(uid)
data
The fields of the attestation, mirrored one for one
issuer
The adapter
Guide: 29 Bring an EAS attestation in as a claim.
Validity
isClaimValid(_identity, claimTopic, sig, data)
Anyone, read
True when getClaimStatus is Valid
getClaimStatus(_identity, claimTopic, sig, data)
Anyone, read
The status, read from EAS at the time of the call
getAttestationData(sig)
Anyone, read
The payload of the attestation, whatever its state. Empty when sig is not a 32-byte UID. Never a basis for a decision
isDigestRevoked(bytes32)
Anyone, read
Always false: revocation is read from EAS
BadSignature
The signature field is not a 32-byte UID
NotIssued
The topic is bound to no schema, the attestation uses another schema, the attester is not accepted for the topic, the record does not mirror the attestation, or the recipient is neither the identity nor a wallet linked to it
Revoked
The attester revoked the attestation on EAS
Expired
The attestation reached its expiration time
Valid
None of the above
Settings
setSchemaForTopic(topic, schema)
Network governance
Binds a claim topic to an EAS schema. A zero schema unbinds the topic: every claim of that topic stops being valid. Emits SchemaForTopicSet
setAttester(topic, attester, allowed)
Network governance
Adds an attester to the accepted set of a topic, or removes it. Reverts with ZeroAddress. Emits AttesterSet
getSchemaForTopic(topic), getIsAttesterAllowed(topic, attester), getEAS(), getFactory()
Anyone, read
Functions that revert
The adapter is not an identity. Every other function of IClaimIssuer and IIdentity reverts with EASNotSupported: addClaimTo, revokeClaimByDigest, getClaimHash, getIdentityType, the key functions (addKey, removeKey, getKey, getKeyPurposes, getKeysByPurpose, keyHasPurpose) and the claim storage functions (addClaim, removeClaim, getClaim, getClaimIdsByTopic).
IdentityFactory.identityTypeOf(adapter) is 0: the adapter is not a factory identity. An Issuer that trusts it adds its address as a trusted issuer, like any Claim Issuer.
Trust statement. A claim through the adapter rests on three parties: the attester, for what it attests, EAS, for the record and its revocation, and Network governance, for the binding of topics to schemas and the list of accepted attesters.
Events
AdapterInitialized(address indexed eas, address indexed factory)
Once, at construction
SchemaForTopicSet(uint256 indexed topic, bytes32 indexed schema, address caller)
A topic is bound to a schema, or unbound with a zero schema
AttesterSet(uint256 indexed topic, address indexed attester, bool allowed, address caller)
An attester is accepted for a topic, or removed
Last updated