This is part of the Cyfrin Updraft Vyper Course.
- git
- You'll know you've done it right if you can run
git --version
and see a version number.
- You'll know you've done it right if you can run
- anvil
- You'll know you've done it right if you can run
anvil --version
and see an output likeanvil 0.2.0 (fdd321b 2024-10-15T00:21:13.119600000Z)
- You'll know you've done it right if you can run
- era-test-node
- You'll know you've done it right if you can run
anvil-zksync --version
and see an output likeanvil-zksync 0.1.0-alpha.28
- You'll know you've done it right if you can run
- moccasin
- You'll know you've done it right if you can run
mox --version
and get an output like:Moccasin CLI v0.3.0
- You'll know you've done it right if you can run
git clone https://github.com/cyfrin/mox-five-more-cu
cd mox-five-more-cu
mox run deploy
mox compile
mox test
mox run deploy
mox run deploy --network eravm
- In a terminal, run:
anvil
- Then, in another terminal, run:
mox run deploy --network anvil
Let's say you want to deploy to the sepolia-zksync
network.
- Update your
moccasin.toml
entry for that network:
[networks.sepolia-zksync]
url = "$SEPOLIA_ZKSYNC_RPC_URL"
chain_id = 300
default_account_name = "default"
is_zksync = true
save_to_db = true
explorer_uri = "https://explorer.sepolia.era.zksync.dev"
explorer_type = "zksyncexplorer"
- Add a
SEPOLIA_ZKSYNC_RPC_URL
environment variable to your shell or a.env
file:
# This is a public endpoint, feel free to try this one
SEPOLIA_ZKSYNC_RPC_URL="https://sepolia.era.zksync.dev"
- Make sure you have a wallet named
default
that is encrypted
mox wallet import default
You will be prompted to enter your private key, and a password to encrypt it with.
Once done, you can verify it's accessible by running:
mox wallet list
And seeing the default
wallet listed.
- Deploy to the network
mox run deploy --network sepolia-zksync
You will be prompted for your wallet password to unlock the wallet.
If you want to verify your contract, add the explorer_uri
, explorer_type
, and explorer_api_key
(if applicable) to your moccasin.toml
file.
As of writing, only the following are supported:
- Blockscout
- ZKsync explorer
Not Etherscan at this time.