Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhettjel/hardhat-boilerplate
https://github.com/rhettjel/hardhat-boilerplate
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rhettjel/hardhat-boilerplate
- Owner: rhettjel
- Created: 2022-01-05T00:07:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T10:57:32.000Z (4 months ago)
- Last Synced: 2024-12-09T19:43:29.810Z (22 days ago)
- Language: TypeScript
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hardhat-Boilerplate
This is the boilerplate for Hardhat Solidity Smart Contract & Typescript(TS) Projects for developers.This project is intended to be used with the
[Hardhat Beginners Tutorial](https://hardhat.org/tutorial), but you should be
able to follow it by yourself by reading the README and exploring its
`contracts`, `test`, and `ignition` directories.## Quick start
The first things you need to do are cloning this repository and installing its
dependencies:```sh
git clone https://github.com/0xapp123/Hardhat-Boilerplate.git
cd Hardhat-Boilerplate
npm install
```Once installed, let's run Hardhat's testing network:
```sh
npx hardhat node
```Then, on a new terminal, go to the repository's root folder and run this to
deploy your contract:```sh
npx hardhat ignition deploy ./ignition/modules/Lock.js --network localhost
```## User Guide
You can find detailed instructions on using this repository and many tips in [its documentation](https://hardhat.org/tutorial).
- [Writing and compiling contracts](https://hardhat.org/tutorial/writing-and-compiling-contracts/)
- [Setting up the environment](https://hardhat.org/tutorial/setting-up-the-environment/)
- [Testing Contracts](https://hardhat.org/tutorial/testing-contracts/)
- [Hardhat's full documentation](https://hardhat.org/docs/)For a complete introduction to Hardhat, refer to [this guide](https://hardhat.org/getting-started/#overview).
## What's Included?
This repository uses our recommended hardhat setup, by using our [`@nomicfoundation/hardhat-toolbox`](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox). When you use this plugin, you'll be able to:
- Deploy and interact with your contracts using [ethers.js](https://docs.ethers.io/v5/) and the [`hardhat-ethers`](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-ethers) plugin.
- Test your contracts with [Mocha](https://mochajs.org/), [Chai](https://chaijs.com/) and our own [Hardhat Chai Matchers](https://hardhat.org/hardhat-chai-matchers) plugin.
- Interact with Hardhat Network with our [Hardhat Network Helpers](https://hardhat.org/hardhat-network-helpers).
- Verify the source code of your contracts with the [hardhat-etherscan](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-etherscan) plugin.
- Get metrics on the gas used by your contracts with the [hardhat-gas-reporter](https://github.com/cgewecke/hardhat-gas-reporter) plugin.
- Measure your tests coverage with [solidity-coverage](https://github.com/sc-forks/solidity-coverage).## Troubleshooting
- `Invalid nonce` errors: if you are seeing this error on the `npx hardhat node`
console, try resetting your Metamask account. This will reset the account's
transaction history and also the nonce. Open Metamask, click on your account
followed by `Settings > Advanced > Clear activity tab data`.## Setting up your editor
[Hardhat for Visual Studio Code](https://hardhat.org/hardhat-vscode) is the official Hardhat extension that adds advanced support for Solidity to VSCode. If you use Visual Studio Code, give it a try!
## Getting help and updates
If you need help with this project, or with Hardhat in general, please read [this guide](https://hardhat.org/hardhat-runner/docs/guides/getting-help) to learn where and how to get it.
For the latest news about Hardhat, [follow us on Twitter](https://twitter.com/HardhatHQ), and don't forget to star [our GitHub repository](https://github.com/0xapp123/Hardhat-Boilerplate)!
**Happy _building_!**