Skip to content

Commit

Permalink
Merge branch 'main' into vault-message-owner
Browse files Browse the repository at this point in the history
  • Loading branch information
adaki2004 authored Feb 14, 2024
2 parents 4f25211 + a401622 commit 44e6ffa
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/libs/LibDepositing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ library LibDepositing {
/// @param amount The amount of the deposit.
/// @return The encoded deposit.
function _encodeEthDeposit(address addr, uint256 amount) private pure returns (uint256) {
if (amount >= type(uint96).max) revert L1_INVALID_ETH_DEPOSIT();
if (amount > type(uint96).max) revert L1_INVALID_ETH_DEPOSIT();
return (uint256(uint160(addr)) << 96) | amount;
}
}
4 changes: 2 additions & 2 deletions packages/protocol/contracts/L1/libs/LibVerifying.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ library LibVerifying {
|| config.ethDepositMaxCountPerBlock < config.ethDepositMinCountPerBlock
|| config.ethDepositMinAmount == 0
|| config.ethDepositMaxAmount <= config.ethDepositMinAmount
|| config.ethDepositMaxAmount >= type(uint96).max || config.ethDepositGas == 0
|| config.ethDepositMaxAmount > type(uint96).max || config.ethDepositGas == 0
|| config.ethDepositMaxFee == 0
|| config.ethDepositMaxFee >= type(uint96).max / config.ethDepositMaxCountPerBlock
|| config.ethDepositMaxFee > type(uint96).max / config.ethDepositMaxCountPerBlock
) return false;

return true;
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L2/TaikoL2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/common/AddressResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 44e6ffa

Please sign in to comment.