Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Oct 25, 2024
1 parent a4b8c65 commit 7dadbb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions l1-contracts/contracts/bridge/L1BridgeContractErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ error ClaimFailedDepositFailed();

// 0x636c90db
error WrongL2Sender(address providedL2Sender);

// 0xb4aeddbc
error WrongCounterpart();
6 changes: 4 additions & 2 deletions l1-contracts/contracts/bridge/ntv/L1NativeTokenVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {ETH_TOKEN_ADDRESS} from "../../common/Config.sol";
import {L2_NATIVE_TOKEN_VAULT_ADDR} from "../../common/L2ContractAddresses.sol";
import {DataEncoding} from "../../common/libraries/DataEncoding.sol";

import {OriginChainIdNotFound, Unauthorized, ZeroAddress, NoFundsTransferred, InsufficientChainBalance, WithdrawFailed} from "../../common/L1ContractErrors.sol";
import {OriginChainIdNotFound, Unauthorized, ZeroAddress, NoFundsTransferred, InsufficientChainBalance, WithdrawFailed, WrongCounterpart} from "../../common/L1ContractErrors.sol";
import {ClaimFailedDepositFailed, ZeroAmountToTransfer, WrongAmountTransferred} from "../L1BridgeContractErrors.sol";

/// @author Matter Labs
Expand Down Expand Up @@ -137,7 +137,9 @@ contract L1NativeTokenVault is IL1NativeTokenVault, IL1AssetHandler, NativeToken
address,
address _assetHandlerAddressOnCounterpart
) external view override onlyAssetRouter {
require(_assetHandlerAddressOnCounterpart == L2_NATIVE_TOKEN_VAULT_ADDR, "NTV: wrong counterpart");
if (_assetHandlerAddressOnCounterpart != L2_NATIVE_TOKEN_VAULT_ADDR) {
revert WrongCounterpart();
}
}

function _getOriginChainId(bytes32 _assetId) internal view returns (uint256) {
Expand Down

0 comments on commit 7dadbb3

Please sign in to comment.