Contracts of the Sismo Attestation Protocol
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
bigq 09206e396c
feat: add tests for SismoLib (#58)
9 months ago
.github/workflows feat: add dockerfile for local deployment 1 year ago
contracts feat: add tests for SismoLib (#58) 9 months ago
deployments deploy: ZKBadgeboundERC721 on Mainnet for Mergooor Pass 9 months ago
docs Initial commit 1 year ago
scripts feat: add dockerfile for local deployment 1 year ago
tasks feat: add tests for SismoLib (#58) 9 months ago
test feat: add tests for SismoLib (#58) 9 months ago
utils feat: local tests green and the proxy address in local corresponds to the same as deployed! 10 months ago
.gitignore feat: e2e tests with proxies upgraded 11 months ago
.mocharc.json feat: add main core contract tests (#4) 1 year ago
.prettierrc Initial commit 1 year ago
Dockerfile feat: add dockerfile for local deployment 1 year ago
LICENSE Initial commit 1 year ago
README.md fix: some typos/sentence in readme.md (#52) 10 months ago
hardhat.config.ts fix: rename main in mainnet 9 months ago
helper-hardhat-config.ts fix: rename main in mainnet 9 months ago
package.json feat: deploy zkBadgeboundERC721 contract behind a proxy, add passTokenId as immutable, use ERC721Upgradeable instead of ERC721 9 months ago
tsconfig.json Initial commit 1 year ago
yarn.lock feat: deploy zkBadgeboundERC721 contract behind a proxy, add passTokenId as immutable, use ERC721Upgradeable instead of ERC721 9 months ago

README.md


Logo

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


bottom