Skip to content

Commit

Permalink
add the check suggested by the bug report
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseMiguelHerrera committed Aug 6, 2024
1 parent 8756bb2 commit a9d3955
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/v2/oracles/individual/ChainlinkPriceProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ contract ChainlinkPriceProvider is IConditionProvider {
revert SequencerDown();
}

if (startedAt == 0) {
revert InvalidRound();
}

// Make sure the grace period has passed after the sequencer is back up - timeSinceUp <= PERIOD
if ((block.timestamp - startedAt) <= _GRACE_PERIOD_TIME) {
revert GracePeriodNotOver();
Expand Down Expand Up @@ -115,6 +119,7 @@ contract ChainlinkPriceProvider is IConditionProvider {
ERRORS
//////////////////////////////////////////////////////////////*/
error SequencerDown();
error InvalidRound();
error GracePeriodNotOver();
error OraclePriceZero();
error RoundIdOutdated();
Expand Down

0 comments on commit a9d3955

Please sign in to comment.