Skip to content

birdsofspace/dapps-smartcontract-boilerplate

Repository files navigation

Birds of Space DApp Boilerplate (Hardhat, Solidity, Pug)

screenshot This repository serves as a starting point for your Ethereum DApp development using Hardhat, Solidity, and Pug for the frontend.

Note: This boilerplate replaces the original React frontend with Pug.

Project Overview

This boilerplate aligns with the Hardhat Beginners Tutorial: https://hardhat.org/tutorial and offers a solid foundation for learning smart contract development. You can explore the code within the contracts, tests, scripts, and frontend directories.

Getting Started

  1. Clone the Repository:
git clone https://github.com/birdsofspace/birds-of-space-dapp-boilerplate.git
cd birds-of-space-dapp-boilerplate
  1. Install Dependencies:
yarn install
  1. Run Truffle Dashboard:
yarn truffle-dashboard
  1. Deploy Contract: (Open a separate terminal)
yarn deploy
  1. Run Frontend:
yarn frontend install
yarn frontend build
yarn frontend start

Access your DApp at http://localhost:3000/. Ensure you have a compatible wallet like MetaMask installed and connected to localhost:8545.

Resources

Included Tools

  • Hardhat Toolbox: Provides functionalities like:
    • Contract deployment and interaction with ethers.js: https://docs.ethers.io/v5/ and the hardhat-ethers plugin.
    • Contract testing with Mocha, Chai, and Hardhat Chai Matchers.
    • Hardhat Network interaction with Hardhat Network Helpers.
    • Contract source code verification with hardhat-etherscan.
    • Gas usage measurement with hardhat-gas-reporter.
    • Solidity code coverage with solidity-coverage.

Note: The original React frontend has been replaced with Pug.

Troubleshooting

  • "Invalid nonce" Errors: Reset your MetaMask account to clear the transaction history and nonce. Navigate to MetaMask, select your account, go to "Settings > Advanced > Clear activity tab data".

Development Tools

Getting Help and Updates

Happy DApp development!