Predeploys.sol 2.42 KB
Newer Older
1
// SPDX-License-Identifier: MIT
2
pragma solidity ^0.8.0;
3 4

/**
5
 * @title Predeploys
6
 * @notice Contains constant addresses for contracts that are pre-deployed to the L2 system.
7
 */
8
library Predeploys {
9 10 11
    /**
     * @notice Address of the L2ToL1MessagePasser predeploy.
     */
12
    address internal constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000000;
13 14 15 16

    /**
     * @notice Address of the L2CrossDomainMessenger predeploy.
     */
17 18
    address internal constant L2_CROSS_DOMAIN_MESSENGER =
        0x4200000000000000000000000000000000000007;
19 20 21 22

    /**
     * @notice Address of the L2StandardBridge predeploy.
     */
23
    address internal constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010;
24 25 26 27

    /**
     * @notice Address of the SequencerFeeWallet predeploy.
     */
28
    address internal constant SEQUENCER_FEE_WALLET = 0x4200000000000000000000000000000000000011;
29 30 31 32 33

    /**
     * @notice Address of the OptimismMintableERC20Factory predeploy.
     */
    address internal constant OPTIMISM_MINTABLE_ERC20_FACTORY =
34
        0x4200000000000000000000000000000000000012;
35 36 37 38

    /**
     * @notice Address of the L1Block predeploy.
     */
39
    address internal constant L1_BLOCK_ATTRIBUTES = 0x4200000000000000000000000000000000000015;
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

    /**
     * @custom:legacy
     * @notice Address of the L1MessageSender predeploy. Deprecated. Use L2CrossDomainMessenger
     *         or access tx.origin (or msg.sender) in a L1 to L2 transaction instead.
     */
    address internal constant L1_MESSAGE_SENDER = 0x4200000000000000000000000000000000000001;

    /**
     * @custom:legacy
     * @notice Address of the DeployerWhitelist predeploy. No longer active.
     */
    address internal constant DEPLOYER_WHITELIST = 0x4200000000000000000000000000000000000002;

    /**
     * @custom:legacy
     * @notice Address of the LegacyERC20ETH predeploy. Deprecated. Balances are migrated to the
     *         state trie as of the Bedrock upgrade. Contract has been locked and write functions
     *         can no longer be accessed.
     */
    address internal constant LEGACY_ERC20_ETH = 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000;

    /**
     * @custom:legacy
     * @notice Address of the L1BlockNumber predeploy. Deprecated. Use the L1Block predeploy
     *         instead, which exposes more information about the L1 state.
     */
    address internal constant L1_BLOCK_NUMBER = 0x4200000000000000000000000000000000000013;
68
}