• Stars
    star
    1,109
  • Rank 41,870 (Top 0.9 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hardhat Boilerplate

This repository contains a sample project that you can use as the starting point for your Ethereum project. It's also a great fit for learning the basics of smart contract development.

This project is intended to be used with the Hardhat Beginners Tutorial, but you should be able to follow it by yourself by reading the README and exploring its contracts, tests, scripts and frontend directories.

Quick start

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/NomicFoundation/hardhat-boilerplate.git
cd hardhat-boilerplate
npm install

Once installed, let's run Hardhat's testing network:

npx hardhat node

Then, on a new terminal, go to the repository's root folder and run this to deploy your contract:

npx hardhat run scripts/deploy.js --network localhost

Finally, we can run the frontend with:

cd frontend
npm install
npm start

Open http://localhost:3000/ to see your Dapp. You will need to have Coinbase Wallet or Metamask installed and listening to localhost 8545.

User Guide

You can find detailed instructions on using this repository and many tips in its documentation.

For a complete introduction to Hardhat, refer to this guide.

What's Included?

This repository uses our recommended hardhat setup, by using our @nomicfoundation/hardhat-toolbox. When you use this plugin, you'll be able to:

This project also includes a sample frontend/Dapp, which uses Create React App.

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 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 to learn where and how to get it.

For the latest news about Hardhat, follow us on Twitter, and don't forget to star our GitHub repository!

Happy building!

More Repositories

1

hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
TypeScript
7,179
star
2

truffle-flattener

Truffle Flattener concats solidity files from Truffle and Buidler projects with all of their dependencies
JavaScript
374
star
3

slang

Solidity compiler tooling by @NomicFoundation
Rust
235
star
4

hardhat-vscode

Solidity and Hardhat support for Visual Studio Code
TypeScript
171
star
5

hardhat-ignition

Hardhat Ignition is a declarative deployment system that enables you to deploy your smart contracts without navigating the mechanics of the deployment process.
TypeScript
104
star
6

hardhat-ts-plugin-boilerplate

Hardhat TypeScript plugin boilerplate
TypeScript
87
star
7

edr

An Ethereum development runtime implementation that can be reused to build new developer tools.
TypeScript
46
star
8

solidity-analyzer

An N-API module to extract version pragma and imports from Solidity sources
JavaScript
17
star
9

hardhat-ignition-examples

How to use Hardhat Ignition
JavaScript
12
star
10

ethereum-hackathon-setup-checker

This project lets you check if your development environment is ready for an Ethereum hackaton
JavaScript
7
star
11

solidity-without-gitattributes

This repository shows that .sol files are automatically treated as Solidity now
Solidity
5
star
12

hardhat-vscode-feedback

A repository to collect feedback about Hardhat VSCode during its beta program
4
star
13

buidler-etherscan

Buidler plugin for verifying contracts on Etherscan
TypeScript
4
star
14

hardhat-waffle

TypeScript
4
star
15

vyper-releases-mirror

A mirror of the Vyper language releases
JavaScript
3
star
16

buidler-truffle5

Buidler plugin for integration with TruffleContract from Truffle 5
3
star
17

buidler-ethers

Buidler plugin for using ethers.js
3
star
18

buidler-web3

Buidler plugin for using Web3 1.x
2
star
19

solidity-debugging-symbols-pocs

2
star
20

buidler-web3-legacy

Buidler plugin for using Web3 0.20.x
2
star
21

buidler-truffle4

Buidler plugin for integration with TruffleContract from Truffle 4
2
star
22

github-actions-workflows

Reusable Github Actions workflows
2
star
23

buidler-solhint

Buidler plugin for running solhint
1
star
24

buidler-solpp

Buidler plugin that integrates the solpp preprocessor into your workflow
1
star
25

github-linear-bridge-tests

This is a sample repository to test our Github and Linear integration
1
star
26

github-linear-bridge

TypeScript
1
star
27

buidler-docker-solc

Buidler plugin to optimize the Solidity compilation process by executing solc via Docker
1
star
28

smoke-tests-vscode

Manual smoke tests used during the release process
Solidity
1
star
29

edr-benchmark-results

EDR benchmark results
1
star