From 939482e028139603fbdc13536194ebd22a3e3868 Mon Sep 17 00:00:00 2001 From: Sergey Khomutinin <31664571+skhomuti@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:51:19 +0500 Subject: [PATCH] chore: add missed role checks (#352) --- test/fork/deployment/PostDeployment.t.sol | 8 ++++++++ test/fork/invariant/Invariants.t.sol | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/test/fork/deployment/PostDeployment.t.sol b/test/fork/deployment/PostDeployment.t.sol index b85af716..527b096e 100644 --- a/test/fork/deployment/PostDeployment.t.sol +++ b/test/fork/deployment/PostDeployment.t.sol @@ -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 { diff --git a/test/fork/invariant/Invariants.t.sol b/test/fork/invariant/Invariants.t.sol index 2e08d40a..80255904 100644 --- a/test/fork/invariant/Invariants.t.sol +++ b/test/fork/invariant/Invariants.t.sol @@ -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" + ); } }