This repository contains a Proof of Concept for the Gitcoin Attestation Network. This feature allows users to mint on-chain attestations as proof of their donations. Attestations are created using delegated signing and stored on-chain to ensure transparency and verifiable records of contributions.
The Gitcoin Attestation Network enables users to mint attestations tied to their donations across multiple networks. Using the Ethereum Attestation Service (EAS), Gitcoin can delegate the signing process to trusted validators. After completing a donation, users are prompted to mint these attestations on the network of their choice, leveraging Custom EAS SchemaResolver to validate the process.
The Gitcoin Attestation Network currently supports the following networks natively via Ethereum Attestation Service (EAS):
- Mainnets: Ethereum, Optimism, Base, Arbitrum One, Arbitrum Nova, Scroll, Linea, Polygon, Blast, Celo
- Testnets: Sepolia, Optimism Sepolia, Optimism Goerli, Base Sepolia, Base Goerli, Polygon Amoy, Linea Goerli, Scroll Sepolia
Additional networks support requires hosting custom infrastructure, including contract deployment and indexer services.
-
Donation: Users donate to one or more projects, potentially across multiple networks.
-
Checkout: After completing their donations, users are given the option to mint attestation proofs of their contributions.
WIP: Decide whether to issue one attestation per donation or one attestation for the entire checkout.
-
Network Selection: The user selects an EAS-supported network (see the full list above) on which they wish to mint their attestations.
-
Attestation Signing: Once the user selects the network, Gitcoin’s whitelisted delegator signs the attestation data, ensuring that only valid donations are attested.
-
Minting: After the signature is generated, the user is prompted to mint the attestations using either the
multiDelegateAttestation
ordelegateAttestation
functionality provided by EAS. This ensures the attestation is recorded on-chain and serves as a verifiable proof of contribution.
- Modular Attestation Fee: Fees are dynamically adjusted based on the network’s native token prices, ensuring flexibility in different market conditions.
- Security: The use of Gitcoin's custom
SchemaResolver
ensures that only attestations signed by authorized Gitcoin delegators are valid, preserving the integrity of the attestation process.
- Private Key Storage: The server that stores the private key of Gitcoin’s delegators may present a security risk if not properly managed.
- Limited Network Support: Additional networks can only be supported by hosting custom infrastructure, including smart contract deployment and indexers.
- Node.js & npm installed
- Hardhat environment set up
- EAS SDK installed
-
Clone the repository:
git clone https://github.com/gitcoinco/gitcoin-attestation-network.git
-
Install dependencies:
cd gitcoin-attestation-network/contracts bun install
-
Set up environment variables for:
cp .env.example .env
- Update with
your private key
- Update with
-
Deploy the
GitcoinGrantsResolver
contract after executing the script. Copy the logged transaction hash from the schema creation transaction and paste it into the EAS scanner. Copy the schemaUID and update the.env GITCOIN_GRANTS_SCHEMA_UID
, then you can test the delegate attestation workflow in the next step:bun deployResolver
-
Test the attestation delegation workflow using the included Hardhat task:
bun delegate
The attestation schema is a Work in Progress (WIP). The schema will capture key attributes such as the donation amount, project name, expected match, and round details to ensure that all donation data is transparently and verifiably stored on-chain.