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

refactor: add state structure to prophet entities #20

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

0xyaco
Copy link
Collaborator

@0xyaco 0xyaco commented Aug 9, 2024

🤖 Linear

Closes GRT-87
Part of GRT-83

Description

Refactor to include state in Prophet entities to augment contracts' structs. This will allow us to, for example:

  • Calculate the windows to finalize request
  • Check for active/disputed responses
  • Validate dispute status with events

Copy link

linear bot commented Aug 9, 2024

GRT-83 Implement onResponseDisputed

We want the actors to handle the event ResponseDisputed from prophet Orcale.

This handler should:

  • Update RequestActivity
  • Validate if the proposal was correct, Leveraging BlockNumberService
  • Bond for disputer or proposer based on validation output

Event: https://github.com/defi-wonderland/prophet-core/blob/d01bc1a0fe39d516ff502a669e80b8eb2fe2df86/solidity/interfaces/IOracle.sol#L40

Follow figma sequence diagram: https://www.figma.com/board/BbciqJb5spg35ZglTsRRBb/Offchain?node-id=239-2749&t=y06FKcx0NVro4Jml-4
AC:

  • Event handler successfully implemented
  • Unit tests

@0xyaco 0xyaco requested review from 0xkenj1 and 0xnigir1 August 9, 2024 22:58
@0xkenj1
Copy link
Collaborator

0xkenj1 commented Aug 12, 2024

🚀

@0xyaco 0xyaco merged commit 0f70775 into dev Aug 12, 2024
5 checks passed
@0xyaco 0xyaco deleted the feat/prophet-state branch August 12, 2024 22:43
Copy link

linear bot commented Aug 16, 2024

GRT-87 Implement `RequestActivity`, `Request` and `Dispute` entities

We need a way to keep track on the proposals and disputes from the requests that each of the actors handle. Like an Activity history.

To implement this we should first implement an abstraction or entity for Proposal and Dispute following figma diagrams:

AC:

  • RequestActivity , Proposal , Dispute successfully implemented
  • development integrated with EBOActor
  • Unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants