🪙 CoinFlipper DApp
This is a decentralized application (DApp) that allows users to flip a coin using Ethereum smart contracts. The application integrates with MetaMask and uses a Solidity smart contract deployed on the Ethereum Sepolia testnet.
🌐 Live Demo
You can try the live version of the project here: CoinFlipper
✨ Features
- Flip a Coin: Users can bet on the outcome of a coin flip and receive double their bet amount if they win.
- Wallet Integration: Connects seamlessly with MetaMask for transaction signing.
- Secure Smart Contract: Built using Solidity and deployed on the Ethereum Sepolia testnet.
- Real-time Event Logging: Displays results and transaction details of the coin flip.
🛠️ Technologies Used
🚀 Getting Started
- Clone the repository:
git clone https://github.com/devansh-chouhan/CoinFlipper-Blockchain.git
- Install dependencies:
npm install --force
- Start the frontend:
npm run dev
📖 How to Use
- Connect your MetaMask wallet to the Sepolia testnet.
- Enter the bet amount in the input field.
- Click the "Flip" button to place your bet and flip the coin.
- If you win, your reward will be automatically sent to your wallet.
📜 Smart Contract Details
- Contract Address: 0x07A89533d524FD745f3a43719eaa83b2C1975Afd
- Network: Ethereum Sepolia testnet
📊 Event Logging
The contract emits a 'CoinFlipResult' event after each flip, providing information on:
- Player address
- Guess (heads or tails)
- Outcome of the flip
- Winner status (whether the player won or not)
- Bet amount