Skip to Content
Building with PassportStampsOnchain PassportContract reference

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:

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:

  1. A request is sent to the Decoder contract, passing the user address and method associated with the data you’d like to receive.
  2. The smart contract delivers the data associated with the user and method.
  3. 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.

Decoder contract addresses

The decoder is currently deployed to the following networks:

NetworkContract addressLink
Arbitrum0x2050256A91cbABD7C42465aA0d5325115C1dEB43Arbiscan 
Base0xaa24a127d10C68C8F9Ac06199AA606953cD82eE7Basescan 
Linea0x423cd60ab053F1b63D6F78c8c0c63e20F009d669Explorer 
Optimism0x5558D441779Eca04A329BcD6b47830D2C6607769Optimism Explorer 
Optimism Sepolia0xe53C60F8069C2f0c3a84F9B3DB5cf56f3100ba56Optimism Explorer 
Scroll0x8A5820030188346cC9532a1dD9FD2EF8d8F464deScrollscan 
Scroll Sepolia0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2Scrollscan 
Shape0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2Shapescan 
Shape Sepolia0x2050256A91cbABD7C42465aA0d5325115C1dEB43Shapescan 
ZkSync Era0x1166FCDCA3B04311Ba9E2eD5ad2c660E730e1386Explorer 
ZkSync Sepolia0x23AF92Af3b5D6faAD920C3CAA4F9A3d4352D6834Explorer 

You can learn more about working with testnets via our guide on Test Mode.

Available methods

MethodDescription
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 : false
bool : 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:

  1. A request is sent to the Resolver contract passing the user address
  2. The Resolver contract returns a UID
  3. The UID is passed to the EAS contract
  4. The EAS contract returns an encoded Attestation
  5. Decode the Attestation and 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 .

contractaddresslink
issuer0x804233b96cbd6d81efeb6517347177ef7bD488EDArbiscan 
EAS0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458Arbiscan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Arbiscan 
GitcoinVerifier0xc4858e4D177Bf0d14571F91401492d62aa608047Arbiscan 
GitcoinAttester0x7848a3578Ff2E1F134659a23f64A404a4D710475Arbiscan 

EAS Schema

schemauidlink
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341EasScan 
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915EasScan 
Base
ContractAddressLink
EAS0x4200000000000000000000000000000000000021Basescan 
EASSchemaRegistry0x4200000000000000000000000000000000000020Basescan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Basescan 
GitcoinVerifier0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185Basescan 
GitcoinAttester0xCc90105D4A2aa067ee768120AdA19886021dF422Basescan 

EAS Schema

schemauidlink
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341EasScan 
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915EasScan 
Linea

The Linea chain ID is 59144 .

contractaddresslink
issuer0x4B70C4308ea49d17FD946dDacD6884e8e1e18B56Lineascan 
EAS0xaEF4103A04090071165F78D45D83A0C0782c2B2aLineascan 
GitcoinVeraxPortal0xCAa9E817f02486cE076560B77A86235Ef91c5d5DLineascan 
GitcoinResolver0x0a774AECE542a1A819107Eb3a06E9D515C67257aLineascan 
GitcoinVerifier0xc94aBf0292Ac04AAC18C251d9C8169a8dd2BBbDCLineascan 
GitcoinAttester0xBC778313E52b1184A15D163b5d3a72AEF8d510A2Lineascan 

Verax schema

schemauid
passport0x501e6fcade7e3483d0ae7fcfebb732907ebda12b209f5116e52c02697062a50e
score0x01f031da36192c34057c764239eb77bb6ec8ebfb808f72a7bb172f37a5bec31f

EAS Schema

schemauidlink
passport0x69b9d63ff6b161097cb4930e197a722bcf423f832d4e4cd3692449d5a1e1319fEasScan 
score0x4da1eaac6346b8b79a705e3898a308062ca607f56c07762ef7b7ff8a7661843cEasScan 
Optimism

The Optimism chain ID is 10 .

Gitcoin

contractaddresslink
issuer0x804233b96cbd6d81efeb6517347177ef7bD488EDOptimism Explorer 
EAS0x4200000000000000000000000000000000000021Optimism Explorer 
GitcoinResolver0xc94aBf0292Ac04AAC18C251d9C8169a8dd2BBbDCOptimism Explorer 
GitcoinVerifier0xa8eD4d2C3f6f98A55cdDEd97C5aE9B932B0633A4Optimism Explorer 
GitcoinAttester0x843829986e895facd330486a61Ebee9E1f1adB1aOptimism Explorer 

EAS Schema

schemauidlink
passport0xd7b8c4ffa4c9fd1ecb3f6db8201e916a8d7dba11f161c1b0b5ccf44ceb8e2a39EasScan 
score0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89EasScan 
Optimism Sepolia

