This repository manages the smart contracts that handle Rarimo <> WorldID integration.
The repository consists of three smart contracts:
IdentityManagerthat stores and updates the WorldID state roots via Rarimo TSS transition function and verifies user ZK proofsSemaphoreVerifierthat actually verifies ZK proofs (forked from WorldID contracts)WorldIDBridgethat sets the interface and integration flow for theIdentityManager
Together these smart contracts allow WorldID to become cross-chain leveraging Rarimo multichain technology.
To run the tests, execute the following command:
npm run testOr to see the coverage, run:
npm run coveragePrior deployment create the .env file following the example provided in .env.example. Also check out the config files in the deploy/config/ directory.
The config structure is the following:
export const signer = "0x0000000000000000000000000000000000000000";
export const sourceStateContract = "0x0000000000000000000000000000000000000000";
export const chainName = "DEPLOYMENT_CHAIN_NAME";Where signer is the address of Rarimo TSS signer, sourceStateContract is the address of WorldID manager contract to listed to, and chainName is the name of the network (e.g. Ethereum, Sepolia, Mumbai) where the contracts are being deployed to.
Note
The appropriate config file gets chosen automatically upon the deployment network.
After the configuration is provided, execute:
npm run deploy-<network>Check the available options in the package.json.
To deploy the contracts locally, run the following commands (in the different terminals):
npm run private-network
npm run deploy-localThe command to generate the bindings is as follows:
npm run generate-typesGLHF!