https://github.com/devlyn37/kyc-zk-sb
https://github.com/devlyn37/kyc-zk-sb
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/devlyn37/kyc-zk-sb
- Owner: devlyn37
- License: mit
- Created: 2022-06-25T13:41:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T13:21:33.000Z (over 3 years ago)
- Last Synced: 2025-02-10T02:13:22.368Z (over 1 year ago)
- Language: TypeScript
- Homepage: kyc-zk-sb.vercel.app
- Size: 2.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# KYC-ZK-SB
This repository contains an example decentralized application (dapp) for [World ID](https://id.worlcoin.org). With Mesha Airdrop test airdropping an ERC-20 token validating a single person can only claim a token once.
> World ID is a mechanism to verify a single human has performed a specific action only once without exposing any personal information.
This repository contains the frontend dapp example. **Please check [this repository][smartcontract] for the smart contract example.**
The Javascript integration is the simplest way to integrate [World ID](https://id.worldcoin.org). The package currently supports web applications and requires only a few lines of code.
## 🚀 Quick start
You can test this dApp right away with our deployed smart contract in the [Polygon Mumbai Testnet](https://mumbai.polygonscan.com) (address `0x330C8452C879506f313D1565702560435b0fee4C`). This deployed contract uses the [World ID Test Network](https://id.worldcoin.org/test) for verified identities.
1. Install dependencies.
```bash
npm install
```
2. Run app (will open browser automatically).
```bash
npm run dev
```
3. Go to [Usage instructions](#-usage-instructions).
## 🗝 Usage instructions
To test this dApp in the [Polygon Mumbai Testnet](https://mumbai.polygonscan.com), follow these steps:
1. Prepare a wallet that has access to the Mumbai Testnet. We recommend using Metamask mobile (you will need to add the Mumbai network manually). Our [docs](https://id.worldcoin.org) contain more detailed instructions on how to do this. Alternatively, there's instructions for how to use the [WalletConnect Test Wallet](https://github.com/WalletConnect/walletconnect-test-wallet).
2. Fund the wallet with some `MATIC`. You can use the [official faucet](https://faucet.polygon.technology) or any other faucet.
3. Launch the mockWLD app (app that holds World ID identities and generates ZKPs) at: [https://mock-app.id.worldcoin.org](https://mock-app.id.worldcoin.org) & follow instructions to generate/fetch your identity and add it to the list of verified identities.
And you're good to go! The airdrop app will guide you through the process:
- You'll first connect your wallet (e.g. Metamask).
- You will then do the World ID verification process.
- You will then execute the smart contract transaction with your wallet.
## 🤓 Advanced setup (custom deployment)
Follow these steps if you want to use your own smart contract and/or use a different network.
1. Deploy your own smart contract using the Airdrop smart contract from [this repository][smartcontract].
2. Set the contract address using the `WLD_CONTRACT_ADDRESS` env var (or edit `const.tsx` directly).
3. Update the contract's ABI in `const.tsx` (if you changed the contract's `claim` function).