Skip to content

prayagsingh/hardhat_polygon_nft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardhat-Polygon-Nft example

An Nft example using Hardhat, Polygon blockchain and OpenZeppelin.

Commands to create a new project using Hardhat

  1. mkdir hardhat_polygon_nft

  2. cd hardhat_polygon_nft

  3. npm init --yes

  4. npm install --save-dev hardhat

  5. npx hardhat

  6. Create an .env file and add the private-key and rpc api-key in this file. we require these keys for configuring hardhat.config.js file.

  7. Please add this .env file to .gitignore to avoid putting private information to github.

  8. Install npm i dotenv package to use the environment variables from .env file

  9. If using openzeppelin then npm install @openzeppelin/contracts command to add the packages.

Compile Project

npx hardhat compile

Test Project

npx hardhat test

Deploy Project

npx hardhat run scripts/deploy.js --network <network_name from hardhat.config.js file>

Example: npx hardhat run scripts/deploy.js --network polygon_test

References:

Hardhat docs

OpenZeppelin docs v4.x

Medium Article

Credits

Special thanks to Justin Hunter for creating a detailed medium article.

About

An Nft example using hardhat and Polygon blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published