ETH Price: $1,834.64 (-3.90%)
    /

    Contract

    0xbd13618bB14A693C6a2aFE541d9e3dd4A60a4a0d
    Age:90D
    Amount:Between 0-1
    Reset Filter
    Transaction Hash
    Method
    Block
    Age
    From
    To
    Amount
    Transfer53062842025-03-28 15:15:2734 hrs ago1743174927
    0xbd13618b...4A60a4a0d
    OUT0.0037672 ETH0.000005830.04525
    Mint Badge50525122025-03-25 15:00:494 days ago1742914849
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.00000530.04525
    Deposit50524692025-03-25 15:00:064 days ago1742914806
    0xbd13618b...4A60a4a0d
    OUT0.0010333 ETH0.000007530.04525
    Burn And Mint44805762025-03-18 18:47:5011 days ago1742323670
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000020430.04525
    Burn And Mint44804962025-03-18 18:46:1911 days ago1742323579
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44804772025-03-18 18:46:0011 days ago1742323560
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44804612025-03-18 18:45:4411 days ago1742323544
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44804442025-03-18 18:45:2711 days ago1742323527
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44804272025-03-18 18:45:1011 days ago1742323510
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44804132025-03-18 18:44:5611 days ago1742323496
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44803962025-03-18 18:44:3911 days ago1742323479
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44803762025-03-18 18:44:1911 days ago1742323459
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44803572025-03-18 18:44:0011 days ago1742323440
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44803352025-03-18 18:43:3811 days ago1742323418
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000016120.04525
    Burn And Mint44803152025-03-18 18:43:1811 days ago1742323398
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000016120.04525
    Burn And Mint44803022025-03-18 18:43:0511 days ago1742323385
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44802862025-03-18 18:42:4911 days ago1742323369
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44802662025-03-18 18:42:2911 days ago1742323349
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44802382025-03-18 18:42:0111 days ago1742323321
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000016130.04525
    Burn And Mint44802172025-03-18 18:41:4011 days ago1742323300
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000016130.04525
    Burn And Mint44801922025-03-18 18:41:1411 days ago1742323274
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44801722025-03-18 18:40:5411 days ago1742323254
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015870.04525
    Burn And Mint44801552025-03-18 18:40:3711 days ago1742323237
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015860.04525
    Burn And Mint44801352025-03-18 18:40:1711 days ago1742323217
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015880.04525
    Burn And Mint44801082025-03-18 18:39:5011 days ago1742323190
    0xbd13618b...4A60a4a0d
    OUT0 ETH0.000015880.04525
    VIEW ADVANCED FILTER

    Latest 25 internal transactions (View All)

    Parent Transaction Hash Block Age From To Amount
    53062842025-03-28 15:15:2734 hrs ago1743174927
    0xbd13618b...4A60a4a0d
    0.0037672 ETH
    53062842025-03-28 15:15:2734 hrs ago1743174927
    0xbd13618b...4A60a4a0d
    0.00000894 ETH
    50525122025-03-25 15:00:494 days ago1742914849
    0xbd13618b...4A60a4a0d
    0.00001038 ETH
    50524692025-03-25 15:00:064 days ago1742914806
    0xbd13618b...4A60a4a0d
    0.0010333 ETH
    50524692025-03-25 15:00:064 days ago1742914806
    0xbd13618b...4A60a4a0d
    0.0010333 ETH
    50524692025-03-25 15:00:064 days ago1742914806
    0xbd13618b...4A60a4a0d
    0.0000199 ETH
    46829212025-03-21 4:56:048 days ago1742532964
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46829212025-03-21 4:56:048 days ago1742532964
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827682025-03-21 4:53:318 days ago1742532811
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827682025-03-21 4:53:318 days ago1742532811
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827652025-03-21 4:53:288 days ago1742532808
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827652025-03-21 4:53:288 days ago1742532808
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827642025-03-21 4:53:278 days ago1742532807
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827642025-03-21 4:53:278 days ago1742532807
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827252025-03-21 4:52:488 days ago1742532768
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46827252025-03-21 4:52:488 days ago1742532768
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46823322025-03-21 4:45:578 days ago1742532357
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46823322025-03-21 4:45:578 days ago1742532357
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46823282025-03-21 4:45:538 days ago1742532353
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46823282025-03-21 4:45:538 days ago1742532353
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46822662025-03-21 4:44:508 days ago1742532290
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    46822662025-03-21 4:44:508 days ago1742532290
    0xbd13618b...4A60a4a0d
    0.000147 ETH
    45934202025-03-20 3:21:119 days ago1742440871
    0xbd13618b...4A60a4a0d
    0.0001372 ETH
    45934202025-03-20 3:21:119 days ago1742440871
    0xbd13618b...4A60a4a0d
    0.0001372 ETH
    45931682025-03-20 3:16:529 days ago1742440612
    0xbd13618b...4A60a4a0d
    0.0001372 ETH
    View All Internal Transactions
    Loading...
    Loading

    Similar Match Source Code
    This contract matches the deployed Bytecode of the Source Code for Contract 0x80aC9535...7CAE584c4
    The constructor portion of the code might be different and could alter the actual behaviour of the contract

    Contract Name:
    AccountProxy

    Compiler Version
    v0.8.26+commit.8a97fa7a

    ZkSolc Version
    v1.5.6

    Optimization Enabled:
    Yes with Mode 3

    Other Settings:
    cancun EvmVersion
    File 1 of 24 : AccountProxy.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: GPL-3.0
    pragma solidity ^0.8.17;
    import {EfficientCall} from '@matterlabs/zksync-contracts/l2/system-contracts/libraries/EfficientCall.sol';
    contract AccountProxy {
    event Upgraded(address indexed implementation);
    //keccak-256 of "eip1967.proxy.implementation" subtracted by 1
    bytes32 private constant _IMPLEMENTATION_SLOT =
    0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
    /**
    * @notice Sets the initial implementation contract.
    * @param implementation address - Address of the implementation contract.
    */
    constructor(address implementation) {
    assembly {
    sstore(_IMPLEMENTATION_SLOT, implementation)
    }
    emit Upgraded(implementation);
    }
    /**
    * @dev Fallback function that delegates the call to the implementation contract.
    */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 2 of 24 : EfficientCall.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    // SPDX-License-Identifier: MIT OR Apache-2.0
    pragma solidity ^0.8.0;
    import "./SystemContractHelper.sol";
    import "./Utils.sol";
    import {SHA256_SYSTEM_CONTRACT, KECCAK256_SYSTEM_CONTRACT} from "../Constants.sol";
    /**
    * @author Matter Labs
    * @notice This library is used to perform ultra-efficient calls using zkEVM-specific features.
    * @dev EVM calls always accept a memory slice as input and return a memory slice as output.
    * Therefore, even if the user has a ready-made calldata slice, they still need to copy it to memory
    * before calling. This is especially inefficient for large inputs (proxies, multi-calls, etc.).
    * In turn, zkEVM operates over a fat pointer, which is a set of (memory page, offset, start, length) in the memory/calldata/returndata.
    * This allows forwarding the calldata slice as is, without copying it to memory.
    * @dev Fat pointer is not just an integer, it is an extended data type supported on the VM level.
    * zkEVM creates the wellformed fat pointers for all the calldata/returndata regions, later
    * the contract may manipulate the already created fat pointers to forward a slice of the data, but not
    * to create new fat pointers!
    * @dev The allowed operation on fat pointers are:
    * 1. `ptr.add` - Transforms `ptr.offset` into `ptr.offset + u32(_value)`. If overflow happens then it panics.
    * 2. `ptr.sub` - Transforms `ptr.offset` into `ptr.offset - u32(_value)`. If underflow happens then it panics.
    * 3. `ptr.pack` - Do the concatenation between the lowest 128 bits of the pointer itself and the highest 128 bits of `_value`. It is typically used
         to prepare the ABI for external calls.
    * 4. `ptr.shrink` - Transforms `ptr.length` into `ptr.length - u32(_shrink)`. If underflow happens then it panics.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 3 of 24 : Constants.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    import "./interfaces/IAccountCodeStorage.sol";
    import "./interfaces/INonceHolder.sol";
    import "./interfaces/IContractDeployer.sol";
    import "./interfaces/IKnownCodesStorage.sol";
    import "./interfaces/IImmutableSimulator.sol";
    import "./interfaces/IEthToken.sol";
    import "./interfaces/IL1Messenger.sol";
    import "./interfaces/ISystemContext.sol";
    import "./interfaces/IBytecodeCompressor.sol";
    import "./BootloaderUtilities.sol";
    /// @dev All the system contracts introduced by zkSync have their addresses
    /// started from 2^15 in order to avoid collision with Ethereum precompiles.
    uint160 constant SYSTEM_CONTRACTS_OFFSET = 0x8000; // 2^15
    /// @dev All the system contracts must be located in the kernel space,
    /// i.e. their addresses must be below 2^16.
    uint160 constant MAX_SYSTEM_CONTRACT_ADDRESS = 0xffff; // 2^16 - 1
    address constant ECRECOVER_SYSTEM_CONTRACT = address(0x01);
    address constant SHA256_SYSTEM_CONTRACT = address(0x02);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 4 of 24 : SystemContractHelper.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8;
    import {MAX_SYSTEM_CONTRACT_ADDRESS, MSG_VALUE_SYSTEM_CONTRACT} from "../Constants.sol";
    import "./SystemContractsCaller.sol";
    import "./Utils.sol";
    uint256 constant UINT32_MASK = 0xffffffff;
    uint256 constant UINT128_MASK = 0xffffffffffffffffffffffffffffffff;
    /// @dev The mask that is used to convert any uint256 to a proper address.
    /// It needs to be padded with `00` to be treated as uint256 by Solidity
    uint256 constant ADDRESS_MASK = 0x00ffffffffffffffffffffffffffffffffffffffff;
    struct ZkSyncMeta {
    uint32 gasPerPubdataByte;
    uint32 heapSize;
    uint32 auxHeapSize;
    uint8 shardId;
    uint8 callerShardId;
    uint8 codeShardId;
    }
    enum Global {
    CalldataPtr,
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 5 of 24 : Utils.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.8.0;
    import "./EfficientCall.sol";
    /**
    * @author Matter Labs
    * @dev Common utilities used in zkSync system contracts
    */
    library Utils {
    /// @dev Bit mask of bytecode hash "isConstructor" marker
    bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK =
    0x00ff000000000000000000000000000000000000000000000000000000000000;
    /// @dev Bit mask to set the "isConstructor" marker in the bytecode hash
    bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK =
    0x0001000000000000000000000000000000000000000000000000000000000000;
    function safeCastToU128(uint256 _x) internal pure returns (uint128) {
    require(_x <= type(uint128).max, "Overflow");
    return uint128(_x);
    }
    function safeCastToU32(uint256 _x) internal pure returns (uint32) {
    require(_x <= type(uint32).max, "Overflow");
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 6 of 24 : IContractDeployer.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IContractDeployer {
    /// @notice Defines the version of the account abstraction protocol
    /// that a contract claims to follow.
    /// - `None` means that the account is just a contract and it should never be interacted
    /// with as a custom account
    /// - `Version1` means that the account follows the first version of the account abstraction protocol
    enum AccountAbstractionVersion {
    None,
    Version1
    }
    /// @notice Defines the nonce ordering used by the account
    /// - `Sequential` means that it is expected that the nonces are monotonic and increment by 1
    /// at a time (the same as EOAs).
    /// - `Arbitrary` means that the nonces for the accounts can be arbitrary. The operator
    /// should serve the transactions from such an account on a first-come-first-serve basis.
    /// @dev This ordering is more of a suggestion to the operator on how the AA expects its transactions
    /// to be processed and is not considered as a system invariant.
    enum AccountNonceOrdering {
    Sequential,
    Arbitrary
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 7 of 24 : IKnownCodesStorage.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IKnownCodesStorage {
    event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1);
    function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external;
    function markBytecodeAsPublished(
    bytes32 _bytecodeHash,
    bytes32 _l1PreimageHash,
    uint256 _l1PreimageBytesLen
    ) external;
    function getMarker(bytes32 _hash) external view returns (uint256);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 8 of 24 : IAccountCodeStorage.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IAccountCodeStorage {
    function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external;
    function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external;
    function markAccountCodeHashAsConstructed(address _address) external;
    function getRawCodeHash(address _address) external view returns (bytes32 codeHash);
    function getCodeHash(uint256 _input) external view returns (bytes32 codeHash);
    function getCodeSize(uint256 _input) external view returns (uint256 codeSize);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 9 of 24 : INonceHolder.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    /**
    * @author Matter Labs
    * @dev Interface of the nonce holder contract -- a contract used by the system to ensure
    * that there is always a unique identifier for a transaction with a particular account (we call it nonce).
    * In other words, the pair of (address, nonce) should always be unique.
    * @dev Custom accounts should use methods of this contract to store nonces or other possible unique identifiers
    * for the transaction.
    */
    interface INonceHolder {
    event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value);
    /// @dev Returns the current minimal nonce for account.
    function getMinNonce(address _address) external view returns (uint256);
    /// @dev Returns the raw version of the current minimal nonce
    /// (equal to minNonce + 2^128 * deployment nonce).
    function getRawNonce(address _address) external view returns (uint256);
    /// @dev Increases the minimal nonce for the msg.sender.
    function increaseMinNonce(uint256 _value) external returns (uint256);
    /// @dev Sets the nonce value `key` as used.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 10 of 24 : IEthToken.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IEthToken {
    function balanceOf(uint256) external view returns (uint256);
    function transferFromTo(address _from, address _to, uint256 _amount) external;
    function totalSupply() external view returns (uint256);
    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function mint(address _account, uint256 _amount) external;
    function withdraw(address _l1Receiver) external payable;
    event Mint(address indexed account, uint256 amount);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 11 of 24 : IImmutableSimulator.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    struct ImmutableData {
    uint256 index;
    bytes32 value;
    }
    interface IImmutableSimulator {
    function getImmutable(address _dest, uint256 _index) external view returns (bytes32);
    function setImmutables(address _dest, ImmutableData[] calldata _immutables) external;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 12 of 24 : IBytecodeCompressor.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IBytecodeCompressor {
    function publishCompressedBytecode(
    bytes calldata _bytecode,
    bytes calldata _rawCompressedData
    ) external payable returns (bytes32 bytecodeHash);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 13 of 24 : IL1Messenger.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    interface IL1Messenger {
    // Possibly in the future we will be able to track the messages sent to L1 with
    // some hooks in the VM. For now, it is much easier to track them with L2 events.
    event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message);
    function sendToL1(bytes memory _message) external returns (bytes32);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 14 of 24 : BootloaderUtilities.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    import "./interfaces/IBootloaderUtilities.sol";
    import "./libraries/TransactionHelper.sol";
    import "./libraries/RLPEncoder.sol";
    import "./libraries/EfficientCall.sol";
    /**
    * @author Matter Labs
    * @notice A contract that provides some utility methods for the bootloader
    * that is very hard to write in Yul.
    */
    contract BootloaderUtilities is IBootloaderUtilities {
    using TransactionHelper for *;
    /// @notice Calculates the canonical transaction hash and the recommended transaction hash.
    /// @param _transaction The transaction.
    /// @return txHash and signedTxHash of the transaction, i.e. the transaction hash to be used in the explorer and commits to all
    /// the fields of the transaction and the recommended hash to be signed for this transaction.
    /// @dev txHash must be unique for all transactions.
    function getTransactionHashes(
    Transaction calldata _transaction
    ) external view override returns (bytes32 txHash, bytes32 signedTxHash) {
    signedTxHash = _transaction.encodeHash();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 15 of 24 : SystemContractsCaller.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8;
    import {MSG_VALUE_SYSTEM_CONTRACT, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT} from "../Constants.sol";
    import "./Utils.sol";
    // Addresses used for the compiler to be replaced with the
    // zkSync-specific opcodes during the compilation.
    // IMPORTANT: these are just compile-time constants and are used
    // only if used in-place by Yul optimizer.
    address constant TO_L1_CALL_ADDRESS = address((1 << 16) - 1);
    address constant CODE_ADDRESS_CALL_ADDRESS = address((1 << 16) - 2);
    address constant PRECOMPILE_CALL_ADDRESS = address((1 << 16) - 3);
    address constant META_CALL_ADDRESS = address((1 << 16) - 4);
    address constant MIMIC_CALL_CALL_ADDRESS = address((1 << 16) - 5);
    address constant SYSTEM_MIMIC_CALL_CALL_ADDRESS = address((1 << 16) - 6);
    address constant MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 7);
    address constant SYSTEM_MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 8);
    address constant RAW_FAR_CALL_CALL_ADDRESS = address((1 << 16) - 9);
    address constant RAW_FAR_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 10);
    address constant SYSTEM_CALL_CALL_ADDRESS = address((1 << 16) - 11);
    address constant SYSTEM_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 12);
    address constant SET_CONTEXT_VALUE_CALL_ADDRESS = address((1 << 16) - 13);
    address constant SET_PUBDATA_PRICE_CALL_ADDRESS = address((1 << 16) - 14);
    address constant INCREMENT_TX_COUNTER_CALL_ADDRESS = address((1 << 16) - 15);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 16 of 24 : ISystemContext.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    /**
    * @author Matter Labs
    * @notice Contract that stores some of the context variables, that may be either
    * block-scoped, tx-scoped or system-wide.
    */
    interface ISystemContext {
    function chainId() external view returns (uint256);
    function origin() external view returns (address);
    function gasPrice() external view returns (uint256);
    function blockGasLimit() external view returns (uint256);
    function coinbase() external view returns (address);
    function difficulty() external view returns (uint256);
    function baseFee() external view returns (uint256);
    function blockHash(uint256 _block) external view returns (bytes32);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 17 of 24 : IBootloaderUtilities.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    import "../libraries/TransactionHelper.sol";
    interface IBootloaderUtilities {
    function getTransactionHashes(
    Transaction calldata _transaction
    ) external view returns (bytes32 txHash, bytes32 signedTxHash);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 18 of 24 : TransactionHelper.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    import "../openzeppelin/token/ERC20/IERC20.sol";
    import "../openzeppelin/token/ERC20/utils/SafeERC20.sol";
    import "../interfaces/IPaymasterFlow.sol";
    import "../interfaces/IContractDeployer.sol";
    import {ETH_TOKEN_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol";
    import "./RLPEncoder.sol";
    import "./EfficientCall.sol";
    /// @dev The type id of zkSync's EIP-712-signed transaction.
    uint8 constant EIP_712_TX_TYPE = 0x71;
    /// @dev The type id of legacy transactions.
    uint8 constant LEGACY_TX_TYPE = 0x0;
    /// @dev The type id of legacy transactions.
    uint8 constant EIP_2930_TX_TYPE = 0x01;
    /// @dev The type id of EIP1559 transactions.
    uint8 constant EIP_1559_TX_TYPE = 0x02;
    /// @notice Structure used to represent zkSync transaction.
    struct Transaction {
    // The type of the transaction.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 19 of 24 : RLPEncoder.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    library RLPEncoder {
    function encodeAddress(address _val) internal pure returns (bytes memory encoded) {
    // The size is equal to 20 bytes of the address itself + 1 for encoding bytes length in RLP.
    encoded = new bytes(0x15);
    bytes20 shiftedVal = bytes20(_val);
    assembly {
    // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94.
    mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000)
    // Write address data without stripping zeros.
    mstore(add(encoded, 0x21), shiftedVal)
    }
    }
    function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) {
    unchecked {
    if (_val < 128) {
    encoded = new bytes(1);
    // Handle zero as a non-value, since stripping zeroes results in an empty byte array
    encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val));
    } else {
    uint256 hbs = _highestByteSet(_val);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 20 of 24 : IERC20.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
    pragma solidity ^0.8.0;
    /**
    * @dev Interface of the ERC20 standard as defined in the EIP.
    */
    interface IERC20 {
    /**
    * @dev Emitted when `value` tokens are moved from one account (`from`) to
    * another (`to`).
    *
    * Note that `value` may be zero.
    */
    event Transfer(address indexed from, address indexed to, uint256 value);
    /**
    * @dev Emitted when the allowance of a `spender` for an `owner` is set by
    * a call to {approve}. `value` is the new allowance.
    */
    event Approval(address indexed owner, address indexed spender, uint256 value);
    /**
    * @dev Returns the amount of tokens in existence.
    */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 21 of 24 : IPaymasterFlow.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    /**
    * @author Matter Labs
    * @dev The interface that is used for encoding/decoding of
    * different types of paymaster flows.
    * @notice This is NOT an interface to be implementated
    * by contracts. It is just used for encoding.
    */
    interface IPaymasterFlow {
    function general(bytes calldata input) external;
    function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 22 of 24 : SafeERC20.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
    pragma solidity ^0.8.0;
    import "../IERC20.sol";
    import "../extensions/IERC20Permit.sol";
    import "../../../utils/Address.sol";
    /**
    * @title SafeERC20
    * @dev Wrappers around ERC20 operations that throw on failure (when the token
    * contract returns false). Tokens that return no value (and instead revert or
    * throw on failure) are also supported, non-reverting calls are assumed to be
    * successful.
    * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
    * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
    */
    library SafeERC20 {
    using Address for address;
    function safeTransfer(
    IERC20 token,
    address to,
    uint256 value
    ) internal {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 23 of 24 : Address.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
    pragma solidity ^0.8.1;
    /**
    * @dev Collection of functions related to the address type
    */
    library Address {
    /**
    * @dev Returns true if `account` is a contract.
    *
    * [IMPORTANT]
    * ====
    * It is unsafe to assume that an address for which this function returns
    * false is an externally-owned account (EOA) and not a contract.
    *
    * Among others, `isContract` will return false for the following
    * types of addresses:
    *
    * - an externally-owned account
    * - a contract in construction
    * - an address where a contract will be created
    * - an address where a contract lived, but was destroyed
    * ====
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 24 of 24 : IERC20Permit.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol)
    pragma solidity ^0.8.0;
    /**
    * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
    * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
    *
    * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
    * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
    * need to send a transaction, and thus is not required to hold Ether at all.
    */
    interface IERC20Permit {
    /**
    * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
    * given ``owner``'s signed approval.
    *
    * IMPORTANT: The same issues {IERC20-approve} has related to transaction
    * ordering also apply here.
    *
    * Emits an {Approval} event.
    *
    * Requirements:
    *
    * - `spender` cannot be the zero address.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Settings
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    {
    "evmVersion": "cancun",
    "optimizer": {
    "enabled": true,
    "mode": "3"
    },
    "outputSelection": {
    "*": {
    "*": [
    "abi"
    ]
    }
    },
    "detectMissingLibraries": false,
    "forceEVMLA": false,
    "enableEraVMExtensions": true,
    "libraries": {
    "contracts/libraries/StringUtils.sol": {
    "StringUtils": "0x7e390c46302Fb6D7f6C7b4e36937287eB678FBC0"
    }
    }
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Contract Security Audit

    Contract ABI

    API
    [{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"}]

    Deployed Bytecode

    0x0010000000000002000000600310027000000024033001970001000000310355000000000031035500020000003103550003000000310355000400000031035500050000003103550006000000310355000700000031035500080000003103550009000000310355000a000000310355000b000000310355000c000000310355000d000000310355000e000000310355000f0000003103550000000100200190000000270000c13d0000008002000039000000400020043f0000002802000041000000000202041a000000000300041400000000001004060000002c0030009c0000005e0000413d0000002f01000041000000800010043f0000002001000039000000840010043f0000000801000039000000a40010043f0000003001000041000000c40010043f0000003101000041000000820000013d0000000002000416000000000002004b0000005c0000c13d0000001f0230003900000025022001970000008002200039000000400020043f0000001f0430018f00000026053001980000008002500039000000380000613d0000008006000039000000000701034f000000007807043c0000000006860436000000000026004b000000340000c13d000000000004004b000000450000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000200030008c0000005c0000413d000000800500043d000000270050009c0000005c0000213d0000002801000041000000000051041b0000000001000414000000240010009c0000002401008041000000c00110021000000029011001c70000800d0200003900000002030000390000002a04000041008d00830000040f00000001002001900000005c0000613d0000002001000039000001000010044300000120000004430000002b010000410000008e0001042e00000000010000190000008f000104300000000001100400000000c0033002100000002d033001970000002e033001c700000000003103b500000000013103af0000002702200197008d00880000040f00000060051002700000001f0450018f0000002603500198000000700000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000037004b0000006c0000c13d0000002405500197000000000004004b0000007e0000613d000000000131034f0000000304400210000000000603043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f000000000013043500000060015002100000000100200190000000820000613d0000008e0001042e0000008f0001043000000086002104210000000102000039000000000001042d0000000002000019000000000001042d0000008b002104250000000102000039000000000001042d0000000002000019000000000001042d0000008d000004320000008e0001042e0000008f0001043000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc0200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000ffffffff000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000004f766572666c6f7700000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000008000000000000000005abc2033c6ab799fea3fb626a476ea5a27f5abb655e1539da50cf77842e426e3

    Block Age Transaction Gas Used Reward
    view all blocks produced

    Block Age Uncle Number Difficulty Gas Used Reward
    View All Uncles
    Loading...
    Loading
    Loading...
    Loading

    Validator Index Block Age Amount
    View All Withdrawals

    Transaction Hash Block Age Value Eth2 PubKey Valid
    View All Deposits
    [ Download: CSV Export  ]
    [ Download: CSV Export  ]

    A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.