ETH Price: $2,114.78 (+6.70%)

Contract

0xB8F0871bc0832cb756f07fFC4bDdC8b6bf8577b5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
L1CrossDomainMessenger

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 10000 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

import {IMessageDropCallback} from "../libraries/callbacks/IMessageDropCallback.sol";
import {Predeploys} from "../libraries/constants/Predeploys.sol";
import {Constants} from "../libraries/constants/Constants.sol";
import {CrossDomainMessenger} from "../libraries/CrossDomainMessenger.sol";
import {ICrossDomainMessenger} from "../libraries/ICrossDomainMessenger.sol";
import {IL1MessageQueue} from "./rollup/IL1MessageQueue.sol";
import {IRollup} from "./rollup/IRollup.sol";
import {Verify} from "../libraries/common/Verify.sol";
import {IL1CrossDomainMessenger} from "./IL1CrossDomainMessenger.sol";

/**
 * @custom:proxied
 * @title L1CrossDomainMessenger
 * @notice The L1CrossDomainMessenger is a message passing interface between L1 and L2 responsible
 *         for sending and receiving data on the L1 side. Users are encouraged to use this
 *         interface instead of interacting with lower-level contracts directly.
 */
contract L1CrossDomainMessenger is IL1CrossDomainMessenger, CrossDomainMessenger, Verify {
    /***********
     * Structs *
     ***********/

    struct ReplayState {
        // The number of replayed times.
        uint128 times;
        // The queue index of latest replayed one. If it is zero, it means the message has not been replayed.
        uint128 lastIndex;
    }
    /*************
     * Variables *
     *************/

    /**
     * @notice A list of withdrawal hashes which have been successfully finalized.
     */
    mapping(bytes32 => bool) public finalizedWithdrawals;

    /// @notice Mapping from L1 message hash to the timestamp when the message is sent.
    mapping(bytes32 => uint256) public messageSendTimestamp;

    /// @notice Mapping from L1 message hash to drop status.
    mapping(bytes32 => bool) public isL1MessageDropped;

    /// @notice The address of Rollup contract.
    address public rollup;

    /// @notice The address of L1MessageQueue contract.
    address public messageQueue;

    /// @notice The maximum number of times each L1 message can be replayed.
    uint256 public maxReplayTimes;

    /// @notice Mapping from L1 message hash to replay state.
    mapping(bytes32 => ReplayState) public replayStates;

    /// @notice Mapping from queue index to previous replay queue index.
    ///
    /// @dev If a message `x` was replayed 3 times with index `q1`, `q2` and `q3`, the
    /// value of `prevReplayIndex` and `replayStates` will be `replayStates[hash(x)].lastIndex = q3`,
    /// `replayStates[hash(x)].times = 3`, `prevReplayIndex[q3] = q2`, `prevReplayIndex[q2] = q1`,
    /// `prevReplayIndex[q1] = x` and `prevReplayIndex[x]=nil`.
    ///
    /// @dev The index `x` that `prevReplayIndex[x]=nil` is used as the termination of the list.
    /// Usually we use `0` to represent `nil`, but we cannot distinguish it with the first message
    /// with index zero. So a nonzero offset `1` is added to the value of `prevReplayIndex[x]` to
    /// avoid such situation.
    mapping(uint256 => uint256) public prevReplayIndex;

    /***************
     * Constructor *
     ***************/

    constructor() {
        _disableInitializers();
    }

    /// @notice Initialize the storage of L1CrossDomainMessenger.
    /// @param _feeVault The address of fee vault, which will be used to collect relayer fee.
    /// @param _rollup The address of rollup contract.
    /// @param _messageQueue The address of L1MessageQueue contract.
    function initialize(address _feeVault, address _rollup, address _messageQueue) public initializer {
        if (_rollup == address(0) || _messageQueue == address(0) || _feeVault == address(0)) {
            revert ErrZeroAddress();
        }
        CrossDomainMessenger.__Messenger_init(Predeploys.L2_CROSS_DOMAIN_MESSENGER, _feeVault);

        rollup = _rollup;
        messageQueue = _messageQueue;

        maxReplayTimes = 3;
        emit UpdateMaxReplayTimes(0, 3);
    }

    /*****************************
     * Public Mutating Functions *
     *****************************/

    /// @inheritdoc ICrossDomainMessenger
    function sendMessage(
        address _to,
        uint256 _value,
        bytes memory _message,
        uint256 _gasLimit
    ) external payable override whenNotPaused {
        _sendMessage(_to, _value, _message, _gasLimit, _msgSender());
    }

    /// @inheritdoc ICrossDomainMessenger
    function sendMessage(
        address _to,
        uint256 _value,
        bytes calldata _message,
        uint256 _gasLimit,
        address _refundAddress
    ) external payable override whenNotPaused {
        _sendMessage(_to, _value, _message, _gasLimit, _refundAddress);
    }

    function proveAndRelayMessage(
        address _from,
        address _to,
        uint256 _value,
        uint256 _nonce,
        bytes memory _message,
        bytes32[32] calldata _withdrawalProof,
        bytes32 _withdrawalRoot
    ) external override whenNotPaused notInExecution {
        // @note check more `_to` address to avoid attack in the future when we add more gateways.
        require(_to != messageQueue, "Messenger: Forbid to call message queue");
        _validateTargetAddress(_to);

        // @note This usually will never happen, just in case.
        require(_from != xDomainMessageSender, "Messenger: Invalid message sender");

        bytes32 _xDomainCalldataHash = keccak256(_encodeXDomainCalldata(_from, _to, _value, _nonce, _message));

        // Check that this withdrawal has not already been finalized, this is replay protection.
        require(!finalizedWithdrawals[_xDomainCalldataHash], "Messenger: withdrawal has already been finalized");

        address _rollup = rollup;
        // prove message
        {
            // withdrawalRoot for withdraw proof verify
            bool finalized = IRollup(_rollup).withdrawalRoots(_withdrawalRoot);
            require(finalized, "Messenger: withdrawalRoot not finalized");

            // Verify that the hash of this withdrawal was stored in the L2toL1MessagePasser contract
            // on L2. If this is true, under the assumption that the Tree does not have
            // bugs, then we know that this withdrawal was actually triggered on L2 and can therefore
            // be relayed on L1.
            require(
                verifyMerkleProof(_xDomainCalldataHash, _withdrawalProof, _nonce, _withdrawalRoot),
                "Messenger: invalid withdrawal inclusion proof"
            );
        }
        // relay message
        xDomainMessageSender = _from;
        (bool success, ) = _to.call{value: _value}(_message);
        // reset value to refund gas.
        xDomainMessageSender = Constants.DEFAULT_XDOMAIN_MESSAGE_SENDER;

        if (success) {
            // Mark the withdrawal as finalized so it can't be replayed.
            finalizedWithdrawals[_xDomainCalldataHash] = true;
            emit RelayedMessage(_xDomainCalldataHash);
        } else {
            emit FailedRelayedMessage(_xDomainCalldataHash);
        }
    }

    /// @inheritdoc IL1CrossDomainMessenger
    function replayMessage(
        address _from,
        address _to,
        uint256 _value,
        uint256 _messageNonce,
        bytes memory _message,
        uint32 _newGasLimit,
        address _refundAddress
    ) external payable override whenNotPaused notInExecution {
        // We will use a different `queueIndex` for the replaced message. However, the original `queueIndex` or `nonce`
        // is encoded in the `_message`. We will check the `xDomainCalldata` on layer 2 to avoid duplicated execution.
        // So, only one message will succeed on layer 2. If one of the message is executed successfully, the other one
        // will revert with "Message was already successfully executed".
        address _messageQueue = messageQueue;
        address _counterpart = counterpart;
        bytes memory _xDomainCalldata = _encodeXDomainCalldata(_from, _to, _value, _messageNonce, _message);
        bytes32 _xDomainCalldataHash = keccak256(_xDomainCalldata);

        require(messageSendTimestamp[_xDomainCalldataHash] > 0, "Provided message has not been enqueued");
        // cannot replay dropped message
        require(!isL1MessageDropped[_xDomainCalldataHash], "Message already dropped");

        // compute and deduct the messaging fee to fee vault.
        uint256 _fee = IL1MessageQueue(_messageQueue).estimateCrossDomainMessageFee(_from, _newGasLimit);

        // charge relayer fee
        require(msg.value >= _fee, "Insufficient msg.value for fee");
        if (_fee > 0) {
            (bool _success, ) = feeVault.call{value: _fee}("");
            require(_success, "Failed to deduct the fee");
        }

        // enqueue the new transaction
        uint256 _nextQueueIndex = IL1MessageQueue(_messageQueue).nextCrossDomainMessageIndex();
        IL1MessageQueue(_messageQueue).appendCrossDomainMessage(_counterpart, _newGasLimit, _xDomainCalldata);

        {
            // avoid stack too deep
            ReplayState memory _replayState = replayStates[_xDomainCalldataHash];
            // update the replayed message chain.
            unchecked {
                if (_replayState.lastIndex == 0) {
                    // the message has not been replayed before.
                    prevReplayIndex[_nextQueueIndex] = _messageNonce + 1;
                } else {
                    prevReplayIndex[_nextQueueIndex] = _replayState.lastIndex + 1;
                }
            }
            _replayState.lastIndex = uint128(_nextQueueIndex);

            // update replay times
            require(_replayState.times < maxReplayTimes, "Exceed maximum replay times");
            unchecked {
                _replayState.times += 1;
            }

            replayStates[_xDomainCalldataHash] = _replayState;
        }

        emit ReplayMessage(_messageNonce, _msgSender(), _to, _value, _nextQueueIndex, _newGasLimit, _message);

        // refund fee to `_refundAddress`
        unchecked {
            uint256 _refund = msg.value - _fee;
            if (_refund > 0) {
                (bool _success, ) = _refundAddress.call{value: _refund}("");
                require(_success, "Failed to refund the fee");
            }
        }
    }

    /// @inheritdoc IL1CrossDomainMessenger
    function dropMessage(
        address _from,
        address _to,
        uint256 _value,
        uint256 _messageNonce,
        bytes memory _message
    ) external override whenNotPaused notInExecution {
        // The criteria for dropping a message:
        // 1. The message is a L1 message.
        // 2. The message has not been dropped before.
        // 3. the message and all of its replacement are finalized in L1.
        // 4. the message and all of its replacement are skipped.
        //
        // Possible denial of service attack:
        // + replayMessage is called every time someone want to drop the message.
        // + replayMessage is called so many times for a skipped message, thus results a long list.
        //
        // We limit the number of `replayMessage` calls of each message, which may solve the above problem.

        address _messageQueue = messageQueue;

        // check message exists
        bytes memory _xDomainCalldata = _encodeXDomainCalldata(_from, _to, _value, _messageNonce, _message);
        bytes32 _xDomainCalldataHash = keccak256(_xDomainCalldata);
        require(messageSendTimestamp[_xDomainCalldataHash] > 0, "Provided message has not been enqueued");

        // check message not dropped
        require(!isL1MessageDropped[_xDomainCalldataHash], "Message already dropped");

        // check message is finalized
        uint256 _lastIndex = replayStates[_xDomainCalldataHash].lastIndex;
        if (_lastIndex == 0) _lastIndex = _messageNonce;

        // check message is skipped and drop it.
        // @note If the list is very long, the message may never be dropped.
        while (true) {
            IL1MessageQueue(_messageQueue).dropCrossDomainMessage(_lastIndex);
            _lastIndex = prevReplayIndex[_lastIndex];
            if (_lastIndex == 0) break;
            unchecked {
                _lastIndex = _lastIndex - 1;
            }
        }

        isL1MessageDropped[_xDomainCalldataHash] = true;
        emit DropMessage(_messageNonce);

        // set execution context
        xDomainMessageSender = Constants.DROP_XDOMAIN_MESSAGE_SENDER;
        IMessageDropCallback(_from).onDropMessage{value: _value}(_message);
        // clear execution context
        xDomainMessageSender = Constants.DEFAULT_XDOMAIN_MESSAGE_SENDER;
    }

    /************************
     * Restricted Functions *
     ************************/

    /// @dev Updates the rollup contract address.
    /// @param _newRollup The address of the new rollup contract.
    function updateRollup(address _newRollup) external onlyOwner {
        require(_newRollup != address(0), "rollup address cannot be address(0)");
        address _oldRollup = rollup;
        rollup = _newRollup;

        emit UpdateRollup(_oldRollup, _newRollup);
    }

    /// @notice Update max replay times.
    /// @dev This function can only called by contract owner.
    /// @param _newMaxReplayTimes The new max replay times.
    function updateMaxReplayTimes(uint256 _newMaxReplayTimes) external onlyOwner {
        require(_newMaxReplayTimes > 0, "replay times must be greater than 0");
        uint256 _oldMaxReplayTimes = maxReplayTimes;
        maxReplayTimes = _newMaxReplayTimes;

        emit UpdateMaxReplayTimes(_oldMaxReplayTimes, _newMaxReplayTimes);
    }

    /**********************
     * Internal Functions *
     **********************/

    function _sendMessage(
        address _to,
        uint256 _value,
        bytes memory _message,
        uint256 _gasLimit,
        address _refundAddress
    ) internal nonReentrant {
        address _messageQueue = messageQueue; // gas saving
        address _counterpart = counterpart; // gas saving

        // compute the actual cross domain message calldata.
        uint256 _messageNonce = IL1MessageQueue(_messageQueue).nextCrossDomainMessageIndex();
        bytes memory _xDomainCalldata = _encodeXDomainCalldata(_msgSender(), _to, _value, _messageNonce, _message);

        // compute and deduct the messaging fee to fee vault.
        uint256 _fee = IL1MessageQueue(_messageQueue).estimateCrossDomainMessageFee(_msgSender(), _gasLimit);
        require(msg.value >= _fee + _value, "Insufficient msg.value");
        if (_fee > 0) {
            (bool _success, ) = feeVault.call{value: _fee}("");
            require(_success, "Failed to deduct the fee");
        }

        // append message to L1MessageQueue
        IL1MessageQueue(_messageQueue).appendCrossDomainMessage(_counterpart, _gasLimit, _xDomainCalldata);

        // record the message hash for future use.
        bytes32 _xDomainCalldataHash = keccak256(_xDomainCalldata);

        // normally this won't happen, since each message has different nonce, but just in case.
        require(messageSendTimestamp[_xDomainCalldataHash] == 0, "Duplicated message");
        messageSendTimestamp[_xDomainCalldataHash] = block.timestamp;

        emit SentMessage(_msgSender(), _to, _value, _messageNonce, _gasLimit, _message);

        // refund fee to `_refundAddress`
        unchecked {
            uint256 _refund = msg.value - _fee - _value;
            if (_refund > 0) {
                (bool _success, ) = _refundAddress.call{value: _refund}("");
                require(_success, "Failed to refund the fee");
            }
        }
    }

    function messageNonce() external view override(ICrossDomainMessenger, CrossDomainMessenger) returns (uint256) {
        return IL1MessageQueue(messageQueue).nextCrossDomainMessageIndex();
    }
}

