Tevaera Contracts on ZKsync
The repo consists of tevaera core contracts
- Once you clone the repo, run in terminal
yarn install
- Clone https://github.com/matter-labs/local-setup repo separately to run zksync image in Docker. Follow the steps as mentioned in the repo to successfully start a ZKsync instant on your local machine
***Make sure to start the ZKsync local-setup via WSL 2 before starting with the below steps.
To compile all the contracts, run in terminal: -
yarn hardhat compile --network <network_name>
To deploy the separate contracts, run in terminal: -
yarn hardhat deploy-zksync --script --network <network_name>
Ex: yarn hardhat deploy-zksync --script zksync/citizenidv1_deploy.ts --network zksyncSepolia
To deploy the separate contracts, run in terminal: -
yarn hardhat run --network <network_name>
Ex: yarn hardhat run deploy/arbitrum/balancerdragonv1_deploy.ts --network arbitrumSepolia
To test the CitizenId contract, run in terminal: -
yarn hardhat test test/cz.id.test.ts
To test the Karma Points contract, run in terminal: -
yarn hardhat test test/kp.test.ts
npx hardhat flatten ./contracts/<ContractName.sol> >> ./Flatten/<FlattenContract.sol>
https://code.zksync.io/tutorials/how-to-verify-contracts
Get ETH in wallet via ZKsync Bridge or Faucet -> https://portal.zksync.io/ Delete cache-zk and artifacts-zk Then, compile and re-deploy the contracts
To get more info about using Hardhat with ZKsync, visit https://docs.zksync.io/build/tooling/hardhat/guides/getting-started To get tokens for testing on ZKsync, visit https://portal.zksync.io