Skip to content

JohnGuilding/clave-contracts

 
 

Repository files navigation

Clave ZkSync Contracts

Clave

Project structure

  • /contracts: smart contracts.
  • /deploy: deployment and contract interaction scripts.
  • /test: test files
  • hardhat.config.ts: configuration file.

Requirements

  • install the zksync era test node from here.

Commands

  • npx hardhat compile will compile the contracts, typescript bindings are generated automatically.
  • npx hardhat deploy-zksync --script {filename} will execute the script /deploy/{filename}.ts. Requires environment variable setup.
  • npm run test-real: run tests. Requires a running zksync era test node.

Environment variables

In order to prevent users to leak private keys, this project includes the dotenv package which is used to load environment variables. It's used to load the wallet private key, required to run the deploy script.

To use it, rename .env.example to .env and enter your private key.

PRIVATE_KEY=123cde574ccff....

Official Links

About

Clave Smart Contracts on zkSync

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 56.9%
  • TypeScript 34.6%
  • Yul 7.8%
  • Other 0.7%