-
- You'll know you've done it right if you can run
forge --version
and you see a response likeforge 0.0.2 (b513e39 2024-10-18T00:25:11.767467870Z)
- If you're unsure whether you're using vanilla or zkSync, note that for zkSync it is
0.0.2
, and for vanilla it is0.2.0
(these are versions which may change over time).
- You'll know you've done it right if you can run
-
- You'll know you've done it right if you can run
docker --version
and you see a response likeDocker version 27.3.1, build ce12230
- You'll know you've done it right if you can run
-
- You'll know you've done it right if you can run
node --version
and you see a response likev20.12.2
- Additionally, you'll know you've done it right if you can run
npm --version
and you see a response like10.5.0
- You'll know you've done it right if you can run
- Setup the config
npx zksync-cli dev config
Select in-memory node
and no additional plugins.
- Run the node
npx zksync-cli dev start
If you get an error like: Command exited with code 1: Error response from daemon: dial unix docker.raw.sock: connect: connection refused
, this means docker is not running.
forge create src/staking/Staking.sol:Staking --rpc-url $ZKSYNC_LOCAL_RPC_URL --private-key $ZKSYNC_LOCAL_PRIVATE_KEY --legacy --zksync --constructor-args $(CONSTRUCTOR_ARGS)
or
forge script script/staking/DeployStaking.s.sol:DeployStaking --rpc-url $ZKSYNC_LOCAL_RPC_URL --private-key $ZKSYNC_LOCAL_PRIVATE_KEY --legacy --zksync --broadcast -vvvv
However, you may fail to run the scripts and if that happens, just run theta create
command.