Skip to content

FLIP is a decentralized application (dApp) that allows users to bet on the flip of a coin. Built on the Ethereum blockchain, it ensures transparency and fairness in every bet.

Notifications You must be signed in to change notification settings

satwikbhasin/flip

Repository files navigation

FLIP - A Decentralized Coin Flip Betting App Built on Ethereum

Overview

FLIP is a decentralized application (dApp) that allows users to bet on the flip of a coin. Built on the Ethereum blockchain, it ensures transparency and fairness in every bet.

Features

  • Decentralized Betting: Place bets on a simple coin flip with full transparency ensured by Ethereum smart contracts.
  • Secure and Fair: Leveraging blockchain technology, every bet outcome is verifiable and immutable.

Smart Contract Deployment

The smart contract that powers FLIP is located in the "Smart Contract" folder. Follow the steps below to compile and deploy it on a local Ethereum network using Truffle and Ganache:

  1. Compile the Smart Contract:

    truffle compile
  2. Deploy the Smart Contract:

    truffle migrate --network development

Prerequisites

Ensure you have the following installed on your system:

Setting Up Environment Variables

After deploying the smart contract, you'll need to create a local .env file in the root directory of this project so that our frontend can interact with our smart contract. Follow these steps:

  • After running truffle migrate, note the contract address from the output. It will look something like:

    0x1234567890abcdef1234567890abcdef12345678
    
  • In the root directory of your project, create a file named .env.

  • Add the Contract Address to the .env File:

    NEXT_PUBLIC_CONTRACT_ADDRESS=0x1234567890abcdef1234567890abcdef12345670
    
    • Replace the placeholder address with the actual address from the deployment output.

By following these steps, you'll have the FLIP smart contract deployed on your local Ethereum network and properly configured for use in your frontend application. Happy betting!

About

FLIP is a decentralized application (dApp) that allows users to bet on the flip of a coin. Built on the Ethereum blockchain, it ensures transparency and fairness in every bet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published