This project was scaffolded with ZKsync CLI.
ZKsync 101 is a quick start template to help you learn how to be a super developer using ZKsync CLI to build projects in the ZKsync ecosystem!
This project is a Nodejs project that uses hardhat, viem, and solidity. You will learn how to build, deploy and test smart contracts with hardhat onto the ZKsync in memory node and use ZKsync CLI to interact with the contracts.
/contracts
: Contains solidity smart contracts./deploy
: Scripts for contract deployment and interaction./test
: Test files.hardhat.config.ts
: Configuration settings, the default network is set to "inMemoryNode".
-
Install dependencies with
npm install --force
. -
Configure your ZKsync CLI to use the In memory node settings for dev.
zksync-cli dev config
-
Start up a local in-memory node with ZKsync CLI with the following command:
zksync-cli dev start
-
Follow along on ZKsync Docs in our ZKsync 101!
This project pulls in environment variables from .env
files.
Rename .env.example
to .env
, the provided private key is a local rich wallet
that is available in the local in-memory node.
WALLET_PRIVATE_KEY=your_private_key_here...
Running npm run test
by default runs the ZKsync In-memory Node provided by the @matterlabs/hardhat-zksync-node tool.
Important: ZKsync In-memory Node currently supports only the L2 node. If contracts also need L1, use another testing environment like Dockerized Node. Refer to test documentation for details.
Contract Address - 0x491475742259B5998330A820648c0F5b4E3570b7
This project is under the MIT license.