false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here

Contract Address Details

0x560Da67B9C65866D0a764f4A861E3Ceba5E0d5bE

Contract Name
DevnetInbox
Creator
0x4779d1–4df7b8 at 0x155eae–3f7a58
Balance
0 ETH
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
185421
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
DevnetInbox




Optimization enabled
true
Compiler version
v0.8.27+commit.40a35a09




Optimization runs
200
EVM Version
cancun




Verified at
2025-04-10T03:50:16.859015Z

Constructor Arguments

0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c5800000000000000000000000034fad38c354f51a1a641b299bec262aadbdcc8cc

Arg [0] (address) : 0x0000000000000000000000000000000000000000
Arg [1] (address) : 0x3ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a
Arg [2] (address) : 0xa20182131658295f37c1a1efdbdc89eff97d9c58
Arg [3] (address) : 0x34fad38c354f51a1a641b299bec262aadbdcc8cc

              

contracts/layer1/devnet/DevnetInbox.sol

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

import "../based/TaikoInbox.sol";

/// @title DevnetInbox
/// @dev Labeled in address resolver as "taiko"
/// @custom:security-contact security@taiko.xyz
contract DevnetInbox is TaikoInbox {
    constructor(
        address _wrapper,
        address _verifier,
        address _bondToken,
        address _signalService
    )
        TaikoInbox(_wrapper, _verifier, _bondToken, _signalService)
    { }

    /// @inheritdoc ITaikoInbox
    function pacayaConfig() public pure override returns (ITaikoInbox.Config memory) {
        return ITaikoInbox.Config({
            chainId: 167_001,
            maxUnverifiedBatches: 324_000,
            batchRingBufferSize: 360_000,
            maxBatchesToVerify: 16,
            blockMaxGasLimit: 240_000_000,
            livenessBondBase: 125e18, // 125 Taiko token per batch
            livenessBondPerBlock: 5e18, // 5 Taiko token per block
            stateRootSyncInternal: 16,
            maxAnchorHeightOffset: 64,
            baseFeeConfig: LibSharedData.BaseFeeConfig({
                adjustmentQuotient: 8,
                sharingPctg: 75,
                gasIssuancePerSecond: 5_000_000,
                minGasExcess: 1_340_000_000,
                maxGasIssuancePerBlock: 600_000_000
            }),
            provingWindow: 2 hours,
            cooldownWindow: 2 hours,
            maxSignalsToReceive: 16,
            maxBlocksPerBatch: 768,
            forkHeights: ITaikoInbox.ForkHeights({ ontake: 0, pacaya: 0, shasta: 0, unzen: 0 })
        });
    }
}
        

contracts/layer1/based/IProposeBatch.sol

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

import "./ITaikoInbox.sol";

/// @title IProposeBatch
/// @notice This interface defines the proposeBatch function that is also part of the ITaikoInbox
/// interface.
/// @custom:security-contact security@taiko.xyz
interface IProposeBatch {
    /// @notice Proposes a batch of blocks.
    /// @param _params ABI-encoded parameters.
    /// @param _txList The transaction list in calldata. If the txList is empty, blob will be used
    /// for data availability.
    /// @return info_ The info of the proposed batch.
    /// @return meta_ The mmetadata of the proposed batch.
    function proposeBatch(
        bytes calldata _params,
        bytes calldata _txList
    )
        external
        returns (ITaikoInbox.BatchInfo memory info_, ITaikoInbox.BatchMetadata memory meta_);
}
          

contracts/layer1/based/ITaikoInbox.sol

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

import "src/shared/based/LibSharedData.sol";

/// @title TaikoInbox
/// @notice Acts as the inbox for the Taiko Alethia protocol, a simplified version of the
/// original Taiko-Based Contestable Rollup (BCR). The tier-based proof system and
/// contestation mechanisms have been removed.
///
/// Key assumptions of this protocol:
/// - Block proposals and proofs are asynchronous. Proofs are not available at proposal time,
///   unlike Taiko Gwyneth, which assumes synchronous composability.
/// - Proofs are presumed error-free and thoroughly validated, with proof type management
///   delegated to IVerifier contracts.
///
/// @dev Registered in the address resolver as "taiko".
/// @custom:security-contact security@taiko.xyz
interface ITaikoInbox {
    struct BlockParams {
        // the max number of transactions in this block. Note that if there are not enough
        // transactions in calldata or blobs, the block will contains as many transactions as
        // possible.
        uint16 numTransactions;
        // The time difference (in seconds) between the timestamp of this block and
        // the timestamp of the parent block in the same batch. For the first block in a batch,
        // there is not parent block in the same batch, so the time shift should be 0.
        uint8 timeShift;
        // Signals sent on L1 and need to sync to this L2 block.
        bytes32[] signalSlots;
    }

    struct BlobParams {
        // The hashes of the blob. Note that if this array is not empty.  `firstBlobIndex` and
        // `numBlobs` must be 0.
        bytes32[] blobHashes;
        // The index of the first blob in this batch.
        uint8 firstBlobIndex;
        // The number of blobs in this batch. Blobs are initially concatenated and subsequently
        // decompressed via Zlib.
        uint8 numBlobs;
        // The byte offset of the blob in the batch.
        uint32 byteOffset;
        // The byte size of the blob.
        uint32 byteSize;
        // The block number when the blob was created.
        uint64 createdIn;
    }

    struct BatchParams {
        address proposer;
        address coinbase;
        bytes32 parentMetaHash;
        uint64 anchorBlockId;
        uint64 lastBlockTimestamp;
        bool revertIfNotFirstProposal;
        // Specifies the number of blocks to be generated from this batch.
        BlobParams blobParams;
        BlockParams[] blocks;
    }

    /// @dev This struct holds batch information essential for constructing blocks offchain, but it
    /// does not include data necessary for batch proving.
    struct BatchInfo {
        bytes32 txsHash;
        // Data to build L2 blocks
        BlockParams[] blocks;
        bytes32[] blobHashes;
        bytes32 extraData;
        address coinbase;
        uint64 proposedIn; // Used by node/client
        uint64 blobCreatedIn;
        uint32 blobByteOffset;
        uint32 blobByteSize;
        uint32 gasLimit;
        uint64 lastBlockId;
        uint64 lastBlockTimestamp;
        // Data for the L2 anchor transaction, shared by all blocks in the batch
        uint64 anchorBlockId;
        // corresponds to the `_anchorStateRoot` parameter in the anchor transaction.
        // The batch's validity proof shall verify the integrity of these two values.
        bytes32 anchorBlockHash;
        LibSharedData.BaseFeeConfig baseFeeConfig;
    }

    /// @dev This struct holds batch metadata essential for proving the batch.
    struct BatchMetadata {
        bytes32 infoHash;
        address proposer;
        uint64 batchId;
        uint64 proposedAt; // Used by node/client
    }

    /// @notice Struct representing transition to be proven.
    struct Transition {
        bytes32 parentHash;
        bytes32 blockHash;
        bytes32 stateRoot;
    }

    //  @notice Struct representing transition storage
    /// @notice 4 slots used.
    struct TransitionState {
        bytes32 parentHash;
        bytes32 blockHash;
        bytes32 stateRoot;
        address prover;
        bool inProvingWindow;
        uint48 createdAt;
    }

    /// @notice 3 slots used.
    struct Batch {
        bytes32 metaHash; // slot 1
        uint64 lastBlockId; // slot 2
        uint96 reserved3;
        uint96 livenessBond;
        uint64 batchId; // slot 3
        uint64 lastBlockTimestamp;
        uint64 anchorBlockId;
        uint24 nextTransitionId;
        uint8 reserved4;
        // The ID of the transaction that is used to verify this batch. However, if this batch is
        // not verified as the last one in a transaction, verifiedTransitionId will remain zero.
        uint24 verifiedTransitionId;
    }

    /// @notice Forge is only able to run coverage in case the contracts by default capable of
    /// compiling without any optimization (neither optimizer runs, no compiling --via-ir flag).
    struct Stats1 {
        uint64 genesisHeight;
        uint64 __reserved2;
        uint64 lastSyncedBatchId;
        uint64 lastSyncedAt;
    }

    struct Stats2 {
        uint64 numBatches;
        uint64 lastVerifiedBatchId;
        bool paused;
        uint56 lastProposedIn;
        uint64 lastUnpausedAt;
    }

    struct ForkHeights {
        uint64 ontake; // measured with block number.
        uint64 pacaya; // measured with the batch Id, not block number.
        uint64 shasta; // measured with the batch Id, not block number.
        uint64 unzen; // measured with the batch Id, not block number.
    }

    /// @notice Struct holding Taiko configuration parameters. See {TaikoConfig}.
    struct Config {
        /// @notice The chain ID of the network where Taiko contracts are deployed.
        uint64 chainId;
        /// @notice The maximum number of unverified batches the protocol supports.
        uint64 maxUnverifiedBatches;
        /// @notice Size of the batch ring buffer, allowing extra space for proposals.
        uint64 batchRingBufferSize;
        /// @notice The maximum number of verifications allowed when a batch is proposed or proved.
        uint64 maxBatchesToVerify;
        /// @notice The maximum gas limit allowed for a block.
        uint32 blockMaxGasLimit;
        /// @notice The amount of Taiko token as a prover liveness bond per batch.
        uint96 livenessBondBase;
        /// @notice The amount of Taiko token as a prover liveness bond per block.
        uint96 livenessBondPerBlock;
        /// @notice The number of batches between two L2-to-L1 state root sync.
        uint8 stateRootSyncInternal;
        /// @notice The max differences of the anchor height and the current block number.
        uint64 maxAnchorHeightOffset;
        /// @notice Base fee configuration
        LibSharedData.BaseFeeConfig baseFeeConfig;
        /// @notice The proving window in seconds.
        uint16 provingWindow;
        /// @notice The time required for a transition to be used for verifying a batch.
        uint24 cooldownWindow;
        /// @notice The maximum number of signals to be received by TaikoL2.
        uint8 maxSignalsToReceive;
        /// @notice The maximum number of blocks per batch.
        uint16 maxBlocksPerBatch;
        /// @notice Historical heights of the forks.
        ForkHeights forkHeights;
    }

    /// @notice Struct holding the state variables for the {Taiko} contract.
    struct State {
        // Ring buffer for proposed batches and a some recent verified batches.
        mapping(uint256 batchId_mod_batchRingBufferSize => Batch batch) batches;
        // Indexing to transition ids (ring buffer not possible)
        mapping(uint256 batchId => mapping(bytes32 parentHash => uint24 transitionId)) transitionIds;
        // Ring buffer for transitions
        mapping(
            uint256 batchId_mod_batchRingBufferSize
                => mapping(uint24 transitionId => TransitionState ts)
        ) transitions;
        bytes32 __reserve1; // slot 4 - was used as a ring buffer for Ether deposits
        Stats1 stats1; // slot 5
        Stats2 stats2; // slot 6
        mapping(address account => uint256 bond) bondBalance;
        uint256[43] __gap;
    }

    /// @notice Emitted when tokens are deposited into a user's bond balance.
    /// @param user The address of the user who deposited the tokens.
    /// @param amount The amount of tokens deposited.
    event BondDeposited(address indexed user, uint256 amount);

    /// @notice Emitted when tokens are withdrawn from a user's bond balance.
    /// @param user The address of the user who withdrew the tokens.
    /// @param amount The amount of tokens withdrawn.
    event BondWithdrawn(address indexed user, uint256 amount);

    /// @notice Emitted when a token is credited back to a user's bond balance.
    /// @param user The address of the user whose bond balance is credited.
    /// @param amount The amount of tokens credited.
    event BondCredited(address indexed user, uint256 amount);

    /// @notice Emitted when a token is debited from a user's bond balance.
    /// @param user The address of the user whose bond balance is debited.
    /// @param amount The amount of tokens debited.
    event BondDebited(address indexed user, uint256 amount);

    /// @notice Emitted when a batch is synced.
    /// @param stats1 The Stats1 data structure.
    event Stats1Updated(Stats1 stats1);

    /// @notice Emitted when some state variable values changed.
    /// @param stats2 The Stats2 data structure.
    event Stats2Updated(Stats2 stats2);

    /// @notice Emitted when a batch is proposed.
    /// @param info The info of the proposed batch.
    /// @param meta The metadata of the proposed batch.
    /// @param txList The tx list in calldata.
    event BatchProposed(BatchInfo info, BatchMetadata meta, bytes txList);

    /// @notice Emitted when multiple transitions are proved.
    /// @param verifier The address of the verifier.
    /// @param transitions The transitions data.
    event BatchesProved(address verifier, uint64[] batchIds, Transition[] transitions);

    /// @notice Emitted when a transition is overwritten by a conflicting one with the same parent
    /// hash but different block hash or state root.
    /// @param batchId The batch ID.
    /// @param oldTran The old transition overwritten.
    /// @param newTran The new transition.
    event ConflictingProof(uint64 batchId, TransitionState oldTran, Transition newTran);

    /// @notice Emitted when a batch is verified.
    /// @param batchId The ID of the verified batch.
    /// @param blockHash The hash of the verified batch.
    event BatchesVerified(uint64 batchId, bytes32 blockHash);

    error AnchorBlockIdSmallerThanParent();
    error AnchorBlockIdTooLarge();
    error AnchorBlockIdTooSmall();
    error ArraySizesMismatch();
    error BatchNotFound();
    error BatchVerified();
    error BeyondCurrentFork();
    error BlobNotFound();
    error BlockNotFound();
    error BlobNotSpecified();
    error ContractPaused();
    error CustomProposerMissing();
    error CustomProposerNotAllowed();
    error EtherNotPaidAsBond();
    error FirstBlockTimeShiftNotZero();
    error ForkNotActivated();
    error InsufficientBond();
    error InvalidBlobCreatedIn();
    error InvalidBlobParams();
    error InvalidGenesisBlockHash();
    error InvalidParams();
    error InvalidTransitionBlockHash();
    error InvalidTransitionParentHash();
    error InvalidTransitionStateRoot();
    error MetaHashMismatch();
    error MsgValueNotZero();
    error NoBlocksToProve();
    error NotFirstProposal();
    error NotInboxWrapper();
    error ParentMetaHashMismatch();
    error SameTransition();
    error SignalNotSent();
    error TimestampSmallerThanParent();
    error TimestampTooLarge();
    error TimestampTooSmall();
    error TooManyBatches();
    error TooManyBlocks();
    error TooManySignals();
    error TransitionNotFound();
    error ZeroAnchorBlockHash();

    /// @notice Proposes a batch of blocks.
    /// @param _params ABI-encoded parameters.
    /// @param _txList The transaction list in calldata. If the txList is empty, blob will be used
    /// for data availability.
    /// @return info_ The info of the proposed batch.
    /// @return meta_ The metadata of the proposed batch.
    function proposeBatch(
        bytes calldata _params,
        bytes calldata _txList
    )
        external
        returns (ITaikoInbox.BatchInfo memory info_, ITaikoInbox.BatchMetadata memory meta_);

    /// @notice Proves state transitions for multiple batches with a single aggregated proof.
    /// @param _params ABI-encoded parameter containing:
    /// - metas: Array of metadata for each batch being proved.
    /// - transitions: Array of batch transitions to be proved.
    /// @param _proof The aggregated cryptographic proof proving the batches transitions.
    function proveBatches(bytes calldata _params, bytes calldata _proof) external;

    /// @notice Deposits TAIKO tokens into the contract to be used as liveness bond.
    /// @param _amount The amount of TAIKO tokens to deposit.
    function depositBond(uint256 _amount) external payable;

    /// @notice Withdraws a specified amount of TAIKO tokens from the contract.
    /// @param _amount The amount of TAIKO tokens to withdraw.
    function withdrawBond(uint256 _amount) external;

    /// @notice Returns the TAIKO token balance of a specific user.
    /// @param _user The address of the user.
    /// @return The TAIKO token balance of the user.
    function bondBalanceOf(address _user) external view returns (uint256);

    /// @notice Retrieves the Bond token address. If Ether is used as bond, this function returns
    /// address(0).
    /// @return The Bond token address.
    function bondToken() external view returns (address);

    /// @notice Retrieves the first set of protocol statistics.
    /// @return Stats1 structure containing the statistics.
    function getStats1() external view returns (Stats1 memory);

    /// @notice Retrieves the second set of protocol statistics.
    /// @return Stats2 structure containing the statistics.
    function getStats2() external view returns (Stats2 memory);

    /// @notice Retrieves data about a specific batch.
    /// @param _batchId The ID of the batch to retrieve.
    /// @return batch_ The batch data.
    function getBatch(uint64 _batchId) external view returns (Batch memory batch_);

    /// @notice Retrieves a specific transition by batch ID and transition ID. This function may
    /// revert if the transition is not found.
    /// @param _batchId The batch ID.
    /// @param _tid The transition ID.
    /// @return The specified transition state.
    function getTransitionById(
        uint64 _batchId,
        uint24 _tid
    )
        external
        view
        returns (ITaikoInbox.TransitionState memory);

    /// @notice Retrieves a specific transition by batch ID and parent Hash. This function may
    /// revert if the transition is not found.
    /// @param _batchId The batch ID.
    /// @param _parentHash The parent hash.
    /// @return The specified transition state.
    function getTransitionByParentHash(
        uint64 _batchId,
        bytes32 _parentHash
    )
        external
        view
        returns (ITaikoInbox.TransitionState memory);

    /// @notice Retrieves the transition used for the last verified batch.
    /// @return batchId_ The batch ID of the last verified transition.
    /// @return blockId_ The block ID of the last verified block.
    /// @return ts_ The last verified transition.
    function getLastVerifiedTransition()
        external
        view
        returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_);

    /// @notice Retrieves the transition used for the last synced batch.
    /// @return batchId_ The batch ID of the last synced transition.
    /// @return blockId_ The block ID of the last synced block.
    /// @return ts_ The last synced transition.
    function getLastSyncedTransition()
        external
        view
        returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_);

    /// @notice Retrieves the transition used for verifying a batch.
    /// @param _batchId The batch ID.
    /// @return The transition used for verifying the batch.
    function getBatchVerifyingTransition(uint64 _batchId)
        external
        view
        returns (TransitionState memory);

    /// @notice Retrieves the current protocol configuration.
    /// @return The current configuration.
    function pacayaConfig() external view returns (Config memory);
}
          

contracts/layer1/based/TaikoInbox.sol

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

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "src/shared/common/EssentialContract.sol";
import "src/shared/based/ITaiko.sol";
import "src/shared/libs/LibAddress.sol";
import "src/shared/libs/LibMath.sol";
import "src/shared/libs/LibNetwork.sol";
import "src/shared/libs/LibStrings.sol";
import "src/shared/signal/ISignalService.sol";
import "src/layer1/verifiers/IVerifier.sol";
import "./ITaikoInbox.sol";
import "./IProposeBatch.sol";

