Coder Social home page Coder Social logo

4302-project's Introduction

Running the project

Installing Ganache CLI

Our contract is too large to be run in the GUI version of Ganache, so the CLI version is needed to bypass the contract size limit.
npm install ganache --global
ganache --chain.allowUnlimitedContractSize -> to run Ganache

Running Tests

truffle test from the root directory

Failing Tests

If the test suite is failing, ganache can be run with another command instead: ganache --chain.allowUnlimitedContractSize --chain.vmErrorsOnRPCResponse

Test Files

test.js

This file contains our individual unit tests for our written functions.

test_flow.js

This file contains our test flows covered in our presentation, representing usage scenarios.

4302-project's People

Contributors

xinyi420 avatar marcusoyh avatar sunaga97 avatar yitongyang avatar edwaahh avatar

Watchers

 avatar

4302-project's Issues

Testing flow

Account Identities

accounts[1] (in 2_deploy_contracts but same as test.js) -> support_team
accounts[2] -> carOwnerAddress1
accounts[3] -> carOwnerAddress2
accounts[4] -> renterAddress1
accounts[5] -> renterAddress2

Extra Stuff

  • singpassVerify
  • singpassVerifyCar

Main Flow

Edward

  • done register 2 x car owner
  • Car Owner 1 -> register 1 x car
  • Car Owner 2 -> register 2 x car
  • list all 3 cars
  • update 1 x car info

Ryuto

  • register 2 x car renter

  • get owner rating -> would be 0

  • renter 1 submit rental request 1

  • renter 2 submit rental request 2

  • renter 2 submit rental request 3

  • (owner 1) approve rental request 1

  • (owner 2) approve rental request 2

  • (owner 2) approve rental request 3

  • get renter rating for request 3 -> would be 0

  • (owner 2) recall rental offer 3

Marcus

  • (renter 1) accept rental offer 1

  • (renter 2) accept rental offer 2

  • rent 1 - renter 1 confirm car received

  • rent 2 - renter 2 confirm car received

  • rent 1 - owner 1 confirm car returned deposit

  • (owner 1) leave rating for renter 1

  • (renter 1) leave rating for owner 1

Additional - Ryuto

  • get owner1 rating -> no longer 0
  • get renter1 rating -> no longer 0

Situations:

  • renter 1, owner 1, rent 1 -> all good
  • renter 2, owner 2, rent 2 -> nv return car
  • renter 1, owner 1, rent 3 -> nv receive car

Issues

Remember carStatus abnormal when opening an issue

  • owner 2 report issue with rent 2 -> nv return car
    (we call renter 2, gets him to return)

  • rent 2 - owner 2 confirm car returned deposit
    support team resolves issue

  • renter 1 report issue with rent 3 -> nv receive car
    (we call owner 1, gets him to deliver car)

  • support team resolves issue

  • renter 1 reopen issue within 7 days -> car stratched

  • support team resolves issue again, done

  • renter 1 reopen issue after 7 days -> unsuccessful

Extra Stuff

  • owner 1 unlist car

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.