tt-hardhat
v0.1.6
Published
Hardhat TypeScript plugin boilerplate
Downloads
5
Readme
ThunderCore Hardhat Plugin
This repo contains configs and features that aims to standardize and jumpstart your smart contract dev experience on ThunderCore:
- ThunderCore network configurations
- Contract deployment logging
Usage
yarn add -D tt-hardhat
Then in hardhat.config
import "tt-hardhat";
Config
account: KEY=$PRIVATE_KEY in your .env file
Features
Networks added
- thundercore-testnet (chain ID - 18)
- thundercore-mainnet (chain ID - 108)
Use deploy account for the above networks: simply add a KEY environment variable
Log contracts deployed
// in your deployment file:
import { ethers, network, upgrades, logDeployContracts } from "hardhat";
logDeployContracts(chainId, { [contractName: string]: Contract });
Package development
To start working on your project, just run
yarn
or
npm install
Plugin development
Read Hardhat's Plugin Development Guide
Publish
yarn publish
make sure to yarn login
if you haven't
Testing
(From Hardhat) Running yarn run test
will run every test located in the test/
folder.
Testing package on project
- run
yarn link
in root - cd into
test/project
, then runyarn link tt-hardhat
to link to local package - if package's code is changed, run
yarn build
to rebuild the package - do tests...
- after testing, run
yarn unlink tt-hardhat
in test/project, thenyarn unlink
in root.
Building the project
Just run yarn build
️👷