Giter VIP home page Giter VIP logo

flip's Introduction

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!

flip's People

Contributors

satwikbhasin avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.