diff --git a/src/executors/AuthBridgeExecutor.sol b/src/executors/AuthBridgeExecutor.sol index bde9190..2772574 100644 --- a/src/executors/AuthBridgeExecutor.sol +++ b/src/executors/AuthBridgeExecutor.sol @@ -11,8 +11,6 @@ import { BridgeExecutorBase } from './BridgeExecutorBase.sol'; * @notice Queue up proposals from an authorized bridge. */ contract AuthBridgeExecutor is IAuthBridgeExecutor, AccessControl, BridgeExecutorBase { - - bytes32 public constant AUTHORIZED_BRIDGE_ROLE = keccak256('AUTHORIZED_BRIDGE_ROLE'); /** * @dev Constructor @@ -33,7 +31,6 @@ contract AuthBridgeExecutor is IAuthBridgeExecutor, AccessControl, BridgeExecuto ) { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); - _setRoleAdmin(AUTHORIZED_BRIDGE_ROLE, DEFAULT_ADMIN_ROLE); } /// @inheritdoc IAuthBridgeExecutor @@ -43,7 +40,7 @@ contract AuthBridgeExecutor is IAuthBridgeExecutor, AccessControl, BridgeExecuto string[] memory signatures, bytes[] memory calldatas, bool[] memory withDelegatecalls - ) external onlyRole(AUTHORIZED_BRIDGE_ROLE) { + ) external onlyRole(DEFAULT_ADMIN_ROLE) { _queue(targets, values, signatures, calldatas, withDelegatecalls); } diff --git a/test/ArbitrumOneCrosschainTest.t.sol b/test/ArbitrumOneCrosschainTest.t.sol index f488829..27f9628 100644 --- a/test/ArbitrumOneCrosschainTest.t.sol +++ b/test/ArbitrumOneCrosschainTest.t.sol @@ -52,7 +52,7 @@ contract ArbitrumOneCrosschainTest is CrosschainTestBase { defaultL2BridgeExecutorArgs.ethereumGovernanceExecutor, bridgeExecutor )); - bridgeExecutor.grantRole(bridgeExecutor.AUTHORIZED_BRIDGE_ROLE(), bridgeReceiver); + bridgeExecutor.grantRole(bridgeExecutor.DEFAULT_ADMIN_ROLE(), bridgeReceiver); hostDomain.selectFork(); vm.deal(L1_EXECUTOR, 0.01 ether); diff --git a/test/AuthBridgeExecutor.t.sol b/test/AuthBridgeExecutor.t.sol index d19d1ce..b9290ae 100644 --- a/test/AuthBridgeExecutor.t.sol +++ b/test/AuthBridgeExecutor.t.sol @@ -70,9 +70,8 @@ contract AuthBridgeExecutorTestBase is Test { gracePeriod: GRACE_PERIOD, guardian: guardian }); - executor.grantRole(executor.AUTHORIZED_BRIDGE_ROLE(), bridge); - executor.grantRole(executor.DEFAULT_ADMIN_ROLE(), bridge); - executor.revokeRole(executor.DEFAULT_ADMIN_ROLE(), address(this)); + executor.grantRole(executor.DEFAULT_ADMIN_ROLE(), bridge); + executor.revokeRole(executor.DEFAULT_ADMIN_ROLE(), address(this)); } /******************************************************************************************************************/ @@ -186,15 +185,14 @@ contract AuthBridgeExecutorConstructorTests is AuthBridgeExecutorTestBase { assertEq(executor.getGuardian(), guardian); assertEq(executor.hasRole(executor.DEFAULT_ADMIN_ROLE(), address(this)), true); - assertEq(executor.getRoleAdmin(executor.AUTHORIZED_BRIDGE_ROLE()), executor.DEFAULT_ADMIN_ROLE()); } } contract AuthBridgeExecutorQueueTests is AuthBridgeExecutorTestBase { - function test_queue_onlyBridge() public { - vm.expectRevert(abi.encodeWithSignature("AccessControlUnauthorizedAccount(address,bytes32)", address(this), executor.AUTHORIZED_BRIDGE_ROLE())); + function test_queue_onlyDefaultAdmin() public { + vm.expectRevert(abi.encodeWithSignature("AccessControlUnauthorizedAccount(address,bytes32)", address(this), executor.DEFAULT_ADMIN_ROLE())); executor.queue(new address[](0), new uint256[](0), new string[](0), new bytes[](0), new bool[](0)); } diff --git a/test/BaseChainCrosschainTest.t.sol b/test/BaseChainCrosschainTest.t.sol index 4cf4f43..85f0924 100644 --- a/test/BaseChainCrosschainTest.t.sol +++ b/test/BaseChainCrosschainTest.t.sol @@ -50,7 +50,7 @@ contract BaseChainCrosschainTest is CrosschainTestBase { defaultL2BridgeExecutorArgs.ethereumGovernanceExecutor, bridgeExecutor )); - bridgeExecutor.grantRole(bridgeExecutor.AUTHORIZED_BRIDGE_ROLE(), bridgeReceiver); + bridgeExecutor.grantRole(bridgeExecutor.DEFAULT_ADMIN_ROLE(), bridgeReceiver); hostDomain.selectFork(); } diff --git a/test/GnosisCrosschainTest.t.sol b/test/GnosisCrosschainTest.t.sol index 4dc701b..5ae376c 100644 --- a/test/GnosisCrosschainTest.t.sol +++ b/test/GnosisCrosschainTest.t.sol @@ -54,7 +54,7 @@ contract GnosisCrosschainTest is CrosschainTestBase { defaultL2BridgeExecutorArgs.ethereumGovernanceExecutor, bridgeExecutor )); - bridgeExecutor.grantRole(bridgeExecutor.AUTHORIZED_BRIDGE_ROLE(), bridgeReceiver); + bridgeExecutor.grantRole(bridgeExecutor.DEFAULT_ADMIN_ROLE(), bridgeReceiver); hostDomain.selectFork(); } diff --git a/test/OptimismCrosschainTest.t.sol b/test/OptimismCrosschainTest.t.sol index a330f59..4fd3f77 100644 --- a/test/OptimismCrosschainTest.t.sol +++ b/test/OptimismCrosschainTest.t.sol @@ -50,7 +50,7 @@ contract OptimismCrosschainTest is CrosschainTestBase { defaultL2BridgeExecutorArgs.ethereumGovernanceExecutor, bridgeExecutor )); - bridgeExecutor.grantRole(bridgeExecutor.AUTHORIZED_BRIDGE_ROLE(), bridgeReceiver); + bridgeExecutor.grantRole(bridgeExecutor.DEFAULT_ADMIN_ROLE(), bridgeReceiver); hostDomain.selectFork(); }