Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickAlphaC committed May 12, 2022
1 parent 3e44e43 commit 36fabe0
Show file tree
Hide file tree
Showing 7 changed files with 23,322 additions and 2,106 deletions.
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,38 @@ This is a minimalistic example what you can find in the [metamask docs](https://
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- You'll know you've installed it right if you can run:
- `git --version`
- [Metamask](https://metamask.io/)
- This is a browser extension that lets you interact with the blockchain.
- [Nodejs](https://nodejs.org/en/)
- You'll know you've installed nodejs right if you can run:
- `node --version` And get an ouput like: `vx.x.x`
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/) 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
- [Metamask](https://metamask.io/)
- This is a browser extension that lets you interact with the blockchain.

# Quickstart

1. Clone the repo, install dependencies, and create the build.
1. Clone the repo

```
git clone https://github.com/PatrickAlphaC/html-fund-me-fcc
cd html-fund-me-fcc
yarn
yarn build
```

2. Serve the file
2. Run the file.

```
yarn http-server
```
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".

And you'll see an output like:
Optionally:

If you'd like to run with prettier formatting, or don't have a way to run your file in the browser, run:
```
Available on:
http://127.0.0.1:8080
http://x.x.x.x:8080
Hit CTRL-C to stop the server
yarn
yarn http-server
```

Copy paste the first link into your browser, and you should see a small button that says "connect".
And you should see a small button that says "connect".

![Connect](connect.png)

Expand All @@ -68,15 +63,9 @@ This will deploy a sample contract and start a local hardhat blockchain.

2. Update your `constants.js` with the new contract address.

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

3. Rebuild

```
yarn build
```
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.

4. Connect your [metamask](https://metamask.io/) to your local hardhat blockchain.
3. Connect your [metamask](https://metamask.io/) to your local hardhat blockchain.

> **PLEASE USE A METAMASK ACCOUNT THAT ISNT ASSOCIATED WITH ANY REAL MONEY.**
> I usually use a few different browser profiles to separate my metamasks easily.
Expand Down
9 changes: 2 additions & 7 deletions constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const contractAddress = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
const abi = [
export const contractAddress = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
export const abi = [
{
inputs: [
{
Expand Down Expand Up @@ -123,8 +123,3 @@ const abi = [
type: "function",
},
]

module.exports = {
abi,
contractAddress,
}
Loading

0 comments on commit 36fabe0

Please sign in to comment.