This repository contains a decentralized application (DAPP) that allows users to check their account balance and transfer funds using Ethereum and MetaMask. The DAPP is built using React and Solidity.
- Connect Wallet: Users can connect their MetaMask wallet to the DAPP.
- Account Balance: Users can view their account balance in the DAPP.
- Transfer Funds: Users can transfer funds to another Ethereum address by specifying the recipient address and the transfer amount.
The smart contract is implemented in Solidity. It includes the following functions:
transferEther
: Allows users to transfer Ether to another address. It requires the sender to have a sufficient balance.accountBalance
: Returns the account balance of the caller.
The frontend of the DAPP is implemented using React. It includes the following functionality:
- Connect Wallet: Allows users to connect their MetaMask wallet to the DAPP.
- Account Balance: Displays the account balance of the connected wallet.
- Transfer Funds: Enables users to specify a recipient address and transfer amount to send funds.
The DAPP uses the Ethereum provider and signer from MetaMask to interact with the smart contract.
- Install MetaMask browser extension.
- Open the DAPP in a web browser.
- Click on the "Connect Wallet" button to connect your MetaMask wallet.
- Once connected, you can view your account balance.
- To transfer funds, enter the recipient address and the transfer amount in the provided input fields and click the "Transfer" button.
- The transaction confirmation hash will be displayed upon successful transfer.