/// @title TaikoInbox
/// @notice Acts as the inbox for the Taiko Alethia protocol, a simplified version of the
/// original Taiko-Based Contestable Rollup (BCR). The tier-based proof system and
/// contestation mechanisms have been removed.
///
/// Key assumptions of this protocol:
/// - Block proposals and proofs are asynchronous. Proofs are not available at proposal time,
///   unlike Taiko Gwyneth, which assumes synchronous composability.
/// - Proofs are presumed error-free and thoroughly validated, with subproofs/multiproofs management
/// delegated to IVerifier contracts.
///
/// @dev Registered in the address resolver as "taiko".
/// @custom:security-contact security@taiko.xyz
abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, ITaiko {
    using LibMath for uint256;
    using SafeERC20 for IERC20;

    address public immutable inboxWrapper;
    address public immutable verifier;
    address public immutable bondToken;
    ISignalService public immutable signalService;

    State public state; // storage layout much match Ontake fork
    uint256[50] private __gap;

    // External functions ------------------------------------------------------------------------

    constructor(
        address _inboxWrapper,
        address _verifier,
        address _bondToken,
        address _signalService
    )
        nonZeroAddr(_verifier)
        nonZeroAddr(_signalService)
        EssentialContract(address(0))
    {
        inboxWrapper = _inboxWrapper;
        verifier = _verifier;
        bondToken = _bondToken;
        signalService = ISignalService(_signalService);
    }

    function init(address _owner, bytes32 _genesisBlockHash) external initializer {
        __Taiko_init(_owner, _genesisBlockHash);
    }

    /// @notice Proposes a batch of blocks.
    /// @param _params ABI-encoded BlockParams.
    /// @param _txList Transaction list in calldata. If the txList is empty, blob will be used for
    /// data availability.
    /// @return info_ Information of the proposed batch, which is used for constructing blocks
    /// offchain.
    /// @return meta_ Metadata of the proposed batch, which is used for proving the batch.
    function proposeBatch(
        bytes calldata _params,
        bytes calldata _txList
    )
        public
        override(ITaikoInbox, IProposeBatch)
        nonReentrant
        returns (BatchInfo memory info_, BatchMetadata memory meta_)
    {
        Stats2 memory stats2 = state.stats2;
        Config memory config = pacayaConfig();
        require(stats2.numBatches >= config.forkHeights.pacaya, ForkNotActivated());

        unchecked {
            require(
                stats2.numBatches <= stats2.lastVerifiedBatchId + config.maxUnverifiedBatches,
                TooManyBatches()
            );

            BatchParams memory params = abi.decode(_params, (BatchParams));

            {
                if (inboxWrapper == address(0)) {
                    require(params.proposer == address(0), CustomProposerNotAllowed());
                    params.proposer = msg.sender;

                    // blob hashes are only accepted if the caller is trusted.
                    require(params.blobParams.blobHashes.length == 0, InvalidBlobParams());
                    require(params.blobParams.createdIn == 0, InvalidBlobCreatedIn());
                    params.blobParams.createdIn = uint64(block.number);
                } else {
                    require(msg.sender == inboxWrapper, NotInboxWrapper());
                    require(params.proposer != address(0), CustomProposerMissing());
                }

                // In the upcoming Shasta fork, we might need to enforce the coinbase address as the
                // preconfer address. This will allow us to implement preconfirmation features in L2
                // anchor transactions.
                if (params.coinbase == address(0)) {
                    params.coinbase = params.proposer;
                }

                if (params.revertIfNotFirstProposal) {
                    require(state.stats2.lastProposedIn != block.number, NotFirstProposal());
                }
            }

            bool calldataUsed = _txList.length != 0;

            if (calldataUsed) {
                // calldata is used for data availability
                params.blobParams.createdIn = 0;
            } else if (params.blobParams.blobHashes.length == 0) {
                // this is a normal batch, blobs are created and used in the current batches.
                // firstBlobIndex can be non-zero.
                require(params.blobParams.numBlobs != 0, BlobNotSpecified());
            } else {
                // this is a forced-inclusion batch, blobs were created in early blocks and are used
                // in the current batches
                require(params.blobParams.numBlobs == 0, InvalidBlobParams());
                require(params.blobParams.firstBlobIndex == 0, InvalidBlobParams());
            }

            // Keep track of last batch's information.
            Batch storage lastBatch =
                state.batches[(stats2.numBatches - 1) % config.batchRingBufferSize];

            (uint64 anchorBlockId, uint64 lastBlockTimestamp) = _validateBatchParams(
                params,
                config.maxAnchorHeightOffset,
                config.maxSignalsToReceive,
                config.maxBlocksPerBatch,
                lastBatch
            );

            // This section constructs the metadata for the proposed batch, which is crucial for
            // nodes/clients to process the batch. The metadata itself is not stored on-chain;
            // instead, only its hash is kept.
            // The metadata must be supplied as calldata prior to proving the batch, enabling the
            // computation and verification of its integrity through the comparison of the metahash.
            //
            // Note that `difficulty` has been removed from the metadata. The client and prover must
            // use
            // the following approach to calculate a block's difficulty:
            //  `keccak256(abi.encode("TAIKO_DIFFICULTY", block.number))`
            info_ = BatchInfo({
                txsHash: bytes32(0), // to be initialised later
                //
                // Data to build L2 blocks
                blocks: params.blocks,
                blobHashes: new bytes32[](0), // to be initialised later
                extraData: bytes32(uint256(config.baseFeeConfig.sharingPctg)),
                coinbase: params.coinbase,
                proposedIn: uint64(block.number),
                blobCreatedIn: params.blobParams.createdIn,
                blobByteOffset: params.blobParams.byteOffset,
                blobByteSize: params.blobParams.byteSize,
                gasLimit: config.blockMaxGasLimit,
                lastBlockId: 0, // to be initialised later
                lastBlockTimestamp: lastBlockTimestamp,
                //
                // Data for the L2 anchor transaction, shared by all blocks in the batch
                anchorBlockId: anchorBlockId,
                anchorBlockHash: blockhash(anchorBlockId),
                baseFeeConfig: config.baseFeeConfig
            });

            require(info_.anchorBlockHash != 0, ZeroAnchorBlockHash());

            info_.lastBlockId = stats2.numBatches == config.forkHeights.pacaya
                ? stats2.numBatches + uint64(params.blocks.length) - 1
                : lastBatch.lastBlockId + uint64(params.blocks.length);

            (info_.txsHash, info_.blobHashes) =
                _calculateTxsHash(keccak256(_txList), params.blobParams);

            meta_ = BatchMetadata({
                infoHash: keccak256(abi.encode(info_)),
                proposer: params.proposer,
                batchId: stats2.numBatches,
                proposedAt: uint64(block.timestamp)
            });

            Batch storage batch = state.batches[stats2.numBatches % config.batchRingBufferSize];

            // SSTORE #1
            batch.metaHash = keccak256(abi.encode(meta_));

            // SSTORE #2 {{
            batch.batchId = stats2.numBatches;
            batch.lastBlockTimestamp = lastBlockTimestamp;
            batch.anchorBlockId = anchorBlockId;
            batch.nextTransitionId = 1;
            batch.verifiedTransitionId = 0;
            batch.reserved4 = 0;
            // SSTORE }}

            uint96 livenessBond =
                config.livenessBondBase + config.livenessBondPerBlock * uint96(params.blocks.length);
            _debitBond(params.proposer, livenessBond);

            // SSTORE #3 {{
            batch.lastBlockId = info_.lastBlockId;
            batch.reserved3 = 0;
            batch.livenessBond = livenessBond;
            // SSTORE }}

            stats2.numBatches += 1;
            require(
                config.forkHeights.shasta == 0 || stats2.numBatches < config.forkHeights.shasta,
                BeyondCurrentFork()
            );
            stats2.lastProposedIn = uint56(block.number);

            emit BatchProposed(info_, meta_, _txList);
        } // end-of-unchecked

        _verifyBatches(config, stats2, 1);
    }

    /// @notice Proves multiple batches with a single aggregated proof.
    /// @param _params ABI-encoded parameter containing:
    /// - metas: Array of metadata for each batch being proved.
    /// - transitions: Array of batch transitions to be proved.
    /// @param _proof The aggregated cryptographic proof proving the batches transitions.
    function proveBatches(bytes calldata _params, bytes calldata _proof) external nonReentrant {
        (BatchMetadata[] memory metas, Transition[] memory trans) =
            abi.decode(_params, (BatchMetadata[], Transition[]));

        uint256 metasLength = metas.length;
        require(metasLength != 0, NoBlocksToProve());
        require(metasLength == trans.length, ArraySizesMismatch());

        Stats2 memory stats2 = state.stats2;
        require(!stats2.paused, ContractPaused());

        Config memory config = pacayaConfig();
        IVerifier.Context[] memory ctxs = new IVerifier.Context[](metasLength);

        bool hasConflictingProof;
        for (uint256 i; i < metasLength; ++i) {
            BatchMetadata memory meta = metas[i];

            require(meta.batchId >= config.forkHeights.pacaya, ForkNotActivated());
            require(
                config.forkHeights.shasta == 0 || meta.batchId < config.forkHeights.shasta,
                BeyondCurrentFork()
            );

            require(meta.batchId > stats2.lastVerifiedBatchId, BatchNotFound());
            require(meta.batchId < stats2.numBatches, BatchNotFound());

            Transition memory tran = trans[i];
            require(tran.parentHash != 0, InvalidTransitionParentHash());
            require(tran.blockHash != 0, InvalidTransitionBlockHash());
            require(tran.stateRoot != 0, InvalidTransitionStateRoot());

            ctxs[i].batchId = meta.batchId;
            ctxs[i].metaHash = keccak256(abi.encode(meta));
            ctxs[i].transition = tran;

            // Verify the batch's metadata.
            uint256 slot = meta.batchId % config.batchRingBufferSize;
            Batch storage batch = state.batches[slot];
            require(ctxs[i].metaHash == batch.metaHash, MetaHashMismatch());

            // Finds out if this transition is overwriting an existing one (with the same parent
            // hash) or is a new one.
            uint24 tid;
            uint24 nextTransitionId = batch.nextTransitionId;
            if (nextTransitionId > 1) {
                // This batch has at least one transition.
                if (state.transitions[slot][1].parentHash == tran.parentHash) {
                    // Overwrite the first transition.
                    tid = 1;
                } else if (nextTransitionId > 2) {
                    // Retrieve the transition ID using the parent hash from the mapping. If the ID
                    // is 0, it indicates a new transition; otherwise, it's an overwrite of an
                    // existing transition.
                    tid = state.transitionIds[meta.batchId][tran.parentHash];
                }
            }

            if (tid == 0) {
                // This transition is new, we need to use the next available ID.
                unchecked {
                    tid = batch.nextTransitionId++;
                }
            } else {
                TransitionState memory _ts = state.transitions[slot][tid];
                if (_ts.blockHash == 0) {
                    // This transition has been invalidated due to a conflicting proof.
                    // So we can reuse the transition ID.
                } else {
                    bool isSameTransition = _ts.blockHash == tran.blockHash
                        && (_ts.stateRoot == 0 || _ts.stateRoot == tran.stateRoot);

                    if (isSameTransition) {
                        // Re-approving the same transition is allowed, but we will not change the
                        // existing one.
                    } else {
                        // A conflict is detected with the new transition. Pause the contract and
                        // invalidate the existing transition by setting its blockHash to 0.
                        hasConflictingProof = true;
                        state.transitions[slot][tid].blockHash = 0;
                        emit ConflictingProof(meta.batchId, _ts, tran);
                    }

                    // Proceed with other transitions.
                    continue;
                }
            }

            TransitionState storage ts = state.transitions[slot][tid];

            ts.blockHash = tran.blockHash;
            ts.stateRoot =
                meta.batchId % config.stateRootSyncInternal == 0 ? tran.stateRoot : bytes32(0);

            bool inProvingWindow;
            unchecked {
                inProvingWindow = block.timestamp
                    <= uint256(meta.proposedAt).max(stats2.lastUnpausedAt) + config.provingWindow;
            }

            ts.inProvingWindow = inProvingWindow;
            ts.prover = inProvingWindow ? meta.proposer : msg.sender;
            ts.createdAt = uint48(block.timestamp);

            if (tid == 1) {
                ts.parentHash = tran.parentHash;
            } else {
                state.transitionIds[meta.batchId][tran.parentHash] = tid;
            }
        }

        IVerifier(verifier).verifyProof(ctxs, _proof);

        // Emit the event
        {
            uint64[] memory batchIds = new uint64[](metasLength);
            for (uint256 i; i < metasLength; ++i) {
                batchIds[i] = metas[i].batchId;
            }

            emit BatchesProved(verifier, batchIds, trans);
        }

        if (hasConflictingProof) {
            _pause();
            emit Paused(verifier);
        } else {
            _verifyBatches(config, stats2, metasLength);
        }
    }

    /// @notice Verify batches by providing the length of the batches to verify.
    /// @dev This function is necessary to upgrade from this fork to the next one.
    /// @param _length Specifis how many batches to verify. The max number of batches to verify is
    /// `pacayaConfig().maxBatchesToVerify * _length`.
    function verifyBatches(uint64 _length)
        external
        nonZeroValue(_length)
        nonReentrant
        whenNotPaused
    {
        _verifyBatches(pacayaConfig(), state.stats2, _length);
    }

    /// @inheritdoc ITaikoInbox
    function depositBond(uint256 _amount) external payable whenNotPaused {
        state.bondBalance[msg.sender] += _handleDeposit(msg.sender, _amount);
    }

    /// @inheritdoc ITaikoInbox
    function withdrawBond(uint256 _amount) external whenNotPaused {
        uint256 balance = state.bondBalance[msg.sender];
        require(balance >= _amount, InsufficientBond());

        emit BondWithdrawn(msg.sender, _amount);

        state.bondBalance[msg.sender] -= _amount;

        if (bondToken != address(0)) {
            IERC20(bondToken).safeTransfer(msg.sender, _amount);
        } else {
            LibAddress.sendEtherAndVerify(msg.sender, _amount);
        }
    }

    /// @inheritdoc ITaikoInbox
    function getStats1() external view returns (Stats1 memory) {
        return state.stats1;
    }

    /// @inheritdoc ITaikoInbox
    function getStats2() external view returns (Stats2 memory) {
        return state.stats2;
    }

    /// @inheritdoc ITaikoInbox
    function getTransitionById(
        uint64 _batchId,
        uint24 _tid
    )
        external
        view
        returns (TransitionState memory)
    {
        Config memory config = pacayaConfig();
        uint256 slot = _batchId % config.batchRingBufferSize;
        Batch storage batch = state.batches[slot];
        require(batch.batchId == _batchId, BatchNotFound());
        require(_tid != 0, TransitionNotFound());
        require(_tid < batch.nextTransitionId, TransitionNotFound());
        return state.transitions[slot][_tid];
    }

    /// @inheritdoc ITaikoInbox
    function getTransitionByParentHash(
        uint64 _batchId,
        bytes32 _parentHash
    )
        external
        view
        returns (TransitionState memory)
    {
        Config memory config = pacayaConfig();
        uint256 slot = _batchId % config.batchRingBufferSize;
        Batch storage batch = state.batches[slot];
        require(batch.batchId == _batchId, BatchNotFound());

        uint24 tid;
        if (batch.nextTransitionId > 1) {
            // This batch has at least one transition.
            if (state.transitions[slot][1].parentHash == _parentHash) {
                // Overwrite the first transition.
                tid = 1;
            } else if (batch.nextTransitionId > 2) {
                // Retrieve the transition ID using the parent hash from the mapping. If the ID
                // is 0, it indicates a new transition; otherwise, it's an overwrite of an
                // existing transition.
                tid = state.transitionIds[_batchId][_parentHash];
            }
        }

        require(tid != 0 && tid < batch.nextTransitionId, TransitionNotFound());
        return state.transitions[slot][tid];
    }

    /// @inheritdoc ITaikoInbox
    function getLastVerifiedTransition()
        external
        view
        returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_)
    {
        batchId_ = state.stats2.lastVerifiedBatchId;
        require(batchId_ >= pacayaConfig().forkHeights.pacaya, BatchNotFound());
        blockId_ = getBatch(batchId_).lastBlockId;
        ts_ = getBatchVerifyingTransition(batchId_);
    }

    /// @inheritdoc ITaikoInbox
    function getLastSyncedTransition()
        external
        view
        returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_)
    {
        batchId_ = state.stats1.lastSyncedBatchId;
        blockId_ = getBatch(batchId_).lastBlockId;
        ts_ = getBatchVerifyingTransition(batchId_);
    }

    /// @inheritdoc ITaikoInbox
    function bondBalanceOf(address _user) external view returns (uint256) {
        return state.bondBalance[_user];
    }

    /// @notice Determines the operational layer of the contract, whether it is on Layer 1 (L1) or
    /// Layer 2 (L2).
    /// @return True if the contract is operating on L1, false if on L2.
    function isOnL1() external pure override returns (bool) {
        return true;
    }

    // Public functions -------------------------------------------------------------------------

    /// @inheritdoc EssentialContract
    function paused() public view override returns (bool) {
        return state.stats2.paused;
    }

    /// @inheritdoc ITaikoInbox
    function getBatch(uint64 _batchId) public view returns (Batch memory batch_) {
        Config memory config = pacayaConfig();

        batch_ = state.batches[_batchId % config.batchRingBufferSize];
        require(batch_.batchId == _batchId, BatchNotFound());
    }

    /// @inheritdoc ITaikoInbox
    function getBatchVerifyingTransition(uint64 _batchId)
        public
        view
        returns (TransitionState memory ts_)
    {
        Config memory config = pacayaConfig();

        uint64 slot = _batchId % config.batchRingBufferSize;
        Batch storage batch = state.batches[slot];
        require(batch.batchId == _batchId, BatchNotFound());

        if (batch.verifiedTransitionId != 0) {
            ts_ = state.transitions[slot][batch.verifiedTransitionId];
        }
    }

    /// @inheritdoc ITaikoInbox
    function pacayaConfig() public view virtual returns (Config memory);

    // Internal functions ----------------------------------------------------------------------

    function __Taiko_init(address _owner, bytes32 _genesisBlockHash) internal onlyInitializing {
        __Essential_init(_owner);

        require(_genesisBlockHash != 0, InvalidGenesisBlockHash());
        state.transitions[0][1].blockHash = _genesisBlockHash;

        Batch storage batch = state.batches[0];
        batch.metaHash = bytes32(uint256(1));
        batch.lastBlockTimestamp = uint64(block.timestamp);
        batch.anchorBlockId = uint64(block.number);
        batch.nextTransitionId = 2;
        batch.verifiedTransitionId = 1;

        state.stats1.genesisHeight = uint64(block.number);

        state.stats2.lastProposedIn = uint56(block.number);
        state.stats2.numBatches = 1;

        emit BatchesVerified(0, _genesisBlockHash);
    }

    function _unpause() internal override {
        state.stats2.lastUnpausedAt = uint64(block.timestamp);
        state.stats2.paused = false;
    }

    function _pause() internal override {
        state.stats2.paused = true;
    }

    function _calculateTxsHash(
        bytes32 _txListHash,
        BlobParams memory _blobParams
    )
        internal
        view
        virtual
        returns (bytes32 hash_, bytes32[] memory blobHashes_)
    {
        if (_blobParams.blobHashes.length != 0) {
            blobHashes_ = _blobParams.blobHashes;
        } else {
            uint256 numBlobs = _blobParams.numBlobs;
            blobHashes_ = new bytes32[](numBlobs);
            for (uint256 i; i < numBlobs; ++i) {
                unchecked {
                    blobHashes_[i] = blobhash(_blobParams.firstBlobIndex + i);
                }
            }
        }

        uint256 bloblHashesLength = blobHashes_.length;
        for (uint256 i; i < bloblHashesLength; ++i) {
            require(blobHashes_[i] != 0, BlobNotFound());
        }
        hash_ = keccak256(abi.encode(_txListHash, blobHashes_));
    }

    // Private functions -----------------------------------------------------------------------

    function _verifyBatches(
        Config memory _config,
        Stats2 memory _stats2,
        uint256 _length
    )
        private
    {
        uint64 batchId = _stats2.lastVerifiedBatchId;

        bool canVerifyBlocks;
        unchecked {
            uint64 pacayaForkHeight = _config.forkHeights.pacaya;
            canVerifyBlocks = pacayaForkHeight == 0 || batchId >= pacayaForkHeight - 1;
        }

        if (canVerifyBlocks) {
            uint256 slot = batchId % _config.batchRingBufferSize;
            Batch storage batch = state.batches[slot];
            uint24 tid = batch.verifiedTransitionId;
            bytes32 blockHash = state.transitions[slot][tid].blockHash;

            SyncBlock memory synced;

            uint256 stopBatchId;
            unchecked {
                stopBatchId = (
                    _config.maxBatchesToVerify * _length + _stats2.lastVerifiedBatchId + 1
                ).min(_stats2.numBatches);

                if (_config.forkHeights.shasta != 0) {
                    stopBatchId = stopBatchId.min(_config.forkHeights.shasta);
                }
            }

            for (++batchId; batchId < stopBatchId; ++batchId) {
                slot = batchId % _config.batchRingBufferSize;
                batch = state.batches[slot];
                uint24 nextTransitionId = batch.nextTransitionId;

                if (paused()) break;
                if (nextTransitionId <= 1) break;

                TransitionState storage ts = state.transitions[slot][1];
                if (ts.parentHash == blockHash) {
                    tid = 1;
                } else if (nextTransitionId > 2) {
                    uint24 _tid = state.transitionIds[batchId][blockHash];
                    if (_tid == 0) break;
                    tid = _tid;
                    ts = state.transitions[slot][tid];
                } else {
                    break;
                }

                bytes32 _blockHash = ts.blockHash;
                // This transition has been invalidated due to conflicting proof
                if (_blockHash == 0) break;

                unchecked {
                    if (ts.createdAt + _config.cooldownWindow > block.timestamp) {
                        break;
                    }
                }

                blockHash = _blockHash;

                uint96 bondToReturn =
                    ts.inProvingWindow ? batch.livenessBond : batch.livenessBond / 2;
                _creditBond(ts.prover, bondToReturn);

                if (batchId % _config.stateRootSyncInternal == 0) {
                    synced.batchId = batchId;
                    synced.blockId = batch.lastBlockId;
                    synced.tid = tid;
                    synced.stateRoot = ts.stateRoot;
                }
            }

            unchecked {
                --batchId;
            }

            if (_stats2.lastVerifiedBatchId != batchId) {
                _stats2.lastVerifiedBatchId = batchId;

                batch = state.batches[_stats2.lastVerifiedBatchId % _config.batchRingBufferSize];
                batch.verifiedTransitionId = tid;
                emit BatchesVerified(_stats2.lastVerifiedBatchId, blockHash);

                if (synced.batchId != 0) {
                    if (synced.batchId != _stats2.lastVerifiedBatchId) {
                        // We write the synced batch's verifiedTransitionId to storage
                        batch = state.batches[synced.batchId % _config.batchRingBufferSize];
                        batch.verifiedTransitionId = synced.tid;
                    }

                    Stats1 memory stats1 = state.stats1;
                    stats1.lastSyncedBatchId = batch.batchId;
                    stats1.lastSyncedAt = uint64(block.timestamp);
                    state.stats1 = stats1;

                    emit Stats1Updated(stats1);

                    // Ask signal service to write cross chain signal
                    signalService.syncChainData(
                        _config.chainId, LibStrings.H_STATE_ROOT, synced.blockId, synced.stateRoot
                    );
                }
            }
        }

        state.stats2 = _stats2;
        emit Stats2Updated(_stats2);
    }

    function _debitBond(address _user, uint256 _amount) private {
        if (_amount == 0) return;

        uint256 balance = state.bondBalance[_user];
        if (balance >= _amount) {
            unchecked {
                state.bondBalance[_user] = balance - _amount;
            }
        } else if (bondToken != address(0)) {
            uint256 amountDeposited = _handleDeposit(_user, _amount);
            require(amountDeposited == _amount, InsufficientBond());
        } else {
            // Ether as bond must be deposited before proposing a batch
            revert InsufficientBond();
        }
        emit BondDebited(_user, _amount);
    }

    function _creditBond(address _user, uint256 _amount) private {
        if (_amount == 0) return;
        unchecked {
            state.bondBalance[_user] += _amount;
        }
        emit BondCredited(_user, _amount);
    }

    function _handleDeposit(
        address _user,
        uint256 _amount
    )
        private
        returns (uint256 amountDeposited_)
    {
        if (bondToken != address(0)) {
            require(msg.value == 0, MsgValueNotZero());

            uint256 balance = IERC20(bondToken).balanceOf(address(this));
            IERC20(bondToken).safeTransferFrom(_user, address(this), _amount);
            amountDeposited_ = IERC20(bondToken).balanceOf(address(this)) - balance;
        } else {
            require(msg.value == _amount, EtherNotPaidAsBond());
            amountDeposited_ = _amount;
        }
        emit BondDeposited(_user, amountDeposited_);
    }

    function _validateBatchParams(
        BatchParams memory _params,
        uint64 _maxAnchorHeightOffset,
        uint8 _maxSignalsToReceive,
        uint16 _maxBlocksPerBatch,
        Batch memory _lastBatch
    )
        private
        view
        returns (uint64 anchorBlockId_, uint64 lastBlockTimestamp_)
    {
        uint256 blocksLength = _params.blocks.length;
        require(blocksLength != 0, BlockNotFound());
        require(blocksLength <= _maxBlocksPerBatch, TooManyBlocks());

        unchecked {
            if (_params.anchorBlockId == 0) {
                anchorBlockId_ = uint64(block.number - 1);
            } else {
                require(
                    _params.anchorBlockId + _maxAnchorHeightOffset >= block.number,
                    AnchorBlockIdTooSmall()
                );
                require(_params.anchorBlockId < block.number, AnchorBlockIdTooLarge());
                require(
                    _params.anchorBlockId >= _lastBatch.anchorBlockId,
                    AnchorBlockIdSmallerThanParent()
                );
                anchorBlockId_ = _params.anchorBlockId;
            }

            lastBlockTimestamp_ = _params.lastBlockTimestamp == 0
                ? uint64(block.timestamp)
                : _params.lastBlockTimestamp;

            require(lastBlockTimestamp_ <= block.timestamp, TimestampTooLarge());
            require(_params.blocks[0].timeShift == 0, FirstBlockTimeShiftNotZero());

            uint64 totalShift;

            for (uint256 i; i < blocksLength; ++i) {
                totalShift += _params.blocks[i].timeShift;

                uint256 numSignals = _params.blocks[i].signalSlots.length;
                if (numSignals == 0) continue;

                require(numSignals <= _maxSignalsToReceive, TooManySignals());

                for (uint256 j; j < numSignals; ++j) {
                    require(
                        signalService.isSignalSent(_params.blocks[i].signalSlots[j]),
                        SignalNotSent()
                    );
                }
            }

            require(lastBlockTimestamp_ >= totalShift, TimestampTooSmall());

            uint64 firstBlockTimestamp = lastBlockTimestamp_ - totalShift;

            require(
                firstBlockTimestamp + _maxAnchorHeightOffset * LibNetwork.ETHEREUM_BLOCK_TIME
                    >= block.timestamp,
                TimestampTooSmall()
            );

            require(
                firstBlockTimestamp >= _lastBatch.lastBlockTimestamp, TimestampSmallerThanParent()
            );

            // make sure the batch builds on the expected latest chain state.
            require(
                _params.parentMetaHash == 0 || _params.parentMetaHash == _lastBatch.metaHash,
                ParentMetaHashMismatch()
            );
        }
    }

    // Memory-only structs ----------------------------------------------------------------------

    struct SyncBlock {
        uint64 batchId;
        uint64 blockId;
        uint24 tid;
        bytes32 stateRoot;
    }
}
          

