State bridge between the WorldID Ethereum mainnet deployment and Linea. The spec can be found in
docs/spec.md.
The addresses of the contract deployments for production and staging can be found in
docs/deployments.md.
This repository implements a World ID state bridge specifically for Linea. For context, the original World ID state bridge supports Polygon PoS and OP stack chains (Optimism and Base), which can be found here. Additionally, there's a standalone bridge similar to this one for Scroll, available here.
This repository uses Bun as a dependency manager, script execution environment and so on. To install Bun, refer to its webpage. Other commands listed below assume you have Bun installed.
Run bun 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.
This is a list of the most frequently needed commands.
bun installBuild the contracts:
$ forge buildDelete the build artifacts and cache directories:
$ forge cleanGenerate test coverage and output result to the terminal:
$ bun run test:coverageFormat the contracts with forge fmt and the rest of the files (.js, .md) with Prettier:
bun run formatGet a gas report:
bun run snapshotRun gas benchmarks on the tests:
bun run benchLint the contracts:
$ bun run lintRun the tests:
$ forge testTo deploy the contracts to the testnet:
$ bun run deploy:testnetTo run the root propagator on testnet:
$ bun run propagator:testnetYou can read more about the root propagator here.
We welcome contributions to improve and expand the functionality of the Worldcoin state bridge for Linea. Please feel free to open issues or submit pull requests.
This repo uses code from the Worldcoin State Bridge for Polygon and Optimism, which can be found here.
This repo uses Paul Razvan Berg's foundry template: A Foundry-based template for developing Solidity smart contracts, with sensible defaults.