Andriy-Kulak / buy-me-coffee-complete

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buy Me A Coffee Hardhat Project

  • We created a hardhat and front-end template so that you can follow along the tutorial without running into dependency issues with newer vs slightly older package versions.
  • to install dependencies, make sure you have node and npm installed and then run npm i within directory
  • You should then be able to follow along the tutorial and commit all the working code with the repo!

Hardhat Basics

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.

Try running some of the following tasks (for hardhat):

npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js

Front-end using Next.js

  • later in the tutorial you will notice a front-end component
  • We added Next.js (a popular React framework), to help you interact with the contract on front-end. Don't worry about mastering Next.js, we mainly want you to focus on the principles of connecting your wallet and interacting with the contract which are mostly the same no matter which framework you use.

The tutorial uses replit, but for the purposes of this assignment, please add front-end code in your repo when submitting the project!

To start the front-end, run the following:

  • npm run dev

Tutorial Documentation

To Run test script:

npx hardhat run scripts/buy-coffee.js

To Deploy Contract to Goerli:

To Run Front-end

  • npm run dev

About


Languages

Language:JavaScript 94.5%Language:CSS 2.9%Language:Solidity 2.6%Language:Shell 0.0%