forked from axieinfinity/ronin-dpos-contracts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(PauseEnforcer): test configurations
- Loading branch information
1 parent
1ad9cff
commit 8a37936
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
test/bridge/integration/pause-enforcer/set-config/setConfig.PauseEnforcer.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |