1. Spin up the testing chain
In the Unirep repository, go to./packages/core
and run a hardhat testing node:
cd packages/core && \
npx hardhat node
info
NOTE: a list of default accounts will be printed, choose one of them to be user's account and one to be attester's. User's and attester's private key will be referred to as userPrivateKey
and attesterPrivateKey
respectively.
For example, choose
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
as the user's private key and0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
as the attester's private keyIn new terminal window, go to
packages/core
cd packages/core
- Export both keys to the environment:
export USER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export ATTESTER_PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d