// SPDX-License-Identifier: MIT

pragma solidity =0.8.24;

import {ICrossDomainMessenger} from "../libraries/ICrossDomainMessenger.sol";

interface IL1CrossDomainMessenger is ICrossDomainMessenger {
    /**********
     * Events *
     **********/

    /// @dev Emitted when the rollup contract address is updated.
    /// @param oldRollup The address of the old rollup contract.
    /// @param newRollup The address of the new rollup contract.
    event UpdateRollup(address oldRollup, address newRollup);

    /// @notice Emitted when the maximum number of times each message can be replayed is updated.
    /// @param oldMaxReplayTimes The old maximum number of times each message can be replayed.
    /// @param newMaxReplayTimes The new maximum number of times each message can be replayed.
    event UpdateMaxReplayTimes(uint256 oldMaxReplayTimes, uint256 newMaxReplayTimes);

    /// @notice Emitted when have message relay.
    /// @param oldNonce The index of the old message to be replayed.
    /// @param sender The address of the sender who initiates the message.
    /// @param target The address of target contract to call.
    /// @param value The amount of value passed to the target contract.
    /// @param messageNonce The nonce of the message.
    /// @param gasLimit The optional gas limit passed to L1 or L2.
    /// @param message The calldata passed to the target contract.
    event ReplayMessage(
        uint256 indexed oldNonce,
        address indexed sender,
        address indexed target,
        uint256 value,
        uint256 messageNonce,
        uint256 gasLimit,
        bytes message
    );

    /// @notice Emitted when have message dropped.
    /// @param nonce The index of the message to be dropped.
    event DropMessage(uint256 indexed nonce);

    /*****************************
     * Public Mutating Functions *
     *****************************/

    /// @notice Prove a L2 => L1 message with message proof and relay a L2 => L1 message.
    /// @param _from The address of the sender of the message.
    /// @param _to The address of the recipient of the message.
    /// @param _value The msg.value passed to the message call.
    /// @param _nonce The nonce of the message to avoid replay attack.
    /// @param _message The content of the message.
    /// @param _withdrawalProof Merkle tree proof of the message.
    /// @param _withdrawalRoot Merkle tree root of the proof.
    function proveAndRelayMessage(
        address _from,
        address _to,
        uint256 _value,
        uint256 _nonce,
        bytes memory _message,
        bytes32[32] calldata _withdrawalProof,
        bytes32 _withdrawalRoot
    ) external;

    /// @notice Replay an existing message.
    /// @param from The address of the sender of the message.
    /// @param to The address of the recipient of the message.
    /// @param value The msg.value passed to the message call.
    /// @param messageNonce The nonce for the message to replay.
    /// @param message The content of the message.
    /// @param newGasLimit New gas limit to be used for this message.
    /// @param refundAddress The address of account who will receive the refunded fee.
    function replayMessage(
        address from,
        address to,
        uint256 value,
        uint256 messageNonce,
        bytes memory message,
        uint32 newGasLimit,
        address refundAddress
    ) external payable;

    /// @notice Drop a skipped message.
    /// @param from The address of the sender of the message.
    /// @param to The address of the recipient of the message.
    /// @param value The msg.value passed to the message call.
    /// @param messageNonce The nonce for the message to drop.
    /// @param message The content of the message.
    function dropMessage(address from, address to, uint256 value, uint256 messageNonce, bytes memory message) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.16;

interface IL1MessageQueue {
    /**********
     * Errors *
     **********/

    /// @dev Thrown when the given address is `address(0)`.
    error ErrZeroAddress();

    /**********
     * Events *
     **********/

    /// @notice Emitted when a new L1 => L2 transaction is appended to the queue.
    /// @param sender The address of account who initiates the transaction.
    /// @param target The address of account who will receive the transaction.
    /// @param value The value passed with the transaction.
    /// @param queueIndex The index of this transaction in the queue.
    /// @param gasLimit Gas limit required to complete the message relay on L2.
    /// @param data The calldata of the transaction.
    event QueueTransaction(
        address indexed sender,
        address indexed target,
        uint256 value,
        uint64 queueIndex,
        uint256 gasLimit,
        bytes data
    );

    /// @notice Emitted when some L1 => L2 transactions are included in L1.
    /// @param startIndex The start index of messages popped.
    /// @param count The number of messages popped.
    /// @param skippedBitmap A bitmap indicates whether a message is skipped.
    event DequeueTransaction(uint256 startIndex, uint256 count, uint256 skippedBitmap);

    /// @notice Emitted when a message is dropped from L1.
    /// @param index The index of message dropped.
    event DropTransaction(uint256 index);

    /// @notice Emitted when owner updates gas oracle contract.
    /// @param _oldGasOracle The address of old gas oracle contract.
    /// @param _newGasOracle The address of new gas oracle contract.
    event UpdateGasOracle(address indexed _oldGasOracle, address indexed _newGasOracle);

    /// @notice Emitted when owner updates EnforcedTxGateway contract.
    /// @param _oldGateway The address of old EnforcedTxGateway contract.
    /// @param _newGateway The address of new EnforcedTxGateway contract.
    event UpdateEnforcedTxGateway(address indexed _oldGateway, address indexed _newGateway);

    /// @notice Emitted when owner updates max gas limit.
    /// @param _oldMaxGasLimit The old max gas limit.
    /// @param _newMaxGasLimit The new max gas limit.
    event UpdateMaxGasLimit(uint256 _oldMaxGasLimit, uint256 _newMaxGasLimit);

