This project can be use to deploy contract and also auto verify contract address in respective blockchain network.
- Clone the repository
$ git clone https://github.com/Samir-Yudiz/contract-deploy-verify.git
$ cd contract-deploy-verify
-
Create
.envfile. -
Add Credential in
.envfile as mentioned in.env.example -
Install node modules
$ npm i
- Deploy Contract on localhost
Add another terminal and start local node
$ npx hardhat node
In first terminal
$ npm run compile
$ npm run deploy
- Deploy Contract on Polygon Network
$ npm run compile
$ npm run deployMatic
You can also create your own custom script for different networks, refer to package.json file.