ETH Price: $2,762.29 (+2.97%)
    /

    Contract

    0x4C6D08185c07C536a38afe2d8240C2093C9ad18D

    Overview

    ETH Balance

    0.002219107181731859 ETH

    ETH Value

    $6.13 (@ $2,762.29/ETH)

    Multichain Info

    No addresses found
    Transaction Hash
    Method
    Block
    Age
    From
    To
    Transfer24160242025-02-22 9:40:5216 hrs ago1740217252
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.00000570.04525
    Buy24071102025-02-22 7:09:3018 hrs ago1740208170
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000010980.04525
    Buy24070882025-02-22 7:08:5718 hrs ago1740208137
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005660.04525
    Buy24070352025-02-22 7:08:0319 hrs ago1740208083
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006050.04525
    Claim Winnings24069672025-02-22 7:06:5519 hrs ago1740208015
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006660.04525
    Transfer23024382025-02-21 1:35:212 days ago1740101721
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005980.04525
    Transfer22817182025-02-20 19:44:572 days ago1740080697
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.00000570.04525
    Claim Winnings22704782025-02-20 16:33:142 days ago1740069194
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000007370.04525
    Transfer21576292025-02-19 8:27:253 days ago1739953645
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005870.04525
    Transfer21153912025-02-18 20:27:224 days ago1739910442
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005910.04525
    Revoke Keys21136882025-02-18 19:57:224 days ago1739908642
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006730.04525
    Mint Badge21119652025-02-18 19:28:114 days ago1739906891
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006650.04525
    Mint With Eth21117692025-02-18 19:24:384 days ago1739906678
    0x4C6D0818...93C9ad18D
    OUT0.00369 ETH0.000027580.04525
    0x77502f5821116332025-02-18 19:22:224 days ago1739906542IN
    0x4C6D0818...93C9ad18D
    0.00398684 ETH0.000004310.04525
    Fulfill Advanced...21065752025-02-18 17:55:584 days ago1739901358
    0x4C6D0818...93C9ad18D
    OUT0.000029 ETH0.000025430.04525
    Claim Winnings20953972025-02-18 14:40:294 days ago1739889629
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000008580.04525
    Buy20953492025-02-18 14:39:254 days ago1739889565
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006310.04525
    Buy20952572025-02-18 14:37:534 days ago1739889473
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000008260.04525
    Buy20947182025-02-18 14:28:214 days ago1739888901
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000008250.04525
    Transfer20680992025-02-18 6:38:364 days ago1739860716
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000006050.04525
    Vote For App20680202025-02-18 6:37:004 days ago1739860620
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.00000670.04525
    Transfer20555892025-02-18 3:01:304 days ago1739847690
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005890.04525
    Transfer20168882025-02-17 15:49:035 days ago1739807343
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000008990.04525
    Transfer19971882025-02-17 9:54:395 days ago1739786079
    0x4C6D0818...93C9ad18D
    OUT0 ETH0.000005780.04525
    Batch Call19970522025-02-17 9:52:065 days ago1739785926
    0x4C6D0818...93C9ad18D
    SELF
    0x4C6D0818...93C9ad18D
    0.00000005 ETH0.000014550.04525
    View all transactions

    Latest 25 internal transactions (View All)

    Parent Transaction Hash Block Age From To Amount
    24160242025-02-22 9:40:5216 hrs ago1740217252
    0x4C6D0818...93C9ad18D
    0.00000885 ETH
    24071102025-02-22 7:09:3018 hrs ago1740208170
    0x4C6D0818...93C9ad18D
    0.00001796 ETH
    24070882025-02-22 7:08:5718 hrs ago1740208137
    0x4C6D0818...93C9ad18D
    0.00001796 ETH
    24070352025-02-22 7:08:0319 hrs ago1740208083
    0x4C6D0818...93C9ad18D
    0.00001796 ETH
    24069672025-02-22 7:06:5519 hrs ago1740208015
    0x4C6D0818...93C9ad18D
    0.00001271 ETH
    23024382025-02-21 1:35:212 days ago1740101721
    0x4C6D0818...93C9ad18D
    0.00000883 ETH
    22817182025-02-20 19:44:572 days ago1740080697
    0x4C6D0818...93C9ad18D
    0.00000887 ETH
    22704782025-02-20 16:33:142 days ago1740069194
    0x4C6D0818...93C9ad18D
    0.00001408 ETH
    21576292025-02-19 8:27:253 days ago1739953645
    0x4C6D0818...93C9ad18D
    0.00000866 ETH
    21153912025-02-18 20:27:224 days ago1739910442
    0x4C6D0818...93C9ad18D
    0.0000087 ETH
    21136882025-02-18 19:57:224 days ago1739908642
    0x4C6D0818...93C9ad18D
    0.00001012 ETH
    21119652025-02-18 19:28:114 days ago1739906891
    0x4C6D0818...93C9ad18D
    0.00001052 ETH
    21117692025-02-18 19:24:384 days ago1739906678
    0x4C6D0818...93C9ad18D
    0.00369 ETH
    21117692025-02-18 19:24:384 days ago1739906678
    0x4C6D0818...93C9ad18D
    0.00004787 ETH
    21116332025-02-18 19:22:224 days ago1739906542
    0x4C6D0818...93C9ad18D
    0.00398684 ETH
    21116332025-02-18 19:22:224 days ago1739906542
    0x4C6D0818...93C9ad18D
    0.00398684 ETH
    21065752025-02-18 17:55:584 days ago1739901358
    0x4C6D0818...93C9ad18D
    0.000029 ETH
    21065752025-02-18 17:55:584 days ago1739901358
    0x4C6D0818...93C9ad18D
    0.00003622 ETH
    20953972025-02-18 14:40:294 days ago1739889629
    0x4C6D0818...93C9ad18D
    0.00001364 ETH
    20953492025-02-18 14:39:254 days ago1739889565
    0x4C6D0818...93C9ad18D
    0.00002373 ETH
    20952572025-02-18 14:37:534 days ago1739889473
    0x4C6D0818...93C9ad18D
    0.0000191 ETH
    20947182025-02-18 14:28:214 days ago1739888901
    0x4C6D0818...93C9ad18D
    0.00001909 ETH
    20680992025-02-18 6:38:364 days ago1739860716
    0x4C6D0818...93C9ad18D
    0.00000889 ETH
    20680202025-02-18 6:37:004 days ago1739860620
    0x4C6D0818...93C9ad18D
    0.00001049 ETH
    20555892025-02-18 3:01:304 days ago1739847690
    0x4C6D0818...93C9ad18D
    0.00000868 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

    [{"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.