Skip to content

Commit

Permalink
chore: add missed role checks (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
skhomuti authored Oct 14, 2024
1 parent ed13582 commit 939482e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/fork/deployment/PostDeployment.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ contract CSFeeOracleDeploymentTest is Test, Utilities, DeploymentFixtures {
assertEq(oracle.getRoleMemberCount(oracle.CONTRACT_MANAGER_ROLE()), 0);
assertEq(oracle.getRoleMemberCount(oracle.SUBMIT_DATA_ROLE()), 0);
assertEq(oracle.getRoleMemberCount(oracle.RECOVERER_ROLE()), 0);
assertEq(
oracle.getRoleMemberCount(oracle.MANAGE_CONSENSUS_CONTRACT_ROLE()),
0
);
assertEq(
oracle.getRoleMemberCount(oracle.MANAGE_CONSENSUS_VERSION_ROLE()),
0
);
}

function test_initialState() public {
Expand Down
10 changes: 10 additions & 0 deletions test/fork/invariant/Invariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ contract CSFeeOracleInvariant is InvariantsBase {
0,
"recoverer"
);
assertEq(
oracle.getRoleMemberCount(oracle.MANAGE_CONSENSUS_CONTRACT_ROLE()),
0,
"manage_consensus_contract"
);
assertEq(
oracle.getRoleMemberCount(oracle.MANAGE_CONSENSUS_VERSION_ROLE()),
0,
"manage_consensus_version"
);
}
}

Expand Down

0 comments on commit 939482e

Please sign in to comment.