Skip to content

akshtsng/HtmlFundMe

Repository files navigation

HtmlFundMe

A minimalistic example - metamask docs.

Requirements

Quickstart

  1. Clone the repo
git clone https://github.com/akshtsng/HtmlFundMe
cd HtmlFundMe
  1. Run the file.

Optionally:

If running with prettier formatting, or don't have a way to run file in the browser, run:

yarn
yarn http-server

A small button can be see that says "connect", metamask will pop on clicking it.

Execute a transaction

To execute a transaction follow this:

Make sure to have the following installed:

  1. Need to open up a second terminal and run:
git clone https://github.com/akshtsng/HardhatFundMe
cd HardhatFundMe
yarn
yarn hardhat node

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

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

In constants.js file, update the variable contractAddress with the address of the deployed "FundMe" contract. It can be seen near the top of the hardhat output.

  1. Connect metamask to local hardhat blockchain.

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

Additionally, add localhost with chainid 31337 to metamask.

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

Thank you!

Akshat Singh Linkedin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published