Giter VIP home page Giter VIP logo

world-id-state-bridge's Introduction

world-id-state-bridge

spec

Description

State bridge between the WorldID Ethereum mainnet deployment and WorldID supported networks. The spec can be found in docs/spec.md.

Supported networks

Currently, the supported networks are Polygon PoS (for backwards compatibility) and Optimism. The next iteration of the bridge will most-likely be based on storage proofs and will support most EVM networks off the get-go, with other networks pending storage proof verifier and Semaphore verifier implementations and deployments.

Documentation

Run make doc to build and deploy a simple documentation webpage on localhost:3000. Uses forge doc under the hood and sources information from the world-id-state-bridge contracts NatSpec documentation.

Usage

Build

Build the contracts:

make build

Clean

Delete the build artifacts and cache directories:

make clean

Coverage

Get a test coverage report:

make coverage

Format

Format the contracts with forge fmt and the rest of the files (.js, .md) with Prettier:

make format

Gas Usage

Get a gas report:

make snapshot
make bench

Lint

Lint the contracts:

make lint

Test

Run the tests:

make test

Environment

Clone .env.example to .env, fill the environment variables and source .env before running any scripts. Beware that there is a different Etherscan API key for every single network that we are deploying a contract onto (Ethereum, Polygon and Optimism- mainnet/testnet).

Deploy

Deploy the WorldID state bridge and all its components to Ethereum mainnet using the CLI tool.

make deploy

Integration with full system:

  • Download world-id-contracts
  • make deploy
  • follow the CLI interface for the deployment script and select Ethereum mainnet as the target deployment network, and input the deployment address of StateBridge when prompted.

Testnet

Deploy the WorldID state bridge and all its components to the Goerli testnet.

make deploy-testnet

Integration with full system:

  • Download world-id-contracts
  • make deploy
  • follow the CLI interface for the deployment script and select Goerli as the target deployment network, and input the deployment address of StateBridge when prompted.

Mock

Deploy the WorldID state bridge and a mock WorldID identity manager to the Goerli testnet for integration tests.

make mock

Integration test

make integration

Credits

This repo uses Paul Razvan Berg's foundry template: A Foundry-based template for developing Solidity smart contracts, with sensible defaults.

world-id-state-bridge's People

Contributors

dcbuild3r avatar iamrecursion avatar snyk-bot avatar cichaczem avatar 0xalpharush avatar mmqxyz avatar wld-terraform avatar

Forkers

dheerajsingh639

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.