This project was bootstrapped with Create React App.
Make sure that these ports on localhost are free to use:
- 8545
- 3000
- 3001
- 3002
Follow the instructions to install zokrates.
If you are working with Linux or macOS, you can run
chmod +x setup.sh and
./setup.sh
to compile zokrates, deploy the contracts and start the project,
then skip to section Hardhat on Metamask.
Run
chmod +x /server/dev.sh
./server/dev.sh
to generate the verifier.sol file.
Navigate to the contracts directory:
cd contracts
Follow the other instructions.
Open repository and run:
npx hardhat clean
npx hardhat compile
Open another terminal, navigate to the repository and type:
npx hardhat node
Go back to the previous window and run these commands:
npx hardhat ignition deploy ./ignition/modules/Verify.js --network localhost
npx hardhat ignition deploy ./ignition/modules/Mapping.js --network localhost
This should now allow you to make contract calls. You can use any of the provided secret keys except the first 2 from the node and import them in MetaMask.
Then add the Hardhat Node to the Networks:
Network Name: Hardhat New RPC URL: http://127.0.0.1:8545/ Chain ID: 31337
navigate back to the root of the project.
In the project directory, you can run:
Installs all dependencies in /client, /login-provider and /server.
Runs the app in the development mode. Open http://localhost:3000 to view the proof-generation-tool in your browser. Open http://localhost:3002 to view the login-provider in your browser.