Giter Site home page Giter Site logo

casino-dapp's Introduction

Running and Deploying Casino Dapp

This project is a Casino decentralized application

Prerequisites:

Have the following installed :

Start the application

In the project directory, follow the steps below to start the application locally

  1. Enter casino-app directory by entering the following command in the terminal, cd casino-app

  2. Install dependencies by executing the following command, npm install

  3. Run the application by entering npm start in the terminal.

  4. Open http://localhost:3000 to view the application in your browser.

Deploy Casino contract to Ganche

In the project directory, follow the steps below to deploy the smart contract on the development network (Ganache). Make sure Ganache is running locally on your device before executing the steps below

  1. Enter casino-contract directory by entering the following command in the terminal, cd casino-contract

  2. Install dependencies by executing the following command, npm install

  3. Deploy smart contract to Ganache network by entering truffle migrate in the terminal.

  4. The command above should have printed contract deployment details on your terminal. Find the address associated with the field 'contract address:'. Copy that address and paste it in between the quotes of line 4 in file app.js. Ex: address: "paste_the_copied_address_here"

  5. Follow the steps detailed in 'Start the application' section to run the application

Deploy Casino contract to Sepolia

In the project directory, follow the steps below to deploy the smart contract on the Sepolia network.

  1. Enter casino-contract directory by entering the following command in the terminal, cd casino-contract

  2. Install dependencies by executing the following command, npm install

  3. Locate the .env file and populate the values for PROJECT_ID and MNEMONIC. For PROJECT_ID variable enter the Infura project API Key inbetween the quotes. For MNEMONIC variable enter the account seed phrase. Note: The contract will be deployed on the address that is assocaited with that seed phrase

  4. Deploy smart contract to Sepolia network by entering truffle migrate --network sepolia in the terminal.

  5. The command above should have printed contract deployment details on your terminal. Find the address associated with the field 'contract address:'. Copy that address and paste it inbetween the quotes of line 4 in file app.js. Ex: address: "paste_the_copied_address_here"

  6. Follow the steps detailed in 'Start the application' section to run the application

casino-dapp's People

Contributors

ajaythecoder 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.