Contains all smart contracts for L1 and L2.
Key Details:
- Propogate the root of the identity merkle tree from L1 to L2 using Starknet's Cross Messenger.
- Built-in Groth16 verifier, easy verification using Garaga
- Local bridge setup testing
- Deploy the L1 contract using the Address of the World ID Manager, a temporary L2 address (ie. 1), and the address of the Starknet Sequencer - Core Contract
- Take the L1 contract deployed address and use it to deploy the L2 contract along with the fixed tree depth of 30.
- Take the L2 address and change the L1 contract's L2 address by invoking the "setStarkWorldIDAddress(uint256)" function with the L2 address
- Bridge is now setup. You can propagate root by sending in eth as value parameter.
- Note: This local setup is deprecated due to bridge version upgrade not being compatible with the katana json rpc version that is used in tandem with starkli
- In new terminal, run a local anvil node
anvil
- In new terminal, run a local katana node
cd state_bridge_l2
katana --messaging config.json
- In new terminal, then run setup script
cd state_bridge_l2
./setup.sh
- In new terminal, source environment variables, run setup script
cd starknet-worldcoin-bridge/state_bridge_l1
cp anvil.env .env
source .env
forge script script/SetupContracts.s.sol:LocalSetup --broadcast --rpc-url ${ETH_RPC_URL}
- In new terminal, run test script that launches relay
cd starknet-worldcoin-bridge/monodock/state_bridge_service
cargo test
L1 address: https://sepolia.etherscan.io/address/0x8dD81147685Dc88B6531cCE6b1a71221Be520d62
Contracts are not yet audited.