ETH Price: $1,608.47 (-1.64%)
    /

    Contract

    0x60C1bc25aFF26749Aa68736158De66e6bCE27CEb

    Overview

    ETH Balance

    0.054229337021164005 ETH

    ETH Value

    $87.23 (@ $1,608.47/ETH)

    Token Holdings

    Multichain Info

    No addresses found
    Transaction Hash
    Method
    Block
    Age
    From
    To
    Amount
    Transfer49378472025-03-24 5:49:0222 days ago1742795342IN
    0x60C1bc25...6bCE27CEb
    0.048314 ETH0.000004220.04525
    Transfer46223732025-03-20 11:38:2426 days ago1742470704IN
    0x60C1bc25...6bCE27CEb
    0.05 ETH0.00000430.04525
    0xe112a5a946222682025-03-20 11:36:3826 days ago1742470598IN
    0x60C1bc25...6bCE27CEb
    0.04997072 ETH0.000004160.04525
    Transfer45680202025-03-19 19:41:3527 days ago1742413295IN
    0x60C1bc25...6bCE27CEb
    0.05 ETH0.000003920.04525
    0x7cd7c7c745679112025-03-19 19:39:4027 days ago1742413180IN
    0x60C1bc25...6bCE27CEb
    0.04997067 ETH0.000003890.04525
    Transfer45677212025-03-19 19:36:2127 days ago1742412981IN
    0x60C1bc25...6bCE27CEb
    0.01 ETH0.000004560.04525
    Transfer45677152025-03-19 19:36:1527 days ago1742412975IN
    0x60C1bc25...6bCE27CEb
    0.049374 ETH0.000004860.04525
    Transfer45566442025-03-19 16:21:1727 days ago1742401277IN
    0x60C1bc25...6bCE27CEb
    0.012261 ETH0.000004550.04525
    Transfer44789562025-03-18 18:20:2428 days ago1742322024IN
    0x60C1bc25...6bCE27CEb
    0.02733907 ETH0.00000440.04525
    Transfer33058942025-03-04 22:25:0141 days ago1741127101IN
    0x60C1bc25...6bCE27CEb
    0.00688 ETH0.000004970.04525
    Transfer25925292025-02-24 11:31:1950 days ago1740396679IN
    0x60C1bc25...6bCE27CEb
    0.00746929 ETH0.000005670.04525
    Transfer16095452025-02-12 18:21:0762 days ago1739384467IN
    0x60C1bc25...6bCE27CEb
    0.009393 ETH0.000005620.04525
    Transfer16095282025-02-12 18:20:5062 days ago1739384450IN
    0x60C1bc25...6bCE27CEb
    0.003757 ETH0.00000660.04525
    Transfer9673882025-02-05 5:15:3369 days ago1738732533IN
    0x60C1bc25...6bCE27CEb
    0.01837 ETH0.000004850.04525
    Transfer4558642025-01-30 2:46:1575 days ago1738205175IN
    0x60C1bc25...6bCE27CEb
    0.01 ETH0.000005050.04525

    Latest 25 internal transactions (View All)

    Parent Transaction Hash Block Age From To Amount
    67540152025-04-14 23:34:2920 hrs ago1744673669
    0x60C1bc25...6bCE27CEb
    0.00000831 ETH
    67295802025-04-14 16:29:3028 hrs ago1744648170
    0x60C1bc25...6bCE27CEb
    0.00001428 ETH
    67243352025-04-14 14:59:2229 hrs ago1744642762
    0x60C1bc25...6bCE27CEb
    0.00000855 ETH
    66510242025-04-13 18:02:552 days ago1744567375
    0x60C1bc25...6bCE27CEb
    0.00000832 ETH
    65588122025-04-12 15:39:223 days ago1744472362
    0x60C1bc25...6bCE27CEb
    0.00001047 ETH
    65205032025-04-12 4:44:333 days ago1744433073
    0x60C1bc25...6bCE27CEb
    0.00000834 ETH
    65123312025-04-12 2:25:233 days ago1744424723
    0x60C1bc25...6bCE27CEb
    0.00001168 ETH
    65123182025-04-12 2:25:103 days ago1744424710
    0x60C1bc25...6bCE27CEb
    0.00000832 ETH
    64984742025-04-11 22:22:193 days ago1744410139
    0x60C1bc25...6bCE27CEb
    0.00000842 ETH
    64658102025-04-11 12:53:184 days ago1744375998
    0x60C1bc25...6bCE27CEb
    0.00000854 ETH
    64064422025-04-10 19:50:475 days ago1744314647
    0x60C1bc25...6bCE27CEb
    0.00000869 ETH
    64048962025-04-10 19:24:125 days ago1744313052
    0x60C1bc25...6bCE27CEb
    0.00000848 ETH
    63395832025-04-10 0:44:015 days ago1744245841
    0x60C1bc25...6bCE27CEb
    0.00000841 ETH
    63263742025-04-09 20:55:465 days ago1744232146
    0x60C1bc25...6bCE27CEb
    0.0000085 ETH
    63235712025-04-09 20:08:016 days ago1744229281
    0x60C1bc25...6bCE27CEb
    0.00000875 ETH
    62116822025-04-08 11:53:117 days ago1744113191
    0x60C1bc25...6bCE27CEb
    0.00000832 ETH
    59982902025-04-05 21:38:259 days ago1743889105
    0x60C1bc25...6bCE27CEb
    0.0000086 ETH
    59913602025-04-05 19:36:4110 days ago1743881801
    0x60C1bc25...6bCE27CEb
    0.0000086 ETH
    59427622025-04-05 5:43:2710 days ago1743831807
    0x60C1bc25...6bCE27CEb
    0.0000086 ETH
    59375962025-04-05 4:14:4310 days ago1743826483
    0x60C1bc25...6bCE27CEb
    0.00000832 ETH
    59235412025-04-05 0:09:0310 days ago1743811743
    0x60C1bc25...6bCE27CEb
    0.00000831 ETH
    58135702025-04-03 16:33:5612 days ago1743698036
    0x60C1bc25...6bCE27CEb
    0.00000839 ETH
    57117942025-04-02 11:44:1013 days ago1743594250
    0x60C1bc25...6bCE27CEb
    0.00000857 ETH
    56418402025-04-01 15:30:1314 days ago1743521413
    0x60C1bc25...6bCE27CEb
    0.00000928 ETH
    56376302025-04-01 14:18:4314 days ago1743517123
    0x60C1bc25...6bCE27CEb
    0.0000107 ETH
    View All Internal Transactions
    Loading...
    Loading

    Contract Source Code Verified (Exact Match)

    Contract Name:
    BearishPaymaster

    Compiler Version
    v0.8.28+commit.7893614a

    ZkSolc Version
    v1.5.10

    Optimization Enabled:
    Yes with Mode 3

    Other Settings:
    paris EvmVersion
    File 1 of 25 : BearishPaymaster.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
    pragma solidity ^0.8.0;
    import {Transaction} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol";
    import {IPaymaster, ExecutionResult, PAYMASTER_VALIDATION_SUCCESS_MAGIC} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymaster
        .sol";
    import {IPaymasterFlow} from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IPaymasterFlow.sol";
    import {BOOTLOADER_FORMAL_ADDRESS} from "@matterlabs/zksync-contracts/l2/system-contracts/Constants.sol";
    contract BearishPaymaster is IPaymaster {
    modifier onlyBootloader() {
    require(
    msg.sender == BOOTLOADER_FORMAL_ADDRESS,
    "Only bootloader can call this method"
    );
    // Continue execution if called from the bootloader.
    _;
    }
    // 1: This is called by the bootloader to check if the paymaster is willing to pay for the transaction
    function validateAndPayForPaymasterTransaction(
    bytes32,
    bytes32,
    Transaction calldata _transaction
    )
    external
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 2 of 25 : IPaymaster.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 "../libraries/TransactionHelper.sol";
    enum ExecutionResult {
    Revert,
    Success
    }
    bytes4 constant PAYMASTER_VALIDATION_SUCCESS_MAGIC = IPaymaster.validateAndPayForPaymasterTransaction.selector;
    interface IPaymaster {
    /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the
    /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader
    /// address.
    /// @param _txHash The hash of the transaction
    /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA
    /// @param _transaction The transaction itself.
    /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction
    /// if the paymaster agrees to pay for the transaction.
    /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be
    /// passed to the `postTransaction` method of the account.
    /// @dev The developer should strive to preserve as many steps as possible both for valid
    /// and invalid transactions as this very method is also used during the gas fee estimation
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 3 of 25 : 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 25 : 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 5 of 25 : 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 6 of 25 : 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 7 of 25 : 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 8 of 25 : 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 9 of 25 : 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 10 of 25 : 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 11 of 25 : 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 12 of 25 : 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 13 of 25 : 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 14 of 25 : 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 15 of 25 : 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 16 of 25 : 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 17 of 25 : 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 18 of 25 : 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 19 of 25 : 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 20 of 25 : 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 21 of 25 : 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 22 of 25 : 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 23 of 25 : 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 25 : 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

    File 25 of 25 : 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

    Settings
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    {
    "evmVersion": "paris",
    "optimizer": {
    "enabled": true,
    "mode": "3",
    "runs": 200
    },
    "outputSelection": {
    "*": {
    "*": [
    "abi"
    ]
    }
    },
    "detectMissingLibraries": false,
    "forceEVMLA": false,
    "enableEraVMExtensions": false,
    "libraries": {}
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Contract Security Audit

    Contract ABI

    API
    [{"inputs":[{"internalType":"bytes","name":"_context","type":"bytes"},{"components":[{"internalType":"uint256","name":"txType","type":"uint256"},{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPerPubdataByteLimit","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"uint256","name":"paymaster","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256[4]","name":"reserved","type":"uint256[4]"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32[]","name":"factoryDeps","type":"bytes32[]"},{"internalType":"bytes","name":"paymasterInput","type":"bytes"},{"internalType":"bytes","name":"reservedDynamic","type":"bytes"}],"internalType":"struct Transaction","name":"_transaction","type":"tuple"},{"internalType":"bytes32","name":"_txHash","type":"bytes32"},{"internalType":"bytes32","name":"_suggestedSignedHash","type":"bytes32"},{"internalType":"enum ExecutionResult","name":"_txResult","type":"uint8"},{"internalType":"uint256","name":"_maxRefundedGas","type":"uint256"}],"name":"postTransaction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"},{"components":[{"internalType":"uint256","name":"txType","type":"uint256"},{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPerPubdataByteLimit","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"uint256","name":"paymaster","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256[4]","name":"reserved","type":"uint256[4]"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32[]","name":"factoryDeps","type":"bytes32[]"},{"internalType":"bytes","name":"paymasterInput","type":"bytes"},{"internalType":"bytes","name":"reservedDynamic","type":"bytes"}],"internalType":"struct Transaction","name":"_transaction","type":"tuple"}],"name":"validateAndPayForPaymasterTransaction","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"},{"internalType":"bytes","name":"context","type":"bytes"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

    9c4d535b000000000000000000000000000000000000000000000000000000000000000001000075e212af837c22a514bc2fbe2d7023f5da2b2359c63063a6b77d81261800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

    Deployed Bytecode

    0x000200000000000200030000000000020000006003100270000000580330019700010000003103550000008004000039000000400040043f0000000100200190000000370000c13d000000040030008c0000003f0000413d000000000201043b000000e0022002700000005a0020009c000000430000613d0000005b0020009c000000490000c13d000000c40030008c000000490000413d0000000402100370000000000202043b0000005c0020009c000000490000213d0000002304200039000000000034004b000000490000813d0000000404200039000000000441034f000000000404043b0000005c0040009c000000490000213d00000000024200190000002402200039000000000032004b000000490000213d0000002402100370000000000202043b0000005c0020009c000000490000213d00000000022300490000005d0020009c000000490000213d000002640020008c000000490000413d0000008401100370000000000101043b000000010010008c000000490000213d0000000001000411000080010010008c00000000010000390000000101006039015a013e0000040f00000000010000190000015b0001042e0000000001000416000000000001004b000000490000c13d00000020010000390000010000100443000001200000044300000059010000410000015b0001042e000000000003004b000000490000c13d00000000010000190000015b0001042e000000640030008c000000490000413d0000004402100370000000000402043b0000005c0040009c0000004b0000a13d00000000010000190000015c0001043000000000054300490000005d0050009c000000490000213d000002640050008c000000490000413d0000000002000411000080010020008c000000870000c13d0000022402400039000000000621034f000000000606043b000000230550008a00000062076001970000006208500197000000000987013f000000000087004b00000000070000190000006207004041000000000056004b00000000050000190000006205008041000000620090009c000000000705c019000000000007004b000000490000c13d00000004044000390000000005640019000000000451034f000000000404043b0000005c0040009c000000490000213d0000000006430049000000200350003900000062056001970000006207300197000000000857013f000000000057004b00000000050000190000006205004041000000000063004b00000000060000190000006206002041000000620080009c000000000506c019000000000005004b000000490000c13d000000030040008c000000930000213d0000005e01000041000000800010043f0000002001000039000000840010043f0000003a01000039000000a40010043f0000006f01000041000000c40010043f0000007001000041000000e40010043f00000061010000410000015c000104300000005e01000041000000800010043f0000002001000039000000840010043f0000002401000039000000a40010043f0000005f01000041000000c40010043f0000006001000041000000e40010043f00000061010000410000015c00010430000000000331034f000000000303043b0000006303300197000000640030009c000000fa0000c13d000001c00320008a000000000331034f000001800220008a000000000121034f000000000101043b000000000203043b000000000002004b000001060000c13d0000000001000415000000030110008a00010005001002180000000001000414000000580010009c0000005801008041000000c0011002100000800102000039015a01550000040f00010000000103550000006001100270000000580010019d0000000101000029000000050110027000000001012001950000000001000032000000d70000613d0000001f0410003900000071044001970000003f044000390000007105400197000000400400043d0000000005540019000000000045004b000000000600003900000001060040390000005c0050009c000001380000213d0000000100600190000001380000c13d000000400050043f000000000614043600000071031001980000001f0410018f00000000013600190000000105000367000000ca0000613d000000000705034f000000007807043c0000000006860436000000000016004b000000c60000c13d000000000004004b000000d70000613d000000000335034f0000000304400210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000400100043d00000001002001900000011c0000613d0000002002100039000000400300003900000000003204350000006e0200004100000000002104350000004003100039000000600200043d00000000002304350000006003100039000000000002004b000000ed0000613d000000000400001900000000053400190000008006400039000000000606043300000000006504350000002004400039000000000024004b000000e60000413d0000001f042000390000007104400197000000000232001900000000000204350000006002400039000000580020009c00000058020080410000006002200210000000580010009c00000058010080410000004001100210000000000112019f0000015b0001042e0000005e01000041000000800010043f0000002001000039000000840010043f0000002e01000039000000a40010043f0000006501000041000000c40010043f0000006601000041000000e40010043f00000061010000410000015c0001043000000000032100a900000000022300d9000000000021004b000001320000c13d0000000001000415000000020110008a00010005001002180000000001000414000000000003004b000000a40000613d000000580010009c0000005801008041000000c00110021000000069011001c7000080090200003900008001040000390000000005000019015a01550000040f0000000003000415000000020330008a0001000500300218000000a90000013d00000084021000390000006a03000041000000000032043500000064021000390000006b03000041000000000032043500000044021000390000006c0300004100000000003204350000002402100039000000530300003900000000003204350000005e020000410000000000210435000000040210003900000020030000390000000000320435000000580010009c000000580100804100000040011002100000006d011001c70000015c000104300000006701000041000000000010043f0000001101000039000000040010043f00000068010000410000015c000104300000006701000041000000000010043f0000004101000039000000040010043f00000068010000410000015c00010430000000000001004b000001410000613d000000000001042d000000400100043d00000064021000390000006003000041000000000032043500000044021000390000005f0300004100000000003204350000002402100039000000240300003900000000003204350000005e020000410000000000210435000000040210003900000020030000390000000000320435000000580010009c0000005801008041000000400110021000000072011001c70000015c0001043000000158002104210000000102000039000000000001042d0000000002000019000000000001042d0000015a000004320000015b0001042e0000015c0001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000038a24bc00000000000000000000000000000000000000000000000000000000817b17f0000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff08c379a0000000000000000000000000000000000000000000000000000000004f6e6c7920626f6f746c6f616465722063616e2063616c6c2074686973206d6574686f640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000008000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000000000000000000000000000000000008c5a344500000000000000000000000000000000000000000000000000000000556e737570706f72746564207061796d617374657220666c6f7720696e207061796d6173746572506172616d732e0000000000000000000000000000000000004e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000020000000000000000000000000000000000000000000000000000000000000069676874206e6f7420626520656e6f7567682e0000000000000000000000000020426f6f746c6f616465722e205061796d61737465722062616c616e6365206d4661696c656420746f207472616e736665722074782066656520746f2074686500000000000000000000000000000000000000a4000000000000000000000000038a24bc00000000000000000000000000000000000000000000000000000000546865207374616e64617264207061796d617374657220696e707574206d757374206265206174206c656173742034206279746573206c6f6e67000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd28e173217c75f10070e3649cd1ab8a6fe60a3fe773b40db55bc3b9eccca401

    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.