contracts/layer1/verifiers/IVerifier.sol

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

import "../based/ITaikoInbox.sol";

/// @title IVerifier
/// @notice Defines the function that handles proof verification.
/// @custom:security-contact security@taiko.xyz
interface IVerifier {
    struct Context {
        uint64 batchId;
        bytes32 metaHash;
        ITaikoInbox.Transition transition;
    }

    /// @notice Verifies multiple proofs. This function must throw if the proof cannot be verified.
    /// @param _ctxs The array of contexts for the proof verifications.
    /// @param _proof The batch proof to verify.
    function verifyProof(Context[] calldata _ctxs, bytes calldata _proof) external;
}
          

contracts/shared/based/ITaiko.sol

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

/// @title ITaiko
/// @notice This interface is used for contracts identified by the "taiko" label in the address
/// resolver, specifically the TaikoInbox and TaikoAnchor contracts.
/// @custom:security-contact security@taiko.xyz
interface ITaiko {
    /// @notice Determines the operational layer of the contract, whether it is on Layer 1 (L1) or
    /// Layer 2 (L2).
    /// @return True if the contract is operating on L1, false if on L2.
    function isOnL1() external pure returns (bool);
}
          

contracts/shared/based/LibSharedData.sol

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

library LibSharedData {
    /// @dev Struct that represents L2 basefee configurations
    struct BaseFeeConfig {
        uint8 adjustmentQuotient;
        uint8 sharingPctg;
        uint32 gasIssuancePerSecond;
        uint64 minGasExcess;
        uint32 maxGasIssuancePerBlock;
    }
}
          

contracts/shared/common/EssentialContract.sol

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

import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import "./IResolver.sol";

/// @title EssentialContract
/// @custom:security-contact security@taiko.xyz
abstract contract EssentialContract is UUPSUpgradeable, Ownable2StepUpgradeable {
    uint8 internal constant _FALSE = 1;
    uint8 internal constant _TRUE = 2;

    address private immutable __resolver;
    uint256[50] private __gapFromOldAddressResolver;

    /// @dev Slot 1.
    uint8 internal __reentry;
    uint8 internal __paused;

    uint256[49] private __gap;

    /// @notice Emitted when the contract is paused.
    /// @param account The account that paused the contract.
    event Paused(address account);

    /// @notice Emitted when the contract is unpaused.
    /// @param account The account that unpaused the contract.
    event Unpaused(address account);

    error INVALID_PAUSE_STATUS();
    error FUNC_NOT_IMPLEMENTED();
    error REENTRANT_CALL();
    error ACCESS_DENIED();
    error RESOLVER_NOT_FOUND();
    error ZERO_ADDRESS();
    error ZERO_VALUE();

    /// @dev Modifier that ensures the caller is the owner or resolved address of a given name.
    /// @param _name The name to check against.
    modifier onlyFromOwnerOrNamed(bytes32 _name) {
        require(msg.sender == owner() || msg.sender == resolve(_name, true), ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that ensures the caller is either the owner or a specified address.
    /// @param _addr The address to check against.
    modifier onlyFromOwnerOr(address _addr) {
        require(msg.sender == owner() || msg.sender == _addr, ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that reverts the function call, indicating it is not implemented.
    modifier notImplemented() {
        revert FUNC_NOT_IMPLEMENTED();
        _;
    }

    /// @dev Modifier that prevents reentrant calls to a function.
    modifier nonReentrant() {
        require(_loadReentryLock() != _TRUE, REENTRANT_CALL());
        _storeReentryLock(_TRUE);
        _;
        _storeReentryLock(_FALSE);
    }

    /// @dev Modifier that allows function execution only when the contract is paused.
    modifier whenPaused() {
        require(paused(), INVALID_PAUSE_STATUS());
        _;
    }

    /// @dev Modifier that allows function execution only when the contract is not paused.
    modifier whenNotPaused() {
        require(!paused(), INVALID_PAUSE_STATUS());
        _;
    }

    /// @dev Modifier that ensures the provided address is not the zero address.
    /// @param _addr The address to check.
    modifier nonZeroAddr(address _addr) {
        require(_addr != address(0), ZERO_ADDRESS());
        _;
    }

    /// @dev Modifier that ensures the provided value is not zero.
    /// @param _value The value to check.
    modifier nonZeroValue(uint256 _value) {
        require(_value != 0, ZERO_VALUE());
        _;
    }

    /// @dev Modifier that ensures the provided bytes32 value is not zero.
    /// @param _value The bytes32 value to check.
    modifier nonZeroBytes32(bytes32 _value) {
        require(_value != 0, ZERO_VALUE());
        _;
    }

    /// @dev Modifier that ensures the caller is the resolved address of a given
    /// name.
    /// @param _name The name to check against.
    modifier onlyFromNamed(bytes32 _name) {
        require(msg.sender == resolve(_name, true), ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that ensures the caller is the resolved address of a given
    /// name, if the name is set.
    /// @param _name The name to check against.
    modifier onlyFromOptionalNamed(bytes32 _name) {
        address addr = resolve(_name, true);
        require(addr == address(0) || msg.sender == addr, ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that ensures the caller is a resolved address to either _name1 or _name2
    /// name.
    /// @param _name1 The first name to check against.
    /// @param _name2 The second name to check against.
    modifier onlyFromNamedEither(bytes32 _name1, bytes32 _name2) {
        require(
            msg.sender == resolve(_name1, true) || msg.sender == resolve(_name2, true),
            ACCESS_DENIED()
        );
        _;
    }

    /// @dev Modifier that ensures the caller is either of the two specified addresses.
    /// @param _addr1 The first address to check against.
    /// @param _addr2 The second address to check against.
    modifier onlyFromEither(address _addr1, address _addr2) {
        require(msg.sender == _addr1 || msg.sender == _addr2, ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that ensures the caller is the specified address.
    /// @param _addr The address to check against.
    modifier onlyFrom(address _addr) {
        require(msg.sender == _addr, ACCESS_DENIED());
        _;
    }

    /// @dev Modifier that ensures the caller is the specified address.
    /// @param _addr The address to check against.
    modifier onlyFromOptional(address _addr) {
        require(_addr == address(0) || msg.sender == _addr, ACCESS_DENIED());
        _;
    }

    constructor(address _resolver) {
        __resolver = _resolver;
        _disableInitializers();
    }

    /// @notice Pauses the contract.
    function pause() public whenNotPaused {
        _pause();
        emit Paused(msg.sender);
        // We call the authorize function here to avoid:
        // Warning (5740): Unreachable code.
        _authorizePause(msg.sender, true);
    }

    /// @notice Unpauses the contract.
    function unpause() public whenPaused {
        _unpause();
        emit Unpaused(msg.sender);
        // We call the authorize function here to avoid:
        // Warning (5740): Unreachable code.
        _authorizePause(msg.sender, false);
    }

    function impl() public view returns (address) {
        return _getImplementation();
    }

    /// @notice Returns true if the contract is paused, and false otherwise.
    /// @return true if paused, false otherwise.
    function paused() public view virtual returns (bool) {
        return __paused == _TRUE;
    }

    function inNonReentrant() public view returns (bool) {
        return _loadReentryLock() == _TRUE;
    }

    /// @notice Returns the address of this contract.
    /// @return The address of this contract.
    function resolver() public view virtual returns (address) {
        return __resolver;
    }

    /// @notice Resolves a name to an address on a specific chain
    /// @param _chainId The chain ID to resolve the name on
    /// @param _name The name to resolve
    /// @param _allowZeroAddress Whether to allow resolving to the zero address
    /// @return The resolved address
    function resolve(
        uint64 _chainId,
        bytes32 _name,
        bool _allowZeroAddress
    )
        internal
        view
        returns (address)
    {
        return IResolver(resolver()).resolve(_chainId, _name, _allowZeroAddress);
    }

    /// @notice Resolves a name to an address on the current chain
    /// @param _name The name to resolve
    /// @param _allowZeroAddress Whether to allow resolving to the zero address
    /// @return The resolved address
    function resolve(bytes32 _name, bool _allowZeroAddress) internal view returns (address) {
        return IResolver(resolver()).resolve(block.chainid, _name, _allowZeroAddress);
    }

    /// @notice Initializes the contract.
    /// @param _owner The owner of this contract. msg.sender will be used if this value is zero.
    function __Essential_init(address _owner) internal virtual onlyInitializing {
        __Context_init();
        _transferOwnership(_owner == address(0) ? msg.sender : _owner);
        __paused = _FALSE;
    }

    function _pause() internal virtual {
        __paused = _TRUE;
    }

    function _unpause() internal virtual {
        __paused = _FALSE;
    }

    function _authorizeUpgrade(address) internal virtual override onlyOwner { }

    function _authorizePause(address, bool) internal virtual onlyOwner { }

    // Stores the reentry lock
    function _storeReentryLock(uint8 _reentry) internal virtual {
        __reentry = _reentry;
    }

    // Loads the reentry lock
    function _loadReentryLock() internal view virtual returns (uint8 reentry_) {
        reentry_ = __reentry;
    }
}
          

contracts/shared/common/IResolver.sol

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

/// @title IResolver
/// @notice This contract acts as a bridge for name-to-address resolution.
/// @custom:security-contact security@taiko.xyz
interface IResolver {
    error RESOLVED_TO_ZERO_ADDRESS();

    /// @notice Resolves a name to its address deployed on a specified chain.
    /// @param _chainId The chainId of interest.
    /// @param _name Name whose address is to be resolved.
    /// @param _allowZeroAddress If set to true, does not throw if the resolved
    /// address is `address(0)`.
    /// @return Address associated with the given name on the specified
    /// chain.
    function resolve(
        uint256 _chainId,
        bytes32 _name,
        bool _allowZeroAddress
    )
        external
        view
        returns (address);
}
          

node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol

// 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);
        }
    }
}
          

contracts/shared/libs/LibAddress.sol

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

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/// @title LibAddress
/// @dev Provides utilities for address-related operations.
/// @custom:security-contact security@taiko.xyz
library LibAddress {
    error ETH_TRANSFER_FAILED();

    /// @dev Sends Ether to the specified address. This method will not revert even if sending ether
    /// fails.
    /// This function is inspired by
    /// https://github.com/nomad-xyz/ExcessivelySafeCall/blob/main/src/ExcessivelySafeCall.sol
    /// @param _to The recipient address.
    /// @param _amount The amount of Ether to send in wei.
    /// @param _gasLimit The max amount gas to pay for this transaction.
    /// @return success_ true if the call is successful, false otherwise.
    function sendEther(
        address _to,
        uint256 _amount,
        uint256 _gasLimit,
        bytes memory _calldata
    )
        internal
        returns (bool success_)
    {
        // Check for zero-address transactions
        require(_to != address(0), ETH_TRANSFER_FAILED());
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            success_ :=
                call(
                    _gasLimit, // gas
                    _to, // recipient
                    _amount, // ether value
                    add(_calldata, 0x20), // inloc
                    mload(_calldata), // inlen
                    0, // outloc
                    0 // outlen
                )
        }
    }

    /// @dev Sends Ether to the specified address. This method will revert if sending ether fails.
    /// @param _to The recipient address.
    /// @param _amount The amount of Ether to send in wei.
    /// @param _gasLimit The max amount gas to pay for this transaction.
    function sendEtherAndVerify(address _to, uint256 _amount, uint256 _gasLimit) internal {
        if (_amount == 0) return;
        require(sendEther(_to, _amount, _gasLimit, ""), ETH_TRANSFER_FAILED());
    }

    /// @dev Sends Ether to the specified address. This method will revert if sending ether fails.
    /// @param _to The recipient address.
    /// @param _amount The amount of Ether to send in wei.
    function sendEtherAndVerify(address _to, uint256 _amount) internal {
        sendEtherAndVerify(_to, _amount, gasleft());
    }

    function supportsInterface(
        address _addr,
        bytes4 _interfaceId
    )
        internal
        view
        returns (bool result_)
    {
        (bool success, bytes memory data) =
            _addr.staticcall(abi.encodeCall(IERC165.supportsInterface, (_interfaceId)));
        if (success && data.length == 32) {
            result_ = abi.decode(data, (bool));
        }
    }
}
          

contracts/shared/libs/LibMath.sol

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

/// @title LibMath
/// @dev This library offers additional math functions for uint256.
/// @custom:security-contact security@taiko.xyz
library LibMath {
    /// @dev Returns the smaller of the two given values.
    /// @param _a The first number to compare.
    /// @param _b The second number to compare.
    /// @return The smaller of the two numbers.
    function min(uint256 _a, uint256 _b) internal pure returns (uint256) {
        return _a > _b ? _b : _a;
    }

    /// @dev Returns the larger of the two given values.
    /// @param _a The first number to compare.
    /// @param _b The second number to compare.
    /// @return The larger of the two numbers.
    function max(uint256 _a, uint256 _b) internal pure returns (uint256) {
        return _a > _b ? _a : _b;
    }

    function capToUint64(uint256 _value) internal pure returns (uint64) {
        return uint64(min(_value, type(uint64).max));
    }
}
          

contracts/shared/libs/LibNetwork.sol

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

/// @title LibNetwork
library LibNetwork {
    uint256 internal constant ETHEREUM_MAINNET = 1;
    uint256 internal constant ETHEREUM_ROPSTEN = 2;
    uint256 internal constant ETHEREUM_RINKEBY = 4;
    uint256 internal constant ETHEREUM_GOERLI = 5;
    uint256 internal constant ETHEREUM_KOVAN = 42;
    uint256 internal constant ETHEREUM_HOLESKY = 17_000;
    uint256 internal constant ETHEREUM_SEPOLIA = 11_155_111;
    uint256 internal constant ETHEREUM_HELDER = 7_014_190_335;
    uint256 internal constant ETHEREUM_HOODI = 560_048;

    uint64 internal constant TAIKO_MAINNET = 167_000;
    uint64 internal constant TAIKO_HEKLA = 167_009;
    uint64 internal constant TAIKO_PRECONFS = 167_010;

    uint256 internal constant ETHEREUM_BLOCK_TIME = 12 seconds;

    /// @dev Checks if the chain ID represents an Ethereum testnet.
    /// @param _chainId The chain ID.
    /// @return true if the chain ID represents an Ethereum testnet, false otherwise.
    function isEthereumTestnet(uint256 _chainId) internal pure returns (bool) {
        return _chainId == LibNetwork.ETHEREUM_ROPSTEN || _chainId == LibNetwork.ETHEREUM_RINKEBY
            || _chainId == LibNetwork.ETHEREUM_GOERLI || _chainId == LibNetwork.ETHEREUM_KOVAN
            || _chainId == LibNetwork.ETHEREUM_HOLESKY || _chainId == LibNetwork.ETHEREUM_SEPOLIA
            || _chainId == LibNetwork.ETHEREUM_HELDER || _chainId == LibNetwork.ETHEREUM_HOODI;
    }

    /// @dev Checks if the chain ID represents an Ethereum testnet or the Etheruem mainnet.
    /// @param _chainId The chain ID.
    /// @return true if the chain ID represents an Ethereum testnet or the Etheruem mainnet, false
    /// otherwise.
    function isEthereumMainnetOrTestnet(uint256 _chainId) internal pure returns (bool) {
        return _chainId == LibNetwork.ETHEREUM_MAINNET || isEthereumTestnet(_chainId);
    }

    /// @dev Checks if the chain ID represents the Taiko L2 mainnet.
    /// @param _chainId The chain ID.
    /// @return true if the chain ID represents the Taiko L2 mainnet.
    function isTaikoMainnet(uint256 _chainId) internal pure returns (bool) {
        return _chainId == TAIKO_MAINNET;
    }

    /// @dev Checks if the chain ID represents an internal Taiko devnet's base layer.
    /// @param _chainId The chain ID.
    /// @return true if the chain ID represents an internal Taiko devnet's base layer, false
    /// otherwise.
    function isTaikoDevnet(uint256 _chainId) internal pure returns (bool) {
        return _chainId >= 32_300 && _chainId <= 32_400;
    }

    /// @dev Checks if the chain supports Dencun hardfork. Note that this check doesn't need to be
    /// exhaustive.
    /// @param _chainId The chain ID.
    /// @return true if the chain supports Dencun hardfork, false otherwise.
    function isDencunSupported(uint256 _chainId) internal pure returns (bool) {
        return _chainId == LibNetwork.ETHEREUM_MAINNET || _chainId == LibNetwork.ETHEREUM_HOLESKY
            || _chainId == LibNetwork.ETHEREUM_SEPOLIA || _chainId == LibNetwork.ETHEREUM_HELDER
            || _chainId == LibNetwork.ETHEREUM_HOODI || isTaikoDevnet(_chainId);
    }
}
          

contracts/shared/libs/LibStrings.sol

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

/// @title LibStrings
/// @custom:security-contact security@taiko.xyz
library LibStrings {
    bytes32 internal constant B_AUTOMATA_DCAP_ATTESTATION = bytes32("automata_dcap_attestation");
    bytes32 internal constant B_SGX_GETH_AUTOMATA = bytes32("sgx_geth_automata");
    bytes32 internal constant B_BOND_TOKEN = bytes32("bond_token");
    bytes32 internal constant B_BRIDGE = bytes32("bridge");
    bytes32 internal constant B_BRIDGE_WATCHDOG = bytes32("bridge_watchdog");
    bytes32 internal constant B_BRIDGED_ERC1155 = bytes32("bridged_erc1155");
    bytes32 internal constant B_BRIDGED_ERC20 = bytes32("bridged_erc20");
    bytes32 internal constant B_BRIDGED_ERC721 = bytes32("bridged_erc721");
    bytes32 internal constant B_CHAIN_WATCHDOG = bytes32("chain_watchdog");
    bytes32 internal constant B_ERC1155_VAULT = bytes32("erc1155_vault");
    bytes32 internal constant B_ERC20_VAULT = bytes32("erc20_vault");
    bytes32 internal constant B_ERC721_VAULT = bytes32("erc721_vault");
    bytes32 internal constant B_FORCED_INCLUSION_STORE = bytes32("forced_inclusion_store");
    bytes32 internal constant B_PRECONF_WHITELIST = bytes32("preconf_whitelist");
    bytes32 internal constant B_PRECONF_WHITELIST_OWNER = bytes32("preconf_whitelist_owner");
    bytes32 internal constant B_PRECONF_ROUTER = bytes32("preconf_router");
    bytes32 internal constant B_TAIKO_WRAPPER = bytes32("taiko_wrapper");
    bytes32 internal constant B_PROOF_VERIFIER = bytes32("proof_verifier");
    bytes32 internal constant B_SGX_RETH_VERIFIER = bytes32("sgx_reth_verifier");
    bytes32 internal constant B_SGX_GETH_VERIFIER = bytes32("sgx_geth_verifier");
    bytes32 internal constant B_RISC0_RETH_VERIFIER = bytes32("risc0_reth_verifier");
    bytes32 internal constant B_SP1_RETH_VERIFIER = bytes32("sp1_reth_verifier");
    bytes32 internal constant B_PROVER_SET = bytes32("prover_set");
    bytes32 internal constant B_QUOTA_MANAGER = bytes32("quota_manager");
    bytes32 internal constant B_SIGNAL_SERVICE = bytes32("signal_service");
    bytes32 internal constant B_TAIKO = bytes32("taiko");
    bytes32 internal constant B_TAIKO_TOKEN = bytes32("taiko_token");
    bytes32 internal constant B_WITHDRAWER = bytes32("withdrawer");
    bytes32 internal constant H_SIGNAL_ROOT = keccak256("SIGNAL_ROOT");
    bytes32 internal constant H_STATE_ROOT = keccak256("STATE_ROOT");
}
          

contracts/shared/signal/ISignalService.sol

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

/// @title ISignalService
/// @notice The SignalService contract serves as a secure cross-chain message
/// passing system. It defines methods for sending and verifying signals with
/// merkle proofs. The trust assumption is that the target chain has secure
/// access to the merkle root (such as Taiko injects it in the anchor
/// transaction). With this, verifying a signal is reduced to simply verifying
/// a merkle proof.
/// @custom:security-contact security@taiko.xyz
interface ISignalService {
    enum CacheOption {
        CACHE_NOTHING,
        CACHE_SIGNAL_ROOT,
        CACHE_STATE_ROOT,
        CACHE_BOTH
    }

    struct HopProof {
        /// @notice This hop's destination chain ID. If there is a next hop, this ID is the next
        /// hop's source chain ID.
        uint64 chainId;
        /// @notice The ID of a source chain block whose state root has been synced to the hop's
        /// destination chain.
        /// Note that this block ID must be greater than or equal to the block ID where the signal
        /// was sent on the source chain.
        uint64 blockId;
        /// @notice The state root or signal root of the source chain at the above blockId. This
        /// value has been synced to the destination chain.
        /// @dev To get both the blockId and the rootHash, apps should subscribe to the
        /// ChainDataSynced event or query `topBlockId` first using the source chain's ID and
        /// LibStrings.H_STATE_ROOT to get the most recent block ID synced, then call
        /// `getSyncedChainData` to read the synchronized data.
        bytes32 rootHash;
        /// @notice Options to cache either the state roots or signal roots of middle-hops to the
        /// current chain.
        CacheOption cacheOption;
        /// @notice The signal service's account proof. If this value is empty, then `rootHash` will
        /// be used as the signal root, otherwise, `rootHash` will be used as the state root.
        bytes[] accountProof;
        /// @notice The signal service's storage proof.
        bytes[] storageProof;
    }

    /// @notice Emitted when a remote chain's state root or signal root is
    /// synced locally as a signal.
    /// @param chainId The remote chainId.
    /// @param blockId The chain data's corresponding blockId.
    /// @param kind A value to mark the data type.
    /// @param data The remote data.
    /// @param signal The signal for this chain data.
    event ChainDataSynced(
        uint64 indexed chainId,
        uint64 indexed blockId,
        bytes32 indexed kind,
        bytes32 data,
        bytes32 signal
    );

    /// @notice Emitted when signals are received directly by TaikoL2 in its Anchor transaction.
    /// @param signalSlots The signal slots that were received.
    event SignalsReceived(bytes32[] signalSlots);

    /// @notice Emitted when a signal is sent.
    /// @param app The address that initiated the signal.
    /// @param signal The signal (message) that was sent.
    /// @param slot The location in storage where this signal is stored.
    /// @param value The value of the signal.
    event SignalSent(address app, bytes32 signal, bytes32 slot, bytes32 value);

    /// @notice Emitted when an address is authorized or deauthorized.
    /// @param addr The address to be authorized or deauthorized.
    /// @param authorized True if authorized, false otherwise.
    event Authorized(address indexed addr, bool authorized);

    /// @dev Allow TaikoL2 to receive signals directly in its Anchor transaction.
    /// @param _signalSlots The signal slots to mark as received.
    function receiveSignals(bytes32[] calldata _signalSlots) external;

    /// @notice Send a signal (message) by setting the storage slot to the same value as the signal
    /// itself.
    /// @param _signal The signal (message) to send.
    /// @return slot_ The location in storage where this signal is stored.
    function sendSignal(bytes32 _signal) external returns (bytes32 slot_);

    /// @notice Sync a data from a remote chain locally as a signal. The signal is calculated
    /// uniquely from chainId, kind, and data.
    /// @param _chainId The remote chainId.
    /// @param _kind A value to mark the data type.
    /// @param _blockId The chain data's corresponding blockId
    /// @param _chainData The remote data.
    /// @return signal_ The signal for this chain data.
    function syncChainData(
        uint64 _chainId,
        bytes32 _kind,
        uint64 _blockId,
        bytes32 _chainData
    )
        external
        returns (bytes32 signal_);

    /// @notice Verifies if a signal has been received on the target chain.
    /// @param _chainId The identifier for the source chain from which the
    /// signal originated.
    /// @param _app The address that initiated the signal.
    /// @param _signal The signal (message) to send.
    /// @param _proof Merkle proof that the signal was persisted on the
    /// source chain. If this proof is empty, then we check if this signal has been marked as
    /// received by TaikoL2.
    /// @return numCacheOps_ The number of newly cached items.
    function proveSignalReceived(
        uint64 _chainId,
        address _app,
        bytes32 _signal,
        bytes calldata _proof
    )
        external
        returns (uint256 numCacheOps_);

    /// @notice Verifies if a signal has been received on the target chain.
    /// This is the "readonly" version of proveSignalReceived.
    /// @param _chainId The identifier for the source chain from which the
    /// signal originated.
    /// @param _app The address that initiated the signal.
    /// @param _signal The signal (message) to send.
    /// @param _proof Merkle proof that the signal was persisted on the
    /// source chain. If this proof is empty, then we check if this signal has been marked as
    /// received by TaikoL2.
    function verifySignalReceived(
        uint64 _chainId,
        address _app,
        bytes32 _signal,
        bytes calldata _proof
    )
        external
        view;

    /// @notice Verifies if a particular signal has already been sent.
    /// @param _app The address that initiated the signal.
    /// @param _signal The signal (message) that was sent.
    /// @return true if the signal has been sent, otherwise false.
    function isSignalSent(address _app, bytes32 _signal) external view returns (bool);

    /// @notice Verifies if a particular signal has already been sent.
    /// @param _signalSlot The location in storage where this signal is stored.
    function isSignalSent(bytes32 _signalSlot) external view returns (bool);

    /// @notice Checks if a chain data has been synced.
    /// @param _chainId The remote chainId.
    /// @param _kind A value to mark the data type.
    /// @param _blockId The chain data's corresponding blockId
    /// @param _chainData The remote data.
    /// @return true if the data has been synced, otherwise false.
    function isChainDataSynced(
        uint64 _chainId,
        bytes32 _kind,
        uint64 _blockId,
        bytes32 _chainData
    )
        external
        view
        returns (bool);

    /// @notice Returns the given block's  chain data.
    /// @param _chainId Identifier of the chainId.
    /// @param _kind A value to mark the data type.
    /// @param _blockId The chain data's corresponding block id. If this value is 0, use the top
    /// block id.
    /// @return blockId_ The actual block id.
    /// @return chainData_ The synced chain data.
    function getSyncedChainData(
        uint64 _chainId,
        bytes32 _kind,
        uint64 _blockId
    )
        external
        view
        returns (uint64 blockId_, bytes32 chainData_);

    /// @notice Returns the data to be used for caching slot generation.
    /// @param _chainId Identifier of the chainId.
    /// @param _kind A value to mark the data type.
    /// @param _blockId The chain data's corresponding block id. If this value is 0, use the top
    /// block id.
    /// @return signal_ The signal used for caching slot creation.
    function signalForChainData(
        uint64 _chainId,
        bytes32 _kind,
        uint64 _blockId
    )
        external
        pure
        returns (bytes32 signal_);
}
          

node_modules/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol

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

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {
    address private _pendingOwner;

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

    function __Ownable2Step_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable2Step_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }

    /**
     * @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;
}
          

node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

// 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;
}
          

node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol

// 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;
    }
}
          

node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol

// 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;
}
          

node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol

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

pragma solidity ^0.8.0;

/**
 * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
 *
 * _Available since v4.8.3._
 */
interface IERC1967 {
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);
}
          

node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}
          

node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol

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

pragma solidity ^0.8.2;

import "../beacon/IBeacon.sol";
import "../../interfaces/IERC1967.sol";
import "../../interfaces/draft-IERC1822.sol";
import "../../utils/Address.sol";
import "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 */
abstract contract ERC1967Upgrade is IERC1967 {
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            Address.isContract(IBeacon(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        }
    }
}
          

node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}
          

node_modules/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol

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

pragma solidity ^0.8.0;

import "../../interfaces/draft-IERC1822.sol";
import "../ERC1967/ERC1967Upgrade.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        require(address(this) != __self, "Function must be called through delegatecall");
        require(_getImplementation() == __self, "Function must be called through active proxy");
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
        return _IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeTo(address newImplementation) public virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeTo} and {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal override onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;
}
          

node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
          

node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}
          

node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}
          

