sismo-core /sismo-badges

Contracts of the Sismo Badge Minting Protocol

★ 15,859⑂ 523👁 189⑃ 70● 4▤ 29
TypeScriptMITCreated 2022-06-16docs.sismo.io
Download: Deploy core protocol on Mainnet Jan 11 2023alpha-deploy-core-hydra-s1-pythia1-mainnet-01-11-2023 ↓20232023-01-11
+1
Daily
15,859
stars
523
forks
189
watchers
70
prs
4
issues
29
releases

README

Sismo Protocol Contracts
  

  
    Made by Sismo
  
  
  
    
        
    
    
        
    
  
  
    
  


This repository contains the smart contracts of the Sismo Protocol.

There are three core contracts:

 - core/AttestationsRegistry.sol: The registry stores all attestations. It is owned by the governance that authorizes/unauthorize issuers to record in it
 - core/Attester.sol The standard abstract contract must be inherited by attesters. Attesters are issuers of attestations. They verify user requests and build attestations that will be recorded in the registry
 - core/Badges.sol Reads the registry. Stateless Non Transferable Token view of attestations (ERC1155)

It also contains implementations of attester in attesters/:
- HydraS1SimpleAttester.sol: ZK Attester using the Hydra S1 Proving Scheme and the notion of nullifiers. Users must provide a ZK Proof along with their request to generate attestations
- HydraS1AccountboundAttester.sol: Accountbound version of the Simple Hydra S1 Simple Attester. (Users can update at will where the attestation is stored)




 Sismo protocol

A complete overview of the protocol is available in our documentation


 Deployed contracts

Deployed contracts can be found here


 Usage
 Installation

yarn


 Compile contracts
Compile contracts using hardhat

yarn compile


 Test
Launch all tests


yarn test


 Print storage layout 

yarn storage-layout


 Deploy on local chain

Terminal tab 1

yarn chain


Terminal tab 2

yarn deploy:local



 Create a new Attester

To develop a new attester, you must inherit the core/Attester.sol abstract contract and implement the following functions: 

-  _verifyRequest(request, proofData): You must implement the user request verification against the proof provided by the user
-  buildAttestations(request, proofData): You must build the attestations that will be recorded from a verified user request

Other optional hook functions that can be implemented:

- _beforeRecordAttestations(request, proofData)
- _afterRecordAttestations(request, proofData)

The /attesters/hydra-s1/HydraS1SimpleAttester.sol is a good example of an attester implementing those functions.

A guide is offered in our documentation.

Feel free open a PR with your new attester in /attester!

 License

Distributed under the MIT License.

 Contribute

Please, feel free to open issues, PRs or simply provide feedback!

 Contact

Prefer Discord or Twitter

Top issues

Latest release

Deploy core protocol on Mainnet Jan 11 2023 alpha-deploy-core-hydra-s1-pythia1-mainnet-01-11-2023 2023-01-11
RECAP                          
    

    date: 2023-01-11T17:26:15.621Z

     Common 
      proxyAdmin: 0x2110475dfbB8d331b300178A867372991ff35fA3

     Front
      - proxy: 0xF518eBd3feeb8dc240b5dE46Ec6C57A0313891c1
      - implem: 0xfF88cbdbe3B9aD9eD3E928527186332eC3a394D6

     AttestationsRegistry
      - proxy: 0xB62F00e4e637e0E1031420D86B84e46BaE2a139F
      - implem: 0xeFBBe795544C1cb0d67F5ce1743B819621e49061
      owner: 0xaee4acd5c4Bf516330ca8fe11B07206fC6709294

     Badges
      - proxy: 0xe77eb6fb5037bCb11db10b9Ae478A7D01354Ae01
      - implem: 0xbaa8fa1F8f31366

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON