Skip to content

Commit

Permalink
chore(protocol): rename a few addresses based on David's feedback (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Apr 23, 2024
1 parent e12b0fb commit 5f093a0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/TaikoL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents, TaikoErrors {
view
virtual
override
onlyFromOwnerOrNamed(LibStrings.B_CHAIN_PAUSER)
onlyFromOwnerOrNamed(LibStrings.B_CHAIN_WATCHDOG)
{ }

function _checkEOAForCalldataDA() internal pure virtual returns (bool) {
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ contract Bridge is EssentialContract, IBridge {
/// only allow watchdog to pause the bridge, but does not allow it to unpause the bridge.
function _authorizePause(address addr, bool toPause) internal view override {
// Owenr and chain_pauser can pause/unpause the bridge.
if (addr == owner() || addr == resolve(LibStrings.B_CHAIN_PAUSER, true)) return;
if (addr == owner() || addr == resolve(LibStrings.B_CHAIN_WATCHDOG, true)) return;

// bridge_watchdog can pause the bridge, but cannot unpause it.
if (toPause && addr == resolve(LibStrings.B_BRIDGE_WATCHDOG, true)) return;
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/contracts/common/LibStrings.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.24;
/// @title LibStrings
/// @custom:security-contact [email protected]
library LibStrings {
bytes32 internal constant B_CHAIN_PAUSER = bytes32("chain_pauser");
bytes32 internal constant B_CHAIN_WATCHDOG = bytes32("chain_watchdog");
bytes32 internal constant B_WITHDRAWER = bytes32("withdrawer");
bytes32 internal constant B_PROPOSER = bytes32("proposer");
bytes32 internal constant B_PROPOSER_ONE = bytes32("proposer_one");
Expand All @@ -19,7 +19,7 @@ library LibStrings {
bytes32 internal constant B_ERC721_VAULT = bytes32("erc721_vault");
bytes32 internal constant B_BRIDGED_ERC721 = bytes32("bridged_erc721");
bytes32 internal constant B_BRIDGE_WATCHDOG = bytes32("bridge_watchdog");
bytes32 internal constant B_ROLLUP_WATCHDOG = bytes32("rollup_watchdog");
bytes32 internal constant B_SGX_WATCHDOG = bytes32("sgx_watchdog");
bytes32 internal constant B_TIER_PROVIDER = bytes32("tier_provider");
bytes32 internal constant B_TIER_SGX = bytes32("tier_sgx");
bytes32 internal constant B_TIER_SGX_ZKVM = bytes32("tier_sgx_zkvm");
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/verifiers/SgxVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ contract SgxVerifier is EssentialContract, IVerifier {
/// @param _ids The ids array of SGX instances.
function deleteInstances(uint256[] calldata _ids)
external
onlyFromOwnerOrNamed(LibStrings.B_ROLLUP_WATCHDOG)
onlyFromOwnerOrNamed(LibStrings.B_SGX_WATCHDOG)
{
for (uint256 i; i < _ids.length; ++i) {
uint256 idx = _ids[i];
Expand Down

0 comments on commit 5f093a0

Please sign in to comment.