- git
- You'll know you've installed it right if you can run:
git --version
- You'll know you've installed it right if you can run:
- Metamask
- This is a browser extension that lets you interact with the blockchain.
- Clone the repo
git clone https://github.com/alfheimrShiven/fundme-client.git
cd html-fund-me-fcc
- 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".
- Start the Anvil blockchain and Deploy the crowd-sourcing-smart-contract:
Note: You'll need to open up a second terminal
git clone https://github.com/alfheimrShiven/crowd-sourcing-smart-contract.git
cd crowd-sourcing-smart-contract
make build
make anvil
Then, in a second terminal
make deploy
This will start a local Anvil blockchain and deploy a sample contract.
- 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.
- Connect your metamask to your local Anvil 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.
In the output of the above command, take one of the private key accounts and import it into your metamask.
Additionally, add your local Anvil network with chainid 31337 to your metamask.
- Finally, refresh the front end, input an amount in the text box, and hit
fund
button after connecting
If you appreciated this, feel free to follow me!