Skip to content
Verified contractPartialMIT

EraChainTypeManager

Address0xe642b64ac222503573ffbebfbd7bb7f072c99ef7
Balance

0 ETH

 

Transactions

0

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
Yes, 9,999,999 runs
EVM version
prague
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,378,190
Creation transaction
0x087d522567…f55d378cbe

83 files

The source code is large: one file is shown at a time. Choose a file in the list.

contracts/bridge/asset-tracker/IL2AssetTracker.sol

// SPDX-License-Identifier: MIT
// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version.
pragma solidity ^0.8.21;

import {MigrationConfirmationData} from "../../common/Messaging.sol";

interface IL2AssetTracker {
    struct InteropL2Info {
        // Amount withdrawn to L1 while the chain settled on L1.
        uint256 totalWithdrawalsToL1;
        // Amount successfully finalized from L1 while the chain settled on L1.
        // For base token, failed deposits are refunded on L2 to the refundRecipient rather than
        // later claimed on L1, so the gap between initiated deposits and this counter should not
        // be interpreted as uniformly "claimable on L1" across all asset types.
        uint256 totalSuccessfulDepositsFromL1;
    }

    /// @notice Emitted when L1 to Gateway migration is initiated for an asset
    /// @param assetId The asset ID being migrated
    /// @param chainId The chain ID from which the migration is initiated
    event L1ToGatewayMigrationInitiated(bytes32 indexed assetId, uint256 chainId);

    /// @notice Emitted when the base token is registered during a V31 upgrade.
    /// @param assetId The base token asset ID that was registered.
    event BaseTokenRegisteredDuringUpgrade(bytes32 indexed assetId);

    function L1_CHAIN_ID() external view returns (uint256);

    function initL2(uint256 _l1ChainId, bytes32 _baseTokenAssetId, bool _needBaseTokenTotalSupplyBackfill) external;

    function handleInitiateBridgingOnL2(
        uint256 _toChainId,
        bytes32 _assetId,
        uint256 _amount,
        uint256 _tokenOriginChainId
    ) external;

    function handleInitiateBaseTokenBridgingOnL2(uint256 _maybeToBlockChainId, uint256 _amount) external;

    function handleFinalizeBaseTokenBridgingOnL2(uint256 _fromChainId, uint256 _amount) external;

    function handleFinalizeBridgingOnL2(
        uint256 _fromChainId,
        bytes32 _assetId,
        uint256 _amount,
        uint256 _tokenOriginChainId,
        address _tokenAddress
    ) external;

    function initiateL1ToGatewayMigrationOnL2(bytes32 _assetId) external;

    function confirmMigrationOnL2(MigrationConfirmationData calldata _migrationConfirmationData) external;

    function registerLegacyToken(bytes32 _assetId) external;

    function registerBaseTokenDuringUpgrade() external;

    function needBaseTokenTotalSupplyBackfill() external view returns (bool);

    function backFillZKSyncOSBaseTokenV31MigrationData(uint256 _amount) external;
}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 9999999,
    "enabled": true
  },
  "evmVersion": "prague",
  "remappings": [
    "@ensdomains/=node_modules/@ensdomains/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "forge-std/=lib/forge-std/src/",
    "hardhat/=node_modules/hardhat/",
    "murky/=lib/murky/src/",
    "foundry-test/=test/foundry/",
    "l2-contracts/=../l2-contracts/contracts/",
    "system-contracts/=../system-contracts/",
    "@openzeppelin/contracts-v4/=lib/openzeppelin-contracts-v4/contracts/",
    "@openzeppelin/contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/contracts/",
    "test-utils/=test/foundry/l1/integration/utils/",
    "openzeppelin-contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/",
    "openzeppelin-contracts-v4/=lib/openzeppelin-contracts-v4/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.