Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checkVoteStatus to PFOffer.sol #217

Merged

Commits on Jun 6, 2016

  1. Add an external voteStatusCheck to PFOffer

    This is a port of @avsa's contribution from his proposed offer contract
    that can be seen here:
    https://gist.github.com/alexvandesande/122c05a0f8a7108523aed29ae7ec92b1
    
    At any point `voteStatusDeadline` seconds before the end of the voting
    period anyone can call `checkVoteStatus()` to attempt and set the
    `wasApprovedBeforeDeadline` flag.
    
    This allows for a way to assure that the last minute yes vote does not
    occur by requiring the flag to be set to true at an earlier point of the
    voting deadline.
    LefterisJP committed Jun 6, 2016
    Configuration menu
    Copy the full SHA
    8a48593 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7269b9 View commit details
    Browse the repository at this point in the history
  3. Add a test for checkVoteStatus() failing

    A test that the checkVoteStatus will fail if it is called after the
    `voteStatusDeadline` period
    LefterisJP committed Jun 6, 2016
    Configuration menu
    Copy the full SHA
    7e06de4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5620e94 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2016

  1. Add the watchProposal() function in PFOffer

    Adding the watchProposal() function that @alexvandesande introduced in
    his Sample Offer contract
    [here](https://gist.github.com/alexvandesande/122c05a0f8a7108523aed29ae7ec92b1#file-proposal-js-L271).
    
    This way there is no requirement to pass the `proposalID` as a
    constructor argument. The contractor should instead add it on his own
    after he makes the proposal by calling `watchProposal()`.
    
    If the contractor tries to cheat by making 2 or more different proposals and
    adding the one that has gotten the most votes as the proposal ID in
    `watchProposal()` the token holders will notice and raise the alert so
    that the contractor can be blacklisted.
    LefterisJP committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    3f330b1 View commit details
    Browse the repository at this point in the history