This project is a decentralized application (DApp) built with React.js and Web3.js that allows users to donate Ethereum (ETH) to a specified charity wallet address using MetaMask.
- Connect to MetaMask
- Display connected wallet address
- Send 0.1 ETH donations to a specified charity wallet
- Handle connection errors gracefully
- Styled UI with Tailwind CSS
- React.js: Frontend framework for building the UI
- Web3.js: Ethereum JavaScript API for interacting with the blockchain
- MetaMask: Ethereum wallet for transactions
- Tailwind CSS: Styling framework
Before running the project, ensure you have the following installed:
- Node.js (latest LTS version recommended)
- npm or yarn
- MetaMask browser extension
- An Ethereum wallet with test ETH (if using a test network)
-
Clone the repository:
git clone https://github.com/yourusername/charity-dapp.git cd charity-dapp
-
Install dependencies:
npm install # or yarn install
-
Start the development server:
npm start # or yarn start
- Open the application in your browser.
- Click Connect to MetaMask to link your Ethereum wallet.
- Click Donate 0.1 ETH to send a donation to the specified charity wallet.
- Confirm the transaction in MetaMask.
- Receive a success message if the transaction is successful.
- Replace
'0xYourCharityAddressHere'
inCharity.js
with the actual charity Ethereum wallet address. - Ensure you are connected to the appropriate Ethereum network (e.g., Goerli testnet for testing).
- Add support for multiple donation amounts
- Display real-time Ethereum balance
- Implement transaction history
- Enhance UI/UX with animations
This project is licensed under the MIT License.
Pull requests are welcome! Feel free to submit issues and suggest improvements.
For any questions, reach out via [your email or GitHub].