Code Monkey home page Code Monkey logo

html-fund-me-fcc's Introduction

HTML Ethers.js FundMe Free Code Camp

This project demonstrates a basic Hardhat use case with a HTML front-end. This was done as part of the Free Code Camp Blockchain course on YouTube.

⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)

This is a minimalistic example what you can find in the metamask docs.

Requirements

  • git
    • You'll know you've installed it right if you can run:
      • git --version
  • Metamask
    • This is a browser extension that lets you interact with the blockchain.
  • Nodejs
    • You'll know you've installed nodejs right if you can run:
      • node --version And get an ouput like: vx.x.x
  • Yarn instead of npm
    • You'll know you've installed yarn right if you can run:
      • yarn --version And get an output like: x.x.x
      • You might need to install it with npm

Quickstart

  1. Clone the repo
git clone https://github.com/KwasiKK/hardhat-fundme-fcc
cd html-fund-me-fcc
  1. Run the file.

You can usually just double click the file to "run it in the browser". Or you can right click the file in your VSCode and run "open with live server".

Optionally:

If you'd like to run with prettier formatting, or don't have a way to run your file in the browser, run:

yarn
yarn http-server

And you should see a small button that says "connect".

Hit it, and you should see metamask pop up.

Execute a transaction

If you want to execute a transaction follow this:

Make sure you have the following installed:

  1. You'll need to open up a second terminal and run:
git clone https://github.com/KwasiKK/hardhat-fundme-fcc
cd hardhat-fund-me-fcc
yarn
yarn hardhat node

This will deploy a sample contract and start a local hardhat blockchain.

  1. Update your constants.js with the new contract address.

In your constants.js file, update the variable contractAddress with the address of the deployed "FundMe" contract. You'll see it near the top of the hardhat output.

  1. Connect your metamask to your local hardhat blockchain.

PLEASE USE A METAMASK ACCOUNT THAT ISNT ASSOCIATED WITH ANY REAL MONEY.

In the output of the above command, take one of the private key accounts and import it into your metamask.

Additionally, add your localhost with chainid 31337 to your metamask.

  1. Reserve the front end with yarn http-server, input an amount in the text box, and hit fund button after connecting

Contact

Kwasi Kgwete - [email protected]

Kwasi Kabelo Kgwete Twitter Kwasi Kabelo Kgwete Linkedin

html-fund-me-fcc's People

Contributors

kwasikk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.