    /*************************
     * Public View Functions *
     *************************/

    /// @notice The start index of all pending inclusion messages.
    function pendingQueueIndex() external view returns (uint256);

    /// @notice Return the index of next appended message.
    /// @dev Also the total number of appended messages.
    function nextCrossDomainMessageIndex() external view returns (uint256);

    /// @notice Return the message of in `queueIndex`.
    /// @param queueIndex The index to query.
    function getCrossDomainMessage(uint256 queueIndex) external view returns (bytes32);

    /// @notice Return the amount of ETH should pay for cross domain message.
    /// @param sender The address of the message sender.
    /// @param gasLimit Gas limit required to complete the message relay on L2.
    /// @dev Estimates the fee for a cross-domain message.
    function estimateCrossDomainMessageFee(address sender, uint256 gasLimit) external view returns (uint256);

    /// @notice Return the amount of intrinsic gas fee should pay for cross domain message.
    /// @param _calldata The calldata of L1-initiated transaction.
    function calculateIntrinsicGasFee(bytes memory _calldata) external view returns (uint256);

    /// @notice Return the hash of a L1 message.
    /// @param sender The address of sender.
    /// @param queueIndex The queue index of this message.
    /// @param value The amount of Ether transfer to target.
    /// @param target The address of target.
    /// @param gasLimit The gas limit provided.
    /// @param data The calldata passed to target address.
    function computeTransactionHash(
        address sender,
        uint256 queueIndex,
        uint256 value,
        address target,
        uint256 gasLimit,
        bytes calldata data
    ) external view returns (bytes32);

    /// @notice Return whether the message is skipped.
    /// @param queueIndex The queue index of the message to check.
    function isMessageSkipped(uint256 queueIndex) external view returns (bool);

    /// @notice Return whether the message is dropped.
    /// @param queueIndex The queue index of the message to check.
    function isMessageDropped(uint256 queueIndex) external view returns (bool);

    /*****************************
     * Public Mutating Functions *
     *****************************/

    /// @notice Append a L1 to L2 message into this contract.
    /// @param target The address of target contract to call in L2.
    /// @param gasLimit The maximum gas should be used for relay this message in L2.
    /// @param data The calldata passed to target contract.
    function appendCrossDomainMessage(address target, uint256 gasLimit, bytes calldata data) external;

    /// @notice Append an enforced transaction to this contract.
    /// @dev The address of sender should be an EOA.
    /// @param sender The address of sender who will initiate this transaction in L2.
    /// @param target The address of target contract to call in L2.
    /// @param value The value passed
    /// @param gasLimit The maximum gas should be used for this transaction in L2.
    /// @param data The calldata passed to target contract.
    function appendEnforcedTransaction(
        address sender,
        address target,
        uint256 value,
        uint256 gasLimit,
        bytes calldata data
    ) external;

    /// @notice Pop finalized messages from queue.
    ///
    /// @dev We can pop at most 256 messages each time. And if the message is not skipped,
    ///      the corresponding entry will be cleared.
    ///
    /// @param startIndex The start index to pop.
    /// @param count The number of messages to pop.
    /// @param skippedBitmap A bitmap indicates whether a message is skipped.
    function popCrossDomainMessage(uint256 startIndex, uint256 count, uint256 skippedBitmap) external;

    /// @notice Drop a skipped message from the queue.
    function dropCrossDomainMessage(uint256 index) external;
}

// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

interface IRollup {
    /***********
     * Structs *
     ***********/

    /// @param version                  The version of current batch.
    /// @param parentBatchHeader        The header of parent batch, see the comments of `BatchHeaderV0Codec`.
    /// @param blockContexts            The block contexts of current batch.
    /// @param skippedL1MessageBitmap   The bitmap indicates whether each L1 message is skipped or not.
    /// @param prevStateRoot            The state root of parent batch.
    /// @param postStateRoot            The state root of current batch.
    /// @param withdrawalRoot           The withdraw trie root of current batch.
    struct BatchDataInput {
        uint8 version;
        bytes parentBatchHeader;
        bytes blockContexts;
        bytes skippedL1MessageBitmap;
        bytes32 prevStateRoot;
        bytes32 postStateRoot;
        bytes32 withdrawalRoot;
    }

    /// @param signedSequencers The bitmap of signed sequencers
    /// @param sequencerSets    The latest 3 sequencer sets
    /// @param signature        The BLS signature
    struct BatchSignatureInput {
        uint256 signedSequencersBitmap;
        bytes sequencerSets;
        bytes signature;
    }

    /// @param originTimestamp
    /// @param finalizeTimestamp
    /// @param blockNumber
    struct BatchData {
        uint256 originTimestamp;
        uint256 finalizeTimestamp;
        uint256 blockNumber;
        uint256 signedSequencersBitmap;
    }

    /// @dev Structure to store information about a batch challenge.
    /// @param batchIndex The index of the challenged batch.
    /// @param challenger The address of the challenger.
    /// @param challengeDeposit The amount of deposit put up by the challenger.
    /// @param startTime The timestamp when the challenge started.
    /// @param challengeSuccess Flag indicating whether the challenge was successful.
    /// @param finished Flag indicating whether the challenge has been resolved.
    struct BatchChallenge {
        uint64 batchIndex;
        address challenger;
        uint256 challengeDeposit;
        uint256 startTime;
        bool challengeSuccess;
        bool finished;
    }

    /// @param receiver
    /// @param amount
    struct BatchChallengeReward {
        address receiver;
        uint256 amount;
    }

    /***********
     * Errors *
     ***********/

    /// @notice error zero address
    error ErrZeroAddress();

    /**********
     * Events *
     **********/

    /// @notice Emitted when a new batch is committed.
    /// @param batchIndex   The index of the batch.
    /// @param batchHash    The hash of the batch.
    event CommitBatch(uint256 indexed batchIndex, bytes32 indexed batchHash);

    /// @notice revert a pending batch.
    /// @param batchIndex   The index of the batch.
    /// @param batchHash    The hash of the batch
    event RevertBatch(uint256 indexed batchIndex, bytes32 indexed batchHash);

    /// @notice Emitted when a batch is finalized.
    /// @param batchIndex   The index of the batch.
    /// @param batchHash    The hash of the batch
    /// @param stateRoot    The state root on layer 2 after this batch.
    /// @param withdrawRoot The merkle root on layer2 after this batch.
    event FinalizeBatch(uint256 indexed batchIndex, bytes32 indexed batchHash, bytes32 stateRoot, bytes32 withdrawRoot);

    /// @notice Emitted when owner updates the proofWindow parameter.
    /// @param oldWindow    The old proofWindow.
    /// @param newWindow    The new proofWindow.
    event UpdateProofWindow(uint256 oldWindow, uint256 newWindow);

    /// @notice Emitted when owner updates the finalizationPeriodSeconds parameter.
    /// @param oldPeriod    The old finalizationPeriodSeconds.
    /// @param newPeriod    The new finalizationPeriodSeconds.
    event UpdateFinalizationPeriodSeconds(uint256 oldPeriod, uint256 newPeriod);

    /// @notice Emitted when owner updates the status of challenger.
    /// @param account  The address of account updated.
    /// @param status   The status of the account updated.
    event UpdateChallenger(address indexed account, bool status);

    /// @notice Emitted when the address of rollup verifier is updated.
    /// @param oldVerifier  The address of old rollup verifier.
    /// @param newVerifier  The address of new rollup verifier.
    event UpdateVerifier(address indexed oldVerifier, address indexed newVerifier);

    /// @notice Emitted when the proof reward percent is updated.
    /// @param oldPercent  The old proofRewardPercent.
    /// @param newPercent  The new proofRewardPercent.
    event UpdateProofRewardPercent(uint256 oldPercent, uint256 newPercent);

    /// @notice Emit when prove remaining claimed.
    /// @param receiver  receiver address.
    /// @param amount    claimed amount.
    event ProveRemainingClaimed(address receiver, uint256 amount);

    /// @notice Emitted when the state of Challenge is updated.
    /// @param batchIndex       The index of the batch.
    /// @param challenger       The address of challenger.
    /// @param challengeDeposit The deposit of challenger.
    event ChallengeState(uint64 indexed batchIndex, address indexed challenger, uint256 challengeDeposit);

    /// @notice Emitted when the result of Challenge is updated.
    /// @param batchIndex   The index of the batch.
    /// @param winner       The address of winner.
    /// @param res          The result of challenge.
    event ChallengeRes(uint256 indexed batchIndex, address indexed winner, string indexed res);

    /// @notice Emitted when the challenger claim the challenge reward.
    /// @param receiver  receiver address
    /// @param amount    claimed amount
    event ChallengeRewardClaim(address indexed receiver, uint256 amount);

    /*************************
     * Public View Functions *
     *************************/

    /// @notice The latest finalized batch index.
    function lastFinalizedBatchIndex() external view returns (uint256);

    /// @notice The latest finalized batch index.
    function lastCommittedBatchIndex() external view returns (uint256);

    /// @notice Return the batch hash of a committed batch.
    /// @param batchIndex The index of the batch.
    function committedBatches(uint256 batchIndex) external view returns (bytes32);

    /// @notice Return the state root of a committed batch.
    /// @param batchIndex The index of the batch.
    function finalizedStateRoots(uint256 batchIndex) external view returns (bytes32);

    /// @notice Return the the committed batch of withdrawalRoot.
    /// @param withdrawalRoot The withdrawal root.
    function withdrawalRoots(bytes32 withdrawalRoot) external view returns (bool);

    /// @notice Return whether the batch is finalized by batch index.
    /// @param batchIndex The index of the batch.
    function isBatchFinalized(uint256 batchIndex) external view returns (bool);

    /// @notice Return the rollup config of finalizationPeriodSeconds.
    function finalizationPeriodSeconds() external view returns (uint256);

    /*****************************
     * Public Mutating Functions *
     *****************************/

    /// @notice Commit a batch of transactions on layer 1.
    ///
    /// @param batchDataInput       The BatchDataInput struct
    /// @param batchSignatureInput  The BatchSignatureInput struct
    function commitBatch(
        BatchDataInput calldata batchDataInput,
        BatchSignatureInput calldata batchSignatureInput
    ) external payable;

