Skip to content

Commit

Permalink
Certora: Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbreak1211 committed Oct 22, 2024
1 parent 2a585d7 commit c8ab9cb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions certora/VoteDelegateFactory.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ methods {
function polling() external returns (address) envfree;
}

definition addrZero() returns address = 0x0000000000000000000000000000000000000000;

// Verify correct storage changes for non reverting create
rule create() {
env e;
Expand All @@ -20,7 +18,7 @@ rule create() {
address delegatesSenderAfter = delegates(e.msg.sender);
mathint createdAfter = created(delegatesSenderAfter);

assert delegatesSenderAfter != addrZero(), "Assert 1";
assert delegatesSenderAfter != 0, "Assert 1";
assert delegatesSenderAfter == voteDelegate, "Assert 2";
assert createdAfter == 1, "Assert 3";
}
Expand All @@ -34,7 +32,7 @@ rule create_revert() {
create@withrevert(e);

bool revert1 = e.msg.value > 0;
bool revert2 = delegatesSender != addrZero();
bool revert2 = delegatesSender != 0;

assert lastReverted <=> revert1 || revert2, "Revert rules failed";
}

0 comments on commit c8ab9cb

Please sign in to comment.