gumdropsteve / Harmonia

Help your peers agree.
https://hack.ethglobal.co/showcase/harmonia-recthDN1JwwOGYs7r
MIT License
1 stars 0 forks source link

Establish Basic Dispute #3

Closed gumdropsteve closed 3 years ago

gumdropsteve commented 3 years ago

A renter or a host can post a dispute. A dispute has the following properties

gumdropsteve commented 3 years ago

TBD Dispute

struct Dispute {
    // the person opening the dispute
    address prosecutor;

    // the defendant of the dispute
    address defendant;

    // the amount in $$ that the prosecutor is requesting in damages
    uint256 amount;

    // file hash (stored on ipfs) on prosecutor evidence related to the case
    bytes32 prosecutorEvidence;

    // file hash (stored on ipfs) on defendant evidence related to the case
    bytes32 defendantEvidence;

    // status of the current dispute
    Status status;

    // addresses of users that voted
    address[] voted;

    // mapping from address of voters to yes or no
    mapping(address => bool) votedYesOrNo;

    // mapping from voters to hashed vote
    mapping(address => uint256)  votedYesOrNoSecret;

    // number of users that voted yes
    uint yea;

    // number of users that voted no
    uint nay;

    // date dispute was opened
    uint256 openDate;

    // deadline to vote
    uint256 voteDeadline;

    // date dispute was closed
    uint256 closeDate;
  }