    /// @notice Revert a pending batch.
    /// @dev one can only revert unfinalized batches.
    /// @param batchHeader  The header of current batch, see the encoding in comments of `commitBatch`.
    /// @param count        The number of subsequent batches to revert, including current batch.
    function revertBatch(bytes calldata batchHeader, uint256 count) external;

    /// @notice Claim challenge reward
    /// @param receiver The receiver address
    function claimReward(address receiver) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

interface IMessageDropCallback {
    function onDropMessage(bytes memory message) external payable;
}

// SPDX-License-Identifier: MIT

pragma solidity =0.8.24;

contract Verify {
    function verifyMerkleProof(
        bytes32 leafHash,
        bytes32[32] calldata smtProof,
        uint256 index,
        bytes32 root
    ) public pure returns (bool) {
        bytes32 node = leafHash;

        for (uint256 height = 0; height < 32; height++) {
            if (((index >> height) & 1) == 1) node = keccak256(abi.encodePacked(smtProof[height], node));
            else node = keccak256(abi.encodePacked(node, smtProof[height]));
        }

        return node == root;
    }
}

File 7 of 16 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

/**
 * @title Constants
 * @notice Constants is a library for storing constants. Simple! Don't put everything in here, just
 *         the stuff used in multiple contracts. Constants that only apply to a single contract
 *         should be defined in that contract instead.
 */
library Constants {
    /**
     * @notice Value used for the L2 sender storage slot in both the MorphPortal and the
     *         CrossDomainMessenger contracts before an actual sender is set. This value is
     *         non-zero to reduce the gas cost of message passing transactions.
     */
    address internal constant DEFAULT_XDOMAIN_MESSAGE_SENDER = 0x000000000000000000000000000000000000dEaD;

    /// @notice The address for dropping message.
    /// @dev The first 20 bytes of keccak("drop")
    address internal constant DROP_XDOMAIN_MESSAGE_SENDER = 0x6f297C61B5C92eF107fFD30CD56AFFE5A273e841;
}

File 8 of 16 : Predeploys.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

/**
 * @title Predeploys
 * @notice Contains constant addresses for contracts that are pre-deployed to the L2 system.
 */
library Predeploys {
    /**
     * @notice Address of the L2_TO_L1_MESSAGE_PASSER predeploy.
     */
    address internal constant L2_TO_L1_MESSAGE_PASSER = 0x5300000000000000000000000000000000000001;

    /**
     * @notice Address of the L2_GATEWAY_ROUTER predeploy.
     */
    address internal constant L2_GATEWAY_ROUTER = 0x5300000000000000000000000000000000000002;

    /**
     * @notice Address of the Gov predeploy.
     */
    address internal constant GOV = 0x5300000000000000000000000000000000000004;

    /**
     * @notice Address of the L2_ETH_GATEWAY predeploy.
     */
    address internal constant L2_ETH_GATEWAY = 0x5300000000000000000000000000000000000006;

    /**
     * @notice Address of the L2_CROSS_DOMAIN_MESSENGER predeploy.
     */
    address internal constant L2_CROSS_DOMAIN_MESSENGER = 0x5300000000000000000000000000000000000007;

    /**
     * @notice Address of the L2_STANDARD_ERC20_GATEWAY predeploy.
     */
    address internal constant L2_STANDARD_ERC20_GATEWAY = 0x5300000000000000000000000000000000000008;

    /**
     * @notice Address of the L2_ERC721_GATEWAY predeploy.
     */
    address internal constant L2_ERC721_GATEWAY = 0x5300000000000000000000000000000000000009;

    /**
     * @notice Address of the L2_TX_FEE_VAULT predeploy.
     */
    address internal constant L2_TX_FEE_VAULT = 0x530000000000000000000000000000000000000a;

    /**
     * @notice Address of the PROXY_ADMIN predeploy.
     */
    address internal constant PROXY_ADMIN = 0x530000000000000000000000000000000000000b;

    /**
     * @notice Address of the L2_ERC1155_GATEWAY predeploy.
     */
    address internal constant L2_ERC1155_GATEWAY = 0x530000000000000000000000000000000000000c;

    /**
     * @notice Address of the MORPH_STANDARD_ERC20 predeploy.
     */
    address internal constant MORPH_STANDARD_ERC20 = 0x530000000000000000000000000000000000000D;

    /**
     * @notice Address of the MORPH_STANDARD_ERC20_FACTORY predeploy.
     */
    address internal constant MORPH_STANDARD_ERC20_FACTORY = 0x530000000000000000000000000000000000000e;

    /**
     * @notice Address of the GAS_PRICE_ORACLE predeploy. Includes fee information
     *         and helpers for computing the L1 portion of the transaction fee.
     */
    address internal constant GAS_PRICE_ORACLE = 0x530000000000000000000000000000000000000f;

    /**
     * @notice Address of the L2_WETH_GATEWAY predeploy.
     */
    address internal constant L2_WETH_GATEWAY = 0x5300000000000000000000000000000000000010;

    /**
     * @notice Address of the L2_WETH predeploy.
     */
    address internal constant L2_WETH = 0x5300000000000000000000000000000000000011;

    /**
     * @notice Address of the RECORD predeploy.
     */
    address internal constant RECORD = 0x5300000000000000000000000000000000000012;

    /**
     * @notice Address of the MORPH_TOKEN predeploy.
     */
    address internal constant MORPH_TOKEN = 0x5300000000000000000000000000000000000013;

    /**
     * @notice Address of the DISTRIBUTE predeploy.
     */
    address internal constant DISTRIBUTE = 0x5300000000000000000000000000000000000014;

    /**
     * @notice Address of the L2_STAKING predeploy.
     */
    address internal constant L2_STAKING = 0x5300000000000000000000000000000000000015;

    /**
     * @notice Address of the L2_CUSTOM_ERC20_GATEWAY predeploy.
     */
    address internal constant L2_CUSTOM_ERC20_GATEWAY = 0x5300000000000000000000000000000000000016;

    /**
     * @notice Address of the SEQUENCER predeploy.
     */
    address internal constant SEQUENCER = 0x5300000000000000000000000000000000000017;

    /**
     * @notice Address of the L2_REVERSE_ERC20_GATEWAY predeploy.
     */
    address internal constant L2_REVERSE_ERC20_GATEWAY = 0x5300000000000000000000000000000000000018;
}

// SPDX-License-Identifier: MIT
pragma solidity =0.8.24;

import {OwnableUpgradeable} from "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {PausableUpgradeable} from "node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import {ReentrancyGuardUpgradeable} from "node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import {Constants} from "./constants/Constants.sol";
import {ICrossDomainMessenger} from "./ICrossDomainMessenger.sol";

/**
 * @custom:upgradeable
 * @title CrossDomainMessenger
 * @notice CrossDomainMessenger is a base contract that provides the core logic for the L1 and L2
 *         cross-chain messenger contracts. It's designed to be a universal interface that only
 *         needs to be extended slightly to provide low-level message passing functionality on each
 *         chain it's deployed on. Currently only designed for message passing between two paired
 *         chains and does not support one-to-many interactions.
 *
 */
abstract contract CrossDomainMessenger is
    OwnableUpgradeable,
    PausableUpgradeable,
    ReentrancyGuardUpgradeable,
    ICrossDomainMessenger
{
    /**********
     * Events *
     **********/

    /// @notice Emitted when owner updates fee vault contract.
    /// @param _oldFeeVault The address of old fee vault contract.
    /// @param _newFeeVault The address of new fee vault contract.
    event UpdateFeeVault(address indexed _oldFeeVault, address indexed _newFeeVault);

    /*************
     * Variables *
     *************/

    /**
     * @notice Address of the sender of the currently executing message on the other chain. If the
     *         value of this variable is the default value (0x00000000...dead) then no message is
     *         currently being executed. Use the xDomainMessageSender getter which will throw an
     *         error if this is the case.
     */
    address public override xDomainMessageSender;

    /**
     * @notice Address of the paired CrossDomainMessenger contract on the other chain.
     */
    address public counterpart;

    /// @notice The address of fee vault, collecting cross domain messaging fee.
    address public feeVault;

    /// @dev The storage slots for future usage.
    uint256[46] private __gap;

    /**********************
     * Function Modifiers *
     **********************/

    modifier notInExecution() {
        require(xDomainMessageSender == Constants.DEFAULT_XDOMAIN_MESSAGE_SENDER, "Message is already in execution");
        _;
    }

    /***************
     * Constructor *
     ***************/

    /* solhint-disable */
    function __Messenger_init(address _counterpart, address _feeVault) internal onlyInitializing {
        OwnableUpgradeable.__Ownable_init();
        PausableUpgradeable.__Pausable_init();
        ReentrancyGuardUpgradeable.__ReentrancyGuard_init();

        // initialize to a nonzero value
        xDomainMessageSender = Constants.DEFAULT_XDOMAIN_MESSAGE_SENDER;

        counterpart = _counterpart;
        if (_feeVault != address(0)) {
            feeVault = _feeVault;
        }
    }

    /* solhint-enable */

    // make sure only owner can send ether to messenger to avoid possible user fund loss.
    receive() external payable onlyOwner {}

    /************************
     * Restricted Functions *
     ************************/

    /// @notice Update fee vault contract.
    /// @dev This function can only called by contract owner.
    /// @param _newFeeVault The address of new fee vault contract.
    function updateFeeVault(address _newFeeVault) external onlyOwner {
        require(_newFeeVault != address(0), "feeVault cannot be address(0)");
        address _oldFeeVault = feeVault;

        feeVault = _newFeeVault;
        emit UpdateFeeVault(_oldFeeVault, _newFeeVault);
    }

    /// @notice Pause the contract
    /// @dev This function can only called by contract owner.
    /// @param _status The pause status to update.
    function setPause(bool _status) external onlyOwner {
        if (_status) {
            _pause();
        } else {
            _unpause();
        }
    }

    /**********************
     * Internal Functions *
     **********************/

    /// @dev Internal function to generate the correct cross domain calldata for a message.
    /// @param _sender Message sender address.
    /// @param _target Target contract address.
    /// @param _value The amount of ETH pass to the target.
    /// @param _messageNonce Nonce for the provided message.
    /// @param _message Message to send to the target.
    /// @return ABI encoded cross domain calldata.
    function _encodeXDomainCalldata(
        address _sender,
        address _target,
        uint256 _value,
        uint256 _messageNonce,
        bytes memory _message
    ) internal pure returns (bytes memory) {
        return
            abi.encodeWithSignature(
                "relayMessage(address,address,uint256,uint256,bytes)",
                _sender,
                _target,
                _value,
                _messageNonce,
                _message
            );
    }

    /// @dev Internal function to check whether the `_target` address is allowed to avoid attack.
    /// @param _target The address of target address to check.
    function _validateTargetAddress(address _target) internal view {
        // @note check more `_target` address to avoid attack in the future when we add more external contracts.

        require(_target != address(this), "Messenger: Forbid to call self");
    }

    function messageNonce() external view virtual returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

interface ICrossDomainMessenger {
    /***********
     * Errors *
     ***********/
    error ErrZeroAddress();

    /**********
     * Events *
     **********/

    /// @notice Emitted when a cross domain message is sent.
    /// @param sender The address of the sender who initiates the message.
    /// @param target The address of target contract to call.
    /// @param value The amount of value passed to the target contract.
    /// @param messageNonce The nonce of the message.
    /// @param gasLimit The optional gas limit passed to L1 or L2.
    /// @param message The calldata passed to the target contract.
    event SentMessage(
        address indexed sender,
        address indexed target,
        uint256 value,
        uint256 messageNonce,
        uint256 gasLimit,
        bytes message
    );

    /// @notice Emitted when a cross domain message is relayed successfully.
    /// @param messageHash The hash of the message.
    event RelayedMessage(bytes32 indexed messageHash);

    /// @notice Emitted when a cross domain message is failed to relay.
    /// @param messageHash The hash of the message.
    event FailedRelayedMessage(bytes32 indexed messageHash);

    /*************************
     * Public View Functions *
     *************************/

    /// @notice Return the sender of a cross domain message.
    function xDomainMessageSender() external view returns (address);

    /// @notice Return the nonce of a cross domain message.
    function messageNonce() external view returns (uint256);

    /*****************************
     * Public Mutating Functions *
     *****************************/

    /// @notice Send cross chain message from L1 to L2 or L2 to L1.
    /// @dev EOA addresses and contracts that have not implemented `onDropMessage`
    /// cannot execute the `dropMessage` operation.
    /// Please proceed with caution to control risk.
    /// @param target The address of account who receive the message.
    /// @param value The amount of ether passed when call target contract.
    /// @param message The content of the message.
    /// @param gasLimit Gas limit required to complete the message relay on corresponding chain.
    function sendMessage(address target, uint256 value, bytes calldata message, uint256 gasLimit) external payable;

    /// @notice Send cross chain message from L1 to L2 or L2 to L1.
    /// @dev EOA addresses and contracts that have not implemented `onDropMessage`
    /// cannot execute the `dropMessage` operation.
    /// Please proceed with caution to control risk.
    /// @param target The address of account who receive the message.
    /// @param value The amount of ether passed when call target contract.
    /// @param message The content of the message.
    /// @param gasLimit Gas limit required to complete the message relay on corresponding chain.
    /// @param refundAddress The address of account who will receive the refunded fee.
    function sendMessage(
        address target,
        uint256 value,
        bytes calldata message,
        uint256 gasLimit,
        address refundAddress
    ) external payable;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

Settings
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "evmVersion": "cancun",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ErrZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"DropMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"name":"FailedRelayedMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"name":"RelayedMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldNonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"messageNonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gasLimit","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"ReplayMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"messageNonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gasLimit","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"SentMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldFeeVault","type":"address"},{"indexed":true,"internalType":"address","name":"_newFeeVault","type":"address"}],"name":"UpdateFeeVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxReplayTimes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxReplayTimes","type":"uint256"}],"name":"UpdateMaxReplayTimes","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRollup","type":"address"},{"indexed":false,"internalType":"address","name":"newRollup","type":"address"}],"name":"UpdateRollup","type":"event"},{"inputs":[],"name":"counterpart","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_messageNonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"dropMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"finalizedWithdrawals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeVault","type":"address"},{"internalType":"address","name":"_rollup","type":"address"},{"internalType":"address","name":"_messageQueue","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"isL1MessageDropped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReplayTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageQueue","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"messageSendTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prevReplayIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes32[32]","name":"_withdrawalProof","type":"bytes32[32]"},{"internalType":"bytes32","name":"_withdrawalRoot","type":"bytes32"}],"name":"proveAndRelayMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_messageNonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"uint32","name":"_newGasLimit","type":"uint32"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"replayMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"replayStates","outputs":[{"internalType":"uint128","name":"times","type":"uint128"},{"internalType":"uint128","name":"lastIndex","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rollup","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFeeVault","type":"address"}],"name":"updateFeeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxReplayTimes","type":"uint256"}],"name":"updateMaxReplayTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRollup","type":"address"}],"name":"updateRollup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leafHash","type":"bytes32"},{"internalType":"bytes32[32]","name":"smtProof","type":"bytes32[32]"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"verifyMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"xDomainMessageSender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801562000010575f80fd5b506200001b62000021565b620000df565b5f54610100900460ff16156200008d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614620000dd575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612de580620000ed5f395ff3fe6080604052600436106101a7575f3560e01c806386fa4b73116100e7578063c0c53b8b11610087578063e70fc93b11610062578063e70fc93b146104f9578063ea7ec51414610524578063ecc7042814610550578063f2fde38b14610564575f80fd5b8063c0c53b8b1461049c578063cb23bcb5146104bb578063d87e7df1146104da575f80fd5b8063a14238e7116100c2578063a14238e71461040e578063b2267a7b1461043c578063b604bf4c1461044f578063bedb86fb1461047d575f80fd5b806386fa4b73146103af5780638da5cb5b146103ce578063946130d8146103eb575f80fd5b806355004105116101525780636e296e451161012d5780636e296e45146102de578063715018a6146102fd578063797594b014610311578063846d4d7a14610330575f80fd5b806355004105146102a15780635c975abb146102b45780635f7b1577146102cb575f80fd5b80633b70c18a116101825780633b70c18a1461022c578063407c195514610263578063478222c214610282575f80fd5b806329907acd146101ba5780632a6cccb2146101d9578063340735f7146101f8575f80fd5b366101b6576101b4610583565b005b5f80fd5b3480156101c5575f80fd5b506101b46101d436600461283a565b6105e4565b3480156101e4575f80fd5b506101b46101f33660046128a7565b610966565b348015610203575f80fd5b506102176102123660046128de565b610a2d565b60405190151581526020015b60405180910390f35b348015610237575f80fd5b5060fe5461024b906001600160a01b031681565b6040516001600160a01b039091168152602001610223565b34801561026e575f80fd5b506101b461027d36600461291a565b610af6565b34801561028d575f80fd5b5060cb5461024b906001600160a01b031681565b6101b46102af366004612931565b610bb9565b3480156102bf575f80fd5b5060655460ff16610217565b6101b46102d93660046129c8565b611201565b3480156102e9575f80fd5b5060c95461024b906001600160a01b031681565b348015610308575f80fd5b506101b4611255565b34801561031c575f80fd5b5060ca5461024b906001600160a01b031681565b34801561033b575f80fd5b5061038661034a36600461291a565b6101006020525f90815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b604080516fffffffffffffffffffffffffffffffff938416815292909116602083015201610223565b3480156103ba575f80fd5b506101b46103c9366004612a66565b611266565b3480156103d9575f80fd5b506033546001600160a01b031661024b565b3480156103f6575f80fd5b5061040060ff5481565b604051908152602001610223565b348015610419575f80fd5b5061021761042836600461291a565b60fa6020525f908152604090205460ff1681565b6101b461044a366004612aef565b611732565b34801561045a575f80fd5b5061021761046936600461291a565b60fc6020525f908152604090205460ff1681565b348015610488575f80fd5b506101b4610497366004612b57565b61174d565b3480156104a7575f80fd5b506101b46104b6366004612b72565b61176e565b3480156104c6575f80fd5b5060fd5461024b906001600160a01b031681565b3480156104e5575f80fd5b506101b46104f43660046128a7565b6119d1565b348015610504575f80fd5b5061040061051336600461291a565b60fb6020525f908152604090205481565b34801561052f575f80fd5b5061040061053e36600461291a565b6101016020525f908152604090205481565b34801561055b575f80fd5b50610400611ac7565b34801561056f575f80fd5b506101b461057e3660046128a7565b611b50565b6033546001600160a01b031633146105e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b565b6105ec611bdd565b60c9546001600160a01b031661dead146106485760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe546001600160a01b03165f6106628787878787611c30565b90505f818051906020012090505f60fb5f8381526020019081526020015f2054116106f55760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206d65737361676520686173206e6f74206265656e20656e60448201527f717565756564000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f81815260fc602052604090205460ff16156107535760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792064726f7070656400000000000000000060448201526064016105d9565b5f818152610100602052604081205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16908190036107935750845b6040517f91652461000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b038516906391652461906024015f604051808303815f87803b1580156107eb575f80fd5b505af11580156107fd573d5f803e3d5ffd5b5050505f918252506101016020526040902054801561083d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610793565b5f82815260fc6020526040808220805460ff191660011790555187917fbd05aabbf548001ebdd6ac80c02f1cfb3b39165f2fae1d420075f22e781ef63b91a260c980547fffffffffffffffffffffffff000000000000000000000000000000000000000016736f297c61b5c92ef107ffd30cd56affe5a273e8411790556040517f14298c510000000000000000000000000000000000000000000000000000000081526001600160a01b038a16906314298c51908990610901908990600401612c1d565b5f604051808303818588803b158015610918575f80fd5b505af115801561092a573d5f803e3d5ffd5b505060c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055505050505050505050505050565b61096e610583565b6001600160a01b0381166109c45760405162461bcd60e51b815260206004820152601d60248201527f6665655661756c742063616e6e6f74206265206164647265737328302900000060448201526064016105d9565b60cb80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f4aadc32827849f797733838c61302f7f56d2b6db28caa175eb3f7f8e5aba25f5905f90a35050565b5f84815b6020811015610aea578085901c600116600103610a9757858160208110610a5a57610a5a612c2f565b602002013582604051602001610a7a929190918252602082015260400190565b604051602081830303815290604052805190602001209150610ae2565b81868260208110610aaa57610aaa612c2f565b6020020135604051602001610ac9929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b600101610a31565b50909114949350505050565b610afe610583565b5f8111610b735760405162461bcd60e51b815260206004820152602360248201527f7265706c61792074696d6573206d75737420626520677265617465722074686160448201527f6e2030000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b60ff80549082905560408051828152602081018490527fd700562df02eb66951f6f5275df7ebd7c0ec58b3422915789b3b1877aab2e52b91015b60405180910390a15050565b610bc1611bdd565b60c9546001600160a01b031661dead14610c1d5760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe5460ca546001600160a01b0391821691165f610c3e8a8a8a8a8a611c30565b90505f818051906020012090505f60fb5f8381526020019081526020015f205411610cd15760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206d65737361676520686173206e6f74206265656e20656e60448201527f717565756564000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f81815260fc602052604090205460ff1615610d2f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792064726f7070656400000000000000000060448201526064016105d9565b6040517f3e4cbbe60000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015263ffffffff881660248301525f9190861690633e4cbbe690604401602060405180830381865afa158015610d9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dbf9190612c5c565b905080341015610e115760405162461bcd60e51b815260206004820152601e60248201527f496e73756666696369656e74206d73672e76616c756520666f7220666565000060448201526064016105d9565b8015610eb95760cb546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610e61576040519150601f19603f3d011682016040523d82523d5f602084013e610e66565b606091505b5050905080610eb75760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f206465647563742074686520666565000000000000000060448201526064016105d9565b505b5f856001600160a01b031663fd0ad31e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ef6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f1a9190612c5c565b6040517f9b1597820000000000000000000000000000000000000000000000000000000081529091506001600160a01b03871690639b15978290610f669088908c908990600401612c73565b5f604051808303815f87803b158015610f7d575f80fd5b505af1158015610f8f573d5f803e3d5ffd5b5050505f848152610100602090815260408083208151808301909252546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041691810182905292509003610fff575f8281526101016020526040902060018c019055611030565b80602001516001016fffffffffffffffffffffffffffffffff166101015f8481526020019081526020015f20819055505b6fffffffffffffffffffffffffffffffff808316602083015260ff5482519091161061109e5760405162461bcd60e51b815260206004820152601b60248201527f457863656564206d6178696d756d207265706c61792074696d6573000000000060448201526064016105d9565b80516fffffffffffffffffffffffffffffffff600191909101811682525f858152610100602090815260409091208351919093015182167001000000000000000000000000000000000291161790556001600160a01b038c166110fe3390565b6001600160a01b03168b7fa3a1251805b1fc7915884575b42e1fb862e814f0f5c9d670d08bf84697053d618e858d8f60405161113d9493929190612ca9565b60405180910390a4348281039083146111f1575f886001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611199576040519150601f19603f3d011682016040523d82523d5f602084013e61119e565b606091505b50509050806111ef5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20726566756e642074686520666565000000000000000060448201526064016105d9565b505b5050505050505050505050505050565b611209611bdd565b61124d868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250889250879150611ccc9050565b505050505050565b61125d610583565b6105e25f612118565b61126e611bdd565b60c9546001600160a01b031661dead146112ca5760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe546001600160a01b039081169087160361134e5760405162461bcd60e51b815260206004820152602760248201527f4d657373656e6765723a20466f7262696420746f2063616c6c206d657373616760448201527f652071756575650000000000000000000000000000000000000000000000000060648201526084016105d9565b61135786612181565b60c9546001600160a01b03908116908816036113db5760405162461bcd60e51b815260206004820152602160248201527f4d657373656e6765723a20496e76616c6964206d6573736167652073656e646560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f6113e98888888888611c30565b80516020918201205f81815260fa90925260409091205490915060ff16156114795760405162461bcd60e51b815260206004820152603060248201527f4d657373656e6765723a207769746864726177616c2068617320616c7265616460448201527f79206265656e2066696e616c697a65640000000000000000000000000000000060648201526084016105d9565b60fd546040517f04d77215000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b03909116905f9082906304d7721590602401602060405180830381865afa1580156114dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115019190612cdd565b9050806115765760405162461bcd60e51b815260206004820152602760248201527f4d657373656e6765723a207769746864726177616c526f6f74206e6f7420666960448201527f6e616c697a65640000000000000000000000000000000000000000000000000060648201526084016105d9565b61158283868987610a2d565b6115f45760405162461bcd60e51b815260206004820152602d60248201527f4d657373656e6765723a20696e76616c6964207769746864726177616c20696e60448201527f636c7573696f6e2070726f6f660000000000000000000000000000000000000060648201526084016105d9565b5060c980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038b8116919091179091556040515f918a16908990611642908990612cf8565b5f6040518083038185875af1925050503d805f811461167c576040519150601f19603f3d011682016040523d82523d5f602084013e611681565b606091505b505060c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080156116fb575f83815260fa6020526040808220805460ff191660011790555184917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611726565b60405183907f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f905f90a25b50505050505050505050565b61173a611bdd565b6117478484848433611ccc565b50505050565b611755610583565b8015611766576117636121d9565b50565b611763612233565b5f54610100900460ff161580801561178c57505f54600160ff909116105b806117a55750303b1580156117a557505f5460ff166001145b6118175760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105d9565b5f805460ff191660011790558015611855575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b038316158061187257506001600160a01b038216155b8061188457506001600160a01b038416155b156118bb576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118d97353000000000000000000000000000000000000078561226c565b60fd80546001600160a01b038086167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560fe805492851692909116919091179055600360ff8190556040517fd700562df02eb66951f6f5275df7ebd7c0ec58b3422915789b3b1877aab2e52b91611962915f9190918252602082015260400190565b60405180910390a18015611747575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b6119d9610583565b6001600160a01b038116611a555760405162461bcd60e51b815260206004820152602360248201527f726f6c6c757020616464726573732063616e6e6f74206265206164647265737360448201527f283029000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b60fd80546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5272c8ad4bd643b1130291ea29bebd9b3bc583057a6e4d047eb7077039a956309101610bad565b60fe54604080517ffd0ad31e00000000000000000000000000000000000000000000000000000000815290515f926001600160a01b03169163fd0ad31e9160048083019260209291908290030181865afa158015611b27573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4b9190612c5c565b905090565b611b58610583565b6001600160a01b038116611bd45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105d9565b61176381612118565b60655460ff16156105e25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105d9565b60608585858585604051602401611c4b959493929190612d13565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8ef1332e00000000000000000000000000000000000000000000000000000000179052905095945050505050565b611cd4612384565b60fe5460ca54604080517ffd0ad31e00000000000000000000000000000000000000000000000000000000815290516001600160a01b0393841693909216915f91849163fd0ad31e916004808201926020929091908290030181865afa158015611d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d649190612c5c565b90505f611d74338a8a858b611c30565b90505f6001600160a01b038516633e4cbbe6336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018a9052604401602060405180830381865afa158015611de8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e0c9190612c5c565b9050611e188982612d55565b341015611e675760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e74206d73672e76616c75650000000000000000000060448201526064016105d9565b8015611f0f5760cb546040515f916001600160a01b03169083908381818185875af1925050503d805f8114611eb7576040519150601f19603f3d011682016040523d82523d5f602084013e611ebc565b606091505b5050905080611f0d5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f206465647563742074686520666565000000000000000060448201526064016105d9565b505b6040517f9b1597820000000000000000000000000000000000000000000000000000000081526001600160a01b03861690639b15978290611f589087908b908790600401612d8d565b5f604051808303815f87803b158015611f6f575f80fd5b505af1158015611f81573d5f803e3d5ffd5b505050505f8280519060200120905060fb5f8281526020019081526020015f20545f14611ff05760405162461bcd60e51b815260206004820152601260248201527f4475706c696361746564206d657373616765000000000000000000000000000060448201526064016105d9565b5f81815260fb602052604090204290556001600160a01b038b16336001600160a01b03167f104371f3b442861a2a7b82a070afbbaab748bb13757bf47769e170e37809ec1e8c878c8e6040516120499493929190612db4565b60405180910390a3348290038a8103908b14612100575f886001600160a01b0316826040515f6040518083038185875af1925050503d805f81146120a8576040519150601f19603f3d011682016040523d82523d5f602084013e6120ad565b606091505b50509050806120fe5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20726566756e642074686520666565000000000000000060448201526064016105d9565b505b505050505050506121116001609755565b5050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b306001600160a01b038216036117635760405162461bcd60e51b815260206004820152601e60248201527f4d657373656e6765723a20466f7262696420746f2063616c6c2073656c66000060448201526064016105d9565b6121e1611bdd565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122163390565b6040516001600160a01b03909116815260200160405180910390a1565b61223b6123e4565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612216565b5f54610100900460ff166122e85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6122f0612436565b6122f86124ba565b61230061253e565b60c980547fffffffffffffffffffffffff000000000000000000000000000000000000000090811661dead1790915560ca80546001600160a01b03858116919093161790558116156123805760cb80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555b5050565b6002609754036123d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d9565b6002609755565b6001609755565b60655460ff166105e25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105d9565b5f54610100900460ff166124b25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e26125c2565b5f54610100900460ff166125365760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e2612647565b5f54610100900460ff166125ba5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e26126cf565b5f54610100900460ff1661263e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e233612118565b5f54610100900460ff166126c35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6065805460ff19169055565b5f54610100900460ff166123dd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b80356001600160a01b0381168114612761575f80fd5b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126127a2575f80fd5b813567ffffffffffffffff808211156127bd576127bd612766565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561280357612803612766565b8160405283815286602085880101111561281b575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a0868803121561284e575f80fd5b6128578661274b565b94506128656020870161274b565b93506040860135925060608601359150608086013567ffffffffffffffff81111561288e575f80fd5b61289a88828901612793565b9150509295509295909350565b5f602082840312156128b7575f80fd5b6128c08261274b565b9392505050565b8061040081018310156128d8575f80fd5b92915050565b5f805f8061046085870312156128f2575f80fd5b8435935061290386602087016128c7565b939693955050505061042082013591610440013590565b5f6020828403121561292a575f80fd5b5035919050565b5f805f805f805f60e0888a031215612947575f80fd5b6129508861274b565b965061295e6020890161274b565b95506040880135945060608801359350608088013567ffffffffffffffff811115612987575f80fd5b6129938a828b01612793565b93505060a088013563ffffffff811681146129ac575f80fd5b91506129ba60c0890161274b565b905092959891949750929550565b5f805f805f8060a087890312156129dd575f80fd5b6129e68761274b565b955060208701359450604087013567ffffffffffffffff80821115612a09575f80fd5b818901915089601f830112612a1c575f80fd5b813581811115612a2a575f80fd5b8a6020828501011115612a3b575f80fd5b60208301965080955050505060608701359150612a5a6080880161274b565b90509295509295509295565b5f805f805f805f6104c0888a031215612a7d575f80fd5b612a868861274b565b9650612a946020890161274b565b95506040880135945060608801359350608088013567ffffffffffffffff811115612abd575f80fd5b612ac98a828b01612793565b935050612ad98960a08a016128c7565b91506104a0880135905092959891949750929550565b5f805f8060808587031215612b02575f80fd5b612b0b8561274b565b935060208501359250604085013567ffffffffffffffff811115612b2d575f80fd5b612b3987828801612793565b949793965093946060013593505050565b8015158114611763575f80fd5b5f60208284031215612b67575f80fd5b81356128c081612b4a565b5f805f60608486031215612b84575f80fd5b612b8d8461274b565b9250612b9b6020850161274b565b9150612ba96040850161274b565b90509250925092565b5f5b83811015612bcc578181015183820152602001612bb4565b50505f910152565b5f8151808452612beb816020860160208601612bb2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f6128c06020830184612bd4565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612c6c575f80fd5b5051919050565b6001600160a01b038416815263ffffffff83166020820152606060408201525f612ca06060830184612bd4565b95945050505050565b84815283602082015263ffffffff83166040820152608060608201525f612cd36080830184612bd4565b9695505050505050565b5f60208284031215612ced575f80fd5b81516128c081612b4a565b5f8251612d09818460208701612bb2565b9190910192915050565b5f6001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612d4a60a0830184612bd4565b979650505050505050565b808201808211156128d8577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b6001600160a01b0384168152826020820152606060408201525f612ca06060830184612bd4565b848152836020820152826040820152608060608201525f612cd36080830184612bd456fea164736f6c6343000818000a

Deployed Bytecode

0x6080604052600436106101a7575f3560e01c806386fa4b73116100e7578063c0c53b8b11610087578063e70fc93b11610062578063e70fc93b146104f9578063ea7ec51414610524578063ecc7042814610550578063f2fde38b14610564575f80fd5b8063c0c53b8b1461049c578063cb23bcb5146104bb578063d87e7df1146104da575f80fd5b8063a14238e7116100c2578063a14238e71461040e578063b2267a7b1461043c578063b604bf4c1461044f578063bedb86fb1461047d575f80fd5b806386fa4b73146103af5780638da5cb5b146103ce578063946130d8146103eb575f80fd5b806355004105116101525780636e296e451161012d5780636e296e45146102de578063715018a6146102fd578063797594b014610311578063846d4d7a14610330575f80fd5b806355004105146102a15780635c975abb146102b45780635f7b1577146102cb575f80fd5b80633b70c18a116101825780633b70c18a1461022c578063407c195514610263578063478222c214610282575f80fd5b806329907acd146101ba5780632a6cccb2146101d9578063340735f7146101f8575f80fd5b366101b6576101b4610583565b005b5f80fd5b3480156101c5575f80fd5b506101b46101d436600461283a565b6105e4565b3480156101e4575f80fd5b506101b46101f33660046128a7565b610966565b348015610203575f80fd5b506102176102123660046128de565b610a2d565b60405190151581526020015b60405180910390f35b348015610237575f80fd5b5060fe5461024b906001600160a01b031681565b6040516001600160a01b039091168152602001610223565b34801561026e575f80fd5b506101b461027d36600461291a565b610af6565b34801561028d575f80fd5b5060cb5461024b906001600160a01b031681565b6101b46102af366004612931565b610bb9565b3480156102bf575f80fd5b5060655460ff16610217565b6101b46102d93660046129c8565b611201565b3480156102e9575f80fd5b5060c95461024b906001600160a01b031681565b348015610308575f80fd5b506101b4611255565b34801561031c575f80fd5b5060ca5461024b906001600160a01b031681565b34801561033b575f80fd5b5061038661034a36600461291a565b6101006020525f90815260409020546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b604080516fffffffffffffffffffffffffffffffff938416815292909116602083015201610223565b3480156103ba575f80fd5b506101b46103c9366004612a66565b611266565b3480156103d9575f80fd5b506033546001600160a01b031661024b565b3480156103f6575f80fd5b5061040060ff5481565b604051908152602001610223565b348015610419575f80fd5b5061021761042836600461291a565b60fa6020525f908152604090205460ff1681565b6101b461044a366004612aef565b611732565b34801561045a575f80fd5b5061021761046936600461291a565b60fc6020525f908152604090205460ff1681565b348015610488575f80fd5b506101b4610497366004612b57565b61174d565b3480156104a7575f80fd5b506101b46104b6366004612b72565b61176e565b3480156104c6575f80fd5b5060fd5461024b906001600160a01b031681565b3480156104e5575f80fd5b506101b46104f43660046128a7565b6119d1565b348015610504575f80fd5b5061040061051336600461291a565b60fb6020525f908152604090205481565b34801561052f575f80fd5b5061040061053e36600461291a565b6101016020525f908152604090205481565b34801561055b575f80fd5b50610400611ac7565b34801561056f575f80fd5b506101b461057e3660046128a7565b611b50565b6033546001600160a01b031633146105e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b565b6105ec611bdd565b60c9546001600160a01b031661dead146106485760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe546001600160a01b03165f6106628787878787611c30565b90505f818051906020012090505f60fb5f8381526020019081526020015f2054116106f55760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206d65737361676520686173206e6f74206265656e20656e60448201527f717565756564000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f81815260fc602052604090205460ff16156107535760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792064726f7070656400000000000000000060448201526064016105d9565b5f818152610100602052604081205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16908190036107935750845b6040517f91652461000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b038516906391652461906024015f604051808303815f87803b1580156107eb575f80fd5b505af11580156107fd573d5f803e3d5ffd5b5050505f918252506101016020526040902054801561083d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610793565b5f82815260fc6020526040808220805460ff191660011790555187917fbd05aabbf548001ebdd6ac80c02f1cfb3b39165f2fae1d420075f22e781ef63b91a260c980547fffffffffffffffffffffffff000000000000000000000000000000000000000016736f297c61b5c92ef107ffd30cd56affe5a273e8411790556040517f14298c510000000000000000000000000000000000000000000000000000000081526001600160a01b038a16906314298c51908990610901908990600401612c1d565b5f604051808303818588803b158015610918575f80fd5b505af115801561092a573d5f803e3d5ffd5b505060c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055505050505050505050505050565b61096e610583565b6001600160a01b0381166109c45760405162461bcd60e51b815260206004820152601d60248201527f6665655661756c742063616e6e6f74206265206164647265737328302900000060448201526064016105d9565b60cb80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f4aadc32827849f797733838c61302f7f56d2b6db28caa175eb3f7f8e5aba25f5905f90a35050565b5f84815b6020811015610aea578085901c600116600103610a9757858160208110610a5a57610a5a612c2f565b602002013582604051602001610a7a929190918252602082015260400190565b604051602081830303815290604052805190602001209150610ae2565b81868260208110610aaa57610aaa612c2f565b6020020135604051602001610ac9929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b600101610a31565b50909114949350505050565b610afe610583565b5f8111610b735760405162461bcd60e51b815260206004820152602360248201527f7265706c61792074696d6573206d75737420626520677265617465722074686160448201527f6e2030000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b60ff80549082905560408051828152602081018490527fd700562df02eb66951f6f5275df7ebd7c0ec58b3422915789b3b1877aab2e52b91015b60405180910390a15050565b610bc1611bdd565b60c9546001600160a01b031661dead14610c1d5760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe5460ca546001600160a01b0391821691165f610c3e8a8a8a8a8a611c30565b90505f818051906020012090505f60fb5f8381526020019081526020015f205411610cd15760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206d65737361676520686173206e6f74206265656e20656e60448201527f717565756564000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f81815260fc602052604090205460ff1615610d2f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792064726f7070656400000000000000000060448201526064016105d9565b6040517f3e4cbbe60000000000000000000000000000000000000000000000000000000081526001600160a01b038c8116600483015263ffffffff881660248301525f9190861690633e4cbbe690604401602060405180830381865afa158015610d9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dbf9190612c5c565b905080341015610e115760405162461bcd60e51b815260206004820152601e60248201527f496e73756666696369656e74206d73672e76616c756520666f7220666565000060448201526064016105d9565b8015610eb95760cb546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610e61576040519150601f19603f3d011682016040523d82523d5f602084013e610e66565b606091505b5050905080610eb75760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f206465647563742074686520666565000000000000000060448201526064016105d9565b505b5f856001600160a01b031663fd0ad31e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ef6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f1a9190612c5c565b6040517f9b1597820000000000000000000000000000000000000000000000000000000081529091506001600160a01b03871690639b15978290610f669088908c908990600401612c73565b5f604051808303815f87803b158015610f7d575f80fd5b505af1158015610f8f573d5f803e3d5ffd5b5050505f848152610100602090815260408083208151808301909252546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041691810182905292509003610fff575f8281526101016020526040902060018c019055611030565b80602001516001016fffffffffffffffffffffffffffffffff166101015f8481526020019081526020015f20819055505b6fffffffffffffffffffffffffffffffff808316602083015260ff5482519091161061109e5760405162461bcd60e51b815260206004820152601b60248201527f457863656564206d6178696d756d207265706c61792074696d6573000000000060448201526064016105d9565b80516fffffffffffffffffffffffffffffffff600191909101811682525f858152610100602090815260409091208351919093015182167001000000000000000000000000000000000291161790556001600160a01b038c166110fe3390565b6001600160a01b03168b7fa3a1251805b1fc7915884575b42e1fb862e814f0f5c9d670d08bf84697053d618e858d8f60405161113d9493929190612ca9565b60405180910390a4348281039083146111f1575f886001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611199576040519150601f19603f3d011682016040523d82523d5f602084013e61119e565b606091505b50509050806111ef5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20726566756e642074686520666565000000000000000060448201526064016105d9565b505b5050505050505050505050505050565b611209611bdd565b61124d868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250889250879150611ccc9050565b505050505050565b61125d610583565b6105e25f612118565b61126e611bdd565b60c9546001600160a01b031661dead146112ca5760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e0060448201526064016105d9565b60fe546001600160a01b039081169087160361134e5760405162461bcd60e51b815260206004820152602760248201527f4d657373656e6765723a20466f7262696420746f2063616c6c206d657373616760448201527f652071756575650000000000000000000000000000000000000000000000000060648201526084016105d9565b61135786612181565b60c9546001600160a01b03908116908816036113db5760405162461bcd60e51b815260206004820152602160248201527f4d657373656e6765723a20496e76616c6964206d6573736167652073656e646560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b5f6113e98888888888611c30565b80516020918201205f81815260fa90925260409091205490915060ff16156114795760405162461bcd60e51b815260206004820152603060248201527f4d657373656e6765723a207769746864726177616c2068617320616c7265616460448201527f79206265656e2066696e616c697a65640000000000000000000000000000000060648201526084016105d9565b60fd546040517f04d77215000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b03909116905f9082906304d7721590602401602060405180830381865afa1580156114dd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115019190612cdd565b9050806115765760405162461bcd60e51b815260206004820152602760248201527f4d657373656e6765723a207769746864726177616c526f6f74206e6f7420666960448201527f6e616c697a65640000000000000000000000000000000000000000000000000060648201526084016105d9565b61158283868987610a2d565b6115f45760405162461bcd60e51b815260206004820152602d60248201527f4d657373656e6765723a20696e76616c6964207769746864726177616c20696e60448201527f636c7573696f6e2070726f6f660000000000000000000000000000000000000060648201526084016105d9565b5060c980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038b8116919091179091556040515f918a16908990611642908990612cf8565b5f6040518083038185875af1925050503d805f811461167c576040519150601f19603f3d011682016040523d82523d5f602084013e611681565b606091505b505060c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055905080156116fb575f83815260fa6020526040808220805460ff191660011790555184917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a2611726565b60405183907f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f905f90a25b50505050505050505050565b61173a611bdd565b6117478484848433611ccc565b50505050565b611755610583565b8015611766576117636121d9565b50565b611763612233565b5f54610100900460ff161580801561178c57505f54600160ff909116105b806117a55750303b1580156117a557505f5460ff166001145b6118175760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016105d9565b5f805460ff191660011790558015611855575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b038316158061187257506001600160a01b038216155b8061188457506001600160a01b038416155b156118bb576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118d97353000000000000000000000000000000000000078561226c565b60fd80546001600160a01b038086167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161790925560fe805492851692909116919091179055600360ff8190556040517fd700562df02eb66951f6f5275df7ebd7c0ec58b3422915789b3b1877aab2e52b91611962915f9190918252602082015260400190565b60405180910390a18015611747575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b6119d9610583565b6001600160a01b038116611a555760405162461bcd60e51b815260206004820152602360248201527f726f6c6c757020616464726573732063616e6e6f74206265206164647265737360448201527f283029000000000000000000000000000000000000000000000000000000000060648201526084016105d9565b60fd80546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5272c8ad4bd643b1130291ea29bebd9b3bc583057a6e4d047eb7077039a956309101610bad565b60fe54604080517ffd0ad31e00000000000000000000000000000000000000000000000000000000815290515f926001600160a01b03169163fd0ad31e9160048083019260209291908290030181865afa158015611b27573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4b9190612c5c565b905090565b611b58610583565b6001600160a01b038116611bd45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105d9565b61176381612118565b60655460ff16156105e25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105d9565b60608585858585604051602401611c4b959493929190612d13565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8ef1332e00000000000000000000000000000000000000000000000000000000179052905095945050505050565b611cd4612384565b60fe5460ca54604080517ffd0ad31e00000000000000000000000000000000000000000000000000000000815290516001600160a01b0393841693909216915f91849163fd0ad31e916004808201926020929091908290030181865afa158015611d40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d649190612c5c565b90505f611d74338a8a858b611c30565b90505f6001600160a01b038516633e4cbbe6336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018a9052604401602060405180830381865afa158015611de8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e0c9190612c5c565b9050611e188982612d55565b341015611e675760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e74206d73672e76616c75650000000000000000000060448201526064016105d9565b8015611f0f5760cb546040515f916001600160a01b03169083908381818185875af1925050503d805f8114611eb7576040519150601f19603f3d011682016040523d82523d5f602084013e611ebc565b606091505b5050905080611f0d5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f206465647563742074686520666565000000000000000060448201526064016105d9565b505b6040517f9b1597820000000000000000000000000000000000000000000000000000000081526001600160a01b03861690639b15978290611f589087908b908790600401612d8d565b5f604051808303815f87803b158015611f6f575f80fd5b505af1158015611f81573d5f803e3d5ffd5b505050505f8280519060200120905060fb5f8281526020019081526020015f20545f14611ff05760405162461bcd60e51b815260206004820152601260248201527f4475706c696361746564206d657373616765000000000000000000000000000060448201526064016105d9565b5f81815260fb602052604090204290556001600160a01b038b16336001600160a01b03167f104371f3b442861a2a7b82a070afbbaab748bb13757bf47769e170e37809ec1e8c878c8e6040516120499493929190612db4565b60405180910390a3348290038a8103908b14612100575f886001600160a01b0316826040515f6040518083038185875af1925050503d805f81146120a8576040519150601f19603f3d011682016040523d82523d5f602084013e6120ad565b606091505b50509050806120fe5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20726566756e642074686520666565000000000000000060448201526064016105d9565b505b505050505050506121116001609755565b5050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b306001600160a01b038216036117635760405162461bcd60e51b815260206004820152601e60248201527f4d657373656e6765723a20466f7262696420746f2063616c6c2073656c66000060448201526064016105d9565b6121e1611bdd565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122163390565b6040516001600160a01b03909116815260200160405180910390a1565b61223b6123e4565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612216565b5f54610100900460ff166122e85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6122f0612436565b6122f86124ba565b61230061253e565b60c980547fffffffffffffffffffffffff000000000000000000000000000000000000000090811661dead1790915560ca80546001600160a01b03858116919093161790558116156123805760cb80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383161790555b5050565b6002609754036123d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d9565b6002609755565b6001609755565b60655460ff166105e25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105d9565b5f54610100900460ff166124b25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e26125c2565b5f54610100900460ff166125365760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e2612647565b5f54610100900460ff166125ba5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e26126cf565b5f54610100900460ff1661263e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6105e233612118565b5f54610100900460ff166126c35760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b6065805460ff19169055565b5f54610100900460ff166123dd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016105d9565b80356001600160a01b0381168114612761575f80fd5b919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126127a2575f80fd5b813567ffffffffffffffff808211156127bd576127bd612766565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561280357612803612766565b8160405283815286602085880101111561281b575f80fd5b836020870160208301375f602085830101528094505050505092915050565b5f805f805f60a0868803121561284e575f80fd5b6128578661274b565b94506128656020870161274b565b93506040860135925060608601359150608086013567ffffffffffffffff81111561288e575f80fd5b61289a88828901612793565b9150509295509295909350565b5f602082840312156128b7575f80fd5b6128c08261274b565b9392505050565b8061040081018310156128d8575f80fd5b92915050565b5f805f8061046085870312156128f2575f80fd5b8435935061290386602087016128c7565b939693955050505061042082013591610440013590565b5f6020828403121561292a575f80fd5b5035919050565b5f805f805f805f60e0888a031215612947575f80fd5b6129508861274b565b965061295e6020890161274b565b95506040880135945060608801359350608088013567ffffffffffffffff811115612987575f80fd5b6129938a828b01612793565b93505060a088013563ffffffff811681146129ac575f80fd5b91506129ba60c0890161274b565b905092959891949750929550565b5f805f805f8060a087890312156129dd575f80fd5b6129e68761274b565b955060208701359450604087013567ffffffffffffffff80821115612a09575f80fd5b818901915089601f830112612a1c575f80fd5b813581811115612a2a575f80fd5b8a6020828501011115612a3b575f80fd5b60208301965080955050505060608701359150612a5a6080880161274b565b90509295509295509295565b5f805f805f805f6104c0888a031215612a7d575f80fd5b612a868861274b565b9650612a946020890161274b565b95506040880135945060608801359350608088013567ffffffffffffffff811115612abd575f80fd5b612ac98a828b01612793565b935050612ad98960a08a016128c7565b91506104a0880135905092959891949750929550565b5f805f8060808587031215612b02575f80fd5b612b0b8561274b565b935060208501359250604085013567ffffffffffffffff811115612b2d575f80fd5b612b3987828801612793565b949793965093946060013593505050565b8015158114611763575f80fd5b5f60208284031215612b67575f80fd5b81356128c081612b4a565b5f805f60608486031215612b84575f80fd5b612b8d8461274b565b9250612b9b6020850161274b565b9150612ba96040850161274b565b90509250925092565b5f5b83811015612bcc578181015183820152602001612bb4565b50505f910152565b5f8151808452612beb816020860160208601612bb2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f6128c06020830184612bd4565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612c6c575f80fd5b5051919050565b6001600160a01b038416815263ffffffff83166020820152606060408201525f612ca06060830184612bd4565b95945050505050565b84815283602082015263ffffffff83166040820152608060608201525f612cd36080830184612bd4565b9695505050505050565b5f60208284031215612ced575f80fd5b81516128c081612b4a565b5f8251612d09818460208701612bb2565b9190910192915050565b5f6001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612d4a60a0830184612bd4565b979650505050505050565b808201808211156128d8577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b6001600160a01b0384168152826020820152606060408201525f612ca06060830184612bd4565b848152836020820152826040820152608060608201525f612cd36080830184612bd456fea164736f6c6343000818000a

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

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.