Skip to content

Commit

Permalink
feat: import ConsistentState in Reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Jan 10, 2024
1 parent e07bfad commit c3b173c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions certora/specs/Reverts.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ methods {
function curator() external returns(address) envfree;
function isAllocator(address) external returns(bool) envfree;
function skimRecipient() external returns(address) envfree;
function fee() external returns(uint96) envfree;
function feeRecipient() external returns(address) envfree;
function guardian() external returns(address) envfree;
function pendingGuardian() external returns(address, uint64) envfree;
function config(MorphoHarness.Id) external returns(uint184, bool, uint64) envfree;
function pendingCap(MorphoHarness.Id) external returns(uint192, uint64) envfree;

function Morpho.libId(MorphoHarness.MarketParams) external returns(MorphoHarness.Id) envfree;
function Morpho.lastUpdate(MorphoHarness.Id) external returns(uint256) envfree;
}

use invariant timelockInRange;

rule setCuratorRevertCondition(env e, address newCurator) {
address owner = owner();
address oldCurator = curator();
Expand Down Expand Up @@ -90,10 +86,9 @@ rule submitGuardianRevertCondition(env e, address newGuardian) {
uint64 pendingGuardianValidAt;
_, pendingGuardianValidAt = pendingGuardian();

requireInvariant timelockInRange();
// Safe require as it corresponds to year 2262.
require e.block.timestamp < 2^63;
// Safe require because it is a verified invariant.
require isPendingTimelockInRange();

submitGuardian@withrevert(e, newGuardian);

Expand Down

0 comments on commit c3b173c

Please sign in to comment.