This is a minimal dapp which implements the FundMe Smart Contract.
-
Clone the repo
git clone https://github.com/0xSanyam/FundMe-Dapp
-
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".
When opened in a browser having metamask wallet extension, it looks like this
And if you open in a browser, which doesn't have the metamask extension, then it looks like this
It prompts us with a button stating "Please install Metamask", when clicking on it, it leads us to the offical download page
When connected it shows us the chain id and the network id and 🛑 warns us if we are on the ethereum mainnet
If we click on the Account button(metamask connected), it shows us our current account number
Now, let us try funding 0.05 Eth to this smart contract
All transaction are being performed on the hardhat localhost
After clicking the fund button
After pressing confirm, the funding is done!
Now, comes the withdrawal part, first we will like to see the current balance after several more transactions in this smart contract, then we'll do the withdrawal
Current balance is 999.05 Eth and the total available credit in our account is
After withdrawal, all the funds are now in our account!