sismo-badges README

The project's README from github.com/sismo-core/sismo-badges. As one markdown file: README.md.


Logo

Sismo Protocol Contracts

Made by Sismo


This repository contains the smart contracts of the Sismo Protocol.

There are three core contracts:

It also contains implementations of attester in attesters/:



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:

Other optional hook functions that can be implemented:

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 (sismo-core/sismo-badges)

Searching Database…

What is this?The smart contracts of the Sismo Protocol, a badge minting protocol on Ethereum. Attestations (claims about accounts) are recorded in a registry and surfaced as non-transferable Badge tokens.
So is a badge a regular tradeable NFT?No — Badges.sol is a stateless, non-transferable ERC1155 view: the actual attestation lives in the AttestationsRegistry, and the token just reflects it.
How do I get the contracts running locally?Clone the repo, install dependencies and use Hardhat: 'hardhat compile' builds the contracts, 'hardhat test' runs the suite, and 'hardhat node' plus the deploy:local script gives you a full local deployment.
What do I need on my machine to compile and test them?A Node.js setup with Hardhat — all scripts (compile, test, deploy, storage layout) go through it. The contracts build on OpenZeppelin, and the repo ships Docker files for local runs.
Can any contract start issuing badges into the registry?No — the AttestationsRegistry is owned by governance, which authorizes and unauthorizes issuers, so an attester must be authorized before its attestations can be recorded.
Is this repo for badge holders or for developers?Developers. The README's core guide is building your own attester: inherit the core Attester abstract contract and implement verifyRequest and buildAttestations.
Does getting a badge mean handing over my personal data?Issuance runs through zero-knowledge proofs: Hydra-S1 attesters verify a ZK proof (using nullifiers) that you submit along with your request, rather than your raw data.
What can I legally do with this code?It is distributed under the MIT License, so it can be reused, modified and forked freely.
What is Hydra-S1?The zero-knowledge proving scheme used by the attesters bundled in this repo. Users submit a Hydra-S1 proof together with their badge request, and nullifiers from the scheme keep attestations from being duplicated across accounts.
What is the difference between the two included attesters?HydraS1SimpleAttester is the base ZK attester. HydraS1AccountboundAttester is its account-bound version, which lets users update at will where the attestation is stored.
How do I create my own attester?Inherit core/Attester.sol and implement verifyRequest(request, proofData) and buildAttestations(request, proofData); the beforeRecordAttestations and afterRecordAttestations hooks are optional. HydraS1SimpleAttester is the reference example, the docs offer a guide, and PRs with new attesters are welcome.
Creator
sismo-core
Size
4.6 MB
Stars
15.9K
Age
4y
Commits · 90 Days