Giter Site home page Giter Site logo

bug-pointer's Introduction

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/

bug-pointer's People

Contributors

rodrigof1307 avatar diogoparente avatar 0xrafaelnicolau avatar zegarcao avatar 0xrebelo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.