Hardhat Starter Pack is a Hardhat deployment stack for Harmony featuring:
hardhat-deploy
for smart contract deploymentssolidity-coverage
for smart contract code coverage analysishardhat-typechain
for smart contract static typingmocha
for testingeslint
for lintingprettier
for code formatting
The starter pack is preconfigured to deploy to Harmony's localnet
, testnet
and mainnet
networks.
git clone https://github.com/harmony-one/hardhat-starter-pack.git
cd hardhat-starter-pack
yarn install
Modify .env and replace "ENTER_PRIVATE_KEY_HERE
" for each network with the respective private key you want to use when deploying contracts.
yarn compile
yarn coverage
Terminal window #1:
yarn hardhat node
Terminal window #2:
yarn void:deploy
Deploying to localnet requires that you have a Harmony node running at http://localhost:9500
.
yarn localnet:deploy
yarn testnet:deploy
yarn mainnet:deploy
The starter pack includes a TestToken.sol
contract that is used as an example for deployments and tests.
When you've verified that deployments work using the TestToken.sol
contract you can remove it, its deployment steps and tests by running:
./clean.sh && rm -rf clean.sh
You should now have a clean slate for you to use for your projects.
This starter pack was largely inspired by Ronan Sandford's hardhat-deploy-ts-test.