8000 GitHub - zeGarcao/bug-pointer
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zeGarcao/bug-pointer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bug-pointer

Intro

Introducing Bug Pointer, the bug bounty platform with a proof of personhood mechanism, making it Sybil attack resistant. This ensures fair reward distribution, solving a common issue in bug bounty platforms. Say goodbye to injustice and welcome a platform that rewards hackers justly.

Instructions

Frontend

Assuming you have npm installed on your machine:

  • 1: cd ../frontend
  • 2: npm i
  • 3: npm run dev 🚀

Backend (Smart Contracts)

  1. End users will need a verified identity, which can be obtained through our Simulator (see docs for more info). In production, this would be obtained by verifying with an orb.

  2. Use the JS widget to prompt the user with verification (make sure you're providing the correct signal and action ID). Upon acceptance, you'll get a merkle_root, nullifier_hash and proof.

  3. The ZKP (attribute proof) is a uint256[8] array and your smart contract expects it that way. For easier handling, the JS widget will return the proof encoded. Unpack your proof before sending it to your smart contract.

import { defaultAbiCoder as abi } from "@ethers/utils";
const unpackedProof = abi.decode(["uint256[8]"], proof)[0];
// You can now pass your unpackedProof to your smart contract
  1. Use the obtained parameters, along with any inputs your contract needs (which should be included in the signal), to call your smart contract!

🚀 Deployment

  1. If you've added any parameters to your constructor or renamed the contract, you should update the scripts/deploy.js script accordingly.
  2. Run cp .env.example .env to create your environment file, and add a RPC_URL for the network you want to deploy (we currently only support the Polygon Mumbai Testnet) and a PRIVATE_KEY for the deployer wallet.
  3. Run make deploy to deploy your contract.

🧑‍💻 Development & testing

  1. Install Foundry.
    curl -L https://foundry.paradigm.xyz | bash
    foundryup # run on a new terminal window; installs latest version
    
  2. Install Node.js v16 or above (required for tests). We recommend nvm if you use multiple node versions.
  3. Install dependencies & build smart contracts
    make
    

Warning Make sure you've run make instead of using Foundry directly! We need to build some of WorldID's dependencies in a specific way, and tests will fail otherwise.

Running test suite

This repository includes automated tests, which you can use to make sure your contract is working as expected before deploying it. Of course, any modifications you've made to the Contract.sol file will need to be reflected on the tests as well to make them work.

If you've changed the type of the external nullifier, or the signal, you should look over the src/test/helpers/InteractsWithWorldID.sol and src/test/scripts/generate-proof.js to update them as well.

Once you've done this, you can run the tests,

make test

About World ID

World ID is the privacy-first identity protocol that brings global proof of personhood to the internet. More on World ID in the announcement blog post.

World ID lets you seamlessly integrate authentication into your app that verifies accounts belong to real persons through Sign in with Worldcoin. For additional flexibility and cases where you need extreme privacy, Anonymous Actions lets you verify users in a way that cannot be tracked across verifications.

Follow the Quick Start guide for the easiest way to get started.

📄 Documentation

All the technical docs for the Wordcoin SDK, World ID Protocol, examples, guides can be found at https://docs.worldcoin.org/

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 69.3%
  • Solidity 22.4%
  • JavaScript 6.7%
  • CSS 1.2%
  • Makefile 0.4%
0