Git Product home page Git Product logo

sismo-badges's Introduction


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

sismo-badges's People

Contributors

yum0e avatar leosayous21 avatar dhadrien avatar nerdynomadd avatar bigbyrd69 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.