MyGit

sismo-core/sismo-badges

Fork: 538 Star: 16082 (更新于 2024-11-15 03:00:08)

license: MIT

Language: TypeScript .

Contracts of the Sismo Badge Minting Protocol

最后发布版本: alpha-testnet-upgrade-hydra-s1-accountbound-and-pythia-1-simple-attesters-01-13-2023 ( 2023-01-13 23:29:39)

官方网址 GitHub网址


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

最近版本更新:(数据更新于 2024-09-20 09:56:01)

2023-01-13 23:29:39 alpha-testnet-upgrade-hydra-s1-accountbound-and-pythia-1-simple-attesters-01-13-2023

2023-01-13 21:53:27 alpha-testnets-upgrade-addresses-provider-01-13-2023

2023-01-12 06:57:32 alpha-deploy-core-hydra-s1-pythia1-mainnet-01-11-2023

2023-01-02 17:17:43 alpha-staging-deploy-zk-badgebound-erc721-right-token-id-01-02-2023

2022-12-23 03:31:09 alpha-staging-deploy-addresses-provider-zk-badgebound-erc721-and-upgrade-hydra-s1-accountbound-and-pythia-1-simple-attesters-12-22-2022

2022-12-20 19:34:31 alpha-deploy-frontend-lib-polygon-12-20-2022

2022-12-19 23:38:31 alpha-deploy-core-hydra-s1-pythia1-gnosis-12-19-2022

2022-12-17 02:31:38 alpha-testnets-deploy-core-hydra-s1-pythia1-mumbai-and-goerli-12-16-2022

2022-12-13 01:47:56 alpha-upgrade-proxies-add-attributes-and-replace-simple-with-accountbound-polygon-12-12-2022

2022-12-13 00:00:13 alpha-testnets-deploy-frontend-lib-goerli-and-mumbai-12-12-2022

主题(topics):

attestations, did, ethereum, smart-contracts, zkp

sismo-core/sismo-badges同语言 TypeScript最近更新仓库

2024-11-22 01:36:46 twentyhq/twenty

2024-11-21 22:40:05 LLOneBot/LLOneBot

2024-11-21 20:34:48 CopilotKit/CopilotKit

2024-11-21 16:58:07 labring/FastGPT

2024-11-21 16:14:54 RSSNext/Follow

2024-11-21 16:12:23 x-extends/vxe-table