This repository provides an example setup for deploying and verifying smart contracts on the ZkEVM testnet using the Hardhat framework. It includes instructions for adding a custom chain in the Hardhat config, using the Etherscan API to view contract information, and utilizing the Blockscout block explorer API for contract verification.
These instructions will guide you on how to set up your local development environment and use this boilerplate for your own projects.
Before you start, ensure that you have the following installed on your machine:
- Clone the repository
git clone https://github.com/Wajahat-Sudozai/ZkEvm-Hardhat.git
- Change to the project directory
cd ZkEvm-Hardhat
npm install
This section will provide you with examples of how to interact with your smart contracts and run the project.
Compile your smart contracts by running the following command:
npx hardhat compile
To verify your smart contracts on Etherscan, first list the available networks by running the following command:
npx hardhat verify --list-networks
Then, verify and deploy your smart contract on the Custom added network polygonZKEVMTestnet or polygonZKEVMMainnet.
This section should provide instructions on how to deploy your smart contracts to different networks.
To deploy your smart contracts, run the following command
Deploy on testnet:
npx hardhat run scripts/deploy.js --network polygonZKEVMTestnet
Deploy on mainnet:
npx hardhat run scripts/deploy.js --network polygonZKEVMMainnet
Networks :
- polygonZKEVMTestnet
- polygonZKEVMMainnet
If you would like to contribute to this project, please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create a new Pull Request