diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol index 8a9bbf7a833..86e8a19941f 100644 --- a/packages/protocol/contracts/L2/TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -78,7 +78,7 @@ contract TaikoL2 is CrossChainOwned, ICrossChainSync { { __CrossChainOwned_init(_addressManager, _l1ChainId); - if (block.chainid <= 1 || block.chainid >= type(uint64).max) { + if (block.chainid <= 1 || block.chainid > type(uint64).max) { revert L2_INVALID_CHAIN_ID(); } diff --git a/packages/protocol/contracts/common/AddressResolver.sol b/packages/protocol/contracts/common/AddressResolver.sol index 78124345ac4..b3ca9523981 100644 --- a/packages/protocol/contracts/common/AddressResolver.sol +++ b/packages/protocol/contracts/common/AddressResolver.sol @@ -94,7 +94,7 @@ abstract contract AddressResolver { /// @param _addressManager Address of the AddressManager. // solhint-disable-next-line func-name-mixedcase function __AddressResolver_init(address _addressManager) internal virtual { - if (block.chainid >= type(uint64).max) { + if (block.chainid > type(uint64).max) { revert RESOLVER_UNEXPECTED_CHAINID(); } addressManager = _addressManager;