Smart Contract Reference
The Passport smart contract stack allows developers to pull Stamp data directly from the blockchain rather than having to make requests to a centralized server. The smart contract stack is built on top of the Ethereum Attestation Service (EAS).
This page will outline the Human Passport smart contract stack and provide all the deployment details you need to integrate onchain Stamp data in your app.
This page is broken into two sections:
You can always chat in our Telegram developer support channelβ if you have questions about the Passport smart contracts.
How Passport adds data to the blockchain
We will not cover this in depth, as it is already documented in our GitHub docsβ.
Passport uses a combination of private Passport smart contracts and EAS contracts to create Passport attestations and mint them to the blockchain. This process is triggered when a user opts-in to minting their Passportβs score and Stamps onchain via the Passport app, and ends with two attestations being minted on EAS that can be accessed by third-party developers.
During this process, the user is charged a $2 mint fee to write the attestations onchain.
How to query for onchain Passport data
Human Passport, EAS, and Verax have created several smart contracts that can be used to retrieve usersβ Passport attestations. There are a couple of different flows you can follow, but we strongly recommend using the Decoder contract.
Available flows:
- [Recommended] Decoder contract flow
- GitcoinResolver >> EAS/Verax flow
Decoder contract
The decoder contract is a greatly simplified version of the alternative flow, and delivers all data you would need to integrate with Passport in a human-readable format.
Here is a rundown of the decoder contract flow:
- A request is sent to the
Decodercontract, passing the user address and method associated with the data youβd like to receive. - The smart contract delivers the data associated with the user and method.
- Your integration then either gates access to just those users over a specified score threshold, or displays the Passport data to help prove a users reputation.
GitHub links
- Smart contract: https://github.com/passportxyz/eas-proxy/blob/main/contracts/GitcoinPassportDecoder.solβ
- Interface contract: https://github.com/passportxyz/eas-proxy/blob/main/contracts/IGitcoinPassportDecoder.solβ
- ABI: https://github.com/passportxyz/eas-proxy/blob/main/deployments/abi/GitcoinPassportDecoder.jsonβ
Decoder contract addresses
The decoder is currently deployed to the following networks:
| Network | Contract address | Link |
|---|---|---|
| Arbitrum | 0x2050256A91cbABD7C42465aA0d5325115C1dEB43 | Arbiscanβ |
| Base | 0xaa24a127d10C68C8F9Ac06199AA606953cD82eE7 | Basescanβ |
| Linea | 0x423cd60ab053F1b63D6F78c8c0c63e20F009d669 | Explorerβ |
| Optimism | 0x5558D441779Eca04A329BcD6b47830D2C6607769 | Optimism Explorerβ |
| Optimism Sepolia | 0xe53C60F8069C2f0c3a84F9B3DB5cf56f3100ba56 | Optimism Explorerβ |
| Scroll | 0x8A5820030188346cC9532a1dD9FD2EF8d8F464de | Scrollscanβ |
| Scroll Sepolia | 0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2 | Scrollscanβ |
| Shape | 0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2 | Shapescanβ |
| Shape Sepolia | 0x2050256A91cbABD7C42465aA0d5325115C1dEB43 | Shapescanβ |
| ZkSync Era | 0x1166FCDCA3B04311Ba9E2eD5ad2c660E730e1386 | Explorerβ |
| ZkSync Sepolia | 0x23AF92Af3b5D6faAD920C3CAA4F9A3d4352D6834 | Explorerβ |
You can learn more about working with testnets via our guide on Test Mode.
Available methods
| Method | Description |
|---|---|
getPassport(userAddress) | Returns a list of valid credentials (Stamps) for a given ETH address. Example response: tuple[] : [[CoinbaseDualVerification2, 100420],[githubContributionActivityGte#60, 18880],[githubContributionActivityGte#30, 18790],[Ens, 2080],[NFTScore#50, 162460],[NFTScore#75, 23620],[NFTScore#90, 24130],[NFT, 10320],[GitcoinContributorStatistics#totalContributionAmountGte#10, 2230]] |
getScore(userAddress) (0xd47875d0) | Returns a specified addressβs score. Divide the value by 10000 to get the userβs score. This function will read the userβs score first from the cache in the GitcoinResolver and fall back to reading the score from the EAS Human Passport attestation schema. This method will revert with an error is a valid score is not found.Example response: uint256 : 143890 |
getScore(scorerId, userAddress) (0xdaadd662) | Returns a specified addressβs score based on the specified scorer ID (also known as community ID). Divide the value by 10000 to get the userβs score. This function will read the userβs score first from the cache in the GitcoinResolver and fall back to reading the score from the EAS Human Passport attestation schema. This method will revert with an error is a valid score is not found.Partners who are using Custom Passport can use this method to retrieve a custom score from a user |
isHuman(userAddress) | Returns a single boolean, indicating if the userβs score is above the minimum threshold, which is currently set to 20. It uses getScore() to retrieve the value that is compared against this threshold.Example responses: bool : falsebool : true |
Alternative flow β Deprecated
Please note that this method only enables you to receive decoded onchain Stamp data, and not score data.
This alternative flow represents a subset of the tasks that the decoder contract automatically works thorugh, which is why we donβt recommend using it. It is, however, useful to understand.
If you decide to go this route, you will follow this flow:
- A request is sent to the
Resolvercontract passing the user address - The
Resolvercontract returns aUID - The
UIDis passed to theEAScontract - The
EAScontract returns an encodedAttestation - Decode the
Attestationand extracts the Stamp data
GitcoinResolver contract
The GitcoinResolver contract is used to request a UID for an address.
The Attestations are stored in a mapping, where the Attestation is stored as raw bytes (allowing Attestations with any schema to be included).
In order to ensure the integrity of the data that the contract stores, the resolver smart contract shall only validate and store date from trusted sources:
- a trusted EAS contract
- a trusted Attester
EAS contract
The EAS contract is where you can pass the UIDreceived from the GitcoinResolver contract to receive an Attestation.
Alternative flow contract addresses
Arbitrum
The Arbitrum chain ID is 42161β.
| contract | address | link |
|---|---|---|
| issuer | 0x804233b96cbd6d81efeb6517347177ef7bD488ED | Arbiscanβ |
| EAS | 0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458 | Arbiscanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Arbiscanβ |
| GitcoinVerifier | 0xc4858e4D177Bf0d14571F91401492d62aa608047 | Arbiscanβ |
| GitcoinAttester | 0x7848a3578Ff2E1F134659a23f64A404a4D710475 | Arbiscanβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 | EasScanβ |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 | EasScanβ |
Base
| Contract | Address | Link |
|---|---|---|
| EAS | 0x4200000000000000000000000000000000000021 | Basescanβ |
| EASSchemaRegistry | 0x4200000000000000000000000000000000000020 | Basescanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Basescanβ |
| GitcoinVerifier | 0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185 | Basescanβ |
| GitcoinAttester | 0xCc90105D4A2aa067ee768120AdA19886021dF422 | Basescanβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 | EasScanβ |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 | EasScanβ |
Linea
The Linea chain ID is 59144β.
| contract | address | link |
|---|---|---|
| issuer | 0x4B70C4308ea49d17FD946dDacD6884e8e1e18B56 | Lineascanβ |
| EAS | 0xaEF4103A04090071165F78D45D83A0C0782c2B2a | Lineascanβ |
| GitcoinVeraxPortal | 0xCAa9E817f02486cE076560B77A86235Ef91c5d5D | Lineascanβ |
| GitcoinResolver | 0x0a774AECE542a1A819107Eb3a06E9D515C67257a | Lineascanβ |
| GitcoinVerifier | 0xc94aBf0292Ac04AAC18C251d9C8169a8dd2BBbDC | Lineascanβ |
| GitcoinAttester | 0xBC778313E52b1184A15D163b5d3a72AEF8d510A2 | Lineascanβ |
Verax schema
| schema | uid |
|---|---|
| passport | 0x501e6fcade7e3483d0ae7fcfebb732907ebda12b209f5116e52c02697062a50e |
| score | 0x01f031da36192c34057c764239eb77bb6ec8ebfb808f72a7bb172f37a5bec31f |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x69b9d63ff6b161097cb4930e197a722bcf423f832d4e4cd3692449d5a1e1319f | EasScanβ |
| score | 0x4da1eaac6346b8b79a705e3898a308062ca607f56c07762ef7b7ff8a7661843c | EasScanβ |
Optimism
The Optimism chain ID is 10β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x804233b96cbd6d81efeb6517347177ef7bD488ED | Optimism Explorerβ |
| EAS | 0x4200000000000000000000000000000000000021 | Optimism Explorerβ |
| GitcoinResolver | 0xc94aBf0292Ac04AAC18C251d9C8169a8dd2BBbDC | Optimism Explorerβ |
| GitcoinVerifier | 0xa8eD4d2C3f6f98A55cdDEd97C5aE9B932B0633A4 | Optimism Explorerβ |
| GitcoinAttester | 0x843829986e895facd330486a61Ebee9E1f1adB1a | Optimism Explorerβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0xd7b8c4ffa4c9fd1ecb3f6db8201e916a8d7dba11f161c1b0b5ccf44ceb8e2a39 | EasScanβ |
| score | 0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89 | EasScanβ |
Optimism Sepolia
The Optimism Sepolia chain ID is 11155420β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x4200000000000000000000000000000000000021 | Optimism Explorerβ |
| EAS | 0x4200000000000000000000000000000000000020 | Optimism Explorerβ |
| GitcoinResolver | 0x074761E1Dc6E6cF9cdeE67dd180E01E818716Ce0 | Optimism Explorerβ |
| GitcoinVerifier | 0x8D21C3360dcE1a9EBD3Da4373c4dAB7F81dd7233 | Optimism Explorerβ |
| GitcoinAttester | 0x8B1A76795e3CbadD79C5410d2C4D4827D9C1503a | Optimism Explorerβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x7026a3d524ee3dae5859aa00cfc0f17a3dac05af70eb758b5c0a40692f1e60f3 | EasScanβ |
| score | 0xe9071177c724d1bd712e4b05b4ce5426e60e141d8aaec86e4e03f25901d0cd91 | EasScanβ |
Scroll
The Scroll chain ID is 534352β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x804233b96cbd6d81efeb6517347177ef7bD488ED | Scrollscanβ |
| EAS | 0xC47300428b6AD2c7D03BB76D05A176058b47E6B0 | Scrollscanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Scrollscanβ |
| GitcoinVerifier | 0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185 | Scrollscanβ |
| GitcoinAttester | 0xCc90105D4A2aa067ee768120AdA19886021dF422 | Scrollscanβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 | EasScanβ |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 | EasScanβ |
Scroll Sepolia
The Scroll chain ID is 534351β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x5f603Ed913738d9105bAf3BD981AA4750016B167 | Scrollscanβ |
| EAS | 0xaEF4103A04090071165F78D45D83A0C0782c2B2a | Scrollscanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Scrollscanβ |
| GitcoinVerifier | 0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185 | Scrollscanβ |
| GitcoinAttester | 0xCc90105D4A2aa067ee768120AdA19886021dF422 | Scrollscanβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 | EasScanβ |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 | EasScanβ |
Shape
The Shape chain ID is 360β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x804233b96cbd6d81efeb6517347177ef7bD488ED | Shapescanβ |
| EAS | 0x4200000000000000000000000000000000000021 | Shapescanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Shapescanβ |
| GitcoinVerifier | 0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185 | Shapescanβ |
| GitcoinAttester | 0xCc90105D4A2aa067ee768120AdA19886021dF422 | Shapescanβ |
EAS Schema
| schema | uid |
|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 |
Shape Sepolia
The Shape chain ID is 11011β.
Gitcoin
| contract | address | link |
|---|---|---|
| issuer | 0x5f603Ed913738d9105bAf3BD981AA4750016B167 | Shapescanβ |
| EAS | 0x4200000000000000000000000000000000000021 | Shapescanβ |
| GitcoinResolver | 0x90E2C4472Df225e8D31f44725B75FFaA244d5D33 | Shapescanβ |
| GitcoinVerifier | 0x3508ea66D2ccCEcD3aa9215b6471868431CF2AdC | Shapescanβ |
| GitcoinAttester | 0x39571bBD5a4c5d1a5184004c63F45FE426dB85Ea | Shapescanβ |
EAS Schema
| schema | uid |
|---|---|
| passport | 0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341 |
| score | 0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915 |
ZkSync Era
The ZkSync chain ID is 324β.
| contract | address | link |
|---|---|---|
| issuer | 0x804233b96cbd6d81efeb6517347177ef7bD488ED | Explorerβ |
| EAS | 0x21d8d4eE83b80bc0Cc0f2B7df3117Cf212d02901 | Explorerβ |
| GitcoinResolver | 0x8789129C5968EdcA5Cb392C4a9A9D7EFB590A838 | Explorerβ |
| GitcoinVerifier | 0xfCC2d308FD4De098D08f056c424C969d728912bF | Explorerβ |
| GitcoinAttester | 0x2B5D97CBE50eA9bf809CbE18A2003E4Cb4D283cC | Explorerβ |
EAS Schema
| schema | uid | link |
|---|---|---|
| passport | 0x71b9da9e4a2ecd8c87ad57d29ef64b9e63887d54039c97c294a6ecba8a8dfb4e | EasScanβ |
| score | 0xfa8f39bf31b38893697a46f2607ef58ef3ec66308840a1e351304d26823a297c | EasScanβ |
ZkSync Sepolia
The ZkSync chain ID is 300β.
| contract | address | link |
|---|---|---|
| issuer | 0x5f603Ed913738d9105bAf3BD981AA4750016B167 | Explorerβ |
| EAS | 0x21d8d4eE83b80bc0Cc0f2B7df3117Cf212d02901 | Explorerβ |
| GitcoinResolver | 0x8789129C5968EdcA5Cb392C4a9A9D7EFB590A838 | Explorerβ |
| GitcoinVerifier | 0xfCC2d308FD4De098D08f056c424C969d728912bF | Explorerβ |
| GitcoinAttester | 0x2B5D97CBE50eA9bf809CbE18A2003E4Cb4D283cC | Explorerβ |
Attestation Schemas
We discuss the Human Passport attestation schema in our Attestation schema guide.