Giter VIP home page Giter VIP logo

ridechain's Introduction

RideChain

RideChain is a ride order application whereby you can order your rides using Blockchain and pay with Ethers for your rides. RideChain will escrow the payment till the ride is completed

This project will give you a very good understanding on how Escrow smart contracts work !

Smart Contract Properties

  1. the balance that will be on hold till the ride is completed and approved by the rider and driver

     uint256 escrowBalance
    
  2. the address of the rider in this ride

     address public rider
    
  3. the address of the driver who is taking this ride

     address public driver
    
  4. address of the escrow contract

     address private escrow
    
  5. boolean indicating that the rider confirmed the completion of the ride

     bool riderOK
    
  6. boolean indicating that the driver accepts the take this ride

     bool driverOK
    
  7. the cost of the drive in finney

     uint256 rideCost
    

Smart Contract Functions

  1. functio for the rider and driver can accept the ride

     function accept()
    
  2. function to send the payment to the driver once the ride is approved by all parties

     function payBalance()
    
  3. function for the rider to order the ride

     function orderRide()
    
  4. function to cancel the ride

     function cancel()
    

How to use

  1. Requirements

     node.js web3 truffle Infura react
    
  2. Deploy the smart contract

    go to the SmartContracts directoy and run the deployment script

    node deploy.js
    

    for the demo UI, go to the Fronend directory and run the server

     run npm start
    

ridechain's People

Contributors

qaisammari avatar

Stargazers

 avatar

Watchers

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