-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: relative timestamps #47
Conversation
// Revert if the request is finalized before the response deadline | ||
vm.expectRevert(IBondedResponseModule.BondedResponseModule_TooEarlyToFinalize.selector); | ||
_arbitrateDispute(_disputeId, IOracle.DisputeStatus.Won); | ||
|
||
// Pass the response deadline | ||
vm.roll(block.number + responseDeadline); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could still be tested in case that disputeDeadline
were less than what's left of responseDeadline
at that moment.
// Pass the dispute window | ||
vm.roll(block.number + responseDisputeWindow - responseDeadline); | ||
vm.warp(oracle.disputeCreatedAt(_disputeId) + disputeDeadline + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass the dispute window or pass the dispute deadline?
Also, bear in mind whether they should be computed from the response creation timestamp or the dispute creation timestamp.
// Pass the response deadline | ||
vm.roll(block.number + responseDeadline); | ||
vm.warp(oracle.responseCreatedAt(_responseId) + responseDeadline); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Pass the response deadline, but not the dispute deadline
Also, shouldn't it add the responseDeadline
to requestCreatedAt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100%
// Do not pass the dispute deadline | ||
vm.warp(disputeDeadline); | ||
vm.warp(_responseCreation + disputeDisputeWindow - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not pass the dispute deadline or do not pass the dispute window?
🤖 Linear
Closes GRT-215