The Optimism Sepolia chain ID is 11155420 .

Gitcoin

contractaddresslink
issuer0x4200000000000000000000000000000000000021Optimism Explorer 
EAS0x4200000000000000000000000000000000000020Optimism Explorer 
GitcoinResolver0x074761E1Dc6E6cF9cdeE67dd180E01E818716Ce0Optimism Explorer 
GitcoinVerifier0x8D21C3360dcE1a9EBD3Da4373c4dAB7F81dd7233Optimism Explorer 
GitcoinAttester0x8B1A76795e3CbadD79C5410d2C4D4827D9C1503aOptimism Explorer 

EAS Schema

schemauidlink
passport0x7026a3d524ee3dae5859aa00cfc0f17a3dac05af70eb758b5c0a40692f1e60f3EasScan 
score0xe9071177c724d1bd712e4b05b4ce5426e60e141d8aaec86e4e03f25901d0cd91EasScan 
Scroll

The Scroll chain ID is 534352 .

Gitcoin

contractaddresslink
issuer0x804233b96cbd6d81efeb6517347177ef7bD488EDScrollscan 
EAS0xC47300428b6AD2c7D03BB76D05A176058b47E6B0Scrollscan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Scrollscan 
GitcoinVerifier0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185Scrollscan 
GitcoinAttester0xCc90105D4A2aa067ee768120AdA19886021dF422Scrollscan 

EAS Schema

schemauidlink
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341EasScan 
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915EasScan 
Scroll Sepolia

The Scroll chain ID is 534351 .

Gitcoin

contractaddresslink
issuer0x5f603Ed913738d9105bAf3BD981AA4750016B167Scrollscan 
EAS0xaEF4103A04090071165F78D45D83A0C0782c2B2aScrollscan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Scrollscan 
GitcoinVerifier0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185Scrollscan 
GitcoinAttester0xCc90105D4A2aa067ee768120AdA19886021dF422Scrollscan 

EAS Schema

schemauidlink
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341EasScan 
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915EasScan 
Shape

The Shape chain ID is 360 .

Gitcoin

contractaddresslink
issuer0x804233b96cbd6d81efeb6517347177ef7bD488EDShapescan 
EAS0x4200000000000000000000000000000000000021Shapescan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Shapescan 
GitcoinVerifier0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185Shapescan 
GitcoinAttester0xCc90105D4A2aa067ee768120AdA19886021dF422Shapescan 

EAS Schema

schemauid
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915
Shape Sepolia

The Shape chain ID is 11011 .

Gitcoin

contractaddresslink
issuer0x5f603Ed913738d9105bAf3BD981AA4750016B167Shapescan 
EAS0x4200000000000000000000000000000000000021Shapescan 
GitcoinResolver0x90E2C4472Df225e8D31f44725B75FFaA244d5D33Shapescan 
GitcoinVerifier0x3508ea66D2ccCEcD3aa9215b6471868431CF2AdCShapescan 
GitcoinAttester0x39571bBD5a4c5d1a5184004c63F45FE426dB85EaShapescan 

EAS Schema

schemauid
passport0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341
score0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915
ZkSync Era

The ZkSync chain ID is 324 .

contractaddresslink
issuer0x804233b96cbd6d81efeb6517347177ef7bD488EDExplorer 
EAS0x21d8d4eE83b80bc0Cc0f2B7df3117Cf212d02901Explorer 
GitcoinResolver0x8789129C5968EdcA5Cb392C4a9A9D7EFB590A838Explorer 
GitcoinVerifier0xfCC2d308FD4De098D08f056c424C969d728912bFExplorer 
GitcoinAttester0x2B5D97CBE50eA9bf809CbE18A2003E4Cb4D283cCExplorer 

EAS Schema

schemauidlink
passport0x71b9da9e4a2ecd8c87ad57d29ef64b9e63887d54039c97c294a6ecba8a8dfb4eEasScan 
score0xfa8f39bf31b38893697a46f2607ef58ef3ec66308840a1e351304d26823a297cEasScan 
ZkSync Sepolia

The ZkSync chain ID is 300 .

contractaddresslink
issuer0x5f603Ed913738d9105bAf3BD981AA4750016B167Explorer 
EAS0x21d8d4eE83b80bc0Cc0f2B7df3117Cf212d02901Explorer 
GitcoinResolver0x8789129C5968EdcA5Cb392C4a9A9D7EFB590A838Explorer 
GitcoinVerifier0xfCC2d308FD4De098D08f056c424C969d728912bFExplorer 
GitcoinAttester0x2B5D97CBE50eA9bf809CbE18A2003E4Cb4D283cCExplorer 

Attestation Schemas

We discuss the Human Passport attestation schema in our Attestation schema guide.

Last updated on