Attestation Resolver Contracts

Using Resolver Contracts

Resolver Contract acts as a hook for a Schema, ensuring that attestations conform to specific rules or any smart contract logic before they can be completed. This feature allows you to introduce additional smart contract functionality to your schema, such as an allowlist of users that can create attestations or minting NFTs when specific conditions are met.

The Concept

When creating a new Schema, an entity might want to enforce custom logic or rules that the Schema must follow. This can be achieved by adding a resolver contract at the schema level, which ensures that the schema adheres to the desired smart contract logic.

FINALIZE YOUR RESOLVER BEFORE USING IT ON A SCHEMA

You cannot update the resolver address associated with the schema after it has been made. Make sure your resolver is ready before deployment.

How it Works

You can explore a base resolver contract in the EAS GitHub Repository:

The SchemaResolver.sol is a base contract that provides a framework for creating custom resolver contracts to validate and process attestations in EAS. This base contract allows for the development of various resolver contracts with custom rules for validating attestations and revocations in a modular and flexible way.

Example Resolver Contracts

We've created a few resolver contract examples you can explore. These are meant to be used for inspiration. Remember that you can add any resolver contract address to your schema when the schema is being made.

EXPLORE THE LATEST EXAMPLES ON GITHUB

https://github.com/ethereum-attestation-service/eas-contracts/tree/master/contracts/resolver/examples

Attester Resolver

The AttesterResolver.sol resolvers purpose is to check if an attestation is created by a specific attester, which is set during the contract deployment. When a new attestation is submitted using this resolver, the contract verifies that the attestation comes from the specified attester before allowing it to proceed.

https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/resolver/examples/AttesterResolver.sol