Skip to content

This repository contains the necessary code and configuration files to deploy and verify contracts using the Zk EVM on Polygon. With the Zk EVM, users can enjoy the benefits of private transactions and reduced gas fees.

Notifications You must be signed in to change notification settings

Wajahat-Husain/ZkEvm-Hardhat

Repository files navigation

ZkEvm-Hardhat

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.

Table of Contents

Getting Started

These instructions will guide you on how to set up your local development environment and use this boilerplate for your own projects.

Prerequisites

Before you start, ensure that you have the following installed on your machine:

Installation

  1. Clone the repository
git clone https://github.com/Wajahat-Sudozai/ZkEvm-Hardhat.git
  1. Change to the project directory
cd ZkEvm-Hardhat
npm install  

Usage

This section will provide you with examples of how to interact with your smart contracts and run the project.

Compiling Smart Contracts

Compile your smart contracts by running the following command:

npx hardhat compile 

Deploying & Verifying Smart Contracts on Etherscan

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.

Deployment

This section should provide instructions on how to deploy your smart contracts to different networks.

Deploying Smart Contracts

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

Contributing

If you would like to contribute to this project, please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create a new Pull Request

About

This repository contains the necessary code and configuration files to deploy and verify contracts using the Zk EVM on Polygon. With the Zk EVM, users can enjoy the benefits of private transactions and reduced gas fees.

Topics

Resources

Stars

Watchers

Forks