Accretence / solidity-hardhat-template

My personal Hardhat boilerplate I use to kickstart all my Solidity projects...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ready to test functionality, monitor gas-usage, and deploy contracts. All of the direct dependencies use their latest available version and the architecture is clean and easy to extend. Have fun BUIDLing! 🤙

Screenshot

Usage

  1. Clone this repo:
git clone https://github.com/Accretence/smooth-hardhat-boilerplate
  1. Install dependencies using:
npm install
  1. Create your .env file according to the sample.env provided file.
MAINNET_PRIVATE_KEY=
RINKEBY_PRIVATE_KEY=
ALCHEMY_RINKEBY_ENDPOINT=
ALCHEMY_MAINNET_ENDPOINT=
CMC_KEY=
ETHERSCAN_KEY=
  1. Test the contract:

There are exhaustive tests provided in the Test.js file. You can run the file using this command:

npx hardhat test

Deploying

You can deploy this contract to Rinkeby testnet. This requires funding a wallet and registering API keys with Alchemy and Etherscan

npm run rinkeby

You can also use the verify scripts to verify the contract on Etherscan.

npx hardhat verify --network rinkeby <YOUR_CONTRACT_ADDRESS>

Substitute mainnet for rinkeby to deploy for realsies. good luck!

About

My personal Hardhat boilerplate I use to kickstart all my Solidity projects...


Languages

Language:JavaScript 65.1%Language:Solidity 32.9%Language:Shell 2.0%