Indexer.getReceivedAttestationUIDs

getReceivedAttestationUIDs(address recipient, bytes32 schemaUid, uint256 start, uint256 length, bool reverseOrder) external view returns (bytes32[] memory)

Paginated reverse-lookup: returns up to length attestation UIDs issued to recipient under schemaUid. Use reverseOrder = true to start from the most recent. Each returned UID feeds EAS.getAttestation(uid) to fetch the actual struct and check revocation/expiration.

Parameters

Name Type Required Description
recipient address The recipient (subject) address.
schemaUid bytes32 The schema UID to filter by.
start uint256 Zero-based offset into the indexer's list. Pass 0 for the first page.
length uint256 Maximum number of UIDs to return. The Indexer caps very large requests internally; in practice 50-100 per call is fine.
reverseOrder bool true to traverse from the most recent attestation to the oldest. Most UI use cases want this.

Returns

Type: bytes32[]

Array of attestation UIDs. Empty array if no attestations match.

Examples

viem — most recent 5 attestations

const INDEXER = "0x1000000000000000000000000000000000000008";

const uids = await publicClient.readContract({
  address: INDEXER,
  abi: indexerAbi,
  functionName: "getReceivedAttestationUIDs",
  args: [recipient, schemaUid, 0n, 5n, true],
});

// Then look up each one to validate
const attestations = await Promise.all(
  uids.map((uid) =>
    publicClient.readContract({
      address: EAS,
      abi: easAbi,
      functionName: "getAttestation",
      args: [uid],
    })
  )
);
const valid = attestations.find(
  (a) => a.revocationTime === 0n && (a.expirationTime === 0n || a.expirationTime > now)
);
ESC
Type to search