Skip to content

Commit

Permalink
test(PauseEnforcer): test configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
huyhuynh3103 committed Jan 27, 2024
1 parent 1ad9cff commit 8a37936
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import { GlobalProposal } from "@ronin/contracts/libraries/GlobalProposal.sol";
import { ContractType } from "@ronin/contracts/utils/ContractType.sol";
import "../../BaseIntegration.t.sol";

contract SetConfig_PauseEnforcer_Test is BaseIntegration_Test {
function setUp() public virtual override {
super.setUp();
_config.switchTo(Network.RoninLocal.key());
}

function test_configPauseEnforcerContract() public {
address pauseEnforcer = _roninGatewayV3.emergencyPauser();
assertEq(pauseEnforcer, address(_roninPauseEnforcer));
}

function test_configBridgeContract() public {
address bridgeContract = address(_roninPauseEnforcer.target());

assertEq(bridgeContract, address(_roninGatewayV3));
}

function test_sentryEnforcerRole() public {
bool isSentryRole =
_roninPauseEnforcer.hasRole(_roninPauseEnforcer.SENTRY_ROLE(), _param.roninPauseEnforcer.sentries[0]);

assertEq(isSentryRole, true);
}
}

0 comments on commit 8a37936

Please sign in to comment.