Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/worldcoin/world-id-lens
Human verification for Lens Protocol with World ID.
https://github.com/worldcoin/world-id-lens
managed-by-terraform
Last synced: about 2 months ago
JSON representation
Human verification for Lens Protocol with World ID.
- Host: GitHub
- URL: https://github.com/worldcoin/world-id-lens
- Owner: worldcoin
- License: mit
- Created: 2022-05-18T20:08:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-27T22:15:14.000Z (about 1 year ago)
- Last Synced: 2024-05-17T08:32:56.096Z (8 months ago)
- Topics: managed-by-terraform
- Language: Solidity
- Homepage:
- Size: 859 KB
- Stars: 92
- Watchers: 13
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-lens-protocol - World ID Lens - Human verification for Lens Protocol with World ID. (Projects / Open Source)
README
# Human verification for Lens
Assert your Lens profile belongs to an actual human through Worldcoin's [World ID](https://docs.worldcoin.org/world-id) protocol.
## âšī¸ About
This repository contains the **smart contract** that enables verification of [Lens Protocol](https://lens.xyz) profiles as owned by a unique human.
- The verification is always exposed on-chain.
- Human verification is done via the [World ID](https://docs.worldcoin.org/world-id) protocol.
- A single human can only have one verified Lens profile. Verifying a new profile will remove the verification from the previous profile.## đ Deployment
The official World ID <> Lens smart contract can be found at `0x8f9b3A2Eb1dfa6D90dEE7C6373f9C0088FeEebAB` on the Polygon Network. To deploy your own version of this contract, follow these instructions.
1. Get an App ID and action from Worldcoin's [Developer Portal](https://developer.worldcoin.org).
2. Run [Foundry's `forge create` command](https://book.getfoundry.sh/reference/forge/forge-create).## đ§âđģ Development
1. Install [Foundry](https://getfoundry.sh/).
2. Install dependencies & build smart contracts
```sh
make
```### Using the contract
To test the contract with your own deployment, we recommend you use World ID's [Staging network](https://docs.worldcoin.org/quick-start/testing),
1. Point your smart contract to the World ID's Staging network contract, which can be found at https://docs.worldcoin.org/reference/address-book.
2. Register an identity as "verified" using Worldcoin's [Simulator](https://simulator.worldcoin.org).
3. Use the hosted IDKit's widget & the Simulator to generate a World ID proof to execute the humanity check.
- Easiest way is to use the [Try it out](https://docs.worldcoin.org/try) page on the Worldcoin Docs.
- After going through the process on the Simulator, you'll get the proof, nullifier hash & Merkle root.
4. Call `HumanCheck.verify(PROFILE_ID, merkle_root, nullifier_hash, proof)` in your contract. The last three parameters are obtained on step 6.
5. You can now check your profile is verified by calling `HumanCheck.isVerified(PROFILE_ID)`.