Skip to content

kleoverse/proof-of-talent-contracts

Repository files navigation

Logo

Proof of Talent Protocol

Developed by Kleoverse crew

Built on top of Sismo Protocol


This repository contains the smart contracts of the Proof Of Talent Protocol. The architecture is forked from Sismo Protocol. We have created new attesters and supporting skill badge contract.

See the whole documentation at https://proofoftalent.org.

There are three core contracts:

  • core/AttestationsRegistry.sol: The registry stores all attestations. It is owned by the governance that authorize/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)

Proof of talent attesters in attesters/:

  • SignatureAttester.sol: Signature Attester verify via Ecrecover that the message was correctly signed by the address of the centralized service that verify the claim based on another centralised service API like github, discord
  • IdentityMerkleAttester.sol: Identity Merkle Attester issues attestations to users with a userId of identity that's part of an identity accounts merkle tree
  • SkillAttester.sol: Skill Attester issues attestations to users with based on skill points fetched from SkillBadge.sol

Badges:

  • periphery/badges/SkillBadge.sol: Stores weights for Cred Badges from POT protocol and external ERC721/ERC1155 contracts for different skills to calculate skill points.



Proof of Talent protocol

A complete overview of the protocol is available in Sismo's 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

There are 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 Sismo's 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published