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

Make a function to prove a value in the history #124

Open
edmundedgar opened this issue Nov 4, 2023 · 2 comments
Open

Make a function to prove a value in the history #124

edmundedgar opened this issue Nov 4, 2023 · 2 comments
Assignees
Labels
contracts v4 likely contract version 4 feature

Comments

@edmundedgar
Copy link
Contributor

Sometimes you want to prove that an answer was given with a sufficient bond, even if someone subsequently submitted a different answer with a higher bond. Make a function to help with this with the same parameters as claimWinnings.

Possible syntax at decreasing levels of specificity:

  • requireResultInHistoryWithMinBond(question_id, result, min_bond, ...history stuff) to do the whole check or revert
  • isResultInHistoryWithMinBond(question_id, result, min_bond, ...history stuff) to do the whole check and return a bool
  • earliestResultInHistory(question_id, ...history stuff) to do the check up to the final (earliest) result then return the result (with the reveal if it's a revealed commitment), then let the caller check the value and the bond amount
  • verifyHistory(question_id, ...history stuff) to just check the history and let the caller do the rest (including checking a commitment)
@edmundedgar
Copy link
Contributor Author

Implemented as part of RealityETH/subjectivocracy@735bec5

Need integrate back into this repo for next version.

@edmundedgar
Copy link
Contributor Author

Done in c8f0910, we called it isHistoryOfUnfinalizedQuestionValid

@edmundedgar edmundedgar added v4 likely contract version 4 feature and removed v3.1 labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts v4 likely contract version 4 feature
Projects
None yet
Development

No branches or pull requests

1 participant