0.1.6 • Published 2 years ago
tt-hardhat v0.1.6
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-hardhatThen 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 installPlugin 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 linkin root - cd into
test/project, then runyarn link tt-hardhatto link to local package - if package's code is changed, run
yarn buildto rebuild the package - do tests...
- after testing, run
yarn unlink tt-hardhatin test/project, thenyarn unlinkin root.
Building the project
Just run yarn build ️👷