Ethereum Attestation Service (EAS) system development

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1 servicesAll 1306 services
Ethereum Attestation Service (EAS) system development
Medium
~3-5 business days
FAQ
Blockchain Development Services
Blockchain Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1214
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823

Development of Attestation System (EAS — Ethereum Attestation Service)

EAS (Ethereum Attestation Service) — open protocol for creating on-chain and off-chain attestations on Ethereum and L2. Attestation — any statement by one address about another address or fact. "Address A confirms that address B passed KYC", "Address A confirms that B is a DAO participant".

Key EAS Concepts

Schema: data structure of attestation. Registered on-chain in SchemaRegistry. Defines fields and their types.

Attestation: specific confirmation based on schema. Contains data, attester (who confirmed), recipient (about whom), expiration, revocable flag.

On-chain vs Off-chain: attestations can be stored on-chain (expensive, but permanent) or off-chain (IPFS/Arweave) with on-chain UID for verification.

Schema Registration

import { ISchemaRegistry, SchemaRecord } from "@ethereum-attestation-service/eas-contracts/contracts/ISchemaRegistry.sol";

ISchemaRegistry schemaRegistry = ISchemaRegistry(EAS_SCHEMA_REGISTRY);

// Register schema
bytes32 schemaUID = schemaRegistry.register(
    "bool isKYCVerified, uint8 verificationLevel, string jurisdiction",
    ISchemaResolver(resolverAddress),  // optional resolver contract
    true  // revocable
);

Creating Attestation

import { IEAS, AttestationRequest, AttestationRequestData } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol";

IEAS eas = IEAS(EAS_ADDRESS);

bytes32 attestationUID = eas.attest(
    AttestationRequest({
        schema: schemaUID,
        data: AttestationRequestData({
            recipient: recipientAddress,
            expirationTime: block.timestamp + 365 days,
            revocable: true,
            refUID: bytes32(0),
            data: abi.encode(true, 2, "EU"),  // isKYCVerified, level, jurisdiction
            value: 0
        })
    })
);

Schema Resolver

Optional smart contract called when creating/revoking attestation — for additional logic:

import { SchemaResolver } from "@ethereum-attestation-service/eas-contracts/contracts/resolver/SchemaResolver.sol";

contract KYCAttestationResolver is SchemaResolver {
    mapping(address => bool) public verifiedAddresses;
    
    function onAttest(Attestation calldata attestation, uint256) 
        internal override returns (bool) {
        // Only whitelist attesters can create
        require(authorizedAttesters[attestation.attester], "Not authorized");
        
        (, uint8 level,) = abi.decode(attestation.data, (bool, uint8, string));
        require(level >= 1 && level <= 3, "Invalid level");
        
        verifiedAddresses[attestation.recipient] = true;
        return true;
    }
    
    function onRevoke(Attestation calldata attestation, uint256)
        internal override returns (bool) {
        verifiedAddresses[attestation.recipient] = false;
        return true;
    }
}

EAS SDK (TypeScript)

import { EAS, SchemaEncoder } from "@ethereum-attestation-service/eas-sdk";

const eas = new EAS(EAS_ADDRESS);
eas.connect(signer);

const schemaEncoder = new SchemaEncoder("bool isKYCVerified,uint8 verificationLevel,string jurisdiction");

const encodedData = schemaEncoder.encodeData([
    { name: "isKYCVerified", value: true, type: "bool" },
    { name: "verificationLevel", value: 2, type: "uint8" },
    { name: "jurisdiction", value: "EU", type: "string" }
]);

const tx = await eas.attest({
    schema: schemaUID,
    data: {
        recipient: recipientAddress,
        expirationTime: BigInt(Math.floor(Date.now() / 1000) + 365 * 24 * 3600),
        revocable: true,
        data: encodedData
    }
});

const uid = await tx.wait();

Use Cases

EAS is used in: Gitcoin Passport (attestations of on-chain activity), Optimism Retro Funding (attestations of contribution), Safe (attestations of trusted addresses).

Development of system based on EAS — 2-4 weeks for custom schema + resolver + frontend.