1/5
## Deploying to ZkSync Era Test Node We can deploy our NFT smart contract to the ZkSync Era Test Node using moccasin. We need to: 1. Import a private key from the ZkSync Era Test Node to our moccasin environment. 2. Add the ZkSync Era Test Node to our moccasin configuration file. 3. Deploy our smart contract to the Era Test Node. 4. Add the deployed smart contract to our MetaMask account. **Import a Private Key into Moccasin** We can import a private key from the Era Test Node into our moccasin environment using the following command: ```bash mox wallet import zk-rich1 ``` This will prompt us to enter the private key and a password to encrypt it. **Add the Era Test Node to our Moccasin Configuration File** We'll add the Era Test Node to our moccasin configuration file, `mocassin.toml`, by copying an existing network configuration and replacing the values with the Era Test Node settings. The Era Test Node URL will be `http://127.0.0.1:8011`. ```bash url = "http://127.0.0.1:8011" is_zksync = true prompt_live = false default_account_name = "zk-rich1" ``` **Deploy the Smart Contract to the Era Test Node** We can deploy our smart contract to the Era Test Node using the following command: ```bash mox run deploy basic-nft --network era-test-node ``` This will prompt us to enter the password for our keystore. **Add the Deployed Smart Contract to our MetaMask Account** We need to add the deployed smart contract to our MetaMask account so that we can interact with it. First, we need to add the Era Test Node to MetaMask as a custom network. 1. Go to MetaMask and click the "Add a custom network" button. 2. Enter the network name "Era Test Node", the URL `http://127.0.0.1:8011`, the Chain ID 260, and the currency symbol ETH. 3. Save the network. We can then import the smart contract using the following steps: 1. Go to the NFTs section in MetaMask. 2. Click the "Import NFT" button. 3. Enter the smart contract address and the token ID. 4. Click "Import". We've now deployed our NFT smart contract to the ZkSync Era Test Node and imported it into our MetaMask account.
A comprehensive guide to deploying an NFT smart contract to the ZkSync Era Test Node. The lesson covers setting up the necessary configuration in the "mocassin.toml" file and deploying the NFT contract through the terminal, demonstrating how to connect and interact with the Era Test Node.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
How to build a DeFi stablecoin and customized NFT
How to deploy your smart contract on ZKsync with Moccasin
Advanced testing techniques like stateful and stateless Python fuzzing
How to write algorithmic trading scripts in Python
Hashing signatures, proxies, delegate calls, upgradable contracts, random numbers, and more!
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on February 4, 2025
Duration: 2h 21min
Duration: 1h 58min
Duration: 2h 55min
Duration: 1h 55min
Duration: 46min
Course Overview
About the course
How to build a DeFi stablecoin and customized NFT
How to deploy your smart contract on ZKsync with Moccasin
Advanced testing techniques like stateful and stateless Python fuzzing
How to write algorithmic trading scripts in Python
Hashing signatures, proxies, delegate calls, upgradable contracts, random numbers, and more!
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on February 4, 2025