node_modules/@openzeppelin/contracts/utils/Address.sol

// 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 Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * 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);
        }
    }
}
          

node_modules/@openzeppelin/contracts/utils/StorageSlot.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}
          

node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
          

Compiler Settings

{"viaIR":false,"remappings":["openzeppelin/=node_modules/@openzeppelin/","@openzeppelin/=node_modules/@openzeppelin/","@openzeppelin-upgrades/contracts/=node_modules/@openzeppelin/contracts-upgradeable/","@risc0/contracts/=node_modules/risc0-ethereum/contracts/src/","@solady/=node_modules/solady/","@optimism/=node_modules/optimism/","@sp1-contracts/=node_modules/sp1-contracts/contracts/","forge-std/=node_modules/forge-std/","ds-test/=node_modules/ds-test/src/","@p256-verifier/contracts/=node_modules/p256-verifier/src/","eigenlayer-middleware/=node_modules/eigenlayer-middleware/","eigenlayer-contracts/=node_modules/eigenlayer-contracts/","src/=contracts/","test/=test/","script/=script/","optimism/=node_modules/optimism/","p256-verifier/=node_modules/p256-verifier/","risc0-ethereum/=node_modules/risc0-ethereum/","solady/=node_modules/solady/","sp1-contracts/=node_modules/sp1-contracts/"],"outputSelection":{"*":{"*":["abi","evm.bytecode.object","evm.bytecode.sourceMap","evm.bytecode.linkReferences","evm.deployedBytecode.object","evm.deployedBytecode.sourceMap","evm.deployedBytecode.linkReferences","evm.deployedBytecode.immutableReferences","evm.methodIdentifiers","metadata"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"libraries":{},"evmVersion":"cancun"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_wrapper","internalType":"address"},{"type":"address","name":"_verifier","internalType":"address"},{"type":"address","name":"_bondToken","internalType":"address"},{"type":"address","name":"_signalService","internalType":"address"}]},{"type":"error","name":"ACCESS_DENIED","inputs":[]},{"type":"error","name":"AnchorBlockIdSmallerThanParent","inputs":[]},{"type":"error","name":"AnchorBlockIdTooLarge","inputs":[]},{"type":"error","name":"AnchorBlockIdTooSmall","inputs":[]},{"type":"error","name":"ArraySizesMismatch","inputs":[]},{"type":"error","name":"BatchNotFound","inputs":[]},{"type":"error","name":"BatchVerified","inputs":[]},{"type":"error","name":"BeyondCurrentFork","inputs":[]},{"type":"error","name":"BlobNotFound","inputs":[]},{"type":"error","name":"BlobNotSpecified","inputs":[]},{"type":"error","name":"BlockNotFound","inputs":[]},{"type":"error","name":"ContractPaused","inputs":[]},{"type":"error","name":"CustomProposerMissing","inputs":[]},{"type":"error","name":"CustomProposerNotAllowed","inputs":[]},{"type":"error","name":"ETH_TRANSFER_FAILED","inputs":[]},{"type":"error","name":"EtherNotPaidAsBond","inputs":[]},{"type":"error","name":"FUNC_NOT_IMPLEMENTED","inputs":[]},{"type":"error","name":"FirstBlockTimeShiftNotZero","inputs":[]},{"type":"error","name":"ForkNotActivated","inputs":[]},{"type":"error","name":"INVALID_PAUSE_STATUS","inputs":[]},{"type":"error","name":"InsufficientBond","inputs":[]},{"type":"error","name":"InvalidBlobCreatedIn","inputs":[]},{"type":"error","name":"InvalidBlobParams","inputs":[]},{"type":"error","name":"InvalidGenesisBlockHash","inputs":[]},{"type":"error","name":"InvalidParams","inputs":[]},{"type":"error","name":"InvalidTransitionBlockHash","inputs":[]},{"type":"error","name":"InvalidTransitionParentHash","inputs":[]},{"type":"error","name":"InvalidTransitionStateRoot","inputs":[]},{"type":"error","name":"MetaHashMismatch","inputs":[]},{"type":"error","name":"MsgValueNotZero","inputs":[]},{"type":"error","name":"NoBlocksToProve","inputs":[]},{"type":"error","name":"NotFirstProposal","inputs":[]},{"type":"error","name":"NotInboxWrapper","inputs":[]},{"type":"error","name":"ParentMetaHashMismatch","inputs":[]},{"type":"error","name":"REENTRANT_CALL","inputs":[]},{"type":"error","name":"RESOLVER_NOT_FOUND","inputs":[]},{"type":"error","name":"SameTransition","inputs":[]},{"type":"error","name":"SignalNotSent","inputs":[]},{"type":"error","name":"TimestampSmallerThanParent","inputs":[]},{"type":"error","name":"TimestampTooLarge","inputs":[]},{"type":"error","name":"TimestampTooSmall","inputs":[]},{"type":"error","name":"TooManyBatches","inputs":[]},{"type":"error","name":"TooManyBlocks","inputs":[]},{"type":"error","name":"TooManySignals","inputs":[]},{"type":"error","name":"TransitionNotFound","inputs":[]},{"type":"error","name":"ZERO_ADDRESS","inputs":[]},{"type":"error","name":"ZERO_VALUE","inputs":[]},{"type":"error","name":"ZeroAnchorBlockHash","inputs":[]},{"type":"event","name":"AdminChanged","inputs":[{"type":"address","name":"previousAdmin","internalType":"address","indexed":false},{"type":"address","name":"newAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"BatchProposed","inputs":[{"type":"tuple","name":"info","internalType":"struct ITaikoInbox.BatchInfo","indexed":false,"components":[{"type":"bytes32","name":"txsHash","internalType":"bytes32"},{"type":"tuple[]","name":"blocks","internalType":"struct ITaikoInbox.BlockParams[]","components":[{"type":"uint16","name":"numTransactions","internalType":"uint16"},{"type":"uint8","name":"timeShift","internalType":"uint8"},{"type":"bytes32[]","name":"signalSlots","internalType":"bytes32[]"}]},{"type":"bytes32[]","name":"blobHashes","internalType":"bytes32[]"},{"type":"bytes32","name":"extraData","internalType":"bytes32"},{"type":"address","name":"coinbase","internalType":"address"},{"type":"uint64","name":"proposedIn","internalType":"uint64"},{"type":"uint64","name":"blobCreatedIn","internalType":"uint64"},{"type":"uint32","name":"blobByteOffset","internalType":"uint32"},{"type":"uint32","name":"blobByteSize","internalType":"uint32"},{"type":"uint32","name":"gasLimit","internalType":"uint32"},{"type":"uint64","name":"lastBlockId","internalType":"uint64"},{"type":"uint64","name":"lastBlockTimestamp","internalType":"uint64"},{"type":"uint64","name":"anchorBlockId","internalType":"uint64"},{"type":"bytes32","name":"anchorBlockHash","internalType":"bytes32"},{"type":"tuple","name":"baseFeeConfig","internalType":"struct LibSharedData.BaseFeeConfig","components":[{"type":"uint8","name":"adjustmentQuotient","internalType":"uint8"},{"type":"uint8","name":"sharingPctg","internalType":"uint8"},{"type":"uint32","name":"gasIssuancePerSecond","internalType":"uint32"},{"type":"uint64","name":"minGasExcess","internalType":"uint64"},{"type":"uint32","name":"maxGasIssuancePerBlock","internalType":"uint32"}]}]},{"type":"tuple","name":"meta","internalType":"struct ITaikoInbox.BatchMetadata","indexed":false,"components":[{"type":"bytes32","name":"infoHash","internalType":"bytes32"},{"type":"address","name":"proposer","internalType":"address"},{"type":"uint64","name":"batchId","internalType":"uint64"},{"type":"uint64","name":"proposedAt","internalType":"uint64"}]},{"type":"bytes","name":"txList","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"BatchesProved","inputs":[{"type":"address","name":"verifier","internalType":"address","indexed":false},{"type":"uint64[]","name":"batchIds","internalType":"uint64[]","indexed":false},{"type":"tuple[]","name":"transitions","internalType":"struct ITaikoInbox.Transition[]","indexed":false,"components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"}]}],"anonymous":false},{"type":"event","name":"BatchesVerified","inputs":[{"type":"uint64","name":"batchId","internalType":"uint64","indexed":false},{"type":"bytes32","name":"blockHash","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"type":"address","name":"beacon","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"BondCredited","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BondDebited","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BondDeposited","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BondWithdrawn","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ConflictingProof","inputs":[{"type":"uint64","name":"batchId","internalType":"uint64","indexed":false},{"type":"tuple","name":"oldTran","internalType":"struct ITaikoInbox.TransitionState","indexed":false,"components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]},{"type":"tuple","name":"newTran","internalType":"struct ITaikoInbox.Transition","indexed":false,"components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"}]}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferStarted","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Stats1Updated","inputs":[{"type":"tuple","name":"stats1","internalType":"struct ITaikoInbox.Stats1","indexed":false,"components":[{"type":"uint64","name":"genesisHeight","internalType":"uint64"},{"type":"uint64","name":"__reserved2","internalType":"uint64"},{"type":"uint64","name":"lastSyncedBatchId","internalType":"uint64"},{"type":"uint64","name":"lastSyncedAt","internalType":"uint64"}]}],"anonymous":false},{"type":"event","name":"Stats2Updated","inputs":[{"type":"tuple","name":"stats2","internalType":"struct ITaikoInbox.Stats2","indexed":false,"components":[{"type":"uint64","name":"numBatches","internalType":"uint64"},{"type":"uint64","name":"lastVerifiedBatchId","internalType":"uint64"},{"type":"bool","name":"paused","internalType":"bool"},{"type":"uint56","name":"lastProposedIn","internalType":"uint56"},{"type":"uint64","name":"lastUnpausedAt","internalType":"uint64"}]}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bondBalanceOf","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"bondToken","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositBond","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"batch_","internalType":"struct ITaikoInbox.Batch","components":[{"type":"bytes32","name":"metaHash","internalType":"bytes32"},{"type":"uint64","name":"lastBlockId","internalType":"uint64"},{"type":"uint96","name":"reserved3","internalType":"uint96"},{"type":"uint96","name":"livenessBond","internalType":"uint96"},{"type":"uint64","name":"batchId","internalType":"uint64"},{"type":"uint64","name":"lastBlockTimestamp","internalType":"uint64"},{"type":"uint64","name":"anchorBlockId","internalType":"uint64"},{"type":"uint24","name":"nextTransitionId","internalType":"uint24"},{"type":"uint8","name":"reserved4","internalType":"uint8"},{"type":"uint24","name":"verifiedTransitionId","internalType":"uint24"}]}],"name":"getBatch","inputs":[{"type":"uint64","name":"_batchId","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"ts_","internalType":"struct ITaikoInbox.TransitionState","components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]}],"name":"getBatchVerifyingTransition","inputs":[{"type":"uint64","name":"_batchId","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"batchId_","internalType":"uint64"},{"type":"uint64","name":"blockId_","internalType":"uint64"},{"type":"tuple","name":"ts_","internalType":"struct ITaikoInbox.TransitionState","components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]}],"name":"getLastSyncedTransition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"batchId_","internalType":"uint64"},{"type":"uint64","name":"blockId_","internalType":"uint64"},{"type":"tuple","name":"ts_","internalType":"struct ITaikoInbox.TransitionState","components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]}],"name":"getLastVerifiedTransition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct ITaikoInbox.Stats1","components":[{"type":"uint64","name":"genesisHeight","internalType":"uint64"},{"type":"uint64","name":"__reserved2","internalType":"uint64"},{"type":"uint64","name":"lastSyncedBatchId","internalType":"uint64"},{"type":"uint64","name":"lastSyncedAt","internalType":"uint64"}]}],"name":"getStats1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct ITaikoInbox.Stats2","components":[{"type":"uint64","name":"numBatches","internalType":"uint64"},{"type":"uint64","name":"lastVerifiedBatchId","internalType":"uint64"},{"type":"bool","name":"paused","internalType":"bool"},{"type":"uint56","name":"lastProposedIn","internalType":"uint56"},{"type":"uint64","name":"lastUnpausedAt","internalType":"uint64"}]}],"name":"getStats2","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct ITaikoInbox.TransitionState","components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]}],"name":"getTransitionById","inputs":[{"type":"uint64","name":"_batchId","internalType":"uint64"},{"type":"uint24","name":"_tid","internalType":"uint24"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct ITaikoInbox.TransitionState","components":[{"type":"bytes32","name":"parentHash","internalType":"bytes32"},{"type":"bytes32","name":"blockHash","internalType":"bytes32"},{"type":"bytes32","name":"stateRoot","internalType":"bytes32"},{"type":"address","name":"prover","internalType":"address"},{"type":"bool","name":"inProvingWindow","internalType":"bool"},{"type":"uint48","name":"createdAt","internalType":"uint48"}]}],"name":"getTransitionByParentHash","inputs":[{"type":"uint64","name":"_batchId","internalType":"uint64"},{"type":"bytes32","name":"_parentHash","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"impl","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"inNonReentrant","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"inboxWrapper","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"init","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"bytes32","name":"_genesisBlockHash","internalType":"bytes32"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOnL1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"tuple","name":"","internalType":"struct ITaikoInbox.Config","components":[{"type":"uint64","name":"chainId","internalType":"uint64"},{"type":"uint64","name":"maxUnverifiedBatches","internalType":"uint64"},{"type":"uint64","name":"batchRingBufferSize","internalType":"uint64"},{"type":"uint64","name":"maxBatchesToVerify","internalType":"uint64"},{"type":"uint32","name":"blockMaxGasLimit","internalType":"uint32"},{"type":"uint96","name":"livenessBondBase","internalType":"uint96"},{"type":"uint96","name":"livenessBondPerBlock","internalType":"uint96"},{"type":"uint8","name":"stateRootSyncInternal","internalType":"uint8"},{"type":"uint64","name":"maxAnchorHeightOffset","internalType":"uint64"},{"type":"tuple","name":"baseFeeConfig","internalType":"struct LibSharedData.BaseFeeConfig","components":[{"type":"uint8","name":"adjustmentQuotient","internalType":"uint8"},{"type":"uint8","name":"sharingPctg","internalType":"uint8"},{"type":"uint32","name":"gasIssuancePerSecond","internalType":"uint32"},{"type":"uint64","name":"minGasExcess","internalType":"uint64"},{"type":"uint32","name":"maxGasIssuancePerBlock","internalType":"uint32"}]},{"type":"uint16","name":"provingWindow","internalType":"uint16"},{"type":"uint24","name":"cooldownWindow","internalType":"uint24"},{"type":"uint8","name":"maxSignalsToReceive","internalType":"uint8"},{"type":"uint16","name":"maxBlocksPerBatch","internalType":"uint16"},{"type":"tuple","name":"forkHeights","internalType":"struct ITaikoInbox.ForkHeights","components":[{"type":"uint64","name":"ontake","internalType":"uint64"},{"type":"uint64","name":"pacaya","internalType":"uint64"},{"type":"uint64","name":"shasta","internalType":"uint64"},{"type":"uint64","name":"unzen","internalType":"uint64"}]}]}],"name":"pacayaConfig","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pendingOwner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"tuple","name":"info_","internalType":"struct ITaikoInbox.BatchInfo","components":[{"type":"bytes32","name":"txsHash","internalType":"bytes32"},{"type":"tuple[]","name":"blocks","internalType":"struct ITaikoInbox.BlockParams[]","components":[{"type":"uint16","name":"numTransactions","internalType":"uint16"},{"type":"uint8","name":"timeShift","internalType":"uint8"},{"type":"bytes32[]","name":"signalSlots","internalType":"bytes32[]"}]},{"type":"bytes32[]","name":"blobHashes","internalType":"bytes32[]"},{"type":"bytes32","name":"extraData","internalType":"bytes32"},{"type":"address","name":"coinbase","internalType":"address"},{"type":"uint64","name":"proposedIn","internalType":"uint64"},{"type":"uint64","name":"blobCreatedIn","internalType":"uint64"},{"type":"uint32","name":"blobByteOffset","internalType":"uint32"},{"type":"uint32","name":"blobByteSize","internalType":"uint32"},{"type":"uint32","name":"gasLimit","internalType":"uint32"},{"type":"uint64","name":"lastBlockId","internalType":"uint64"},{"type":"uint64","name":"lastBlockTimestamp","internalType":"uint64"},{"type":"uint64","name":"anchorBlockId","internalType":"uint64"},{"type":"bytes32","name":"anchorBlockHash","internalType":"bytes32"},{"type":"tuple","name":"baseFeeConfig","internalType":"struct LibSharedData.BaseFeeConfig","components":[{"type":"uint8","name":"adjustmentQuotient","internalType":"uint8"},{"type":"uint8","name":"sharingPctg","internalType":"uint8"},{"type":"uint32","name":"gasIssuancePerSecond","internalType":"uint32"},{"type":"uint64","name":"minGasExcess","internalType":"uint64"},{"type":"uint32","name":"maxGasIssuancePerBlock","internalType":"uint32"}]}]},{"type":"tuple","name":"meta_","internalType":"struct ITaikoInbox.BatchMetadata","components":[{"type":"bytes32","name":"infoHash","internalType":"bytes32"},{"type":"address","name":"proposer","internalType":"address"},{"type":"uint64","name":"batchId","internalType":"uint64"},{"type":"uint64","name":"proposedAt","internalType":"uint64"}]}],"name":"proposeBatch","inputs":[{"type":"bytes","name":"_params","internalType":"bytes"},{"type":"bytes","name":"_txList","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"proveBatches","inputs":[{"type":"bytes","name":"_params","internalType":"bytes"},{"type":"bytes","name":"_proof","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"proxiableUUID","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"resolver","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISignalService"}],"name":"signalService","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"__reserve1","internalType":"bytes32"},{"type":"tuple","name":"stats1","internalType":"struct ITaikoInbox.Stats1","components":[{"type":"uint64","name":"genesisHeight","internalType":"uint64"},{"type":"uint64","name":"__reserved2","internalType":"uint64"},{"type":"uint64","name":"lastSyncedBatchId","internalType":"uint64"},{"type":"uint64","name":"lastSyncedAt","internalType":"uint64"}]},{"type":"tuple","name":"stats2","internalType":"struct ITaikoInbox.Stats2","components":[{"type":"uint64","name":"numBatches","internalType":"uint64"},{"type":"uint64","name":"lastVerifiedBatchId","internalType":"uint64"},{"type":"bool","name":"paused","internalType":"bool"},{"type":"uint56","name":"lastProposedIn","internalType":"uint56"},{"type":"uint64","name":"lastUnpausedAt","internalType":"uint64"}]}],"name":"state","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"upgradeTo","inputs":[{"type":"address","name":"newImplementation","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"upgradeToAndCall","inputs":[{"type":"address","name":"newImplementation","internalType":"address"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"verifier","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"verifyBatches","inputs":[{"type":"uint64","name":"_length","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawBond","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

Verify & Publish
0x61014060405230608052348015610014575f5ffd5b50604051615be9380380615be98339810160408190526100339161019c565b5f60a081905284908490849084906100496100c5565b50826001600160a01b0381166100725760405163538ba4f960e01b815260040160405180910390fd5b816001600160a01b03811661009a5760405163538ba4f960e01b815260040160405180910390fd5b50506001600160a01b0393841660c05291831660e0528216610100521661012052506101ed92505050565b5f54610100900460ff16156101305760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461017f575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114610197575f5ffd5b919050565b5f5f5f5f608085870312156101af575f5ffd5b6101b885610181565b93506101c660208601610181565b92506101d460408601610181565b91506101e260608601610181565b905092959194509250565b60805160a05160c05160e05161010051610120516159376102b25f395f818161052c01528181613173015261384f01525f818161077101528181611dd701528181611e1101528181613b9601528181613c5a01528181613cbd01528181613d3d0152613d7c01525f81816103bc015281816125d4015281816126fd015261276201525f81816104da01528181610dfc0152610ece01525f61021901525f8181610aa501528181610ae50152818161161e0152818161165e01526116d501526159375ff3fe608060405260043610610207575f3560e01c80637e7501dc11610113578063c19d93fb1161009d578063cee1136c1161006d578063cee1136c146107d1578063e30c3978146107e5578063e8353dc014610802578063f2fde38b14610821578063ff109f5914610840575f5ffd5b8063c19d93fb1461069f578063c28f439214610760578063c3daab9614610793578063c9cc2843146107b2575f5ffd5b80638da5cb5b116100e35780638da5cb5b146105f65780639c43647314610613578063a4b2355414610636578063a9c2c83514610649578063b932bf2b1461067e575f5ffd5b80637e7501dc146105765780638456cb59146105a2578063888775d9146105b65780638abf6077146105e2575f5ffd5b806347faad141161019457806359df11181161016457806359df1118146104c95780635c975abb146104fc57806362d094531461051b578063715018a61461054e57806379ba509714610562575f5ffd5b806347faad14146104545780634dcb05f9146104815780634f1ef2861461049457806352d1902d146104a7575f5ffd5b80632b7ac3f3116101da5780632b7ac3f3146103ab5780632cc0b254146103de5780633075db56146103fd5780633659cfe6146104215780633f4ba83a14610440575f5ffd5b806304f3bcec1461020b5780630cc62b421461025657806312ad809c1461027757806326baca1c14610301575b5f5ffd5b348015610216575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b348015610261575f5ffd5b506102756102703660046145fc565b61085f565b005b348015610282575f5ffd5b506102f4604080516080810182525f808252602082018190529181018290526060810191909152506040805160808101825260ff546001600160401b038082168352600160401b820481166020840152600160801b8204811693830193909352600160c01b9004909116606082015290565b60405161024d919061465f565b34801561030c575f5ffd5b5061039e6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b9004909116608082015290565b60405161024d91906146c3565b3480156103b6575f5ffd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b3480156103e9575f5ffd5b506102756103f83660046146e7565b61096e565b348015610408575f5ffd5b50610411610a83565b604051901515815260200161024d565b34801561042c575f5ffd5b5061027561043b36600461470f565b610a9b565b34801561044b575f5ffd5b50610275610b62565b34801561045f575f5ffd5b5061047361046e36600461476c565b610c05565b60405161024d929190614a7f565b61027561048f366004614aa0565b6115b7565b6102756104a2366004614b8a565b611614565b3480156104b2575f5ffd5b506104bb6116c9565b60405190815260200161024d565b3480156104d4575f5ffd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b348015610507575f5ffd5b5061010054600160801b900460ff16610411565b348015610526575f5ffd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b348015610559575f5ffd5b5061027561177a565b34801561056d575f5ffd5b5061027561178b565b348015610581575f5ffd5b506105956105903660046145fc565b611802565b60405161024d9190614c77565b3480156105ad575f5ffd5b5061027561191a565b3480156105c1575f5ffd5b506105d56105d03660046145fc565b61199d565b60405161024d9190614c85565b3480156105ed575f5ffd5b50610239611aef565b348015610601575f5ffd5b506033546001600160a01b0316610239565b34801561061e575f5ffd5b50610627611afd565b60405161024d93929190614d7e565b348015610641575f5ffd5b506001610411565b348015610654575f5ffd5b506104bb61066336600461470f565b6001600160a01b03165f908152610101602052604090205490565b348015610689575f5ffd5b50610692611b7f565b60405161024d9190614da4565b3480156106aa575f5ffd5b5060fe54604080516080808201835260ff80546001600160401b038082168552600160401b8083048216602080880191909152600160801b8085048416888a0152600160c01b9485900484166060808a0191909152895160a081018b5261010054808716825294850486169381019390935290830490951615159781019790975266ffffffffffffff600160881b8204169387019390935291041690830152610751929183565b60405161024d93929190614ef2565b34801561076b575f5ffd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b34801561079e575f5ffd5b506102756107ad366004614aa0565b611d1f565b3480156107bd575f5ffd5b506102756107cc36600461476c565b611e42565b3480156107dc575f5ffd5b506106276127d8565b3480156107f0575f5ffd5b506065546001600160a01b0316610239565b34801561080d575f5ffd5b5061059561081c366004614f14565b612800565b34801561082c575f5ffd5b5061027561083b36600461470f565b6129bb565b34801561084b575f5ffd5b5061059561085a366004614f2e565b612a2c565b806001600160401b0316805f036108895760405163ec73295960e01b815260040160405180910390fd5b600261089760c95460ff1690565b60ff16036108b85760405163dfc60d8560e01b815260040160405180910390fd5b6108c26002612b74565b61010054600160801b900460ff16156108ee5760405163bae6e2a960e01b815260040160405180910390fd5b6109606108f9611b7f565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900482166080820152908516612b8a565b61096a6001612b74565b5050565b5f54610100900460ff161580801561098c57505f54600160ff909116105b806109a55750303b1580156109a557505f5460ff166001145b610a0d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610a2e575f805461ff0019166101001790555b610a3883836132c9565b8015610a7e575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050565b5f6002610a9260c95460ff1690565b60ff1614905090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610ae35760405162461bcd60e51b8152600401610a0490614f6a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b15613486565b6001600160a01b031614610b3b5760405162461bcd60e51b8152600401610a0490614fb6565b610b44816134a1565b604080515f80825260208201909252610b5f918391906134a9565b50565b61010054600160801b900460ff16610b8d5760405163bae6e2a960e01b815260040160405180910390fd5b610100805477ffffffffffffff00ffffffffffffffffffffffffffffffff16600160c01b426001600160401b03160260ff60801b19161790556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9060200160405180910390a1610c03335f613613565b565b610ca5604080516101e0810182525f80825260606020808401829052838501829052818401839052608080850184905260a080860185905260c0860185905260e08601859052610100860185905261012086018590526101408601859052610160860185905261018086018590526101a086018590528651908101875284815291820184905294810183905290810182905292830152906101c082015290565b604080516080810182525f8082526020820181905291810182905260608101919091526002610cd660c95460ff1690565b60ff1603610cf75760405163dfc60d8560e01b815260040160405180910390fd5b610d016002612b74565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900490911660808201525f610d6a611b7f565b9050806101c00151602001516001600160401b0316825f01516001600160401b03161015610dab57604051630db2616960e01b815260040160405180910390fd5b80602001518260200151016001600160401b0316825f01516001600160401b03161115610deb5760405163a464214b60e01b815260040160405180910390fd5b5f610df8888a018a615242565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ec35780516001600160a01b031615610e515760405163612e247160e11b815260040160405180910390fd5b33815260c0810151515115610e7957604051632677ebff60e01b815260040160405180910390fd5b60c081015160a001516001600160401b031615610ea9576040516307a4f83360e11b815260040160405180910390fd5b60c08101516001600160401b03431660a090910152610f34565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f0c57604051635e9e444960e01b815260040160405180910390fd5b80516001600160a01b0316610f34576040516310213ad760e01b815260040160405180910390fd5b60208101516001600160a01b0316610f575780516001600160a01b031660208201525b8060a0015115610f95576101005443600160881b90910466ffffffffffffff1603610f95576040516304f14fd760e11b815260040160405180910390fd5b8515801590610faf5760c08201515f60a090910152611040565b60c082015151515f03610fec578160c001516040015160ff165f03610fe75760405163f911438d60e01b815260040160405180910390fd5b611040565b60c08201516040015160ff161561101657604051632677ebff60e01b815260040160405180910390fd5b60c08201516020015160ff161561104057604051632677ebff60e01b815260040160405180910390fd5b5f60fb5f015f85604001516001600160401b03166001885f0151036001600160401b03168161107157611071615336565b6001600160401b039190068116825260208083019390935260409182015f908120610100808a01516101808b01516101a08c01518751610140810189528554815260018601548089169a82019a909a526001600160601b03600160401b808c0482169a83019a909a52600160a01b909a0490991660608a0152600285015480881660808b0152978804871660a08a0152600160801b880490961660c089015262ffffff600160c01b8804811660e08a015260ff600160d81b89041693890193909352600160e01b909604909116610120870152909550909384936111579389939261361b565b91509150604051806101e001604052805f5f1b81526020018660e0015181526020015f6001600160401b0381111561119157611191614ab7565b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b5081526020018761012001516020015160ff165f1b815260200186602001516001600160a01b03168152602001436001600160401b031681526020018660c0015160a001516001600160401b031681526020018660c001516060015163ffffffff1681526020018660c001516080015163ffffffff168152602001876080015163ffffffff1681526020015f6001600160401b03168152602001826001600160401b03168152602001836001600160401b03168152602001836001600160401b03164081526020018761012001518152509850886101a001515f5f1b036112b4576040516302b44f0160e41b815260040160405180910390fd5b856101c00151602001516001600160401b0316875f01516001600160401b0316146112f35760e08501515160018401546001600160401b031601611300565b60e0850151518751015f19015b6001600160401b03166101408a015260405161133590611323908d908d9061534a565b60405180910390208660c00151613a26565b6040808c0191909152908a52805160808101909152806113588b60a08301615359565b604051602081830303815290604052805190602001208152602001865f01516001600160a01b03168152602001885f01516001600160401b03168152602001426001600160401b031681525097505f60fb5f015f88604001516001600160401b03168a5f01516001600160401b0316816113d4576113d4615336565b066001600160401b031681526020019081526020015f209050886040516020016113fe919061536b565b60408051808303601f19018152919052805160209091012081558751600282018054600160c01b6001600160401b039384166001600160801b031990921691909117600160401b86851602176affffffffffffffffffffff60801b1916600160801b9387169390930262ffffff60c01b1916929092179190911763ffffffff60d81b1916905560e08601515160c088015160a0890151885191909202909101906114b1906001600160601b038316613b47565b6101408b01516001600160601b038216600160a01b026001600160401b03918216176001808501919091558a510181168a526101c0890151604001511615806115175750876101c00151604001516001600160401b0316895f01516001600160401b0316105b6115345760405163110f3dcf60e31b815260040160405180910390fd5b43896060019066ffffffffffffff16908166ffffffffffffff16815250507f9eb7fc80523943f28950bbb71ed6d584effe3e1e02ca4ddc8c86e5ee1558c0968b8b8f8f60405161158794939291906153a1565b60405180910390a1505050505050506115a281836001612b8a565b50506115ae6001612b74565b94509492505050565b61010054600160801b900460ff16156115e35760405163bae6e2a960e01b815260040160405180910390fd5b6115ed3382613c57565b335f90815261010160205260408120805490919061160c9084906153e7565b909155505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361165c5760405162461bcd60e51b8152600401610a0490614f6a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661168e613486565b6001600160a01b0316146116b45760405162461bcd60e51b8152600401610a0490614fb6565b6116bd826134a1565b61096a828260016134a9565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146117685760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a04565b505f5160206158bb5f395f51905f5290565b611782613e6a565b610c035f613ec4565b60655433906001600160a01b031681146117f95760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610a04565b610b5f81613ec4565b61180a61455d565b5f611813611b7f565b90505f81604001518461182691906153fa565b6001600160401b038082165f90815260fb6020526040902060028101549293509181169086161461186a57604051632785786f60e21b815260040160405180910390fd5b6002810154600160e01b900462ffffff1615611912576001600160401b0382165f90815260fd60209081526040808320600285810154600160e01b900462ffffff16855290835292819020815160c0810183528154815260018201549381019390935292830154908201526003909101546001600160a01b0381166060830152600160a01b810460ff1615156080830152600160a81b900465ffffffffffff1660a082015293505b505050919050565b61010054600160801b900460ff16156119465760405163bae6e2a960e01b815260040160405180910390fd5b61195f610100805460ff60801b1916600160801b179055565b6040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1610c03336001613613565b60408051610140810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052906119f5611b7f565b905060fb5f015f826040015185611a0c91906153fa565b6001600160401b03908116825260208083019390935260409182015f20825161014081018452815481526001820154808416958201959095526001600160601b03600160401b808704821695830195909552600160a01b90950490941660608501526002015480821660808501819052928104821660a0850152600160801b8104821660c085015262ffffff600160c01b8204811660e086015260ff600160d81b830416610100860152600160e01b9091041661012084015291935090841614611ae957604051632785786f60e21b815260040160405180910390fd5b50919050565b5f611af8613486565b905090565b5f5f611b0761455d565b61010054600160401b90046001600160401b03169250611b25611b7f565b6101c00151602001516001600160401b0316836001600160401b03161015611b6057604051632785786f60e21b815260040160405180910390fd5b611b698361199d565b602001519150611b7883611802565b9050909192565b604080516101e0810182525f80825260208083018290528284018290526060808401839052608080850184905260a080860185905260c0860185905260e086018590526101008601859052865190810187528481528084018590528087018590528083018590528082018590526101208601526101408501849052610160850184905261018085018490526101a0850184905285519081018652838152918201839052938101829052928301526101c081019190915250604080516101e08101825262028c5981526204f1a060208083019190915262057e408284015260106060808401829052630e4e1c006080808601919091526806c6b935b8bbd4000060a080870191909152674563918244f4000060c087015260e0860184905261010086018790528651908101875260088152604b81860152624c4b4081880152634fdec700818401526323c3460081830152610120860152611c2061014086018190526101608601526101808501929092526103006101a0850152845191820185525f808352928201839052938101829052928301526101c081019190915290565b61010054600160801b900460ff1615611d4b5760405163bae6e2a960e01b815260040160405180910390fd5b335f908152610101602052604090205481811015611d7c5760405163e92c469f60e01b815260040160405180910390fd5b60405182815233907f0d41118e36df44efb77a471fc49fb9c0be0406d802ef95520e9fbf606e65b4559060200160405180910390a2335f908152610101602052604081208054849290611dd0908490615427565b90915550507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615611e385761096a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384613edd565b61096a3383613f40565b6002611e5060c95460ff1690565b60ff1603611e715760405163dfc60d8560e01b815260040160405180910390fd5b611e7b6002612b74565b5f80611e89858701876154c4565b815191935091505f819003611eb157604051631b3dc8e560e11b815260040160405180910390fd5b81518114611ed2576040516341e3f65360e11b815260040160405180910390fd5b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b8304161580159484019490945266ffffffffffffff600160881b8304166060840152600160c01b90910416608082015290611f505760405163ab35696f60e01b815260040160405180910390fd5b5f611f59611b7f565b90505f836001600160401b03811115611f7457611f74614ab7565b604051908082528060200260200182016040528015611fad57816020015b611f9a6145a0565b815260200190600190039081611f925790505b5090505f5f5b858110156125bc575f888281518110611fce57611fce6155cd565b60200260200101519050846101c00151602001516001600160401b031681604001516001600160401b0316101561201857604051630db2616960e01b815260040160405180910390fd5b6101c0850151604001516001600160401b031615806120555750846101c00151604001516001600160401b031681604001516001600160401b0316105b6120725760405163110f3dcf60e31b815260040160405180910390fd5b85602001516001600160401b031681604001516001600160401b0316116120ac57604051632785786f60e21b815260040160405180910390fd5b855f01516001600160401b031681604001516001600160401b0316106120e557604051632785786f60e21b815260040160405180910390fd5b5f8883815181106120f8576120f86155cd565b60200260200101519050805f01515f5f1b03612127576040516319ead34160e01b815260040160405180910390fd5b60208101515f0361214b5760405163ac97cfc760e01b815260040160405180910390fd5b60408101515f0361216f57604051636c0118eb60e01b815260040160405180910390fd5b8160400151858481518110612186576121866155cd565b6020908102919091018101516001600160401b039092169091526040516121af9184910161536b565b604051602081830303815290604052805190602001208584815181106121d7576121d76155cd565b60200260200101516020018181525050808584815181106121fa576121fa6155cd565b6020026020010151604001819052505f8660400151836040015161221e91906153fa565b6001600160401b03165f81815260fb6020526040902080548851929350909188908790811061224f5761224f6155cd565b602002602001015160200151146122795760405163419b53b760e01b815260040160405180910390fd5b60028101545f90600160c01b900462ffffff1660018111156122fa5784515f85815260fd6020908152604080832060018452909152902054036122bf57600191506122fa565b60028162ffffff1611156122fa576040808701516001600160401b03165f90815260fc6020908152828220885183529052205462ffffff1691505b8162ffffff165f0361233b5760028301805462ffffff60c01b198116600160c01b9182900462ffffff90811660018101909116909202179091559150612463565b5f84815260fd6020908152604080832062ffffff86168452825291829020825160c081018452815481526001820154928101839052600282015493810193909352600301546001600160a01b0381166060840152600160a01b810460ff1615156080840152600160a81b900465ffffffffffff1660a083015215612461575f866020015182602001511480156123e45750604082015115806123e4575086604001518260400151145b905080612454575f86815260fd6020908152604080832062ffffff88168452909152808220600190810192909255898101519051919b507fa05e896ff20170d694345384140d3397c040699d982fd6bdd73028e3d311f4449161244b919085908b906155e1565b60405180910390a15b50505050505050506125b4565b505b5f84815260fd6020908152604080832062ffffff8616845282529182902090870151600182015560e08c01519188015190916124a49160ff909116906153fa565b6001600160401b0316156124b8575f6124be565b85604001515b60028201556101408b015160808d015160608901515f9261ffff16916124f0916001600160401b039081169116613f4b565b60038401805460ff60a01b191691909201421115600160a01b81029190911790915590508061251f5733612525565b87602001515b6003830180546001600160a01b0392909216600166ffffffffffff0160a01b031990921691909117600160a81b4265ffffffffffff160217905562ffffff841660010361257557865182556125ab565b6040888101516001600160401b03165f90815260fc60209081528282208a518352905220805462ffffff191662ffffff86161790555b50505050505050505b600101611fb3565b506040516326c9adc960e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b26b7249061260d9085908d908d90600401615621565b5f604051808303815f87803b158015612624575f5ffd5b505af1158015612636573d5f5f3e3d5ffd5b505050505f856001600160401b0381111561265357612653614ab7565b60405190808252806020026020018201604052801561267c578160200160208202803683370190505b5090505f5b868110156126d95788818151811061269b5761269b6155cd565b6020026020010151604001518282815181106126b9576126b96155cd565b6001600160401b0390921660209283029190910190910152600101612681565b507fc99f03c7db71a9e8c78654b1d2f77378b413cc979a02fa22dc9d39702afa92bc7f0000000000000000000000000000000000000000000000000000000000000000828960405161272d939291906156a2565b60405180910390a15080156127b657612755610100805460ff60801b1916600160801b179055565b6040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a16127c1565b6127c1838587612b8a565b505050505050506127d26001612b74565b50505050565b5f5f6127e261455d565b60ff54600160801b90046001600160401b03169250611b698361199d565b61280861455d565b5f612811611b7f565b90505f81604001518561282491906153fa565b6001600160401b039081165f81815260fb6020526040902060028101549193509187811691161461286857604051632785786f60e21b815260040160405180910390fd5b60028101545f906001600160c01b90910462ffffff1611156128ef575f83815260fd60209081526040808320600184529091529020548690036128ad575060016128ef565b600282810154600160c01b900462ffffff1611156128ef57506001600160401b0386165f90815260fc6020908152604080832088845290915290205462ffffff165b62ffffff8116158015906129165750600282015462ffffff600160c01b9091048116908216105b61293357604051631daf8e2f60e21b815260040160405180910390fd5b5f92835260fd6020908152604080852062ffffff909316855291815292819020815160c08101835281548152600182015494810194909452600281015491840191909152600301546001600160a01b038116606084015260ff600160a01b8204161515608084015265ffffffffffff600160a81b9091041660a0830152509150505b92915050565b6129c3613e6a565b606580546001600160a01b0383166001600160a01b031990911681179091556129f46033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b612a3461455d565b5f612a3d611b7f565b90505f816040015185612a5091906153fa565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612a9457604051632785786f60e21b815260040160405180910390fd5b8462ffffff165f03612ab957604051631daf8e2f60e21b815260040160405180910390fd5b600281015462ffffff600160c01b909104811690861610612aed57604051631daf8e2f60e21b815260040160405180910390fd5b505f90815260fd6020908152604080832062ffffff87168452825291829020825160c081018452815481526001820154928101929092526002810154928201929092526003909101546001600160a01b038116606083015260ff600160a01b8204161515608083015265ffffffffffff600160a81b9091041660a082015291505092915050565b60c9805460ff191660ff92909216919091179055565b6020808301516101c0850151909101515f906001600160401b0381161580612bc75750600181036001600160401b0316836001600160401b031610155b91505080156131ef575f856040015183612be191906153fa565b6001600160401b03165f81815260fb60209081526040808320600281015460fd8452828520600160e01b90910462ffffff168086529084528285206001015483516080810185528681529485018690529284018590526060840194909452939450905f612c848a5f01516001600160401b03168b602001516001600160401b03168b8e606001516001600160401b03160201600101613f6290919063ffffffff16565b90508a6101c00151604001516001600160401b03165f14612cc0576101c08b015160400151612cbd9082906001600160401b0316613f62565b90505b612cc98861575a565b97505b80886001600160401b03161015612f125760408b0151612cec90896153fa565b6001600160401b03165f81815260fb60205260409020600281015461010054929850909650600160c01b900462ffffff1690600160801b900460ff1615612d335750612f12565b60018162ffffff1611612d465750612f12565b5f87815260fd602090815260408083206001845290915290208054859003612d715760019550612de5565b60028262ffffff161115612dde576001600160401b038a165f90815260fc6020908152604080832088845290915281205462ffffff1690819003612db757505050612f12565b5f89815260fd6020908152604080832062ffffff8516845290915290209096509050612de5565b5050612f12565b60018101545f819003612dfa57505050612f12565b428e610160015162ffffff168360030160159054906101000a900465ffffffffffff160165ffffffffffff161115612e3457505050612f12565b8095505f8260030160149054906101000a900460ff16612e74576001890154612e6f90600290600160a01b90046001600160601b0316615784565b612e8a565b6001890154600160a01b90046001600160601b03165b6003840154909150612eae906001600160a01b03166001600160601b038316613f70565b60e08f0151612ec09060ff168d6153fa565b6001600160401b03165f03612efd576001600160401b03808d16875260018a015416602087015262ffffff88166040870152600283015460608701525b5050505087612f0b9061575a565b9750612ccc565b87600190039750876001600160401b03168a602001516001600160401b0316146131e8576001600160401b03881660208b0181905260408c015160fb915f91612f5a916153fa565b6001600160401b03908116825260208083019390935260409182015f2060028101805462ffffff60e01b1916600160e01b62ffffff8b16021790558d8401518351921682529281018690529196507fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a0910160405180910390a181516001600160401b0316156131e85789602001516001600160401b0316825f01516001600160401b0316146130575760408b0151825160fb915f9161301991906153fa565b6001600160401b031681526020019081526020015f209450816040015185600201601c6101000a81548162ffffff021916908362ffffff1602179055505b6040805160808101825260ff80546001600160401b03808216808552600160401b80840483166020870181905260028d0154841687890181905242909416606088018190526001600160801b03199095169092179102176fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b90910217905590517fcfbcbd3a81b749a28e6289bc350363f1949bb0a58ba7120d8dd4ef4b3617dff89061310c90839061465f565b60405180910390a18b51602084015160608501516040516313e4299d60e21b81526001600160401b0393841660048201527f73e6d340850343cc6f001515dc593377337c95a6ffe034fe1e844d4dab5da169602482015292909116604483015260648201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634f90a674906084016020604051808303815f875af11580156131c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e591906157b1565b50505b5050505050505b83516101008054602087015160408089015160608a015160808b01516001600160401b03908116600160c01b026001600160c01b0366ffffffffffffff909316600160881b0266ffffffffffffff60881b19941515600160801b029490941667ffffffffffffffff60801b19968316600160401b026001600160801b031990981692909916919091179590951793909316959095179490941716179055517f7156d026e6a3864d290a971910746f96477d3901e33c4b2375e4ee00dabe7d87906132ba9086906146c3565b60405180910390a15050505050565b5f54610100900460ff166132ef5760405162461bcd60e51b8152600401610a04906157c8565b6132f882613fd7565b5f8190036133195760405163cd21cd4360e01b815260040160405180910390fd5b7f62706e85402cc48a87d49cd7385662e24ad19ed753c6d6f4d464b32120eeb9938190555f80805260fb602090815260017fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d89758181557fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8977805477ffffffffffffffffffffffffffffffff00000000000000001916600160401b426001600160401b039081169190910267ffffffffffffffff60801b191691909117600160801b439283169081029190911766ffffff00ffffff60c01b1916638000000160c11b1790925560ff805467ffffffffffffffff199081169093179055610100805477ffffffffffffff000000000000000000ffffffffffffffff1916600160881b66ffffffffffffff909316929092029092161790921790915560408051938452918301849052917fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a09101610a75565b5f5160206158bb5f395f51905f52546001600160a01b031690565b610b5f613e6a565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156134dc57610a7e83614035565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613536575060408051601f3d908101601f19168201909252613533918101906157b1565b60015b6135995760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a04565b5f5160206158bb5f395f51905f5281146136075760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a04565b50610a7e8383836140d0565b61096a613e6a565b60e0850151515f9081908082036136455760405163feb32ebd60e01b815260040160405180910390fd5b8461ffff1681111561366a57604051633f836abd60e11b815260040160405180910390fd5b87606001516001600160401b03165f0361368957600143039250613729565b43878960600151016001600160401b031610156136b9576040516311abefd560e21b815260040160405180910390fd5b4388606001516001600160401b0316106136e657604051630fe29b5f60e31b815260040160405180910390fd5b8360c001516001600160401b031688606001516001600160401b0316101561372157604051637f0b4c5960e11b815260040160405180910390fd5b876060015192505b60808801516001600160401b031615613746578760800151613748565b425b915042826001600160401b0316111561377457604051633d32ffdb60e01b815260040160405180910390fd5b8760e001515f8151811061378a5761378a6155cd565b60200260200101516020015160ff165f146137b857604051630649ac0f60e31b815260040160405180910390fd5b5f5f5b82811015613944578960e0015181815181106137d9576137d96155cd565b60200260200101516020015160ff16820191505f8a60e001518281518110613803576138036155cd565b602002602001015160400151519050805f0361381f575061393c565b8860ff168111156138435760405163c577d38360e01b815260040160405180910390fd5b5f5b81811015613939577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638e899f808d60e001518581518110613892576138926155cd565b60200260200101516040015183815181106138af576138af6155cd565b60200260200101516040518263ffffffff1660e01b81526004016138d591815260200190565b602060405180830381865afa1580156138f0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139149190615813565b61393157604051634300d2ff60e11b815260040160405180910390fd5b600101613845565b50505b6001016137bb565b50806001600160401b0316836001600160401b0316101561397857604051630cccd76960e11b815260040160405180910390fd5b808303426001600160401b03808316908b16600c020110156139ad57604051630cccd76960e11b815260040160405180910390fd5b8560a001516001600160401b0316816001600160401b031610156139e45760405163084e26e160e21b815260040160405180910390fd5b60408a015115806139f95750855160408b0151145b613a19576040516001629d908960e01b0319815260040160405180910390fd5b5050509550959350505050565b8051515f9060609015613a3b57508151613ac4565b604083015160ff16806001600160401b03811115613a5b57613a5b614ab7565b604051908082528060200260200182016040528015613a84578160200160208202803683370190505b5091505f5b81811015613ac15780856020015160ff160149838281518110613aae57613aae6155cd565b6020908102919091010152600101613a89565b50505b80515f5b81811015613b1357828181518110613ae257613ae26155cd565b60200260200101515f5f1b03613b0b57604051637bb2fa2f60e11b815260040160405180910390fd5b600101613ac8565b508482604051602001613b2792919061582e565b604051602081830303815290604052805190602001209250509250929050565b805f03613b52575050565b6001600160a01b0382165f9081526101016020526040902054818110613b94576001600160a01b0383165f908152610101602052604090208282039055613c0f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615613bf6575f613bce8484613c57565b9050828114613bf05760405163e92c469f60e01b815260040160405180910390fd5b50613c0f565b60405163e92c469f60e01b815260040160405180910390fd5b826001600160a01b03167f85f32beeaff2d0019a8d196f06790c9a652191759c46643311344fd38920423c83604051613c4a91815260200190565b60405180910390a2505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615613dff573415613ca65760405163798ee6f160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015613d0a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d2e91906157b1565b9050613d656001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168530866140f4565b6040516370a0823160e01b815230600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015613dc9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ded91906157b1565b613df79190615427565b915050613e21565b813414613e1e5760405162c56beb60e11b815260040160405180910390fd5b50805b826001600160a01b03167f8ed8c6869618197b68315ade66e75ed3906c97b111fa3ab81e5760046825c7db82604051613e5c91815260200190565b60405180910390a292915050565b6033546001600160a01b03163314610c035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a04565b606580546001600160a01b0319169055610b5f8161412c565b6040516001600160a01b038316602482015260448101829052610a7e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261417d565b61096a82825a614250565b5f818311613f595781613f5b565b825b9392505050565b5f818311611ae95782613f5b565b805f03613f7b575050565b6001600160a01b0382165f818152610101602052604090819020805484019055517f6de6fe586196fa05b73b973026c5fda3968a2933989bff3a0b6bd57644fab60690613fcb9084815260200190565b60405180910390a25050565b5f54610100900460ff16613ffd5760405162461bcd60e51b8152600401610a04906157c8565b614005614293565b6140236001600160a01b0382161561401d5781613ec4565b33613ec4565b5060c9805461ff001916610100179055565b6001600160a01b0381163b6140a25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a04565b5f5160206158bb5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b6140d9836142b9565b5f825111806140e55750805b15610a7e576127d283836142f8565b6040516001600160a01b03808516602483015283166044820152606481018290526127d29085906323b872dd60e01b90608401613f09565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6141d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661431d9092919063ffffffff16565b905080515f14806141f15750808060200190518101906141f19190615813565b610a7e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a04565b815f0361425c57505050565b61427683838360405180602001604052805f815250614333565b610a7e57604051634c67134d60e11b815260040160405180910390fd5b5f54610100900460ff16610c035760405162461bcd60e51b8152600401610a04906157c8565b6142c281614035565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060613f5b83836040518060600160405280602781526020016158db60279139614370565b606061432b84845f856143e4565b949350505050565b5f6001600160a01b03851661435b57604051634c67134d60e11b815260040160405180910390fd5b5f5f835160208501878988f195945050505050565b60605f5f856001600160a01b03168560405161438c919061586f565b5f60405180830381855af49150503d805f81146143c4576040519150601f19603f3d011682016040523d82523d5f602084013e6143c9565b606091505b50915091506143da868383876144bb565b9695505050505050565b6060824710156144455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a04565b5f5f866001600160a01b03168587604051614460919061586f565b5f6040518083038185875af1925050503d805f811461449a576040519150601f19603f3d011682016040523d82523d5f602084013e61449f565b606091505b50915091506144b0878383876144bb565b979650505050505050565b606083156145295782515f03614522576001600160a01b0385163b6145225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a04565b508161432b565b61432b838381511561453e5781518083602001fd5b8060405162461bcd60e51b8152600401610a049190615885565b905290565b6040518060c001604052805f81526020015f81526020015f81526020015f6001600160a01b031681526020015f151581526020015f65ffffffffffff1681525090565b60405180606001604052805f6001600160401b031681526020015f815260200161455860405180606001604052805f81526020015f81526020015f81525090565b80356001600160401b03811681146145f7575f5ffd5b919050565b5f6020828403121561460c575f5ffd5b613f5b826145e1565b6001600160401b0381511682526001600160401b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b608081016129b58284614615565b6001600160401b0381511682526001600160401b03602082015116602083015260408101511515604083015266ffffffffffffff60608201511660608301526001600160401b0360808201511660808301525050565b60a081016129b5828461466d565b80356001600160a01b03811681146145f7575f5ffd5b5f5f604083850312156146f8575f5ffd5b614701836146d1565b946020939093013593505050565b5f6020828403121561471f575f5ffd5b613f5b826146d1565b5f5f83601f840112614738575f5ffd5b5081356001600160401b0381111561474e575f5ffd5b602083019150836020828501011115614765575f5ffd5b9250929050565b5f5f5f5f6040858703121561477f575f5ffd5b84356001600160401b03811115614794575f5ffd5b6147a087828801614728565b90955093505060208501356001600160401b038111156147be575f5ffd5b6147ca87828801614728565b95989497509550505050565b5f8151808452602084019350602083015f5b828110156148065781518652602095860195909101906001016147e8565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b8381101561488657601f19858403018852815161ffff815116845260ff6020820151166020850152604081015190506060604085015261486f60608501826147d6565b6020998a019990945092909201915060010161482c565b50909695505050505050565b60ff815116825260ff602082015116602083015263ffffffff60408201511660408301526001600160401b03606082015116606083015263ffffffff60808201511660808301525050565b805182525f602082015161026060208501526148fd610260850182614810565b90506040830151848203604086015261491682826147d6565b91505060608301516060850152608083015161493d60808601826001600160a01b03169052565b5060a083015161495860a08601826001600160401b03169052565b5060c083015161497360c08601826001600160401b03169052565b5060e083015161498b60e086018263ffffffff169052565b506101008301516149a561010086018263ffffffff169052565b506101208301516149bf61012086018263ffffffff169052565b506101408301516149dc6101408601826001600160401b03169052565b506101608301516149f96101608601826001600160401b03169052565b50610180830151614a166101808601826001600160401b03169052565b506101a08301516101a08501526101c0830151614a376101c0860182614892565b509392505050565b8051825260018060a01b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60a081525f614a9160a08301856148dd565b9050613f5b6020830184614a3f565b5f60208284031215614ab0575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715614aed57614aed614ab7565b60405290565b604051606081016001600160401b0381118282101715614aed57614aed614ab7565b60405161010081016001600160401b0381118282101715614aed57614aed614ab7565b604051608081016001600160401b0381118282101715614aed57614aed614ab7565b604051601f8201601f191681016001600160401b0381118282101715614b8257614b82614ab7565b604052919050565b5f5f60408385031215614b9b575f5ffd5b614ba4836146d1565b915060208301356001600160401b03811115614bbe575f5ffd5b8301601f81018513614bce575f5ffd5b80356001600160401b03811115614be757614be7614ab7565b614bfa601f8201601f1916602001614b5a565b818152866020838501011115614c0e575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b8051825260208082015190830152604080820151908301526060808201516001600160a01b03169083015260808082015115159083015260a09081015165ffffffffffff16910152565b60c081016129b58284614c2d565b81518152602080830151610140830191614ca9908401826001600160401b03169052565b506040830151614cc460408401826001600160601b03169052565b506060830151614cdf60608401826001600160601b03169052565b506080830151614cfa60808401826001600160401b03169052565b5060a0830151614d1560a08401826001600160401b03169052565b5060c0830151614d3060c08401826001600160401b03169052565b5060e0830151614d4760e084018262ffffff169052565b50610100830151614d5e61010084018260ff169052565b50610120830151614d7761012084018262ffffff169052565b5092915050565b6001600160401b03848116825283166020820152610100810161432b6040830184614c2d565b81516001600160401b031681526102c081016020830151614dd060208401826001600160401b03169052565b506040830151614deb60408401826001600160401b03169052565b506060830151614e0660608401826001600160401b03169052565b506080830151614e1e608084018263ffffffff169052565b5060a0830151614e3960a08401826001600160601b03169052565b5060c0830151614e5460c08401826001600160601b03169052565b5060e0830151614e6960e084018260ff169052565b50610100830151614e866101008401826001600160401b03169052565b50610120830151614e9b610120840182614892565b5061014083015161ffff9081166101c08481019190915261016085015162ffffff166101e085015261018085015160ff166102008501526101a0850151909116610220840152830151614d77610240840182614615565b8381526101408101614f076020830185614615565b61432b60a083018461466d565b5f5f60408385031215614f25575f5ffd5b614701836145e1565b5f5f60408385031215614f3f575f5ffd5b614f48836145e1565b9150602083013562ffffff81168114614f5f575f5ffd5b809150509250929050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b8015158114610b5f575f5ffd5b80356145f781615002565b5f6001600160401b0382111561503257615032614ab7565b5060051b60200190565b5f82601f83011261504b575f5ffd5b813561505e6150598261501a565b614b5a565b8082825260208201915060208360051b86010192508583111561507f575f5ffd5b602085015b8381101561509c578035835260209283019201615084565b5095945050505050565b803560ff811681146145f7575f5ffd5b803563ffffffff811681146145f7575f5ffd5b5f60c082840312156150d9575f5ffd5b6150e1614acb565b905081356001600160401b038111156150f8575f5ffd5b6151048482850161503c565b825250615113602083016150a6565b6020820152615124604083016150a6565b6040820152615135606083016150b6565b6060820152615146608083016150b6565b608082015261515760a083016145e1565b60a082015292915050565b5f82601f830112615171575f5ffd5b813561517f6150598261501a565b8082825260208201915060208360051b8601019250858311156151a0575f5ffd5b602085015b8381101561509c5780356001600160401b038111156151c2575f5ffd5b86016060818903601f190112156151d7575f5ffd5b6151df614af3565b602082013561ffff811681146151f3575f5ffd5b8152615201604083016150a6565b602082015260608201356001600160401b0381111561521e575f5ffd5b61522d8a60208386010161503c565b604083015250845250602092830192016151a5565b5f60208284031215615252575f5ffd5b81356001600160401b03811115615267575f5ffd5b82016101008185031215615279575f5ffd5b615281614b15565b61528a826146d1565b8152615298602083016146d1565b6020820152604082810135908201526152b3606083016145e1565b60608201526152c4608083016145e1565b60808201526152d560a0830161500f565b60a082015260c08201356001600160401b038111156152f2575f5ffd5b6152fe868285016150c9565b60c08301525060e08201356001600160401b0381111561531c575f5ffd5b61532886828501615162565b60e083015250949350505050565b634e487b7160e01b5f52601260045260245ffd5b818382375f9101908152919050565b602081525f613f5b60208301846148dd565b608081016129b58284614a3f565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60c081525f6153b360c08301876148dd565b6153c06020840187614a3f565b82810360a08401526144b0818587615379565b634e487b7160e01b5f52601160045260245ffd5b808201808211156129b5576129b56153d3565b5f6001600160401b0383168061541257615412615336565b806001600160401b0384160691505092915050565b818103818111156129b5576129b56153d3565b5f82601f830112615449575f5ffd5b81356154576150598261501a565b80828252602082019150602060608402860101925085831115615478575f5ffd5b602085015b8381101561509c5760608188031215615494575f5ffd5b61549c614af3565b813581526020808301358183015260408084013590830152908452929092019160600161547d565b5f5f604083850312156154d5575f5ffd5b82356001600160401b038111156154ea575f5ffd5b8301601f810185136154fa575f5ffd5b80356155086150598261501a565b8082825260208201915060208360071b850101925087831115615529575f5ffd5b6020840193505b8284101561559a5760808489031215615547575f5ffd5b61554f614b38565b8435815261555f602086016146d1565b6020820152615570604086016145e1565b6040820152615581606086016145e1565b6060820152825260809390930192602090910190615530565b945050505060208301356001600160401b038111156155b7575f5ffd5b6155c38582860161543a565b9150509250929050565b634e487b7160e01b5f52603260045260245ffd5b6001600160401b038416815261014081016155ff6020830185614c2d565b825160e08301526020830151610100830152604083015161012083015261432b565b604080825284519082018190525f9060208601906060840190835b8181101561568d57835180516001600160401b03168452602080820151818601526040918201518051838701528082015160608701529091015160808501529093019260a09092019160010161563c565b505083810360208501526144b0818688615379565b6001600160a01b03841681526060602080830182905284519183018290525f91908501906080840190835b818110156156f45783516001600160401b03168352602093840193909201916001016156cd565b50508381036040850152845180825260209182019250908501905f5b8181101561574d576157378484518051825260208082015190830152604090810151910152565b6060939093019260209290920191600101615710565b5091979650505050505050565b5f6001600160401b0382166001600160401b03810361577b5761577b6153d3565b60010192915050565b5f6001600160601b0383168061579c5761579c615336565b806001600160601b0384160491505092915050565b5f602082840312156157c1575f5ffd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f60208284031215615823575f5ffd5b8151613f5b81615002565b5f60408201848352604060208401528084518083526060850191506020860192505f5b81811015614886578351835260209384019390920191600101615851565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208a248fa4f6aa1c15012e381ef792fa4f3dae598a47a365d04f282c0994ebd88e64736f6c634300081b003300000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c5800000000000000000000000034fad38c354f51a1a641b299bec262aadbdcc8cc

Deployed ByteCode

0x608060405260043610610207575f3560e01c80637e7501dc11610113578063c19d93fb1161009d578063cee1136c1161006d578063cee1136c146107d1578063e30c3978146107e5578063e8353dc014610802578063f2fde38b14610821578063ff109f5914610840575f5ffd5b8063c19d93fb1461069f578063c28f439214610760578063c3daab9614610793578063c9cc2843146107b2575f5ffd5b80638da5cb5b116100e35780638da5cb5b146105f65780639c43647314610613578063a4b2355414610636578063a9c2c83514610649578063b932bf2b1461067e575f5ffd5b80637e7501dc146105765780638456cb59146105a2578063888775d9146105b65780638abf6077146105e2575f5ffd5b806347faad141161019457806359df11181161016457806359df1118146104c95780635c975abb146104fc57806362d094531461051b578063715018a61461054e57806379ba509714610562575f5ffd5b806347faad14146104545780634dcb05f9146104815780634f1ef2861461049457806352d1902d146104a7575f5ffd5b80632b7ac3f3116101da5780632b7ac3f3146103ab5780632cc0b254146103de5780633075db56146103fd5780633659cfe6146104215780633f4ba83a14610440575f5ffd5b806304f3bcec1461020b5780630cc62b421461025657806312ad809c1461027757806326baca1c14610301575b5f5ffd5b348015610216575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b348015610261575f5ffd5b506102756102703660046145fc565b61085f565b005b348015610282575f5ffd5b506102f4604080516080810182525f808252602082018190529181018290526060810191909152506040805160808101825260ff546001600160401b038082168352600160401b820481166020840152600160801b8204811693830193909352600160c01b9004909116606082015290565b60405161024d919061465f565b34801561030c575f5ffd5b5061039e6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b9004909116608082015290565b60405161024d91906146c3565b3480156103b6575f5ffd5b506102397f0000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a81565b3480156103e9575f5ffd5b506102756103f83660046146e7565b61096e565b348015610408575f5ffd5b50610411610a83565b604051901515815260200161024d565b34801561042c575f5ffd5b5061027561043b36600461470f565b610a9b565b34801561044b575f5ffd5b50610275610b62565b34801561045f575f5ffd5b5061047361046e36600461476c565b610c05565b60405161024d929190614a7f565b61027561048f366004614aa0565b6115b7565b6102756104a2366004614b8a565b611614565b3480156104b2575f5ffd5b506104bb6116c9565b60405190815260200161024d565b3480156104d4575f5ffd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b348015610507575f5ffd5b5061010054600160801b900460ff16610411565b348015610526575f5ffd5b506102397f00000000000000000000000034fad38c354f51a1a641b299bec262aadbdcc8cc81565b348015610559575f5ffd5b5061027561177a565b34801561056d575f5ffd5b5061027561178b565b348015610581575f5ffd5b506105956105903660046145fc565b611802565b60405161024d9190614c77565b3480156105ad575f5ffd5b5061027561191a565b3480156105c1575f5ffd5b506105d56105d03660046145fc565b61199d565b60405161024d9190614c85565b3480156105ed575f5ffd5b50610239611aef565b348015610601575f5ffd5b506033546001600160a01b0316610239565b34801561061e575f5ffd5b50610627611afd565b60405161024d93929190614d7e565b348015610641575f5ffd5b506001610411565b348015610654575f5ffd5b506104bb61066336600461470f565b6001600160a01b03165f908152610101602052604090205490565b348015610689575f5ffd5b50610692611b7f565b60405161024d9190614da4565b3480156106aa575f5ffd5b5060fe54604080516080808201835260ff80546001600160401b038082168552600160401b8083048216602080880191909152600160801b8085048416888a0152600160c01b9485900484166060808a0191909152895160a081018b5261010054808716825294850486169381019390935290830490951615159781019790975266ffffffffffffff600160881b8204169387019390935291041690830152610751929183565b60405161024d93929190614ef2565b34801561076b575f5ffd5b506102397f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c5881565b34801561079e575f5ffd5b506102756107ad366004614aa0565b611d1f565b3480156107bd575f5ffd5b506102756107cc36600461476c565b611e42565b3480156107dc575f5ffd5b506106276127d8565b3480156107f0575f5ffd5b506065546001600160a01b0316610239565b34801561080d575f5ffd5b5061059561081c366004614f14565b612800565b34801561082c575f5ffd5b5061027561083b36600461470f565b6129bb565b34801561084b575f5ffd5b5061059561085a366004614f2e565b612a2c565b806001600160401b0316805f036108895760405163ec73295960e01b815260040160405180910390fd5b600261089760c95460ff1690565b60ff16036108b85760405163dfc60d8560e01b815260040160405180910390fd5b6108c26002612b74565b61010054600160801b900460ff16156108ee5760405163bae6e2a960e01b815260040160405180910390fd5b6109606108f9611b7f565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900482166080820152908516612b8a565b61096a6001612b74565b5050565b5f54610100900460ff161580801561098c57505f54600160ff909116105b806109a55750303b1580156109a557505f5460ff166001145b610a0d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610a2e575f805461ff0019166101001790555b610a3883836132c9565b8015610a7e575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050565b5f6002610a9260c95460ff1690565b60ff1614905090565b6001600160a01b037f000000000000000000000000560da67b9c65866d0a764f4a861e3ceba5e0d5be163003610ae35760405162461bcd60e51b8152600401610a0490614f6a565b7f000000000000000000000000560da67b9c65866d0a764f4a861e3ceba5e0d5be6001600160a01b0316610b15613486565b6001600160a01b031614610b3b5760405162461bcd60e51b8152600401610a0490614fb6565b610b44816134a1565b604080515f80825260208201909252610b5f918391906134a9565b50565b61010054600160801b900460ff16610b8d5760405163bae6e2a960e01b815260040160405180910390fd5b610100805477ffffffffffffff00ffffffffffffffffffffffffffffffff16600160c01b426001600160401b03160260ff60801b19161790556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9060200160405180910390a1610c03335f613613565b565b610ca5604080516101e0810182525f80825260606020808401829052838501829052818401839052608080850184905260a080860185905260c0860185905260e08601859052610100860185905261012086018590526101408601859052610160860185905261018086018590526101a086018590528651908101875284815291820184905294810183905290810182905292830152906101c082015290565b604080516080810182525f8082526020820181905291810182905260608101919091526002610cd660c95460ff1690565b60ff1603610cf75760405163dfc60d8560e01b815260040160405180910390fd5b610d016002612b74565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900490911660808201525f610d6a611b7f565b9050806101c00151602001516001600160401b0316825f01516001600160401b03161015610dab57604051630db2616960e01b815260040160405180910390fd5b80602001518260200151016001600160401b0316825f01516001600160401b03161115610deb5760405163a464214b60e01b815260040160405180910390fd5b5f610df8888a018a615242565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ec35780516001600160a01b031615610e515760405163612e247160e11b815260040160405180910390fd5b33815260c0810151515115610e7957604051632677ebff60e01b815260040160405180910390fd5b60c081015160a001516001600160401b031615610ea9576040516307a4f83360e11b815260040160405180910390fd5b60c08101516001600160401b03431660a090910152610f34565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f0c57604051635e9e444960e01b815260040160405180910390fd5b80516001600160a01b0316610f34576040516310213ad760e01b815260040160405180910390fd5b60208101516001600160a01b0316610f575780516001600160a01b031660208201525b8060a0015115610f95576101005443600160881b90910466ffffffffffffff1603610f95576040516304f14fd760e11b815260040160405180910390fd5b8515801590610faf5760c08201515f60a090910152611040565b60c082015151515f03610fec578160c001516040015160ff165f03610fe75760405163f911438d60e01b815260040160405180910390fd5b611040565b60c08201516040015160ff161561101657604051632677ebff60e01b815260040160405180910390fd5b60c08201516020015160ff161561104057604051632677ebff60e01b815260040160405180910390fd5b5f60fb5f015f85604001516001600160401b03166001885f0151036001600160401b03168161107157611071615336565b6001600160401b039190068116825260208083019390935260409182015f908120610100808a01516101808b01516101a08c01518751610140810189528554815260018601548089169a82019a909a526001600160601b03600160401b808c0482169a83019a909a52600160a01b909a0490991660608a0152600285015480881660808b0152978804871660a08a0152600160801b880490961660c089015262ffffff600160c01b8804811660e08a015260ff600160d81b89041693890193909352600160e01b909604909116610120870152909550909384936111579389939261361b565b91509150604051806101e001604052805f5f1b81526020018660e0015181526020015f6001600160401b0381111561119157611191614ab7565b6040519080825280602002602001820160405280156111ba578160200160208202803683370190505b5081526020018761012001516020015160ff165f1b815260200186602001516001600160a01b03168152602001436001600160401b031681526020018660c0015160a001516001600160401b031681526020018660c001516060015163ffffffff1681526020018660c001516080015163ffffffff168152602001876080015163ffffffff1681526020015f6001600160401b03168152602001826001600160401b03168152602001836001600160401b03168152602001836001600160401b03164081526020018761012001518152509850886101a001515f5f1b036112b4576040516302b44f0160e41b815260040160405180910390fd5b856101c00151602001516001600160401b0316875f01516001600160401b0316146112f35760e08501515160018401546001600160401b031601611300565b60e0850151518751015f19015b6001600160401b03166101408a015260405161133590611323908d908d9061534a565b60405180910390208660c00151613a26565b6040808c0191909152908a52805160808101909152806113588b60a08301615359565b604051602081830303815290604052805190602001208152602001865f01516001600160a01b03168152602001885f01516001600160401b03168152602001426001600160401b031681525097505f60fb5f015f88604001516001600160401b03168a5f01516001600160401b0316816113d4576113d4615336565b066001600160401b031681526020019081526020015f209050886040516020016113fe919061536b565b60408051808303601f19018152919052805160209091012081558751600282018054600160c01b6001600160401b039384166001600160801b031990921691909117600160401b86851602176affffffffffffffffffffff60801b1916600160801b9387169390930262ffffff60c01b1916929092179190911763ffffffff60d81b1916905560e08601515160c088015160a0890151885191909202909101906114b1906001600160601b038316613b47565b6101408b01516001600160601b038216600160a01b026001600160401b03918216176001808501919091558a510181168a526101c0890151604001511615806115175750876101c00151604001516001600160401b0316895f01516001600160401b0316105b6115345760405163110f3dcf60e31b815260040160405180910390fd5b43896060019066ffffffffffffff16908166ffffffffffffff16815250507f9eb7fc80523943f28950bbb71ed6d584effe3e1e02ca4ddc8c86e5ee1558c0968b8b8f8f60405161158794939291906153a1565b60405180910390a1505050505050506115a281836001612b8a565b50506115ae6001612b74565b94509492505050565b61010054600160801b900460ff16156115e35760405163bae6e2a960e01b815260040160405180910390fd5b6115ed3382613c57565b335f90815261010160205260408120805490919061160c9084906153e7565b909155505050565b6001600160a01b037f000000000000000000000000560da67b9c65866d0a764f4a861e3ceba5e0d5be16300361165c5760405162461bcd60e51b8152600401610a0490614f6a565b7f000000000000000000000000560da67b9c65866d0a764f4a861e3ceba5e0d5be6001600160a01b031661168e613486565b6001600160a01b0316146116b45760405162461bcd60e51b8152600401610a0490614fb6565b6116bd826134a1565b61096a828260016134a9565b5f306001600160a01b037f000000000000000000000000560da67b9c65866d0a764f4a861e3ceba5e0d5be16146117685760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a04565b505f5160206158bb5f395f51905f5290565b611782613e6a565b610c035f613ec4565b60655433906001600160a01b031681146117f95760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610a04565b610b5f81613ec4565b61180a61455d565b5f611813611b7f565b90505f81604001518461182691906153fa565b6001600160401b038082165f90815260fb6020526040902060028101549293509181169086161461186a57604051632785786f60e21b815260040160405180910390fd5b6002810154600160e01b900462ffffff1615611912576001600160401b0382165f90815260fd60209081526040808320600285810154600160e01b900462ffffff16855290835292819020815160c0810183528154815260018201549381019390935292830154908201526003909101546001600160a01b0381166060830152600160a01b810460ff1615156080830152600160a81b900465ffffffffffff1660a082015293505b505050919050565b61010054600160801b900460ff16156119465760405163bae6e2a960e01b815260040160405180910390fd5b61195f610100805460ff60801b1916600160801b179055565b6040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1610c03336001613613565b60408051610140810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052906119f5611b7f565b905060fb5f015f826040015185611a0c91906153fa565b6001600160401b03908116825260208083019390935260409182015f20825161014081018452815481526001820154808416958201959095526001600160601b03600160401b808704821695830195909552600160a01b90950490941660608501526002015480821660808501819052928104821660a0850152600160801b8104821660c085015262ffffff600160c01b8204811660e086015260ff600160d81b830416610100860152600160e01b9091041661012084015291935090841614611ae957604051632785786f60e21b815260040160405180910390fd5b50919050565b5f611af8613486565b905090565b5f5f611b0761455d565b61010054600160401b90046001600160401b03169250611b25611b7f565b6101c00151602001516001600160401b0316836001600160401b03161015611b6057604051632785786f60e21b815260040160405180910390fd5b611b698361199d565b602001519150611b7883611802565b9050909192565b604080516101e0810182525f80825260208083018290528284018290526060808401839052608080850184905260a080860185905260c0860185905260e086018590526101008601859052865190810187528481528084018590528087018590528083018590528082018590526101208601526101408501849052610160850184905261018085018490526101a0850184905285519081018652838152918201839052938101829052928301526101c081019190915250604080516101e08101825262028c5981526204f1a060208083019190915262057e408284015260106060808401829052630e4e1c006080808601919091526806c6b935b8bbd4000060a080870191909152674563918244f4000060c087015260e0860184905261010086018790528651908101875260088152604b81860152624c4b4081880152634fdec700818401526323c3460081830152610120860152611c2061014086018190526101608601526101808501929092526103006101a0850152845191820185525f808352928201839052938101829052928301526101c081019190915290565b61010054600160801b900460ff1615611d4b5760405163bae6e2a960e01b815260040160405180910390fd5b335f908152610101602052604090205481811015611d7c5760405163e92c469f60e01b815260040160405180910390fd5b60405182815233907f0d41118e36df44efb77a471fc49fb9c0be0406d802ef95520e9fbf606e65b4559060200160405180910390a2335f908152610101602052604081208054849290611dd0908490615427565b90915550507f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c586001600160a01b031615611e385761096a6001600160a01b037f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c58163384613edd565b61096a3383613f40565b6002611e5060c95460ff1690565b60ff1603611e715760405163dfc60d8560e01b815260040160405180910390fd5b611e7b6002612b74565b5f80611e89858701876154c4565b815191935091505f819003611eb157604051631b3dc8e560e11b815260040160405180910390fd5b81518114611ed2576040516341e3f65360e11b815260040160405180910390fd5b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b8304161580159484019490945266ffffffffffffff600160881b8304166060840152600160c01b90910416608082015290611f505760405163ab35696f60e01b815260040160405180910390fd5b5f611f59611b7f565b90505f836001600160401b03811115611f7457611f74614ab7565b604051908082528060200260200182016040528015611fad57816020015b611f9a6145a0565b815260200190600190039081611f925790505b5090505f5f5b858110156125bc575f888281518110611fce57611fce6155cd565b60200260200101519050846101c00151602001516001600160401b031681604001516001600160401b0316101561201857604051630db2616960e01b815260040160405180910390fd5b6101c0850151604001516001600160401b031615806120555750846101c00151604001516001600160401b031681604001516001600160401b0316105b6120725760405163110f3dcf60e31b815260040160405180910390fd5b85602001516001600160401b031681604001516001600160401b0316116120ac57604051632785786f60e21b815260040160405180910390fd5b855f01516001600160401b031681604001516001600160401b0316106120e557604051632785786f60e21b815260040160405180910390fd5b5f8883815181106120f8576120f86155cd565b60200260200101519050805f01515f5f1b03612127576040516319ead34160e01b815260040160405180910390fd5b60208101515f0361214b5760405163ac97cfc760e01b815260040160405180910390fd5b60408101515f0361216f57604051636c0118eb60e01b815260040160405180910390fd5b8160400151858481518110612186576121866155cd565b6020908102919091018101516001600160401b039092169091526040516121af9184910161536b565b604051602081830303815290604052805190602001208584815181106121d7576121d76155cd565b60200260200101516020018181525050808584815181106121fa576121fa6155cd565b6020026020010151604001819052505f8660400151836040015161221e91906153fa565b6001600160401b03165f81815260fb6020526040902080548851929350909188908790811061224f5761224f6155cd565b602002602001015160200151146122795760405163419b53b760e01b815260040160405180910390fd5b60028101545f90600160c01b900462ffffff1660018111156122fa5784515f85815260fd6020908152604080832060018452909152902054036122bf57600191506122fa565b60028162ffffff1611156122fa576040808701516001600160401b03165f90815260fc6020908152828220885183529052205462ffffff1691505b8162ffffff165f0361233b5760028301805462ffffff60c01b198116600160c01b9182900462ffffff90811660018101909116909202179091559150612463565b5f84815260fd6020908152604080832062ffffff86168452825291829020825160c081018452815481526001820154928101839052600282015493810193909352600301546001600160a01b0381166060840152600160a01b810460ff1615156080840152600160a81b900465ffffffffffff1660a083015215612461575f866020015182602001511480156123e45750604082015115806123e4575086604001518260400151145b905080612454575f86815260fd6020908152604080832062ffffff88168452909152808220600190810192909255898101519051919b507fa05e896ff20170d694345384140d3397c040699d982fd6bdd73028e3d311f4449161244b919085908b906155e1565b60405180910390a15b50505050505050506125b4565b505b5f84815260fd6020908152604080832062ffffff8616845282529182902090870151600182015560e08c01519188015190916124a49160ff909116906153fa565b6001600160401b0316156124b8575f6124be565b85604001515b60028201556101408b015160808d015160608901515f9261ffff16916124f0916001600160401b039081169116613f4b565b60038401805460ff60a01b191691909201421115600160a01b81029190911790915590508061251f5733612525565b87602001515b6003830180546001600160a01b0392909216600166ffffffffffff0160a01b031990921691909117600160a81b4265ffffffffffff160217905562ffffff841660010361257557865182556125ab565b6040888101516001600160401b03165f90815260fc60209081528282208a518352905220805462ffffff191662ffffff86161790555b50505050505050505b600101611fb3565b506040516326c9adc960e21b81526001600160a01b037f0000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a1690639b26b7249061260d9085908d908d90600401615621565b5f604051808303815f87803b158015612624575f5ffd5b505af1158015612636573d5f5f3e3d5ffd5b505050505f856001600160401b0381111561265357612653614ab7565b60405190808252806020026020018201604052801561267c578160200160208202803683370190505b5090505f5b868110156126d95788818151811061269b5761269b6155cd565b6020026020010151604001518282815181106126b9576126b96155cd565b6001600160401b0390921660209283029190910190910152600101612681565b507fc99f03c7db71a9e8c78654b1d2f77378b413cc979a02fa22dc9d39702afa92bc7f0000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a828960405161272d939291906156a2565b60405180910390a15080156127b657612755610100805460ff60801b1916600160801b179055565b6040516001600160a01b037f0000000000000000000000003ce38009a85ff15f2d6e0cb1ec3dbca6b097f47a1681527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a16127c1565b6127c1838587612b8a565b505050505050506127d26001612b74565b50505050565b5f5f6127e261455d565b60ff54600160801b90046001600160401b03169250611b698361199d565b61280861455d565b5f612811611b7f565b90505f81604001518561282491906153fa565b6001600160401b039081165f81815260fb6020526040902060028101549193509187811691161461286857604051632785786f60e21b815260040160405180910390fd5b60028101545f906001600160c01b90910462ffffff1611156128ef575f83815260fd60209081526040808320600184529091529020548690036128ad575060016128ef565b600282810154600160c01b900462ffffff1611156128ef57506001600160401b0386165f90815260fc6020908152604080832088845290915290205462ffffff165b62ffffff8116158015906129165750600282015462ffffff600160c01b9091048116908216105b61293357604051631daf8e2f60e21b815260040160405180910390fd5b5f92835260fd6020908152604080852062ffffff909316855291815292819020815160c08101835281548152600182015494810194909452600281015491840191909152600301546001600160a01b038116606084015260ff600160a01b8204161515608084015265ffffffffffff600160a81b9091041660a0830152509150505b92915050565b6129c3613e6a565b606580546001600160a01b0383166001600160a01b031990911681179091556129f46033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b612a3461455d565b5f612a3d611b7f565b90505f816040015185612a5091906153fa565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612a9457604051632785786f60e21b815260040160405180910390fd5b8462ffffff165f03612ab957604051631daf8e2f60e21b815260040160405180910390fd5b600281015462ffffff600160c01b909104811690861610612aed57604051631daf8e2f60e21b815260040160405180910390fd5b505f90815260fd6020908152604080832062ffffff87168452825291829020825160c081018452815481526001820154928101929092526002810154928201929092526003909101546001600160a01b038116606083015260ff600160a01b8204161515608083015265ffffffffffff600160a81b9091041660a082015291505092915050565b60c9805460ff191660ff92909216919091179055565b6020808301516101c0850151909101515f906001600160401b0381161580612bc75750600181036001600160401b0316836001600160401b031610155b91505080156131ef575f856040015183612be191906153fa565b6001600160401b03165f81815260fb60209081526040808320600281015460fd8452828520600160e01b90910462ffffff168086529084528285206001015483516080810185528681529485018690529284018590526060840194909452939450905f612c848a5f01516001600160401b03168b602001516001600160401b03168b8e606001516001600160401b03160201600101613f6290919063ffffffff16565b90508a6101c00151604001516001600160401b03165f14612cc0576101c08b015160400151612cbd9082906001600160401b0316613f62565b90505b612cc98861575a565b97505b80886001600160401b03161015612f125760408b0151612cec90896153fa565b6001600160401b03165f81815260fb60205260409020600281015461010054929850909650600160c01b900462ffffff1690600160801b900460ff1615612d335750612f12565b60018162ffffff1611612d465750612f12565b5f87815260fd602090815260408083206001845290915290208054859003612d715760019550612de5565b60028262ffffff161115612dde576001600160401b038a165f90815260fc6020908152604080832088845290915281205462ffffff1690819003612db757505050612f12565b5f89815260fd6020908152604080832062ffffff8516845290915290209096509050612de5565b5050612f12565b60018101545f819003612dfa57505050612f12565b428e610160015162ffffff168360030160159054906101000a900465ffffffffffff160165ffffffffffff161115612e3457505050612f12565b8095505f8260030160149054906101000a900460ff16612e74576001890154612e6f90600290600160a01b90046001600160601b0316615784565b612e8a565b6001890154600160a01b90046001600160601b03165b6003840154909150612eae906001600160a01b03166001600160601b038316613f70565b60e08f0151612ec09060ff168d6153fa565b6001600160401b03165f03612efd576001600160401b03808d16875260018a015416602087015262ffffff88166040870152600283015460608701525b5050505087612f0b9061575a565b9750612ccc565b87600190039750876001600160401b03168a602001516001600160401b0316146131e8576001600160401b03881660208b0181905260408c015160fb915f91612f5a916153fa565b6001600160401b03908116825260208083019390935260409182015f2060028101805462ffffff60e01b1916600160e01b62ffffff8b16021790558d8401518351921682529281018690529196507fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a0910160405180910390a181516001600160401b0316156131e85789602001516001600160401b0316825f01516001600160401b0316146130575760408b0151825160fb915f9161301991906153fa565b6001600160401b031681526020019081526020015f209450816040015185600201601c6101000a81548162ffffff021916908362ffffff1602179055505b6040805160808101825260ff80546001600160401b03808216808552600160401b80840483166020870181905260028d0154841687890181905242909416606088018190526001600160801b03199095169092179102176fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b90910217905590517fcfbcbd3a81b749a28e6289bc350363f1949bb0a58ba7120d8dd4ef4b3617dff89061310c90839061465f565b60405180910390a18b51602084015160608501516040516313e4299d60e21b81526001600160401b0393841660048201527f73e6d340850343cc6f001515dc593377337c95a6ffe034fe1e844d4dab5da169602482015292909116604483015260648201527f00000000000000000000000034fad38c354f51a1a641b299bec262aadbdcc8cc6001600160a01b031690634f90a674906084016020604051808303815f875af11580156131c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e591906157b1565b50505b5050505050505b83516101008054602087015160408089015160608a015160808b01516001600160401b03908116600160c01b026001600160c01b0366ffffffffffffff909316600160881b0266ffffffffffffff60881b19941515600160801b029490941667ffffffffffffffff60801b19968316600160401b026001600160801b031990981692909916919091179590951793909316959095179490941716179055517f7156d026e6a3864d290a971910746f96477d3901e33c4b2375e4ee00dabe7d87906132ba9086906146c3565b60405180910390a15050505050565b5f54610100900460ff166132ef5760405162461bcd60e51b8152600401610a04906157c8565b6132f882613fd7565b5f8190036133195760405163cd21cd4360e01b815260040160405180910390fd5b7f62706e85402cc48a87d49cd7385662e24ad19ed753c6d6f4d464b32120eeb9938190555f80805260fb602090815260017fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d89758181557fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8977805477ffffffffffffffffffffffffffffffff00000000000000001916600160401b426001600160401b039081169190910267ffffffffffffffff60801b191691909117600160801b439283169081029190911766ffffff00ffffff60c01b1916638000000160c11b1790925560ff805467ffffffffffffffff199081169093179055610100805477ffffffffffffff000000000000000000ffffffffffffffff1916600160881b66ffffffffffffff909316929092029092161790921790915560408051938452918301849052917fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a09101610a75565b5f5160206158bb5f395f51905f52546001600160a01b031690565b610b5f613e6a565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156134dc57610a7e83614035565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613536575060408051601f3d908101601f19168201909252613533918101906157b1565b60015b6135995760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a04565b5f5160206158bb5f395f51905f5281146136075760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a04565b50610a7e8383836140d0565b61096a613e6a565b60e0850151515f9081908082036136455760405163feb32ebd60e01b815260040160405180910390fd5b8461ffff1681111561366a57604051633f836abd60e11b815260040160405180910390fd5b87606001516001600160401b03165f0361368957600143039250613729565b43878960600151016001600160401b031610156136b9576040516311abefd560e21b815260040160405180910390fd5b4388606001516001600160401b0316106136e657604051630fe29b5f60e31b815260040160405180910390fd5b8360c001516001600160401b031688606001516001600160401b0316101561372157604051637f0b4c5960e11b815260040160405180910390fd5b876060015192505b60808801516001600160401b031615613746578760800151613748565b425b915042826001600160401b0316111561377457604051633d32ffdb60e01b815260040160405180910390fd5b8760e001515f8151811061378a5761378a6155cd565b60200260200101516020015160ff165f146137b857604051630649ac0f60e31b815260040160405180910390fd5b5f5f5b82811015613944578960e0015181815181106137d9576137d96155cd565b60200260200101516020015160ff16820191505f8a60e001518281518110613803576138036155cd565b602002602001015160400151519050805f0361381f575061393c565b8860ff168111156138435760405163c577d38360e01b815260040160405180910390fd5b5f5b81811015613939577f00000000000000000000000034fad38c354f51a1a641b299bec262aadbdcc8cc6001600160a01b0316638e899f808d60e001518581518110613892576138926155cd565b60200260200101516040015183815181106138af576138af6155cd565b60200260200101516040518263ffffffff1660e01b81526004016138d591815260200190565b602060405180830381865afa1580156138f0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139149190615813565b61393157604051634300d2ff60e11b815260040160405180910390fd5b600101613845565b50505b6001016137bb565b50806001600160401b0316836001600160401b0316101561397857604051630cccd76960e11b815260040160405180910390fd5b808303426001600160401b03808316908b16600c020110156139ad57604051630cccd76960e11b815260040160405180910390fd5b8560a001516001600160401b0316816001600160401b031610156139e45760405163084e26e160e21b815260040160405180910390fd5b60408a015115806139f95750855160408b0151145b613a19576040516001629d908960e01b0319815260040160405180910390fd5b5050509550959350505050565b8051515f9060609015613a3b57508151613ac4565b604083015160ff16806001600160401b03811115613a5b57613a5b614ab7565b604051908082528060200260200182016040528015613a84578160200160208202803683370190505b5091505f5b81811015613ac15780856020015160ff160149838281518110613aae57613aae6155cd565b6020908102919091010152600101613a89565b50505b80515f5b81811015613b1357828181518110613ae257613ae26155cd565b60200260200101515f5f1b03613b0b57604051637bb2fa2f60e11b815260040160405180910390fd5b600101613ac8565b508482604051602001613b2792919061582e565b604051602081830303815290604052805190602001209250509250929050565b805f03613b52575050565b6001600160a01b0382165f9081526101016020526040902054818110613b94576001600160a01b0383165f908152610101602052604090208282039055613c0f565b7f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c586001600160a01b031615613bf6575f613bce8484613c57565b9050828114613bf05760405163e92c469f60e01b815260040160405180910390fd5b50613c0f565b60405163e92c469f60e01b815260040160405180910390fd5b826001600160a01b03167f85f32beeaff2d0019a8d196f06790c9a652191759c46643311344fd38920423c83604051613c4a91815260200190565b60405180910390a2505050565b5f7f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c586001600160a01b031615613dff573415613ca65760405163798ee6f160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c586001600160a01b0316906370a0823190602401602060405180830381865afa158015613d0a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d2e91906157b1565b9050613d656001600160a01b037f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c58168530866140f4565b6040516370a0823160e01b815230600482015281907f000000000000000000000000a20182131658295f37c1a1efdbdc89eff97d9c586001600160a01b0316906370a0823190602401602060405180830381865afa158015613dc9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ded91906157b1565b613df79190615427565b915050613e21565b813414613e1e5760405162c56beb60e11b815260040160405180910390fd5b50805b826001600160a01b03167f8ed8c6869618197b68315ade66e75ed3906c97b111fa3ab81e5760046825c7db82604051613e5c91815260200190565b60405180910390a292915050565b6033546001600160a01b03163314610c035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a04565b606580546001600160a01b0319169055610b5f8161412c565b6040516001600160a01b038316602482015260448101829052610a7e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261417d565b61096a82825a614250565b5f818311613f595781613f5b565b825b9392505050565b5f818311611ae95782613f5b565b805f03613f7b575050565b6001600160a01b0382165f818152610101602052604090819020805484019055517f6de6fe586196fa05b73b973026c5fda3968a2933989bff3a0b6bd57644fab60690613fcb9084815260200190565b60405180910390a25050565b5f54610100900460ff16613ffd5760405162461bcd60e51b8152600401610a04906157c8565b614005614293565b6140236001600160a01b0382161561401d5781613ec4565b33613ec4565b5060c9805461ff001916610100179055565b6001600160a01b0381163b6140a25760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a04565b5f5160206158bb5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b6140d9836142b9565b5f825111806140e55750805b15610a7e576127d283836142f8565b6040516001600160a01b03808516602483015283166044820152606481018290526127d29085906323b872dd60e01b90608401613f09565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6141d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661431d9092919063ffffffff16565b905080515f14806141f15750808060200190518101906141f19190615813565b610a7e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a04565b815f0361425c57505050565b61427683838360405180602001604052805f815250614333565b610a7e57604051634c67134d60e11b815260040160405180910390fd5b5f54610100900460ff16610c035760405162461bcd60e51b8152600401610a04906157c8565b6142c281614035565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b6060613f5b83836040518060600160405280602781526020016158db60279139614370565b606061432b84845f856143e4565b949350505050565b5f6001600160a01b03851661435b57604051634c67134d60e11b815260040160405180910390fd5b5f5f835160208501878988f195945050505050565b60605f5f856001600160a01b03168560405161438c919061586f565b5f60405180830381855af49150503d805f81146143c4576040519150601f19603f3d011682016040523d82523d5f602084013e6143c9565b606091505b50915091506143da868383876144bb565b9695505050505050565b6060824710156144455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a04565b5f5f866001600160a01b03168587604051614460919061586f565b5f6040518083038185875af1925050503d805f811461449a576040519150601f19603f3d011682016040523d82523d5f602084013e61449f565b606091505b50915091506144b0878383876144bb565b979650505050505050565b606083156145295782515f03614522576001600160a01b0385163b6145225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a04565b508161432b565b61432b838381511561453e5781518083602001fd5b8060405162461bcd60e51b8152600401610a049190615885565b905290565b6040518060c001604052805f81526020015f81526020015f81526020015f6001600160a01b031681526020015f151581526020015f65ffffffffffff1681525090565b60405180606001604052805f6001600160401b031681526020015f815260200161455860405180606001604052805f81526020015f81526020015f81525090565b80356001600160401b03811681146145f7575f5ffd5b919050565b5f6020828403121561460c575f5ffd5b613f5b826145e1565b6001600160401b0381511682526001600160401b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b608081016129b58284614615565b6001600160401b0381511682526001600160401b03602082015116602083015260408101511515604083015266ffffffffffffff60608201511660608301526001600160401b0360808201511660808301525050565b60a081016129b5828461466d565b80356001600160a01b03811681146145f7575f5ffd5b5f5f604083850312156146f8575f5ffd5b614701836146d1565b946020939093013593505050565b5f6020828403121561471f575f5ffd5b613f5b826146d1565b5f5f83601f840112614738575f5ffd5b5081356001600160401b0381111561474e575f5ffd5b602083019150836020828501011115614765575f5ffd5b9250929050565b5f5f5f5f6040858703121561477f575f5ffd5b84356001600160401b03811115614794575f5ffd5b6147a087828801614728565b90955093505060208501356001600160401b038111156147be575f5ffd5b6147ca87828801614728565b95989497509550505050565b5f8151808452602084019350602083015f5b828110156148065781518652602095860195909101906001016147e8565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b8381101561488657601f19858403018852815161ffff815116845260ff6020820151166020850152604081015190506060604085015261486f60608501826147d6565b6020998a019990945092909201915060010161482c565b50909695505050505050565b60ff815116825260ff602082015116602083015263ffffffff60408201511660408301526001600160401b03606082015116606083015263ffffffff60808201511660808301525050565b805182525f602082015161026060208501526148fd610260850182614810565b90506040830151848203604086015261491682826147d6565b91505060608301516060850152608083015161493d60808601826001600160a01b03169052565b5060a083015161495860a08601826001600160401b03169052565b5060c083015161497360c08601826001600160401b03169052565b5060e083015161498b60e086018263ffffffff169052565b506101008301516149a561010086018263ffffffff169052565b506101208301516149bf61012086018263ffffffff169052565b506101408301516149dc6101408601826001600160401b03169052565b506101608301516149f96101608601826001600160401b03169052565b50610180830151614a166101808601826001600160401b03169052565b506101a08301516101a08501526101c0830151614a376101c0860182614892565b509392505050565b8051825260018060a01b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60a081525f614a9160a08301856148dd565b9050613f5b6020830184614a3f565b5f60208284031215614ab0575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715614aed57614aed614ab7565b60405290565b604051606081016001600160401b0381118282101715614aed57614aed614ab7565b60405161010081016001600160401b0381118282101715614aed57614aed614ab7565b604051608081016001600160401b0381118282101715614aed57614aed614ab7565b604051601f8201601f191681016001600160401b0381118282101715614b8257614b82614ab7565b604052919050565b5f5f60408385031215614b9b575f5ffd5b614ba4836146d1565b915060208301356001600160401b03811115614bbe575f5ffd5b8301601f81018513614bce575f5ffd5b80356001600160401b03811115614be757614be7614ab7565b614bfa601f8201601f1916602001614b5a565b818152866020838501011115614c0e575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b8051825260208082015190830152604080820151908301526060808201516001600160a01b03169083015260808082015115159083015260a09081015165ffffffffffff16910152565b60c081016129b58284614c2d565b81518152602080830151610140830191614ca9908401826001600160401b03169052565b506040830151614cc460408401826001600160601b03169052565b506060830151614cdf60608401826001600160601b03169052565b506080830151614cfa60808401826001600160401b03169052565b5060a0830151614d1560a08401826001600160401b03169052565b5060c0830151614d3060c08401826001600160401b03169052565b5060e0830151614d4760e084018262ffffff169052565b50610100830151614d5e61010084018260ff169052565b50610120830151614d7761012084018262ffffff169052565b5092915050565b6001600160401b03848116825283166020820152610100810161432b6040830184614c2d565b81516001600160401b031681526102c081016020830151614dd060208401826001600160401b03169052565b506040830151614deb60408401826001600160401b03169052565b506060830151614e0660608401826001600160401b03169052565b506080830151614e1e608084018263ffffffff169052565b5060a0830151614e3960a08401826001600160601b03169052565b5060c0830151614e5460c08401826001600160601b03169052565b5060e0830151614e6960e084018260ff169052565b50610100830151614e866101008401826001600160401b03169052565b50610120830151614e9b610120840182614892565b5061014083015161ffff9081166101c08481019190915261016085015162ffffff166101e085015261018085015160ff166102008501526101a0850151909116610220840152830151614d77610240840182614615565b8381526101408101614f076020830185614615565b61432b60a083018461466d565b5f5f60408385031215614f25575f5ffd5b614701836145e1565b5f5f60408385031215614f3f575f5ffd5b614f48836145e1565b9150602083013562ffffff81168114614f5f575f5ffd5b809150509250929050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b8015158114610b5f575f5ffd5b80356145f781615002565b5f6001600160401b0382111561503257615032614ab7565b5060051b60200190565b5f82601f83011261504b575f5ffd5b813561505e6150598261501a565b614b5a565b8082825260208201915060208360051b86010192508583111561507f575f5ffd5b602085015b8381101561509c578035835260209283019201615084565b5095945050505050565b803560ff811681146145f7575f5ffd5b803563ffffffff811681146145f7575f5ffd5b5f60c082840312156150d9575f5ffd5b6150e1614acb565b905081356001600160401b038111156150f8575f5ffd5b6151048482850161503c565b825250615113602083016150a6565b6020820152615124604083016150a6565b6040820152615135606083016150b6565b6060820152615146608083016150b6565b608082015261515760a083016145e1565b60a082015292915050565b5f82601f830112615171575f5ffd5b813561517f6150598261501a565b8082825260208201915060208360051b8601019250858311156151a0575f5ffd5b602085015b8381101561509c5780356001600160401b038111156151c2575f5ffd5b86016060818903601f190112156151d7575f5ffd5b6151df614af3565b602082013561ffff811681146151f3575f5ffd5b8152615201604083016150a6565b602082015260608201356001600160401b0381111561521e575f5ffd5b61522d8a60208386010161503c565b604083015250845250602092830192016151a5565b5f60208284031215615252575f5ffd5b81356001600160401b03811115615267575f5ffd5b82016101008185031215615279575f5ffd5b615281614b15565b61528a826146d1565b8152615298602083016146d1565b6020820152604082810135908201526152b3606083016145e1565b60608201526152c4608083016145e1565b60808201526152d560a0830161500f565b60a082015260c08201356001600160401b038111156152f2575f5ffd5b6152fe868285016150c9565b60c08301525060e08201356001600160401b0381111561531c575f5ffd5b61532886828501615162565b60e083015250949350505050565b634e487b7160e01b5f52601260045260245ffd5b818382375f9101908152919050565b602081525f613f5b60208301846148dd565b608081016129b58284614a3f565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60c081525f6153b360c08301876148dd565b6153c06020840187614a3f565b82810360a08401526144b0818587615379565b634e487b7160e01b5f52601160045260245ffd5b808201808211156129b5576129b56153d3565b5f6001600160401b0383168061541257615412615336565b806001600160401b0384160691505092915050565b818103818111156129b5576129b56153d3565b5f82601f830112615449575f5ffd5b81356154576150598261501a565b80828252602082019150602060608402860101925085831115615478575f5ffd5b602085015b8381101561509c5760608188031215615494575f5ffd5b61549c614af3565b813581526020808301358183015260408084013590830152908452929092019160600161547d565b5f5f604083850312156154d5575f5ffd5b82356001600160401b038111156154ea575f5ffd5b8301601f810185136154fa575f5ffd5b80356155086150598261501a565b8082825260208201915060208360071b850101925087831115615529575f5ffd5b6020840193505b8284101561559a5760808489031215615547575f5ffd5b61554f614b38565b8435815261555f602086016146d1565b6020820152615570604086016145e1565b6040820152615581606086016145e1565b6060820152825260809390930192602090910190615530565b945050505060208301356001600160401b038111156155b7575f5ffd5b6155c38582860161543a565b9150509250929050565b634e487b7160e01b5f52603260045260245ffd5b6001600160401b038416815261014081016155ff6020830185614c2d565b825160e08301526020830151610100830152604083015161012083015261432b565b604080825284519082018190525f9060208601906060840190835b8181101561568d57835180516001600160401b03168452602080820151818601526040918201518051838701528082015160608701529091015160808501529093019260a09092019160010161563c565b505083810360208501526144b0818688615379565b6001600160a01b03841681526060602080830182905284519183018290525f91908501906080840190835b818110156156f45783516001600160401b03168352602093840193909201916001016156cd565b50508381036040850152845180825260209182019250908501905f5b8181101561574d576157378484518051825260208082015190830152604090810151910152565b6060939093019260209290920191600101615710565b5091979650505050505050565b5f6001600160401b0382166001600160401b03810361577b5761577b6153d3565b60010192915050565b5f6001600160601b0383168061579c5761579c615336565b806001600160601b0384160491505092915050565b5f602082840312156157c1575f5ffd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f60208284031215615823575f5ffd5b8151613f5b81615002565b5f60408201848352604060208401528084518083526060850191506020860192505f5b81811015614886578351835260209384019390920191600101615851565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208a248fa4f6aa1c15012e381ef792fa4f3dae598a47a365d04f282c0994ebd88e64736f6c634300081b0033