Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N-02 Typographical Errors #573

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions l1-contracts/contracts/bridge/L1SharedBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {ETH_TOKEN_ADDRESS, TWO_BRIDGES_MAGIC_VALUE} from "../common/Config.sol";
import {IBridgehub, L2TransactionRequestTwoBridgesInner, L2TransactionRequestDirect} from "../bridgehub/IBridgehub.sol";
import {IGetters} from "../state-transition/chain-interfaces/IGetters.sol";
import {L2_BASE_TOKEN_SYSTEM_CONTRACT_ADDR} from "../common/L2ContractAddresses.sol";
import {Unauthorized, ZeroAddress, SharedBridgeValueAlreadySet, SharedBridgeKey, NoFundsTransferred, ZeroBalance, ValueMismatch, TokensWithFeesNotSupported, NonEmptyMsgValue, L2BridgeNotSet, TokenNotSupported, WithdrawIncorrectAmount, EmptyDeposit, DepositExists, AddressAlreadyUsed, InvalidProof, DepositDoesNotExist, InsufficientChainBalance, ShareadBridgeValueNotSet, WithdrawalAlreadyFinalized, WithdrawFailed, L2WithdrawalMessageWrongLength, InvalidSelector, SharedBridgeBalanceMismatch} from "../common/L1ContractErrors.sol";
import {Unauthorized, ZeroAddress, SharedBridgeValueAlreadySet, SharedBridgeKey, NoFundsTransferred, ZeroBalance, ValueMismatch, TokensWithFeesNotSupported, NonEmptyMsgValue, L2BridgeNotSet, TokenNotSupported, WithdrawIncorrectAmount, EmptyDeposit, DepositExists, AddressAlreadyUsed, InvalidProof, DepositDoesNotExist, InsufficientChainBalance, SharedBridgeValueNotSet, WithdrawalAlreadyFinalized, WithdrawFailed, L2WithdrawalMessageWrongLength, InvalidSelector, SharedBridgeBalanceMismatch, SharedBridgeValueNotSet} from "../common/L1ContractErrors.sol";

/// @author Matter Labs
/// @custom:security-contact security@matterlabs.dev
Expand Down Expand Up @@ -527,7 +527,7 @@ contract L1SharedBridge is IL1SharedBridge, ReentrancyGuard, Ownable2StepUpgrade
/// @return Whether withdrawal was initiated on zkSync Era before diamond proxy upgrade.
function _isEraLegacyEthWithdrawal(uint256 _chainId, uint256 _l2BatchNumber) internal view returns (bool) {
if ((_chainId == ERA_CHAIN_ID) && eraPostDiamondUpgradeFirstBatch == 0) {
revert ShareadBridgeValueNotSet(SharedBridgeKey.PostUpgradeFirstBatch);
revert SharedBridgeValueNotSet(SharedBridgeKey.PostUpgradeFirstBatch);
}
return (_chainId == ERA_CHAIN_ID) && (_l2BatchNumber < eraPostDiamondUpgradeFirstBatch);
}
Expand All @@ -538,7 +538,7 @@ contract L1SharedBridge is IL1SharedBridge, ReentrancyGuard, Ownable2StepUpgrade
/// @return Whether withdrawal was initiated on zkSync Era before Legacy Bridge upgrade.
function _isEraLegacyTokenWithdrawal(uint256 _chainId, uint256 _l2BatchNumber) internal view returns (bool) {
if ((_chainId == ERA_CHAIN_ID) && eraPostLegacyBridgeUpgradeFirstBatch == 0) {
revert ShareadBridgeValueNotSet(SharedBridgeKey.LegacyBridgeFirstBatch);
revert SharedBridgeValueNotSet(SharedBridgeKey.LegacyBridgeFirstBatch);
}
return (_chainId == ERA_CHAIN_ID) && (_l2BatchNumber < eraPostLegacyBridgeUpgradeFirstBatch);
}
Expand All @@ -554,7 +554,7 @@ contract L1SharedBridge is IL1SharedBridge, ReentrancyGuard, Ownable2StepUpgrade
uint256 _l2TxNumberInBatch
) internal view returns (bool) {
if ((_chainId == ERA_CHAIN_ID) && (eraLegacyBridgeLastDepositBatch == 0)) {
revert ShareadBridgeValueNotSet(SharedBridgeKey.LegacyBridgeLastDepositBatch);
revert SharedBridgeValueNotSet(SharedBridgeKey.LegacyBridgeLastDepositBatch);
}
return
(_chainId == ERA_CHAIN_ID) &&
Expand Down
4 changes: 2 additions & 2 deletions l1-contracts/contracts/common/L1ContractErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ error DepositDoesNotExist();
error InsufficientFunds();
// 0x79cacff1
error DepositFailed();
// 0xfc1a3c3a
error ShareadBridgeValueNotSet(SharedBridgeKey);
// 0x7774d2f9
error SharedBridgeValueNotSet(SharedBridgeKey);
// 0x750b219c
error WithdrawFailed();
// 0x16509b9a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ interface IStateTransitionManager {
function setNewVersionUpgrade(
Diamond.DiamondCutData calldata _cutData,
uint256 _oldProtocolVersion,
uint256 _oldprotocolVersionDeadline,
uint256 _oldProtocolVersionDeadline,
uint256 _newProtocolVersion
) external;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ contract ExecutorFacet is ZkSyncHyperchainBase, IExecutor {
// carried out within the first batch committed after the upgrade.

// While the logic of the contract ensures that the s.l2SystemContractsUpgradeBatchNumber is 0 when this function is called,
// this check is added just in case. Since it is a hot read, it does not encure noticeable gas cost.
// this check is added just in case. Since it is a hot read, it does not incur noticeable gas cost.
if (s.l2SystemContractsUpgradeBatchNumber != 0) {
revert UpgradeBatchNumberIsNotZero();
}
Expand Down
Loading