ETH Price: $3,188.99 (+0.78%)

Contract

0x935239e066F4F449D87D600e6d7c1a4F24c50f97

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60a060401676636942024-01-06 11:30:27190 days ago1704540627IN
 Create: ChallengeManager
0 ETH0.001321120.1

Parent Transaction Hash Block From To Value
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChallengeManager

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 23 : ChallengeManager.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";

import {NO_CHAL_INDEX} from "../libraries/Constants.sol";

contract ChallengeManager is DelegateCallAware, IChallengeManager {
    using GlobalStateLib for GlobalState;
    using MachineLib for Machine;
    using ChallengeLib for ChallengeLib.Challenge;

    enum ChallengeModeRequirement {
        ANY,
        BLOCK,
        EXECUTION
    }

    string private constant NO_CHAL = "NO_CHAL";
    uint256 private constant MAX_CHALLENGE_DEGREE = 40;

    uint64 public totalChallengesCreated;
    mapping(uint256 => ChallengeLib.Challenge) public challenges;

    IChallengeResultReceiver public resultReceiver;

    ISequencerInbox public sequencerInbox;
    IBridge public bridge;
    IOneStepProofEntry public osp;

    function challengeInfo(uint64 challengeIndex)
        external
        view
        override
        returns (ChallengeLib.Challenge memory)
    {
        return challenges[challengeIndex];
    }

    modifier takeTurn(
        uint64 challengeIndex,
        ChallengeLib.SegmentSelection calldata selection,
        ChallengeModeRequirement expectedMode
    ) {
        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        require(msg.sender == currentResponder(challengeIndex), "CHAL_SENDER");
        require(!isTimedOut(challengeIndex), "CHAL_DEADLINE");

        if (expectedMode == ChallengeModeRequirement.ANY) {
            require(challenge.mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL);
        } else if (expectedMode == ChallengeModeRequirement.BLOCK) {
            require(challenge.mode == ChallengeLib.ChallengeMode.BLOCK, "CHAL_NOT_BLOCK");
        } else if (expectedMode == ChallengeModeRequirement.EXECUTION) {
            require(challenge.mode == ChallengeLib.ChallengeMode.EXECUTION, "CHAL_NOT_EXECUTION");
        } else {
            assert(false);
        }

        require(
            challenge.challengeStateHash ==
                ChallengeLib.hashChallengeState(
                    selection.oldSegmentsStart,
                    selection.oldSegmentsLength,
                    selection.oldSegments
                ),
            "BIS_STATE"
        );
        if (
            selection.oldSegments.length < 2 ||
            selection.challengePosition >= selection.oldSegments.length - 1
        ) {
            revert("BAD_CHALLENGE_POS");
        }

        _;

        if (challenge.mode == ChallengeLib.ChallengeMode.NONE) {
            // Early return since challenge must have terminated
            return;
        }

        ChallengeLib.Participant memory current = challenge.current;
        current.timeLeft -= block.timestamp - challenge.lastMoveTimestamp;

        challenge.current = challenge.next;
        challenge.next = current;

        challenge.lastMoveTimestamp = block.timestamp;
    }

    function initialize(
        IChallengeResultReceiver resultReceiver_,
        ISequencerInbox sequencerInbox_,
        IBridge bridge_,
        IOneStepProofEntry osp_
    ) external override onlyDelegated {
        require(address(resultReceiver) == address(0), "ALREADY_INIT");
        require(address(resultReceiver_) != address(0), "NO_RESULT_RECEIVER");
        resultReceiver = resultReceiver_;
        sequencerInbox = sequencerInbox_;
        bridge = bridge_;
        osp = osp_;
    }

    function createChallenge(
        bytes32 wasmModuleRoot_,
        MachineStatus[2] calldata startAndEndMachineStatuses_,
        GlobalState[2] calldata startAndEndGlobalStates_,
        uint64 numBlocks,
        address asserter_,
        address challenger_,
        uint256 asserterTimeLeft_,
        uint256 challengerTimeLeft_
    ) external override returns (uint64) {
        require(msg.sender == address(resultReceiver), "ONLY_ROLLUP_CHAL");
        bytes32[] memory segments = new bytes32[](2);
        segments[0] = ChallengeLib.blockStateHash(
            startAndEndMachineStatuses_[0],
            startAndEndGlobalStates_[0].hash()
        );
        segments[1] = ChallengeLib.blockStateHash(
            startAndEndMachineStatuses_[1],
            startAndEndGlobalStates_[1].hash()
        );

        uint64 challengeIndex = ++totalChallengesCreated;
        // The following is an assertion since it should never be possible, but it's an important invariant
        assert(challengeIndex != NO_CHAL_INDEX);
        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        challenge.wasmModuleRoot = wasmModuleRoot_;

        // See validator/assertion.go ExecutionState RequiredBatches() for reasoning
        uint64 maxInboxMessagesRead = startAndEndGlobalStates_[1].getInboxPosition();
        if (
            startAndEndMachineStatuses_[1] == MachineStatus.ERRORED ||
            startAndEndGlobalStates_[1].getPositionInMessage() > 0
        ) {
            maxInboxMessagesRead++;
        }
        challenge.maxInboxMessages = maxInboxMessagesRead;
        challenge.next = ChallengeLib.Participant({addr: asserter_, timeLeft: asserterTimeLeft_});
        challenge.current = ChallengeLib.Participant({
            addr: challenger_,
            timeLeft: challengerTimeLeft_
        });
        challenge.lastMoveTimestamp = block.timestamp;
        challenge.mode = ChallengeLib.ChallengeMode.BLOCK;

        emit InitiatedChallenge(
            challengeIndex,
            startAndEndGlobalStates_[0],
            startAndEndGlobalStates_[1]
        );
        completeBisection(challengeIndex, 0, numBlocks, segments);
        return challengeIndex;
    }

    /**
     * @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
     * of an execution segment with the same length but a different endpoint. This is either the initial move
     * or follows another execution objection
     */
    function bisectExecution(
        uint64 challengeIndex,
        ChallengeLib.SegmentSelection calldata selection,
        bytes32[] calldata newSegments
    ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
        (uint256 challengeStart, uint256 challengeLength) = ChallengeLib.extractChallengeSegment(
            selection
        );
        require(challengeLength > 1, "TOO_SHORT");
        {
            uint256 expectedDegree = challengeLength;
            if (expectedDegree > MAX_CHALLENGE_DEGREE) {
                expectedDegree = MAX_CHALLENGE_DEGREE;
            }
            require(newSegments.length == expectedDegree + 1, "WRONG_DEGREE");
        }

        requireValidBisection(selection, newSegments[0], newSegments[newSegments.length - 1]);

        completeBisection(challengeIndex, challengeStart, challengeLength, newSegments);
    }

    function challengeExecution(
        uint64 challengeIndex,
        ChallengeLib.SegmentSelection calldata selection,
        MachineStatus[2] calldata machineStatuses,
        bytes32[2] calldata globalStateHashes,
        uint256 numSteps
    ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
        require(numSteps >= 1, "CHALLENGE_TOO_SHORT");
        require(numSteps <= OneStepProofEntryLib.MAX_STEPS, "CHALLENGE_TOO_LONG");
        requireValidBisection(
            selection,
            ChallengeLib.blockStateHash(machineStatuses[0], globalStateHashes[0]),
            ChallengeLib.blockStateHash(machineStatuses[1], globalStateHashes[1])
        );

        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        (uint256 executionChallengeAtSteps, uint256 challengeLength) = ChallengeLib
            .extractChallengeSegment(selection);
        require(challengeLength == 1, "TOO_LONG");

        if (machineStatuses[0] != MachineStatus.FINISHED) {
            // If the machine is in a halted state, it can't change
            require(
                machineStatuses[0] == machineStatuses[1] &&
                    globalStateHashes[0] == globalStateHashes[1],
                "HALTED_CHANGE"
            );
            _currentWin(challengeIndex, ChallengeTerminationType.BLOCK_PROOF);
            return;
        }

        if (machineStatuses[1] == MachineStatus.ERRORED) {
            // If the machine errors, it must return to the previous global state
            require(globalStateHashes[0] == globalStateHashes[1], "ERROR_CHANGE");
        }

        bytes32[] memory segments = new bytes32[](2);
        segments[0] = ChallengeLib.getStartMachineHash(
            globalStateHashes[0],
            challenge.wasmModuleRoot
        );
        segments[1] = ChallengeLib.getEndMachineHash(machineStatuses[1], globalStateHashes[1]);

        challenge.mode = ChallengeLib.ChallengeMode.EXECUTION;

        completeBisection(challengeIndex, 0, numSteps, segments);

        emit ExecutionChallengeBegun(challengeIndex, executionChallengeAtSteps);
    }

    function oneStepProveExecution(
        uint64 challengeIndex,
        ChallengeLib.SegmentSelection calldata selection,
        bytes calldata proof
    ) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        uint256 challengeStart;
        {
            uint256 challengeLength;
            (challengeStart, challengeLength) = ChallengeLib.extractChallengeSegment(selection);
            require(challengeLength == 1, "TOO_LONG");
        }

        bytes32 afterHash = osp.proveOneStep(
            ExecutionContext({maxInboxMessagesRead: challenge.maxInboxMessages, bridge: bridge}),
            challengeStart,
            selection.oldSegments[selection.challengePosition],
            proof
        );
        require(
            afterHash != selection.oldSegments[selection.challengePosition + 1],
            "SAME_OSP_END"
        );

        emit OneStepProofCompleted(challengeIndex);
        _currentWin(challengeIndex, ChallengeTerminationType.EXECUTION_PROOF);
    }

    function timeout(uint64 challengeIndex) external override {
        require(challenges[challengeIndex].mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL);
        require(isTimedOut(challengeIndex), "TIMEOUT_DEADLINE");
        _nextWin(challengeIndex, ChallengeTerminationType.TIMEOUT);
    }

    function clearChallenge(uint64 challengeIndex) external override {
        require(msg.sender == address(resultReceiver), "NOT_RES_RECEIVER");
        require(challenges[challengeIndex].mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL);
        delete challenges[challengeIndex];
        emit ChallengeEnded(challengeIndex, ChallengeTerminationType.CLEARED);
    }

    function currentResponder(uint64 challengeIndex) public view override returns (address) {
        return challenges[challengeIndex].current.addr;
    }

    function isTimedOut(uint64 challengeIndex) public view virtual override returns (bool) {
        return challenges[challengeIndex].isTimedOut();
    }

    function requireValidBisection(
        ChallengeLib.SegmentSelection calldata selection,
        bytes32 startHash,
        bytes32 endHash
    ) private pure {
        require(selection.oldSegments[selection.challengePosition] == startHash, "WRONG_START");
        require(selection.oldSegments[selection.challengePosition + 1] != endHash, "SAME_END");
    }

    function completeBisection(
        uint64 challengeIndex,
        uint256 challengeStart,
        uint256 challengeLength,
        bytes32[] memory newSegments
    ) private {
        assert(challengeLength >= 1);
        assert(newSegments.length >= 2);

        bytes32 challengeStateHash = ChallengeLib.hashChallengeState(
            challengeStart,
            challengeLength,
            newSegments
        );
        challenges[challengeIndex].challengeStateHash = challengeStateHash;

        emit Bisected(
            challengeIndex,
            challengeStateHash,
            challengeStart,
            challengeLength,
            newSegments
        );
    }

    /// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
    function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        address next = challenge.next.addr;
        address current = challenge.current.addr;
        delete challenges[challengeIndex];
        resultReceiver.completeChallenge(challengeIndex, next, current);
        emit ChallengeEnded(challengeIndex, reason);
    }

    /**
     * @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
     * state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
     * to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
     */
    function _currentWin(
        uint64 challengeIndex,
        ChallengeTerminationType /* reason */
    ) private {
        ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
        challenge.challengeStateHash = bytes32(0);

        //        address next = challenge.next.addr;
        //        address current = challenge.current.addr;
        //        delete challenges[challengeIndex];
        //        resultReceiver.completeChallenge(challengeIndex, current, next);
        //        emit ChallengeEnded(challengeIndex, reason);
    }
}

File 2 of 23 : IBridge.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

import "./IOwnable.sol";

interface IBridge {
    event MessageDelivered(
        uint256 indexed messageIndex,
        bytes32 indexed beforeInboxAcc,
        address inbox,
        uint8 kind,
        address sender,
        bytes32 messageDataHash,
        uint256 baseFeeL1,
        uint64 timestamp
    );

    event DepositMessageDelivered(address indexed sender);

    event BridgeCallTriggered(
        address indexed outbox,
        address indexed to,
        uint256 value,
        bytes data
    );

    event InboxToggle(address indexed inbox, bool enabled);

    event OutboxToggle(address indexed outbox, bool enabled);

    event SequencerInboxUpdated(address newSequencerInbox);

    event RollupUpdated(address rollup);

    function allowedDelayedInboxList(uint256) external returns (address);

    function allowedOutboxList(uint256) external returns (address);

    /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message.
    function delayedInboxAccs(uint256) external view returns (bytes32);

    /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message.
    function sequencerInboxAccs(uint256) external view returns (bytes32);

    function rollup() external view returns (IOwnable);

    function sequencerInbox() external view returns (address);

    function activeOutbox() external view returns (address);

    function allowedDelayedInboxes(address inbox) external view returns (bool);

    function allowedOutboxes(address outbox) external view returns (bool);

    function sequencerReportedSubMessageCount() external view returns (uint256);

    function executeCall(
        address to,
        uint256 value,
        bytes calldata data
    ) external returns (bool success, bytes memory returnData);

    function delayedMessageCount() external view returns (uint256);

    function sequencerMessageCount() external view returns (uint256);

    // ---------- onlySequencerInbox functions ----------

    function enqueueSequencerMessage(
        bytes32 dataHash,
        uint256 afterDelayedMessagesRead,
        uint256 prevMessageCount,
        uint256 newMessageCount
    )
        external
        returns (
            uint256 seqMessageIndex,
            bytes32 beforeAcc,
            bytes32 delayedAcc,
            bytes32 acc
        );

    /**
     * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type
     *      This is done through a separate function entrypoint instead of allowing the sequencer inbox
     *      to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either
     *      every delayed inbox or every sequencer inbox call.
     */
    function submitBatchSpendingReport(address batchPoster, bytes32 dataHash)
        external
        returns (uint256 msgNum);

    // ---------- onlyRollupOrOwner functions ----------

    function setSequencerInbox(address _sequencerInbox) external;

    function setDelayedInbox(address inbox, bool enabled) external;

    function setOutbox(address inbox, bool enabled) external;

    function updateRollupAddress(IOwnable _rollup) external;
}

File 3 of 23 : IDelayedMessageProvider.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

interface IDelayedMessageProvider {
    /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator
    event InboxMessageDelivered(uint256 indexed messageNum, bytes data);

    /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator
    /// same as InboxMessageDelivered but the batch data is available in tx.input
    event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum);
}

File 4 of 23 : IOwnable.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.21 <0.9.0;

interface IOwnable {
    function owner() external view returns (address);
}

File 5 of 23 : ISequencerInbox.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;
pragma experimental ABIEncoderV2;

import "../libraries/IGasRefunder.sol";
import "./IDelayedMessageProvider.sol";
import "./IBridge.sol";

interface ISequencerInbox is IDelayedMessageProvider {
    struct MaxTimeVariation {
        uint256 delayBlocks;
        uint256 futureBlocks;
        uint256 delaySeconds;
        uint256 futureSeconds;
    }

    struct TimeBounds {
        uint64 minTimestamp;
        uint64 maxTimestamp;
        uint64 minBlockNumber;
        uint64 maxBlockNumber;
    }

    enum BatchDataLocation {
        TxInput,
        SeparateBatchEvent,
        NoData
    }

    event SequencerBatchDelivered(
        uint256 indexed batchSequenceNumber,
        bytes32 indexed beforeAcc,
        bytes32 indexed afterAcc,
        bytes32 delayedAcc,
        uint256 afterDelayedMessagesRead,
        TimeBounds timeBounds,
        BatchDataLocation dataLocation
    );

    event OwnerFunctionCalled(uint256 indexed id);

    /// @dev a separate event that emits batch data when this isn't easily accessible in the tx.input
    event SequencerBatchData(uint256 indexed batchSequenceNumber, bytes data);

    /// @dev a valid keyset was added
    event SetValidKeyset(bytes32 indexed keysetHash, bytes keysetBytes);

    /// @dev a keyset was invalidated
    event InvalidateKeyset(bytes32 indexed keysetHash);

    function totalDelayedMessagesRead() external view returns (uint256);

    function bridge() external view returns (IBridge);

    /// @dev The size of the batch header
    // solhint-disable-next-line func-name-mixedcase
    function HEADER_LENGTH() external view returns (uint256);

    /// @dev If the first batch data byte after the header has this bit set,
    ///      the sequencer inbox has authenticated the data. Currently not used.
    // solhint-disable-next-line func-name-mixedcase
    function DATA_AUTHENTICATED_FLAG() external view returns (bytes1);

    function rollup() external view returns (IOwnable);

    function isBatchPoster(address) external view returns (bool);

    function isSequencer(address) external view returns (bool);

    function maxDataSize() external view returns (uint256);

    struct DasKeySetInfo {
        bool isValidKeyset;
        uint64 creationBlock;
    }

    function maxTimeVariation()
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        );

    function dasKeySetInfo(bytes32) external view returns (bool, uint64);

    /// @notice Remove force inclusion delay after a L1 chainId fork
    function removeDelayAfterFork() external;

    /// @notice Force messages from the delayed inbox to be included in the chain
    ///         Callable by any address, but message can only be force-included after maxTimeVariation.delayBlocks and
    ///         maxTimeVariation.delaySeconds has elapsed. As part of normal behaviour the sequencer will include these
    ///         messages so it's only necessary to call this if the sequencer is down, or not including any delayed messages.
    /// @param _totalDelayedMessagesRead The total number of messages to read up to
    /// @param kind The kind of the last message to be included
    /// @param l1BlockAndTime The l1 block and the l1 timestamp of the last message to be included
    /// @param baseFeeL1 The l1 gas price of the last message to be included
    /// @param sender The sender of the last message to be included
    /// @param messageDataHash The messageDataHash of the last message to be included
    function forceInclusion(
        uint256 _totalDelayedMessagesRead,
        uint8 kind,
        uint64[2] calldata l1BlockAndTime,
        uint256 baseFeeL1,
        address sender,
        bytes32 messageDataHash
    ) external;

    function inboxAccs(uint256 index) external view returns (bytes32);

    function batchCount() external view returns (uint256);

    function isValidKeysetHash(bytes32 ksHash) external view returns (bool);

    /// @notice the creation block is intended to still be available after a keyset is deleted
    function getKeysetCreationBlock(bytes32 ksHash) external view returns (uint256);

    // ---------- BatchPoster functions ----------

    function addSequencerL2BatchFromOrigin(
        uint256 sequenceNumber,
        bytes calldata data,
        uint256 afterDelayedMessagesRead,
        IGasRefunder gasRefunder
    ) external;

    function addSequencerL2Batch(
        uint256 sequenceNumber,
        bytes calldata data,
        uint256 afterDelayedMessagesRead,
        IGasRefunder gasRefunder,
        uint256 prevMessageCount,
        uint256 newMessageCount
    ) external;

    // ---------- onlyRollupOrOwner functions ----------

    /**
     * @notice Set max delay for sequencer inbox
     * @param maxTimeVariation_ the maximum time variation parameters
     */
    function setMaxTimeVariation(MaxTimeVariation memory maxTimeVariation_) external;

    /**
     * @notice Updates whether an address is authorized to be a batch poster at the sequencer inbox
     * @param addr the address
     * @param isBatchPoster_ if the specified address should be authorized as a batch poster
     */
    function setIsBatchPoster(address addr, bool isBatchPoster_) external;

    /**
     * @notice Makes Data Availability Service keyset valid
     * @param keysetBytes bytes of the serialized keyset
     */
    function setValidKeyset(bytes calldata keysetBytes) external;

    /**
     * @notice Invalidates a Data Availability Service keyset
     * @param ksHash hash of the keyset
     */
    function invalidateKeysetHash(bytes32 ksHash) external;

    /**
     * @notice Updates whether an address is authorized to be a sequencer.
     * @dev The IsSequencer information is used only off-chain by the nitro node to validate sequencer feed signer.
     * @param addr the address
     * @param isSequencer_ if the specified address should be authorized as a sequencer
     */
    function setIsSequencer(address addr, bool isSequencer_) external;

    // ---------- initializer ----------

    function initialize(IBridge bridge_, MaxTimeVariation calldata maxTimeVariation_) external;

    function updateRollupAddress() external;
}

File 6 of 23 : ChallengeLib.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "../state/Machine.sol";
import "../state/GlobalState.sol";

library ChallengeLib {
    using MachineLib for Machine;
    using ChallengeLib for Challenge;

    /// @dev It's assumed that that uninitialzed challenges have mode NONE
    enum ChallengeMode {
        NONE,
        BLOCK,
        EXECUTION
    }

    struct Participant {
        address addr;
        uint256 timeLeft;
    }

    struct Challenge {
        Participant current;
        Participant next;
        uint256 lastMoveTimestamp;
        bytes32 wasmModuleRoot;
        bytes32 challengeStateHash;
        uint64 maxInboxMessages;
        ChallengeMode mode;
    }

    struct SegmentSelection {
        uint256 oldSegmentsStart;
        uint256 oldSegmentsLength;
        bytes32[] oldSegments;
        uint256 challengePosition;
    }

    function timeUsedSinceLastMove(Challenge storage challenge) internal view returns (uint256) {
        return block.timestamp - challenge.lastMoveTimestamp;
    }

    function isTimedOut(Challenge storage challenge) internal view returns (bool) {
        return challenge.timeUsedSinceLastMove() > challenge.current.timeLeft;
    }

    function getStartMachineHash(bytes32 globalStateHash, bytes32 wasmModuleRoot)
        internal
        pure
        returns (bytes32)
    {
        // Start the value stack with the function call ABI for the entrypoint
        Value[] memory startingValues = new Value[](3);
        startingValues[0] = ValueLib.newRefNull();
        startingValues[1] = ValueLib.newI32(0);
        startingValues[2] = ValueLib.newI32(0);
        ValueArray memory valuesArray = ValueArray({inner: startingValues});
        ValueStack memory values = ValueStack({proved: valuesArray, remainingHash: 0});
        ValueStack memory internalStack;
        StackFrameWindow memory frameStack;

        Machine memory mach = Machine({
            status: MachineStatus.RUNNING,
            valueStack: values,
            internalStack: internalStack,
            frameStack: frameStack,
            globalStateHash: globalStateHash,
            moduleIdx: 0,
            functionIdx: 0,
            functionPc: 0,
            modulesRoot: wasmModuleRoot
        });
        return mach.hash();
    }

    function getEndMachineHash(MachineStatus status, bytes32 globalStateHash)
        internal
        pure
        returns (bytes32)
    {
        if (status == MachineStatus.FINISHED) {
            return keccak256(abi.encodePacked("Machine finished:", globalStateHash));
        } else if (status == MachineStatus.ERRORED) {
            return keccak256(abi.encodePacked("Machine errored:"));
        } else if (status == MachineStatus.TOO_FAR) {
            return keccak256(abi.encodePacked("Machine too far:"));
        } else {
            revert("BAD_BLOCK_STATUS");
        }
    }

    function extractChallengeSegment(SegmentSelection calldata selection)
        internal
        pure
        returns (uint256 segmentStart, uint256 segmentLength)
    {
        uint256 oldChallengeDegree = selection.oldSegments.length - 1;
        segmentLength = selection.oldSegmentsLength / oldChallengeDegree;
        // Intentionally done before challengeLength is potentially added to for the final segment
        segmentStart = selection.oldSegmentsStart + segmentLength * selection.challengePosition;
        if (selection.challengePosition == selection.oldSegments.length - 2) {
            segmentLength += selection.oldSegmentsLength % oldChallengeDegree;
        }
    }

    function hashChallengeState(
        uint256 segmentsStart,
        uint256 segmentsLength,
        bytes32[] memory segments
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(segmentsStart, segmentsLength, segments));
    }

    function blockStateHash(MachineStatus status, bytes32 globalStateHash)
        internal
        pure
        returns (bytes32)
    {
        if (status == MachineStatus.FINISHED) {
            return keccak256(abi.encodePacked("Block state:", globalStateHash));
        } else if (status == MachineStatus.ERRORED) {
            return keccak256(abi.encodePacked("Block state, errored:", globalStateHash));
        } else if (status == MachineStatus.TOO_FAR) {
            return keccak256(abi.encodePacked("Block state, too far:"));
        } else {
            revert("BAD_BLOCK_STATUS");
        }
    }
}

File 7 of 23 : IChallengeManager.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "../state/Machine.sol";
import "../bridge/IBridge.sol";
import "../bridge/ISequencerInbox.sol";
import "../osp/IOneStepProofEntry.sol";

import "./IChallengeResultReceiver.sol";

import "./ChallengeLib.sol";

interface IChallengeManager {
    enum ChallengeTerminationType {
        TIMEOUT,
        BLOCK_PROOF,
        EXECUTION_PROOF,
        CLEARED
    }

    event InitiatedChallenge(
        uint64 indexed challengeIndex,
        GlobalState startState,
        GlobalState endState
    );

    event Bisected(
        uint64 indexed challengeIndex,
        bytes32 indexed challengeRoot,
        uint256 challengedSegmentStart,
        uint256 challengedSegmentLength,
        bytes32[] chainHashes
    );

    event ExecutionChallengeBegun(uint64 indexed challengeIndex, uint256 blockSteps);
    event OneStepProofCompleted(uint64 indexed challengeIndex);

    event ChallengeEnded(uint64 indexed challengeIndex, ChallengeTerminationType kind);

    function initialize(
        IChallengeResultReceiver resultReceiver_,
        ISequencerInbox sequencerInbox_,
        IBridge bridge_,
        IOneStepProofEntry osp_
    ) external;

    function createChallenge(
        bytes32 wasmModuleRoot_,
        MachineStatus[2] calldata startAndEndMachineStatuses_,
        GlobalState[2] calldata startAndEndGlobalStates_,
        uint64 numBlocks,
        address asserter_,
        address challenger_,
        uint256 asserterTimeLeft_,
        uint256 challengerTimeLeft_
    ) external returns (uint64);

    function challengeInfo(uint64 challengeIndex_)
        external
        view
        returns (ChallengeLib.Challenge memory);

    function currentResponder(uint64 challengeIndex) external view returns (address);

    function isTimedOut(uint64 challengeIndex) external view returns (bool);

    function clearChallenge(uint64 challengeIndex_) external;

    function timeout(uint64 challengeIndex_) external;
}

File 8 of 23 : IChallengeResultReceiver.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

interface IChallengeResultReceiver {
    function completeChallenge(
        uint256 challengeIndex,
        address winner,
        address loser
    ) external;
}

File 9 of 23 : Constants.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.4;

uint64 constant NO_CHAL_INDEX = 0;

// Expected seconds per block in Ethereum PoS
uint256 constant ETH_POS_BLOCK_TIME = 12;

File 10 of 23 : DelegateCallAware.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import {NotOwner} from "./Error.sol";

/// @dev A stateless contract that allows you to infer if the current call has been delegated or not
/// Pattern used here is from UUPS implementation by the OpenZeppelin team
abstract contract DelegateCallAware {
    address private immutable __self = address(this);

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

    /**
     * @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, "Function must not be called through delegatecall");
        _;
    }

    /// @dev Check that msg.sender is the current EIP 1967 proxy admin
    modifier onlyProxyOwner() {
        // Storage slot with the admin of the proxy contract
        // This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1
        bytes32 slot = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
        address admin;
        assembly {
            admin := sload(slot)
        }
        if (msg.sender != admin) revert NotOwner(msg.sender, admin);
        _;
    }
}

File 11 of 23 : Error.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.4;

/// @dev Init was already called
error AlreadyInit();

/// @dev Init was called with param set to zero that must be nonzero
error HadZeroInit();

/// @dev Thrown when post upgrade init validation fails
error BadPostUpgradeInit();

/// @dev Thrown when non owner tries to access an only-owner function
/// @param sender The msg.sender who is not the owner
/// @param owner The owner address
error NotOwner(address sender, address owner);

/// @dev Thrown when an address that is not the rollup tries to call an only-rollup function
/// @param sender The sender who is not the rollup
/// @param rollup The rollup address authorized to call this function
error NotRollup(address sender, address rollup);

/// @dev Thrown when the contract was not called directly from the origin ie msg.sender != tx.origin
error NotOrigin();

/// @dev Provided data was too large
/// @param dataLength The length of the data that is too large
/// @param maxDataLength The max length the data can be
error DataTooLarge(uint256 dataLength, uint256 maxDataLength);

/// @dev The provided is not a contract and was expected to be
/// @param addr The adddress in question
error NotContract(address addr);

/// @dev The merkle proof provided was too long
/// @param actualLength The length of the merkle proof provided
/// @param maxProofLength The max length a merkle proof can have
error MerkleProofTooLong(uint256 actualLength, uint256 maxProofLength);

/// @dev Thrown when an un-authorized address tries to access an admin function
/// @param sender The un-authorized sender
/// @param rollup The rollup, which would be authorized
/// @param owner The rollup's owner, which would be authorized
error NotRollupOrOwner(address sender, address rollup, address owner);

// Bridge Errors

/// @dev Thrown when an un-authorized address tries to access an only-inbox function
/// @param sender The un-authorized sender
error NotDelayedInbox(address sender);

/// @dev Thrown when an un-authorized address tries to access an only-sequencer-inbox function
/// @param sender The un-authorized sender
error NotSequencerInbox(address sender);

/// @dev Thrown when an un-authorized address tries to access an only-outbox function
/// @param sender The un-authorized sender
error NotOutbox(address sender);

/// @dev the provided outbox address isn't valid
/// @param outbox address of outbox being set
error InvalidOutboxSet(address outbox);

/// @dev The provided token address isn't valid
/// @param token address of token being set
error InvalidTokenSet(address token);

/// @dev Call to this specific address is not allowed
/// @param target address of the call receiver
error CallTargetNotAllowed(address target);

/// @dev Call that changes the balance of ERC20Bridge is not allowed
error CallNotAllowed();

// Inbox Errors

/// @dev The contract is paused, so cannot be paused
error AlreadyPaused();

/// @dev The contract is unpaused, so cannot be unpaused
error AlreadyUnpaused();

/// @dev The contract is paused
error Paused();

/// @dev msg.value sent to the inbox isn't high enough
error InsufficientValue(uint256 expected, uint256 actual);

/// @dev submission cost provided isn't enough to create retryable ticket
error InsufficientSubmissionCost(uint256 expected, uint256 actual);

/// @dev address not allowed to interact with the given contract
error NotAllowedOrigin(address origin);

/// @dev used to convey retryable tx data in eth calls without requiring a tx trace
/// this follows a pattern similar to EIP-3668 where reverts surface call information
error RetryableData(
    address from,
    address to,
    uint256 l2CallValue,
    uint256 deposit,
    uint256 maxSubmissionCost,
    address excessFeeRefundAddress,
    address callValueRefundAddress,
    uint256 gasLimit,
    uint256 maxFeePerGas,
    bytes data
);

/// @dev Thrown when a L1 chainId fork is detected
error L1Forked();

/// @dev Thrown when a L1 chainId fork is not detected
error NotForked();

/// @dev The provided gasLimit is larger than uint64
error GasLimitTooLarge();

// Outbox Errors

/// @dev The provided proof was too long
/// @param proofLength The length of the too-long proof
error ProofTooLong(uint256 proofLength);

/// @dev The output index was greater than the maximum
/// @param index The output index
/// @param maxIndex The max the index could be
error PathNotMinimal(uint256 index, uint256 maxIndex);

/// @dev The calculated root does not exist
/// @param root The calculated root
error UnknownRoot(bytes32 root);

/// @dev The record has already been spent
/// @param index The index of the spent record
error AlreadySpent(uint256 index);

/// @dev A call to the bridge failed with no return data
error BridgeCallFailed();

// Sequencer Inbox Errors

/// @dev Thrown when someone attempts to read fewer messages than have already been read
error DelayedBackwards();

/// @dev Thrown when someone attempts to read more messages than exist
error DelayedTooFar();

/// @dev Force include can only read messages more blocks old than the delay period
error ForceIncludeBlockTooSoon();

/// @dev Force include can only read messages more seconds old than the delay period
error ForceIncludeTimeTooSoon();

/// @dev The message provided did not match the hash in the delayed inbox
error IncorrectMessagePreimage();

/// @dev This can only be called by the batch poster
error NotBatchPoster();

/// @dev The sequence number provided to this message was inconsistent with the number of batches already included
error BadSequencerNumber(uint256 stored, uint256 received);

/// @dev The sequence message number provided to this message was inconsistent with the previous one
error BadSequencerMessageNumber(uint256 stored, uint256 received);

/// @dev The batch data has the inbox authenticated bit set, but the batch data was not authenticated by the inbox
error DataNotAuthenticated();

/// @dev Tried to create an already valid Data Availability Service keyset
error AlreadyValidDASKeyset(bytes32);

/// @dev Tried to use or invalidate an already invalid Data Availability Service keyset
error NoSuchKeyset(bytes32);

/// @dev Thrown when rollup is not updated with updateRollupAddress
error RollupNotChanged();

File 12 of 23 : IGasRefunder.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

interface IGasRefunder {
    function onGasSpent(
        address payable spender,
        uint256 gasUsed,
        uint256 calldataSize
    ) external returns (bool success);
}

abstract contract GasRefundEnabled {
    /// @dev this refunds the sender for execution costs of the tx
    /// calldata costs are only refunded if `msg.sender == tx.origin` to guarantee the value refunded relates to charging
    /// for the `tx.input`. this avoids a possible attack where you generate large calldata from a contract and get over-refunded
    modifier refundsGas(IGasRefunder gasRefunder) {
        uint256 startGasLeft = gasleft();
        _;
        if (address(gasRefunder) != address(0)) {
            uint256 calldataSize = msg.data.length;
            uint256 calldataWords = (calldataSize + 31) / 32;
            // account for the CALLDATACOPY cost of the proxy contract, including the memory expansion cost
            startGasLeft += calldataWords * 6 + (calldataWords**2) / 512;
            // if triggered in a contract call, the spender may be overrefunded by appending dummy data to the call
            // so we check if it is a top level call, which would mean the sender paid calldata as part of tx.input
            // solhint-disable-next-line avoid-tx-origin
            if (msg.sender != tx.origin) {
                // We can't be sure if this calldata came from the top level tx,
                // so to be safe we tell the gas refunder there was no calldata.
                calldataSize = 0;
            }
            gasRefunder.onGasSpent(payable(msg.sender), startGasLeft - gasleft(), calldataSize);
        }
    }
}

File 13 of 23 : IOneStepProofEntry.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./IOneStepProver.sol";

library OneStepProofEntryLib {
    uint256 internal constant MAX_STEPS = 1 << 43;
}

interface IOneStepProofEntry {
    function proveOneStep(
        ExecutionContext calldata execCtx,
        uint256 machineStep,
        bytes32 beforeHash,
        bytes calldata proof
    ) external view returns (bytes32 afterHash);
}

File 14 of 23 : IOneStepProver.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "../state/Machine.sol";
import "../state/Module.sol";
import "../state/Instructions.sol";
import "../state/GlobalState.sol";
import "../bridge/ISequencerInbox.sol";
import "../bridge/IBridge.sol";

struct ExecutionContext {
    uint256 maxInboxMessagesRead;
    IBridge bridge;
}

abstract contract IOneStepProver {
    function executeOneStep(
        ExecutionContext memory execCtx,
        Machine calldata mach,
        Module calldata mod,
        Instruction calldata instruction,
        bytes calldata proof
    ) external view virtual returns (Machine memory result, Module memory resultMod);
}

File 15 of 23 : GlobalState.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

struct GlobalState {
    bytes32[2] bytes32Vals;
    uint64[2] u64Vals;
}

library GlobalStateLib {
    uint16 internal constant BYTES32_VALS_NUM = 2;
    uint16 internal constant U64_VALS_NUM = 2;

    function hash(GlobalState memory state) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(
                    "Global state:",
                    state.bytes32Vals[0],
                    state.bytes32Vals[1],
                    state.u64Vals[0],
                    state.u64Vals[1]
                )
            );
    }

    function getBlockHash(GlobalState memory state) internal pure returns (bytes32) {
        return state.bytes32Vals[0];
    }

    function getSendRoot(GlobalState memory state) internal pure returns (bytes32) {
        return state.bytes32Vals[1];
    }

    function getInboxPosition(GlobalState memory state) internal pure returns (uint64) {
        return state.u64Vals[0];
    }

    function getPositionInMessage(GlobalState memory state) internal pure returns (uint64) {
        return state.u64Vals[1];
    }

    function isEmpty(GlobalState calldata state) internal pure returns (bool) {
        return (state.bytes32Vals[0] == bytes32(0) &&
            state.bytes32Vals[1] == bytes32(0) &&
            state.u64Vals[0] == 0 &&
            state.u64Vals[1] == 0);
    }
}

File 16 of 23 : Instructions.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

struct Instruction {
    uint16 opcode;
    uint256 argumentData;
}

library Instructions {
    uint16 internal constant UNREACHABLE = 0x00;
    uint16 internal constant NOP = 0x01;
    uint16 internal constant RETURN = 0x0F;
    uint16 internal constant CALL = 0x10;
    uint16 internal constant CALL_INDIRECT = 0x11;
    uint16 internal constant LOCAL_GET = 0x20;
    uint16 internal constant LOCAL_SET = 0x21;
    uint16 internal constant GLOBAL_GET = 0x23;
    uint16 internal constant GLOBAL_SET = 0x24;

    uint16 internal constant I32_LOAD = 0x28;
    uint16 internal constant I64_LOAD = 0x29;
    uint16 internal constant F32_LOAD = 0x2A;
    uint16 internal constant F64_LOAD = 0x2B;
    uint16 internal constant I32_LOAD8_S = 0x2C;
    uint16 internal constant I32_LOAD8_U = 0x2D;
    uint16 internal constant I32_LOAD16_S = 0x2E;
    uint16 internal constant I32_LOAD16_U = 0x2F;
    uint16 internal constant I64_LOAD8_S = 0x30;
    uint16 internal constant I64_LOAD8_U = 0x31;
    uint16 internal constant I64_LOAD16_S = 0x32;
    uint16 internal constant I64_LOAD16_U = 0x33;
    uint16 internal constant I64_LOAD32_S = 0x34;
    uint16 internal constant I64_LOAD32_U = 0x35;

    uint16 internal constant I32_STORE = 0x36;
    uint16 internal constant I64_STORE = 0x37;
    uint16 internal constant F32_STORE = 0x38;
    uint16 internal constant F64_STORE = 0x39;
    uint16 internal constant I32_STORE8 = 0x3A;
    uint16 internal constant I32_STORE16 = 0x3B;
    uint16 internal constant I64_STORE8 = 0x3C;
    uint16 internal constant I64_STORE16 = 0x3D;
    uint16 internal constant I64_STORE32 = 0x3E;

    uint16 internal constant MEMORY_SIZE = 0x3F;
    uint16 internal constant MEMORY_GROW = 0x40;

    uint16 internal constant DROP = 0x1A;
    uint16 internal constant SELECT = 0x1B;
    uint16 internal constant I32_CONST = 0x41;
    uint16 internal constant I64_CONST = 0x42;
    uint16 internal constant F32_CONST = 0x43;
    uint16 internal constant F64_CONST = 0x44;
    uint16 internal constant I32_EQZ = 0x45;
    uint16 internal constant I32_RELOP_BASE = 0x46;
    uint16 internal constant IRELOP_EQ = 0;
    uint16 internal constant IRELOP_NE = 1;
    uint16 internal constant IRELOP_LT_S = 2;
    uint16 internal constant IRELOP_LT_U = 3;
    uint16 internal constant IRELOP_GT_S = 4;
    uint16 internal constant IRELOP_GT_U = 5;
    uint16 internal constant IRELOP_LE_S = 6;
    uint16 internal constant IRELOP_LE_U = 7;
    uint16 internal constant IRELOP_GE_S = 8;
    uint16 internal constant IRELOP_GE_U = 9;
    uint16 internal constant IRELOP_LAST = IRELOP_GE_U;

    uint16 internal constant I64_EQZ = 0x50;
    uint16 internal constant I64_RELOP_BASE = 0x51;

    uint16 internal constant I32_UNOP_BASE = 0x67;
    uint16 internal constant IUNOP_CLZ = 0;
    uint16 internal constant IUNOP_CTZ = 1;
    uint16 internal constant IUNOP_POPCNT = 2;
    uint16 internal constant IUNOP_LAST = IUNOP_POPCNT;

    uint16 internal constant I32_ADD = 0x6A;
    uint16 internal constant I32_SUB = 0x6B;
    uint16 internal constant I32_MUL = 0x6C;
    uint16 internal constant I32_DIV_S = 0x6D;
    uint16 internal constant I32_DIV_U = 0x6E;
    uint16 internal constant I32_REM_S = 0x6F;
    uint16 internal constant I32_REM_U = 0x70;
    uint16 internal constant I32_AND = 0x71;
    uint16 internal constant I32_OR = 0x72;
    uint16 internal constant I32_XOR = 0x73;
    uint16 internal constant I32_SHL = 0x74;
    uint16 internal constant I32_SHR_S = 0x75;
    uint16 internal constant I32_SHR_U = 0x76;
    uint16 internal constant I32_ROTL = 0x77;
    uint16 internal constant I32_ROTR = 0x78;

    uint16 internal constant I64_UNOP_BASE = 0x79;

    uint16 internal constant I64_ADD = 0x7C;
    uint16 internal constant I64_SUB = 0x7D;
    uint16 internal constant I64_MUL = 0x7E;
    uint16 internal constant I64_DIV_S = 0x7F;
    uint16 internal constant I64_DIV_U = 0x80;
    uint16 internal constant I64_REM_S = 0x81;
    uint16 internal constant I64_REM_U = 0x82;
    uint16 internal constant I64_AND = 0x83;
    uint16 internal constant I64_OR = 0x84;
    uint16 internal constant I64_XOR = 0x85;
    uint16 internal constant I64_SHL = 0x86;
    uint16 internal constant I64_SHR_S = 0x87;
    uint16 internal constant I64_SHR_U = 0x88;
    uint16 internal constant I64_ROTL = 0x89;
    uint16 internal constant I64_ROTR = 0x8A;

    uint16 internal constant I32_WRAP_I64 = 0xA7;
    uint16 internal constant I64_EXTEND_I32_S = 0xAC;
    uint16 internal constant I64_EXTEND_I32_U = 0xAD;

    uint16 internal constant I32_REINTERPRET_F32 = 0xBC;
    uint16 internal constant I64_REINTERPRET_F64 = 0xBD;
    uint16 internal constant F32_REINTERPRET_I32 = 0xBE;
    uint16 internal constant F64_REINTERPRET_I64 = 0xBF;

    uint16 internal constant I32_EXTEND_8S = 0xC0;
    uint16 internal constant I32_EXTEND_16S = 0xC1;
    uint16 internal constant I64_EXTEND_8S = 0xC2;
    uint16 internal constant I64_EXTEND_16S = 0xC3;
    uint16 internal constant I64_EXTEND_32S = 0xC4;

    uint16 internal constant INIT_FRAME = 0x8002;
    uint16 internal constant ARBITRARY_JUMP = 0x8003;
    uint16 internal constant ARBITRARY_JUMP_IF = 0x8004;
    uint16 internal constant MOVE_FROM_STACK_TO_INTERNAL = 0x8005;
    uint16 internal constant MOVE_FROM_INTERNAL_TO_STACK = 0x8006;
    uint16 internal constant DUP = 0x8008;
    uint16 internal constant CROSS_MODULE_CALL = 0x8009;
    uint16 internal constant CALLER_MODULE_INTERNAL_CALL = 0x800A;

    uint16 internal constant GET_GLOBAL_STATE_BYTES32 = 0x8010;
    uint16 internal constant SET_GLOBAL_STATE_BYTES32 = 0x8011;
    uint16 internal constant GET_GLOBAL_STATE_U64 = 0x8012;
    uint16 internal constant SET_GLOBAL_STATE_U64 = 0x8013;

    uint16 internal constant READ_PRE_IMAGE = 0x8020;
    uint16 internal constant READ_INBOX_MESSAGE = 0x8021;
    uint16 internal constant HALT_AND_SET_FINISHED = 0x8022;

    uint256 internal constant INBOX_INDEX_SEQUENCER = 0;
    uint256 internal constant INBOX_INDEX_DELAYED = 1;

    function hash(Instruction memory inst) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("Instruction:", inst.opcode, inst.argumentData));
    }
}

File 17 of 23 : Machine.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./ValueStack.sol";
import "./Instructions.sol";
import "./StackFrame.sol";

enum MachineStatus {
    RUNNING,
    FINISHED,
    ERRORED,
    TOO_FAR
}

struct Machine {
    MachineStatus status;
    ValueStack valueStack;
    ValueStack internalStack;
    StackFrameWindow frameStack;
    bytes32 globalStateHash;
    uint32 moduleIdx;
    uint32 functionIdx;
    uint32 functionPc;
    bytes32 modulesRoot;
}

library MachineLib {
    using StackFrameLib for StackFrameWindow;
    using ValueStackLib for ValueStack;

    function hash(Machine memory mach) internal pure returns (bytes32) {
        // Warning: the non-running hashes are replicated in Challenge
        if (mach.status == MachineStatus.RUNNING) {
            return
                keccak256(
                    abi.encodePacked(
                        "Machine running:",
                        mach.valueStack.hash(),
                        mach.internalStack.hash(),
                        mach.frameStack.hash(),
                        mach.globalStateHash,
                        mach.moduleIdx,
                        mach.functionIdx,
                        mach.functionPc,
                        mach.modulesRoot
                    )
                );
        } else if (mach.status == MachineStatus.FINISHED) {
            return keccak256(abi.encodePacked("Machine finished:", mach.globalStateHash));
        } else if (mach.status == MachineStatus.ERRORED) {
            return keccak256(abi.encodePacked("Machine errored:"));
        } else if (mach.status == MachineStatus.TOO_FAR) {
            return keccak256(abi.encodePacked("Machine too far:"));
        } else {
            revert("BAD_MACH_STATUS");
        }
    }
}

File 18 of 23 : Module.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./ModuleMemoryCompact.sol";

struct Module {
    bytes32 globalsMerkleRoot;
    ModuleMemory moduleMemory;
    bytes32 tablesMerkleRoot;
    bytes32 functionsMerkleRoot;
    uint32 internalsOffset;
}

library ModuleLib {
    using ModuleMemoryCompactLib for ModuleMemory;

    function hash(Module memory mod) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(
                    "Module:",
                    mod.globalsMerkleRoot,
                    mod.moduleMemory.hash(),
                    mod.tablesMerkleRoot,
                    mod.functionsMerkleRoot,
                    mod.internalsOffset
                )
            );
    }
}

File 19 of 23 : ModuleMemoryCompact.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

struct ModuleMemory {
    uint64 size;
    uint64 maxSize;
    bytes32 merkleRoot;
}

library ModuleMemoryCompactLib {
    function hash(ModuleMemory memory mem) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("Memory:", mem.size, mem.maxSize, mem.merkleRoot));
    }
}

File 20 of 23 : StackFrame.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./Value.sol";

struct StackFrame {
    Value returnPc;
    bytes32 localsMerkleRoot;
    uint32 callerModule;
    uint32 callerModuleInternals;
}

struct StackFrameWindow {
    StackFrame[] proved;
    bytes32 remainingHash;
}

library StackFrameLib {
    using ValueLib for Value;

    function hash(StackFrame memory frame) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(
                    "Stack frame:",
                    frame.returnPc.hash(),
                    frame.localsMerkleRoot,
                    frame.callerModule,
                    frame.callerModuleInternals
                )
            );
    }

    function hash(StackFrameWindow memory window) internal pure returns (bytes32 h) {
        h = window.remainingHash;
        for (uint256 i = 0; i < window.proved.length; i++) {
            h = keccak256(abi.encodePacked("Stack frame stack:", hash(window.proved[i]), h));
        }
    }

    function peek(StackFrameWindow memory window) internal pure returns (StackFrame memory) {
        require(window.proved.length == 1, "BAD_WINDOW_LENGTH");
        return window.proved[0];
    }

    function pop(StackFrameWindow memory window) internal pure returns (StackFrame memory frame) {
        require(window.proved.length == 1, "BAD_WINDOW_LENGTH");
        frame = window.proved[0];
        window.proved = new StackFrame[](0);
    }

    function push(StackFrameWindow memory window, StackFrame memory frame) internal pure {
        StackFrame[] memory newProved = new StackFrame[](window.proved.length + 1);
        for (uint256 i = 0; i < window.proved.length; i++) {
            newProved[i] = window.proved[i];
        }
        newProved[window.proved.length] = frame;
        window.proved = newProved;
    }
}

File 21 of 23 : Value.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

enum ValueType {
    I32,
    I64,
    F32,
    F64,
    REF_NULL,
    FUNC_REF,
    INTERNAL_REF
}

struct Value {
    ValueType valueType;
    uint256 contents;
}

library ValueLib {
    function hash(Value memory val) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("Value:", val.valueType, val.contents));
    }

    function maxValueType() internal pure returns (ValueType) {
        return ValueType.INTERNAL_REF;
    }

    function assumeI32(Value memory val) internal pure returns (uint32) {
        uint256 uintval = uint256(val.contents);
        require(val.valueType == ValueType.I32, "NOT_I32");
        require(uintval < (1 << 32), "BAD_I32");
        return uint32(uintval);
    }

    function assumeI64(Value memory val) internal pure returns (uint64) {
        uint256 uintval = uint256(val.contents);
        require(val.valueType == ValueType.I64, "NOT_I64");
        require(uintval < (1 << 64), "BAD_I64");
        return uint64(uintval);
    }

    function newRefNull() internal pure returns (Value memory) {
        return Value({valueType: ValueType.REF_NULL, contents: 0});
    }

    function newI32(uint32 x) internal pure returns (Value memory) {
        return Value({valueType: ValueType.I32, contents: uint256(x)});
    }

    function newI64(uint64 x) internal pure returns (Value memory) {
        return Value({valueType: ValueType.I64, contents: uint256(x)});
    }

    function newBoolean(bool x) internal pure returns (Value memory) {
        if (x) {
            return newI32(uint32(1));
        } else {
            return newI32(uint32(0));
        }
    }
}

File 22 of 23 : ValueArray.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./Value.sol";

struct ValueArray {
    Value[] inner;
}

library ValueArrayLib {
    function get(ValueArray memory arr, uint256 index) internal pure returns (Value memory) {
        return arr.inner[index];
    }

    function set(
        ValueArray memory arr,
        uint256 index,
        Value memory val
    ) internal pure {
        arr.inner[index] = val;
    }

    function length(ValueArray memory arr) internal pure returns (uint256) {
        return arr.inner.length;
    }

    function push(ValueArray memory arr, Value memory val) internal pure {
        Value[] memory newInner = new Value[](arr.inner.length + 1);
        for (uint256 i = 0; i < arr.inner.length; i++) {
            newInner[i] = arr.inner[i];
        }
        newInner[arr.inner.length] = val;
        arr.inner = newInner;
    }

    function pop(ValueArray memory arr) internal pure returns (Value memory popped) {
        popped = arr.inner[arr.inner.length - 1];
        Value[] memory newInner = new Value[](arr.inner.length - 1);
        for (uint256 i = 0; i < newInner.length; i++) {
            newInner[i] = arr.inner[i];
        }
        arr.inner = newInner;
    }
}

File 23 of 23 : ValueStack.sol
// Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./Value.sol";
import "./ValueArray.sol";

struct ValueStack {
    ValueArray proved;
    bytes32 remainingHash;
}

library ValueStackLib {
    using ValueLib for Value;
    using ValueArrayLib for ValueArray;

    function hash(ValueStack memory stack) internal pure returns (bytes32 h) {
        h = stack.remainingHash;
        uint256 len = stack.proved.length();
        for (uint256 i = 0; i < len; i++) {
            h = keccak256(abi.encodePacked("Value stack:", stack.proved.get(i).hash(), h));
        }
    }

    function peek(ValueStack memory stack) internal pure returns (Value memory) {
        uint256 len = stack.proved.length();
        return stack.proved.get(len - 1);
    }

    function pop(ValueStack memory stack) internal pure returns (Value memory) {
        return stack.proved.pop();
    }

    function push(ValueStack memory stack, Value memory val) internal pure {
        return stack.proved.push(val);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"indexed":true,"internalType":"bytes32","name":"challengeRoot","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"challengedSegmentStart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"challengedSegmentLength","type":"uint256"},{"indexed":false,"internalType":"bytes32[]","name":"chainHashes","type":"bytes32[]"}],"name":"Bisected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"indexed":false,"internalType":"enum IChallengeManager.ChallengeTerminationType","name":"kind","type":"uint8"}],"name":"ChallengeEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"blockSteps","type":"uint256"}],"name":"ExecutionChallengeBegun","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"components":[{"internalType":"bytes32[2]","name":"bytes32Vals","type":"bytes32[2]"},{"internalType":"uint64[2]","name":"u64Vals","type":"uint64[2]"}],"indexed":false,"internalType":"struct GlobalState","name":"startState","type":"tuple"},{"components":[{"internalType":"bytes32[2]","name":"bytes32Vals","type":"bytes32[2]"},{"internalType":"uint64[2]","name":"u64Vals","type":"uint64[2]"}],"indexed":false,"internalType":"struct GlobalState","name":"endState","type":"tuple"}],"name":"InitiatedChallenge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"OneStepProofCompleted","type":"event"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"components":[{"internalType":"uint256","name":"oldSegmentsStart","type":"uint256"},{"internalType":"uint256","name":"oldSegmentsLength","type":"uint256"},{"internalType":"bytes32[]","name":"oldSegments","type":"bytes32[]"},{"internalType":"uint256","name":"challengePosition","type":"uint256"}],"internalType":"struct ChallengeLib.SegmentSelection","name":"selection","type":"tuple"},{"internalType":"bytes32[]","name":"newSegments","type":"bytes32[]"}],"name":"bisectExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"contract IBridge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"components":[{"internalType":"uint256","name":"oldSegmentsStart","type":"uint256"},{"internalType":"uint256","name":"oldSegmentsLength","type":"uint256"},{"internalType":"bytes32[]","name":"oldSegments","type":"bytes32[]"},{"internalType":"uint256","name":"challengePosition","type":"uint256"}],"internalType":"struct ChallengeLib.SegmentSelection","name":"selection","type":"tuple"},{"internalType":"enum MachineStatus[2]","name":"machineStatuses","type":"uint8[2]"},{"internalType":"bytes32[2]","name":"globalStateHashes","type":"bytes32[2]"},{"internalType":"uint256","name":"numSteps","type":"uint256"}],"name":"challengeExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"challengeInfo","outputs":[{"components":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"internalType":"struct ChallengeLib.Participant","name":"current","type":"tuple"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"internalType":"struct ChallengeLib.Participant","name":"next","type":"tuple"},{"internalType":"uint256","name":"lastMoveTimestamp","type":"uint256"},{"internalType":"bytes32","name":"wasmModuleRoot","type":"bytes32"},{"internalType":"bytes32","name":"challengeStateHash","type":"bytes32"},{"internalType":"uint64","name":"maxInboxMessages","type":"uint64"},{"internalType":"enum ChallengeLib.ChallengeMode","name":"mode","type":"uint8"}],"internalType":"struct ChallengeLib.Challenge","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"challenges","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"internalType":"struct ChallengeLib.Participant","name":"current","type":"tuple"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"timeLeft","type":"uint256"}],"internalType":"struct ChallengeLib.Participant","name":"next","type":"tuple"},{"internalType":"uint256","name":"lastMoveTimestamp","type":"uint256"},{"internalType":"bytes32","name":"wasmModuleRoot","type":"bytes32"},{"internalType":"bytes32","name":"challengeStateHash","type":"bytes32"},{"internalType":"uint64","name":"maxInboxMessages","type":"uint64"},{"internalType":"enum ChallengeLib.ChallengeMode","name":"mode","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"clearChallenge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"wasmModuleRoot_","type":"bytes32"},{"internalType":"enum MachineStatus[2]","name":"startAndEndMachineStatuses_","type":"uint8[2]"},{"components":[{"internalType":"bytes32[2]","name":"bytes32Vals","type":"bytes32[2]"},{"internalType":"uint64[2]","name":"u64Vals","type":"uint64[2]"}],"internalType":"struct GlobalState[2]","name":"startAndEndGlobalStates_","type":"tuple[2]"},{"internalType":"uint64","name":"numBlocks","type":"uint64"},{"internalType":"address","name":"asserter_","type":"address"},{"internalType":"address","name":"challenger_","type":"address"},{"internalType":"uint256","name":"asserterTimeLeft_","type":"uint256"},{"internalType":"uint256","name":"challengerTimeLeft_","type":"uint256"}],"name":"createChallenge","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"currentResponder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IChallengeResultReceiver","name":"resultReceiver_","type":"address"},{"internalType":"contract ISequencerInbox","name":"sequencerInbox_","type":"address"},{"internalType":"contract IBridge","name":"bridge_","type":"address"},{"internalType":"contract IOneStepProofEntry","name":"osp_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"isTimedOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"},{"components":[{"internalType":"uint256","name":"oldSegmentsStart","type":"uint256"},{"internalType":"uint256","name":"oldSegmentsLength","type":"uint256"},{"internalType":"bytes32[]","name":"oldSegments","type":"bytes32[]"},{"internalType":"uint256","name":"challengePosition","type":"uint256"}],"internalType":"struct ChallengeLib.SegmentSelection","name":"selection","type":"tuple"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"oneStepProveExecution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"osp","outputs":[{"internalType":"contract IOneStepProofEntry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resultReceiver","outputs":[{"internalType":"contract IChallengeResultReceiver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sequencerInbox","outputs":[{"internalType":"contract ISequencerInbox","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"challengeIndex","type":"uint64"}],"name":"timeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalChallengesCreated","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"}]

60a06040523060805234801561001457600080fd5b50608051613023610030600039600061122501526130236000f3fe608060405234801561001057600080fd5b50600436106100e05760003560e01c80639ede42b9116100875780639ede42b914610251578063a521b03214610274578063d248d12414610287578063e78cea921461029a578063ee35f327146102ad578063f26a62c6146102c0578063f8c8765e146102d3578063fb7be0a1146102e657600080fd5b806314eab5e7146100e55780631b45c86a1461011557806323a9ef231461012a5780633504f1d71461015557806356e9df97146101685780635ef489e61461017b5780637fd07a9c1461018e5780638f1d3776146101ae575b600080fd5b6100f86100f33660046125f8565b6102f9565b6040516001600160401b0390911681526020015b60405180910390f35b61012861012336600461268b565b610601565b005b61013d61013836600461268b565b6106d1565b6040516001600160a01b03909116815260200161010c565b60025461013d906001600160a01b031681565b61012861017636600461268b565b6106f5565b6000546100f8906001600160401b031681565b6101a161019c36600461268b565b610863565b60405161010c91906126e8565b61023e6101bc36600461275a565b6001602081815260009283526040928390208351808501855281546001600160a01b0390811682529382015481840152845180860190955260028201549093168452600381015491840191909152600481015460058201546006830154600790930154939493919290916001600160401b03811690600160401b900460ff1687565b60405161010c9796959493929190612773565b61026461025f36600461268b565b61093c565b604051901515815260200161010c565b6101286102823660046127d0565b610963565b610128610295366004612874565b610dd9565b60045461013d906001600160a01b031681565b60035461013d906001600160a01b031681565b60055461013d906001600160a01b031681565b6101286102e1366004612906565b61121a565b6101286102f4366004612962565b61138b565b6002546000906001600160a01b0316331461034e5760405162461bcd60e51b815260206004820152601060248201526f13d3931657d493d313155417d0d2105360821b60448201526064015b60405180910390fd5b6040805160028082526060820183526000926020830190803683370190505090506103a461037f60208b018b612a06565b61039f8a60005b6080020180360381019061039a9190612ac5565b6119fb565b611a7c565b816000815181106103b7576103b76129f0565b60209081029190910101526103e68960016020020160208101906103db9190612a06565b61039f8a6001610386565b816001815181106103f9576103f96129f0565b6020908102919091010152600080548190819061041e906001600160401b0316612b73565b91906101000a8154816001600160401b0302191690836001600160401b031602179055905060006001600160401b0316816001600160401b0316141561046657610466612b9a565b6001600160401b0381166000908152600160205260408120600581018d9055906104a061049b368d90038d0160808e01612ac5565b611ba0565b905060026104b460408e0160208f01612a06565b60038111156104c5576104c56126be565b14806104f3575060006104e86104e3368e90038e0160808f01612ac5565b611bb5565b6001600160401b0316115b15610506578061050281612b73565b9150505b6007820180546040805180820182526001600160a01b038d811680835260209283018d90526002880180546001600160a01b03199081169092179055600388018d905583518085018552918e16808352919092018b90528654909116178555600185018990554260048601556001600160401b0384811668ffffffffffffffffff1990931692909217600160401b179092559051908416907f76604fe17af46c9b5f53ffe99ff23e0f655dab91886b07ac1fc0254319f7145a906105d0908e906080820190612bfa565b60405180910390a26105ee8360008c6001600160401b031687611bc4565b5090925050505b98975050505050505050565b60006001600160401b038216600090815260016020526040902060070154600160401b900460ff16600281111561063a5761063a6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b8152509061067a5760405162461bcd60e51b81526004016103459190612c16565b506106848161093c565b6106c35760405162461bcd60e51b815260206004820152601060248201526f54494d454f55545f444541444c494e4560801b6044820152606401610345565b6106ce816000611c5a565b50565b6001600160401b03166000908152600160205260409020546001600160a01b031690565b6002546001600160a01b031633146107425760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b6044820152606401610345565b60006001600160401b038216600090815260016020526040902060070154600160401b900460ff16600281111561077b5761077b6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b815250906107bb5760405162461bcd60e51b81526004016103459190612c16565b506001600160401b038116600081815260016020819052604080832080546001600160a01b031990811682559281018490556002810180549093169092556003808301849055600483018490556005830184905560068301939093556007909101805468ffffffffffffffffff19169055517ffdaece6c274a4b56af16761f83fd6b1062823192630ea08e019fdf9b2d747f409161085891612c6b565b60405180910390a250565b61086b612553565b6001600160401b0382811660009081526001602081815260409283902083516101208101855281546001600160a01b0390811660e0830190815294830154610100830152938152845180860186526002808401549095168152600383015481850152928101929092526004810154938201939093526005830154606082015260068301546080820152600783015493841660a08201529260c0840191600160401b90910460ff1690811115610922576109226126be565b6002811115610933576109336126be565b90525092915050565b6001600160401b038116600090815260016020526040812061095d90611d88565b92915050565b6001600160401b038416600090815260016020526040812085918591610988846106d1565b6001600160a01b0316336001600160a01b0316146109b85760405162461bcd60e51b815260040161034590612c85565b6109c18461093c565b156109de5760405162461bcd60e51b815260040161034590612caa565b60008260028111156109f2576109f26126be565b1415610a605760006007820154600160401b900460ff166002811115610a1a57610a1a6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b81525090610a5a5760405162461bcd60e51b81526004016103459190612c16565b50610b1f565b6001826002811115610a7457610a746126be565b1415610abe5760016007820154600160401b900460ff166002811115610a9c57610a9c6126be565b14610ab95760405162461bcd60e51b815260040161034590612cd1565b610b1f565b6002826002811115610ad257610ad26126be565b1415610b175760026007820154600160401b900460ff166002811115610afa57610afa6126be565b14610ab95760405162461bcd60e51b815260040161034590612cf9565b610b1f612b9a565b610b6d83356020850135610b366040870187612d25565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611da092505050565b816006015414610b8f5760405162461bcd60e51b815260040161034590612d75565b6002610b9e6040850185612d25565b90501080610bc957506001610bb66040850185612d25565b610bc1929150612d98565b836060013510155b15610be65760405162461bcd60e51b815260040161034590612daf565b600080610bf289611dd7565b9150915060018111610c325760405162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b6044820152606401610345565b806028811115610c40575060285b610c4b816001612dda565b8814610c885760405162461bcd60e51b815260206004820152600c60248201526b57524f4e475f44454752454560a01b6044820152606401610345565b50610cd28989896000818110610ca057610ca06129f0565b602002919091013590508a8a610cb7600182612d98565b818110610cc657610cc66129f0565b90506020020135611e68565b610d118a83838b8b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bc492505050565b50600090505b6007820154600160401b900460ff166002811115610d3757610d376126be565b1415610d435750610dd0565b6040805180820190915281546001600160a01b03168152600182015460208201526004820154610d739042612d98565b81602001818151610d849190612d98565b90525060028201805483546001600160a01b038083166001600160a01b031992831617865560038601805460018801558551929093169116179091556020909101519055426004909101555b50505050505050565b6001600160401b038416600090815260016020526040902084908490600290610e01846106d1565b6001600160a01b0316336001600160a01b031614610e315760405162461bcd60e51b815260040161034590612c85565b610e3a8461093c565b15610e575760405162461bcd60e51b815260040161034590612caa565b6000826002811115610e6b57610e6b6126be565b1415610ed95760006007820154600160401b900460ff166002811115610e9357610e936126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b81525090610ed35760405162461bcd60e51b81526004016103459190612c16565b50610f98565b6001826002811115610eed57610eed6126be565b1415610f375760016007820154600160401b900460ff166002811115610f1557610f156126be565b14610f325760405162461bcd60e51b815260040161034590612cd1565b610f98565b6002826002811115610f4b57610f4b6126be565b1415610f905760026007820154600160401b900460ff166002811115610f7357610f736126be565b14610f325760405162461bcd60e51b815260040161034590612cf9565b610f98612b9a565b610faf83356020850135610b366040870187612d25565b816006015414610fd15760405162461bcd60e51b815260040161034590612d75565b6002610fe06040850185612d25565b9050108061100b57506001610ff86040850185612d25565b611003929150612d98565b836060013510155b156110285760405162461bcd60e51b815260040161034590612daf565b6001600160401b0388166000908152600160205260408120908061104b8a611dd7565b9092509050600181146110705760405162461bcd60e51b815260040161034590612df2565b5060055460408051808201825260078501546001600160401b031681526004546001600160a01b0390811660208301526000931691635d3adcfb919085906110ba908f018f612d25565b8f606001358181106110ce576110ce6129f0565b905060200201358d8d6040518663ffffffff1660e01b81526004016110f7959493929190612e14565b60206040518083038186803b15801561110f57600080fd5b505afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190612e6b565b905061115660408b018b612d25565b61116560608d01356001612dda565b818110611174576111746129f0565b905060200201358114156111b95760405162461bcd60e51b815260206004820152600c60248201526b14d0535157d3d4d417d1539160a21b6044820152606401610345565b6040516001600160401b038c16907fc2cc42e04ff8c36de71c6a2937ea9f161dd0dd9e175f00caa26e5200643c781e90600090a261120e8b6001600160401b0316600090815260016020526040812060060155565b5060009150610d179050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156112a85760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610345565b6002546001600160a01b0316156112f05760405162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b6044820152606401610345565b6001600160a01b03841661133b5760405162461bcd60e51b81526020600482015260126024820152712727afa922a9aaa62a2fa922a1a2a4ab22a960711b6044820152606401610345565b600280546001600160a01b039586166001600160a01b0319918216179091556003805494861694821694909417909355600480549285169284169290921790915560058054919093169116179055565b6001600160401b0385166000908152600160208190526040909120869186916113b3846106d1565b6001600160a01b0316336001600160a01b0316146113e35760405162461bcd60e51b815260040161034590612c85565b6113ec8461093c565b156114095760405162461bcd60e51b815260040161034590612caa565b600082600281111561141d5761141d6126be565b141561148b5760006007820154600160401b900460ff166002811115611445576114456126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b815250906114855760405162461bcd60e51b81526004016103459190612c16565b5061154a565b600182600281111561149f5761149f6126be565b14156114e95760016007820154600160401b900460ff1660028111156114c7576114c76126be565b146114e45760405162461bcd60e51b815260040161034590612cd1565b61154a565b60028260028111156114fd576114fd6126be565b14156115425760026007820154600160401b900460ff166002811115611525576115256126be565b146114e45760405162461bcd60e51b815260040161034590612cf9565b61154a612b9a565b61156183356020850135610b366040870187612d25565b8160060154146115835760405162461bcd60e51b815260040161034590612d75565b60026115926040850185612d25565b905010806115bd575060016115aa6040850185612d25565b6115b5929150612d98565b836060013510155b156115da5760405162461bcd60e51b815260040161034590612daf565b60018510156116215760405162461bcd60e51b815260206004820152601360248201527210d2105313115391d157d513d3d7d4d213d495606a1b6044820152606401610345565b6508000000000085111561166c5760405162461bcd60e51b81526020600482015260126024820152714348414c4c454e47455f544f4f5f4c4f4e4760701b6044820152606401610345565b6116ae8861168e61168060208b018b612a06565b8960005b6020020135611a7c565b6116a96116a160408c0160208d01612a06565b8a6001611684565b611e68565b6001600160401b038916600090815260016020526040812090806116d18b611dd7565b91509150806001146116f55760405162461bcd60e51b815260040161034590612df2565b600161170460208c018c612a06565b6003811115611715576117156126be565b146117cf5761172a60408b0160208c01612a06565b600381111561173b5761173b6126be565b61174860208c018c612a06565b6003811115611759576117596126be565b14801561176a5750883560208a0135145b6117a65760405162461bcd60e51b815260206004820152600d60248201526c48414c5445445f4348414e474560981b6044820152606401610345565b6117c78c6001600160401b0316600090815260016020526040812060060155565b505050611936565b60026117e160408c0160208d01612a06565b60038111156117f2576117f26126be565b141561183b57883560208a01351461183b5760405162461bcd60e51b815260206004820152600c60248201526b4552524f525f4348414e474560a01b6044820152606401610345565b604080516002808252606082018352600092602083019080368337505050600585015490915061186d908b3590611f3d565b81600081518110611880576118806129f0565b60209081029190910101526118ae8b60016020020160208101906118a49190612a06565b60208c01356120c9565b816001815181106118c1576118c16129f0565b602090810291909101015260078401805460ff60401b1916600160411b1790556118ee8d60008b84611bc4565b8c6001600160401b03167f24e032e170243bbea97e140174b22dc7e54fb85925afbf52c70e001cd6af16db8460405161192991815260200190565b60405180910390a2505050505b60006007820154600160401b900460ff166002811115611958576119586126be565b141561196457506119f1565b6040805180820190915281546001600160a01b031681526001820154602082015260048201546119949042612d98565b816020018181516119a59190612d98565b90525060028201805483546001600160a01b038083166001600160a01b031992831617865560038601805460018801558551929093169116179091556020909101519055426004909101555b5050505050505050565b80518051602091820151828401518051908401516040516c23b637b130b61039ba30ba329d60991b95810195909552602d850193909352604d8401919091526001600160c01b031960c091821b8116606d85015291901b166075820152600090607d015b604051602081830303815290604052805190602001209050919050565b60006001836003811115611a9257611a926126be565b1415611ad8576040516b213637b1b59039ba30ba329d60a11b6020820152602c8101839052604c015b60405160208183030381529060405280519060200120905061095d565b6002836003811115611aec57611aec6126be565b1415611b225760405174213637b1b59039ba30ba32961032b93937b932b21d60591b602082015260358101839052605501611abb565b6003836003811115611b3657611b366126be565b1415611b655760405174213637b1b59039ba30ba3296103a37b7903330b91d60591b6020820152603501611abb565b60405162461bcd60e51b815260206004820152601060248201526f4241445f424c4f434b5f53544154555360801b6044820152606401610345565b6020810151600090815b602002015192915050565b60208101516000906001611baa565b6001821015611bd557611bd5612b9a565b600281511015611be757611be7612b9a565b6000611bf4848484611da0565b6001600160401b038616600081815260016020526040908190206006018390555191925082917f86b34e9455464834eca718f62d4481437603bb929d8a78ccde5d1bc79fa06d6890611c4b90889088908890612e84565b60405180910390a35050505050565b6001600160401b03821660008181526001602081905260408083206002808201805483546001600160a01b0319808216865596850188905595811690915560038301869055600480840187905560058401879055600684019690965560078301805468ffffffffffffffffff1916905590549251630357aa4960e01b8152948501959095526001600160a01b03948516602485018190529285166044850181905290949293909290911690630357aa4990606401600060405180830381600087803b158015611d2857600080fd5b505af1158015611d3c573d6000803e3d6000fd5b50505050846001600160401b03167ffdaece6c274a4b56af16761f83fd6b1062823192630ea08e019fdf9b2d747f4085604051611d799190612c6b565b60405180910390a25050505050565b6001810154600090611d9983612172565b1192915050565b6000838383604051602001611db793929190612ed9565b6040516020818303038152906040528051906020012090505b9392505050565b600080806001611dea6040860186612d25565b611df5929150612d98565b9050611e05816020860135612f31565b9150611e15606085013583612f45565b611e20908535612dda565b92506002611e316040860186612d25565b611e3c929150612d98565b84606001351415611e6257611e55816020860135612f64565b611e5f9083612dda565b91505b50915091565b81611e766040850185612d25565b8560600135818110611e8a57611e8a6129f0565b9050602002013514611ecc5760405162461bcd60e51b815260206004820152600b60248201526a15d493d391d7d4d510549560aa1b6044820152606401610345565b80611eda6040850185612d25565b611ee960608701356001612dda565b818110611ef857611ef86129f0565b905060200201351415611f385760405162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b6044820152606401610345565b505050565b60408051600380825260808201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081611f58575050604080518082018252600080825260209182018190528251808401909352600483529082015290915081600081518110611fba57611fba6129f0565b6020026020010181905250611fcf6000612184565b81600181518110611fe257611fe26129f0565b6020026020010181905250611ff76000612184565b8160028151811061200a5761200a6129f0565b602090810291909101810191909152604080518083018252838152815180830190925280825260009282019290925261205a60408051606080820183529181019182529081526000602082015290565b604080518082018252606080825260006020808401829052845161012081018652828152908101879052938401859052908301829052608083018a905260a0830181905260c0830181905260e08301526101008201889052906120bc816121b7565b9998505050505050505050565b600060018360038111156120df576120df6126be565b14156120f65781604051602001611abb9190612f78565b600283600381111561210a5761210a6126be565b1415612134576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001611abb565b6003836003811115612148576121486126be565b1415611b65576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001611abb565b600081600401544261095d9190612d98565b604080518082019091526000808252602082015250604080518082019091526000815263ffffffff909116602082015290565b600080825160038111156121cd576121cd6126be565b1415612283576121e08260200151612370565b6121ed8360400151612370565b6121fa84606001516123f5565b608085015160a086015160c087015160e0808901516101008a01516040516f26b0b1b434b73290393ab73734b7339d60811b602082015260308101999099526050890197909752607088019590955260908701939093526001600160e01b031991831b821660b0870152821b811660b486015291901b1660b883015260bc82015260dc01611a5f565b600182516003811115612298576122986126be565b14156122b3578160800151604051602001611a5f9190612f78565b6002825160038111156122c8576122c86126be565b14156122f2576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001611a5f565b600382516003811115612307576123076126be565b1415612331576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001611a5f565b60405162461bcd60e51b815260206004820152600f60248201526e4241445f4d4143485f53544154555360881b6044820152606401610345565b919050565b60208101518151515160005b818110156123ee57835161239990612394908361248e565b6124c6565b6040516b2b30b63ab29039ba30b1b59d60a11b6020820152602c810191909152604c8101849052606c0160405160208183030381529060405280519060200120925080806123e690612f9d565b91505061237c565b5050919050565b602081015160005b8251518110156124885761242d83600001518281518110612420576124206129f0565b60200260200101516124e3565b6040517129ba30b1b590333930b6b29039ba30b1b59d60711b6020820152603281019190915260528101839052607201604051602081830303815290604052805190602001209150808061248090612f9d565b9150506123fd565b50919050565b604080518082019091526000808252602082015282518051839081106124b6576124b66129f0565b6020026020010151905092915050565b600081600001518260200151604051602001611a5f929190612fb8565b60006124f282600001516124c6565b602080840151604080860151606087015191516b29ba30b1b590333930b6b29d60a11b94810194909452602c840194909452604c8301919091526001600160e01b031960e093841b8116606c840152921b9091166070820152607401611a5f565b604080516101208101909152600060e0820181815261010083019190915281908152602001612592604080518082019091526000808252602082015290565b815260006020820181905260408201819052606082018190526080820181905260a09091015290565b806040810183101561095d57600080fd5b80356001600160401b038116811461236b57600080fd5b6001600160a01b03811681146106ce57600080fd5b600080600080600080600080610200898b03121561261557600080fd5b883597506126268a60208b016125bb565b965061016089018a81111561263a57600080fd5b60608a019650612649816125cc565b95505061018089013561265b816125e3565b93506101a089013561266c816125e3565b979a96995094979396929592945050506101c0820135916101e0013590565b60006020828403121561269d57600080fd5b611dd0826125cc565b80516001600160a01b03168252602090810151910152565b634e487b7160e01b600052602160045260246000fd5b600381106126e4576126e46126be565b9052565b6000610120820190506126fc8284516126a6565b602083015161270e60408401826126a6565b5060408301516080830152606083015160a0830152608083015160c08301526001600160401b0360a08401511660e083015260c08301516127536101008401826126d4565b5092915050565b60006020828403121561276c57600080fd5b5035919050565b6101208101612782828a6126a6565b61278f60408301896126a6565b8660808301528560a08301528460c08301526001600160401b03841660e08301526105f56101008301846126d4565b60006080828403121561248857600080fd5b600080600080606085870312156127e657600080fd5b6127ef856125cc565b935060208501356001600160401b038082111561280b57600080fd5b612817888389016127be565b9450604087013591508082111561282d57600080fd5b818701915087601f83011261284157600080fd5b81358181111561285057600080fd5b8860208260051b850101111561286557600080fd5b95989497505060200194505050565b6000806000806060858703121561288a57600080fd5b612893856125cc565b935060208501356001600160401b03808211156128af57600080fd5b6128bb888389016127be565b945060408701359150808211156128d157600080fd5b818701915087601f8301126128e557600080fd5b8135818111156128f457600080fd5b88602082850101111561286557600080fd5b6000806000806080858703121561291c57600080fd5b8435612927816125e3565b93506020850135612937816125e3565b92506040850135612947816125e3565b91506060850135612957816125e3565b939692955090935050565b600080600080600060e0868803121561297a57600080fd5b612983866125cc565b945060208601356001600160401b0381111561299e57600080fd5b6129aa888289016127be565b9450506129ba87604088016125bb565b92506129c987608088016125bb565b9497939650919460c0013592915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215612a1857600080fd5b813560048110611dd057600080fd5b604080519081016001600160401b0381118282101715612a4957612a496129da565b60405290565b600082601f830112612a6057600080fd5b604051604081018181106001600160401b0382111715612a8257612a826129da565b8060405250806040840185811115612a9957600080fd5b845b81811015612aba57612aac816125cc565b835260209283019201612a9b565b509195945050505050565b600060808284031215612ad757600080fd5b604051604081018181106001600160401b0382111715612af957612af96129da565b604052601f83018413612b0b57600080fd5b612b13612a27565b806040850186811115612b2557600080fd5b855b81811015612b3f578035845260209384019301612b27565b50818452612b4d8782612a4f565b6020850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681811415612b9057612b90612b5d565b6001019392505050565b634e487b7160e01b600052600160045260246000fd5b604081833760006040838101828152908301915b6002811015612bf3576001600160401b03612bde846125cc565b16825260209283019290910190600101612bc4565b5050505050565b6101008101612c098285612bb0565b611dd06080830184612bb0565b600060208083528351808285015260005b81811015612c4357858101830151858201604001528201612c27565b81811115612c55576000604083870101525b50601f01601f1916929092016040019392505050565b6020810160048310612c7f57612c7f6126be565b91905290565b6020808252600b908201526a21a420a62fa9a2a72222a960a91b604082015260600190565b6020808252600d908201526c4348414c5f444541444c494e4560981b604082015260600190565b6020808252600e908201526d4348414c5f4e4f545f424c4f434b60901b604082015260600190565b60208082526012908201527121a420a62fa727aa2fa2ac22a1aaaa24a7a760711b604082015260600190565b6000808335601e19843603018112612d3c57600080fd5b8301803591506001600160401b03821115612d5657600080fd5b6020019150600581901b3603821315612d6e57600080fd5b9250929050565b6020808252600990820152684249535f535441544560b81b604082015260600190565b600082821015612daa57612daa612b5d565b500390565b6020808252601190820152704241445f4348414c4c454e47455f504f5360781b604082015260600190565b60008219821115612ded57612ded612b5d565b500190565b602080825260089082015267544f4f5f4c4f4e4760c01b604082015260600190565b8551815260018060a01b03602087015116602082015284604082015283606082015260a060808201528160a0820152818360c0830137600081830160c090810191909152601f909201601f19160101949350505050565b600060208284031215612e7d57600080fd5b5051919050565b6000606082018583526020858185015260606040850152818551808452608086019150828701935060005b81811015612ecb57845183529383019391830191600101612eaf565b509098975050505050505050565b83815260006020848184015260408301845182860160005b82811015612f0d57815184529284019290840190600101612ef1565b509198975050505050505050565b634e487b7160e01b600052601260045260246000fd5b600082612f4057612f40612f1b565b500490565b6000816000190483118215151615612f5f57612f5f612b5d565b500290565b600082612f7357612f73612f1b565b500690565b7026b0b1b434b732903334b734b9b432b21d60791b8152601181019190915260310190565b6000600019821415612fb157612fb1612b5d565b5060010190565b652b30b63ab29d60d11b8152600060078410612fd657612fd66126be565b5060f89290921b600683015260078201526027019056fea2646970667358221220828e2b65d1a8865296e78f84a3366e612f1a6c9e97a5a7227c1fdbd34fce24de64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100e05760003560e01c80639ede42b9116100875780639ede42b914610251578063a521b03214610274578063d248d12414610287578063e78cea921461029a578063ee35f327146102ad578063f26a62c6146102c0578063f8c8765e146102d3578063fb7be0a1146102e657600080fd5b806314eab5e7146100e55780631b45c86a1461011557806323a9ef231461012a5780633504f1d71461015557806356e9df97146101685780635ef489e61461017b5780637fd07a9c1461018e5780638f1d3776146101ae575b600080fd5b6100f86100f33660046125f8565b6102f9565b6040516001600160401b0390911681526020015b60405180910390f35b61012861012336600461268b565b610601565b005b61013d61013836600461268b565b6106d1565b6040516001600160a01b03909116815260200161010c565b60025461013d906001600160a01b031681565b61012861017636600461268b565b6106f5565b6000546100f8906001600160401b031681565b6101a161019c36600461268b565b610863565b60405161010c91906126e8565b61023e6101bc36600461275a565b6001602081815260009283526040928390208351808501855281546001600160a01b0390811682529382015481840152845180860190955260028201549093168452600381015491840191909152600481015460058201546006830154600790930154939493919290916001600160401b03811690600160401b900460ff1687565b60405161010c9796959493929190612773565b61026461025f36600461268b565b61093c565b604051901515815260200161010c565b6101286102823660046127d0565b610963565b610128610295366004612874565b610dd9565b60045461013d906001600160a01b031681565b60035461013d906001600160a01b031681565b60055461013d906001600160a01b031681565b6101286102e1366004612906565b61121a565b6101286102f4366004612962565b61138b565b6002546000906001600160a01b0316331461034e5760405162461bcd60e51b815260206004820152601060248201526f13d3931657d493d313155417d0d2105360821b60448201526064015b60405180910390fd5b6040805160028082526060820183526000926020830190803683370190505090506103a461037f60208b018b612a06565b61039f8a60005b6080020180360381019061039a9190612ac5565b6119fb565b611a7c565b816000815181106103b7576103b76129f0565b60209081029190910101526103e68960016020020160208101906103db9190612a06565b61039f8a6001610386565b816001815181106103f9576103f96129f0565b6020908102919091010152600080548190819061041e906001600160401b0316612b73565b91906101000a8154816001600160401b0302191690836001600160401b031602179055905060006001600160401b0316816001600160401b0316141561046657610466612b9a565b6001600160401b0381166000908152600160205260408120600581018d9055906104a061049b368d90038d0160808e01612ac5565b611ba0565b905060026104b460408e0160208f01612a06565b60038111156104c5576104c56126be565b14806104f3575060006104e86104e3368e90038e0160808f01612ac5565b611bb5565b6001600160401b0316115b15610506578061050281612b73565b9150505b6007820180546040805180820182526001600160a01b038d811680835260209283018d90526002880180546001600160a01b03199081169092179055600388018d905583518085018552918e16808352919092018b90528654909116178555600185018990554260048601556001600160401b0384811668ffffffffffffffffff1990931692909217600160401b179092559051908416907f76604fe17af46c9b5f53ffe99ff23e0f655dab91886b07ac1fc0254319f7145a906105d0908e906080820190612bfa565b60405180910390a26105ee8360008c6001600160401b031687611bc4565b5090925050505b98975050505050505050565b60006001600160401b038216600090815260016020526040902060070154600160401b900460ff16600281111561063a5761063a6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b8152509061067a5760405162461bcd60e51b81526004016103459190612c16565b506106848161093c565b6106c35760405162461bcd60e51b815260206004820152601060248201526f54494d454f55545f444541444c494e4560801b6044820152606401610345565b6106ce816000611c5a565b50565b6001600160401b03166000908152600160205260409020546001600160a01b031690565b6002546001600160a01b031633146107425760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b6044820152606401610345565b60006001600160401b038216600090815260016020526040902060070154600160401b900460ff16600281111561077b5761077b6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b815250906107bb5760405162461bcd60e51b81526004016103459190612c16565b506001600160401b038116600081815260016020819052604080832080546001600160a01b031990811682559281018490556002810180549093169092556003808301849055600483018490556005830184905560068301939093556007909101805468ffffffffffffffffff19169055517ffdaece6c274a4b56af16761f83fd6b1062823192630ea08e019fdf9b2d747f409161085891612c6b565b60405180910390a250565b61086b612553565b6001600160401b0382811660009081526001602081815260409283902083516101208101855281546001600160a01b0390811660e0830190815294830154610100830152938152845180860186526002808401549095168152600383015481850152928101929092526004810154938201939093526005830154606082015260068301546080820152600783015493841660a08201529260c0840191600160401b90910460ff1690811115610922576109226126be565b6002811115610933576109336126be565b90525092915050565b6001600160401b038116600090815260016020526040812061095d90611d88565b92915050565b6001600160401b038416600090815260016020526040812085918591610988846106d1565b6001600160a01b0316336001600160a01b0316146109b85760405162461bcd60e51b815260040161034590612c85565b6109c18461093c565b156109de5760405162461bcd60e51b815260040161034590612caa565b60008260028111156109f2576109f26126be565b1415610a605760006007820154600160401b900460ff166002811115610a1a57610a1a6126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b81525090610a5a5760405162461bcd60e51b81526004016103459190612c16565b50610b1f565b6001826002811115610a7457610a746126be565b1415610abe5760016007820154600160401b900460ff166002811115610a9c57610a9c6126be565b14610ab95760405162461bcd60e51b815260040161034590612cd1565b610b1f565b6002826002811115610ad257610ad26126be565b1415610b175760026007820154600160401b900460ff166002811115610afa57610afa6126be565b14610ab95760405162461bcd60e51b815260040161034590612cf9565b610b1f612b9a565b610b6d83356020850135610b366040870187612d25565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611da092505050565b816006015414610b8f5760405162461bcd60e51b815260040161034590612d75565b6002610b9e6040850185612d25565b90501080610bc957506001610bb66040850185612d25565b610bc1929150612d98565b836060013510155b15610be65760405162461bcd60e51b815260040161034590612daf565b600080610bf289611dd7565b9150915060018111610c325760405162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b6044820152606401610345565b806028811115610c40575060285b610c4b816001612dda565b8814610c885760405162461bcd60e51b815260206004820152600c60248201526b57524f4e475f44454752454560a01b6044820152606401610345565b50610cd28989896000818110610ca057610ca06129f0565b602002919091013590508a8a610cb7600182612d98565b818110610cc657610cc66129f0565b90506020020135611e68565b610d118a83838b8b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bc492505050565b50600090505b6007820154600160401b900460ff166002811115610d3757610d376126be565b1415610d435750610dd0565b6040805180820190915281546001600160a01b03168152600182015460208201526004820154610d739042612d98565b81602001818151610d849190612d98565b90525060028201805483546001600160a01b038083166001600160a01b031992831617865560038601805460018801558551929093169116179091556020909101519055426004909101555b50505050505050565b6001600160401b038416600090815260016020526040902084908490600290610e01846106d1565b6001600160a01b0316336001600160a01b031614610e315760405162461bcd60e51b815260040161034590612c85565b610e3a8461093c565b15610e575760405162461bcd60e51b815260040161034590612caa565b6000826002811115610e6b57610e6b6126be565b1415610ed95760006007820154600160401b900460ff166002811115610e9357610e936126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b81525090610ed35760405162461bcd60e51b81526004016103459190612c16565b50610f98565b6001826002811115610eed57610eed6126be565b1415610f375760016007820154600160401b900460ff166002811115610f1557610f156126be565b14610f325760405162461bcd60e51b815260040161034590612cd1565b610f98565b6002826002811115610f4b57610f4b6126be565b1415610f905760026007820154600160401b900460ff166002811115610f7357610f736126be565b14610f325760405162461bcd60e51b815260040161034590612cf9565b610f98612b9a565b610faf83356020850135610b366040870187612d25565b816006015414610fd15760405162461bcd60e51b815260040161034590612d75565b6002610fe06040850185612d25565b9050108061100b57506001610ff86040850185612d25565b611003929150612d98565b836060013510155b156110285760405162461bcd60e51b815260040161034590612daf565b6001600160401b0388166000908152600160205260408120908061104b8a611dd7565b9092509050600181146110705760405162461bcd60e51b815260040161034590612df2565b5060055460408051808201825260078501546001600160401b031681526004546001600160a01b0390811660208301526000931691635d3adcfb919085906110ba908f018f612d25565b8f606001358181106110ce576110ce6129f0565b905060200201358d8d6040518663ffffffff1660e01b81526004016110f7959493929190612e14565b60206040518083038186803b15801561110f57600080fd5b505afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190612e6b565b905061115660408b018b612d25565b61116560608d01356001612dda565b818110611174576111746129f0565b905060200201358114156111b95760405162461bcd60e51b815260206004820152600c60248201526b14d0535157d3d4d417d1539160a21b6044820152606401610345565b6040516001600160401b038c16907fc2cc42e04ff8c36de71c6a2937ea9f161dd0dd9e175f00caa26e5200643c781e90600090a261120e8b6001600160401b0316600090815260016020526040812060060155565b5060009150610d179050565b306001600160a01b037f000000000000000000000000935239e066f4f449d87d600e6d7c1a4f24c50f971614156112a85760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610345565b6002546001600160a01b0316156112f05760405162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b6044820152606401610345565b6001600160a01b03841661133b5760405162461bcd60e51b81526020600482015260126024820152712727afa922a9aaa62a2fa922a1a2a4ab22a960711b6044820152606401610345565b600280546001600160a01b039586166001600160a01b0319918216179091556003805494861694821694909417909355600480549285169284169290921790915560058054919093169116179055565b6001600160401b0385166000908152600160208190526040909120869186916113b3846106d1565b6001600160a01b0316336001600160a01b0316146113e35760405162461bcd60e51b815260040161034590612c85565b6113ec8461093c565b156114095760405162461bcd60e51b815260040161034590612caa565b600082600281111561141d5761141d6126be565b141561148b5760006007820154600160401b900460ff166002811115611445576114456126be565b1415604051806040016040528060078152602001661393d7d0d2105360ca1b815250906114855760405162461bcd60e51b81526004016103459190612c16565b5061154a565b600182600281111561149f5761149f6126be565b14156114e95760016007820154600160401b900460ff1660028111156114c7576114c76126be565b146114e45760405162461bcd60e51b815260040161034590612cd1565b61154a565b60028260028111156114fd576114fd6126be565b14156115425760026007820154600160401b900460ff166002811115611525576115256126be565b146114e45760405162461bcd60e51b815260040161034590612cf9565b61154a612b9a565b61156183356020850135610b366040870187612d25565b8160060154146115835760405162461bcd60e51b815260040161034590612d75565b60026115926040850185612d25565b905010806115bd575060016115aa6040850185612d25565b6115b5929150612d98565b836060013510155b156115da5760405162461bcd60e51b815260040161034590612daf565b60018510156116215760405162461bcd60e51b815260206004820152601360248201527210d2105313115391d157d513d3d7d4d213d495606a1b6044820152606401610345565b6508000000000085111561166c5760405162461bcd60e51b81526020600482015260126024820152714348414c4c454e47455f544f4f5f4c4f4e4760701b6044820152606401610345565b6116ae8861168e61168060208b018b612a06565b8960005b6020020135611a7c565b6116a96116a160408c0160208d01612a06565b8a6001611684565b611e68565b6001600160401b038916600090815260016020526040812090806116d18b611dd7565b91509150806001146116f55760405162461bcd60e51b815260040161034590612df2565b600161170460208c018c612a06565b6003811115611715576117156126be565b146117cf5761172a60408b0160208c01612a06565b600381111561173b5761173b6126be565b61174860208c018c612a06565b6003811115611759576117596126be565b14801561176a5750883560208a0135145b6117a65760405162461bcd60e51b815260206004820152600d60248201526c48414c5445445f4348414e474560981b6044820152606401610345565b6117c78c6001600160401b0316600090815260016020526040812060060155565b505050611936565b60026117e160408c0160208d01612a06565b60038111156117f2576117f26126be565b141561183b57883560208a01351461183b5760405162461bcd60e51b815260206004820152600c60248201526b4552524f525f4348414e474560a01b6044820152606401610345565b604080516002808252606082018352600092602083019080368337505050600585015490915061186d908b3590611f3d565b81600081518110611880576118806129f0565b60209081029190910101526118ae8b60016020020160208101906118a49190612a06565b60208c01356120c9565b816001815181106118c1576118c16129f0565b602090810291909101015260078401805460ff60401b1916600160411b1790556118ee8d60008b84611bc4565b8c6001600160401b03167f24e032e170243bbea97e140174b22dc7e54fb85925afbf52c70e001cd6af16db8460405161192991815260200190565b60405180910390a2505050505b60006007820154600160401b900460ff166002811115611958576119586126be565b141561196457506119f1565b6040805180820190915281546001600160a01b031681526001820154602082015260048201546119949042612d98565b816020018181516119a59190612d98565b90525060028201805483546001600160a01b038083166001600160a01b031992831617865560038601805460018801558551929093169116179091556020909101519055426004909101555b5050505050505050565b80518051602091820151828401518051908401516040516c23b637b130b61039ba30ba329d60991b95810195909552602d850193909352604d8401919091526001600160c01b031960c091821b8116606d85015291901b166075820152600090607d015b604051602081830303815290604052805190602001209050919050565b60006001836003811115611a9257611a926126be565b1415611ad8576040516b213637b1b59039ba30ba329d60a11b6020820152602c8101839052604c015b60405160208183030381529060405280519060200120905061095d565b6002836003811115611aec57611aec6126be565b1415611b225760405174213637b1b59039ba30ba32961032b93937b932b21d60591b602082015260358101839052605501611abb565b6003836003811115611b3657611b366126be565b1415611b655760405174213637b1b59039ba30ba3296103a37b7903330b91d60591b6020820152603501611abb565b60405162461bcd60e51b815260206004820152601060248201526f4241445f424c4f434b5f53544154555360801b6044820152606401610345565b6020810151600090815b602002015192915050565b60208101516000906001611baa565b6001821015611bd557611bd5612b9a565b600281511015611be757611be7612b9a565b6000611bf4848484611da0565b6001600160401b038616600081815260016020526040908190206006018390555191925082917f86b34e9455464834eca718f62d4481437603bb929d8a78ccde5d1bc79fa06d6890611c4b90889088908890612e84565b60405180910390a35050505050565b6001600160401b03821660008181526001602081905260408083206002808201805483546001600160a01b0319808216865596850188905595811690915560038301869055600480840187905560058401879055600684019690965560078301805468ffffffffffffffffff1916905590549251630357aa4960e01b8152948501959095526001600160a01b03948516602485018190529285166044850181905290949293909290911690630357aa4990606401600060405180830381600087803b158015611d2857600080fd5b505af1158015611d3c573d6000803e3d6000fd5b50505050846001600160401b03167ffdaece6c274a4b56af16761f83fd6b1062823192630ea08e019fdf9b2d747f4085604051611d799190612c6b565b60405180910390a25050505050565b6001810154600090611d9983612172565b1192915050565b6000838383604051602001611db793929190612ed9565b6040516020818303038152906040528051906020012090505b9392505050565b600080806001611dea6040860186612d25565b611df5929150612d98565b9050611e05816020860135612f31565b9150611e15606085013583612f45565b611e20908535612dda565b92506002611e316040860186612d25565b611e3c929150612d98565b84606001351415611e6257611e55816020860135612f64565b611e5f9083612dda565b91505b50915091565b81611e766040850185612d25565b8560600135818110611e8a57611e8a6129f0565b9050602002013514611ecc5760405162461bcd60e51b815260206004820152600b60248201526a15d493d391d7d4d510549560aa1b6044820152606401610345565b80611eda6040850185612d25565b611ee960608701356001612dda565b818110611ef857611ef86129f0565b905060200201351415611f385760405162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b6044820152606401610345565b505050565b60408051600380825260808201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081611f58575050604080518082018252600080825260209182018190528251808401909352600483529082015290915081600081518110611fba57611fba6129f0565b6020026020010181905250611fcf6000612184565b81600181518110611fe257611fe26129f0565b6020026020010181905250611ff76000612184565b8160028151811061200a5761200a6129f0565b602090810291909101810191909152604080518083018252838152815180830190925280825260009282019290925261205a60408051606080820183529181019182529081526000602082015290565b604080518082018252606080825260006020808401829052845161012081018652828152908101879052938401859052908301829052608083018a905260a0830181905260c0830181905260e08301526101008201889052906120bc816121b7565b9998505050505050505050565b600060018360038111156120df576120df6126be565b14156120f65781604051602001611abb9190612f78565b600283600381111561210a5761210a6126be565b1415612134576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001611abb565b6003836003811115612148576121486126be565b1415611b65576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001611abb565b600081600401544261095d9190612d98565b604080518082019091526000808252602082015250604080518082019091526000815263ffffffff909116602082015290565b600080825160038111156121cd576121cd6126be565b1415612283576121e08260200151612370565b6121ed8360400151612370565b6121fa84606001516123f5565b608085015160a086015160c087015160e0808901516101008a01516040516f26b0b1b434b73290393ab73734b7339d60811b602082015260308101999099526050890197909752607088019590955260908701939093526001600160e01b031991831b821660b0870152821b811660b486015291901b1660b883015260bc82015260dc01611a5f565b600182516003811115612298576122986126be565b14156122b3578160800151604051602001611a5f9190612f78565b6002825160038111156122c8576122c86126be565b14156122f2576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001611a5f565b600382516003811115612307576123076126be565b1415612331576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001611a5f565b60405162461bcd60e51b815260206004820152600f60248201526e4241445f4d4143485f53544154555360881b6044820152606401610345565b919050565b60208101518151515160005b818110156123ee57835161239990612394908361248e565b6124c6565b6040516b2b30b63ab29039ba30b1b59d60a11b6020820152602c810191909152604c8101849052606c0160405160208183030381529060405280519060200120925080806123e690612f9d565b91505061237c565b5050919050565b602081015160005b8251518110156124885761242d83600001518281518110612420576124206129f0565b60200260200101516124e3565b6040517129ba30b1b590333930b6b29039ba30b1b59d60711b6020820152603281019190915260528101839052607201604051602081830303815290604052805190602001209150808061248090612f9d565b9150506123fd565b50919050565b604080518082019091526000808252602082015282518051839081106124b6576124b66129f0565b6020026020010151905092915050565b600081600001518260200151604051602001611a5f929190612fb8565b60006124f282600001516124c6565b602080840151604080860151606087015191516b29ba30b1b590333930b6b29d60a11b94810194909452602c840194909452604c8301919091526001600160e01b031960e093841b8116606c840152921b9091166070820152607401611a5f565b604080516101208101909152600060e0820181815261010083019190915281908152602001612592604080518082019091526000808252602082015290565b815260006020820181905260408201819052606082018190526080820181905260a09091015290565b806040810183101561095d57600080fd5b80356001600160401b038116811461236b57600080fd5b6001600160a01b03811681146106ce57600080fd5b600080600080600080600080610200898b03121561261557600080fd5b883597506126268a60208b016125bb565b965061016089018a81111561263a57600080fd5b60608a019650612649816125cc565b95505061018089013561265b816125e3565b93506101a089013561266c816125e3565b979a96995094979396929592945050506101c0820135916101e0013590565b60006020828403121561269d57600080fd5b611dd0826125cc565b80516001600160a01b03168252602090810151910152565b634e487b7160e01b600052602160045260246000fd5b600381106126e4576126e46126be565b9052565b6000610120820190506126fc8284516126a6565b602083015161270e60408401826126a6565b5060408301516080830152606083015160a0830152608083015160c08301526001600160401b0360a08401511660e083015260c08301516127536101008401826126d4565b5092915050565b60006020828403121561276c57600080fd5b5035919050565b6101208101612782828a6126a6565b61278f60408301896126a6565b8660808301528560a08301528460c08301526001600160401b03841660e08301526105f56101008301846126d4565b60006080828403121561248857600080fd5b600080600080606085870312156127e657600080fd5b6127ef856125cc565b935060208501356001600160401b038082111561280b57600080fd5b612817888389016127be565b9450604087013591508082111561282d57600080fd5b818701915087601f83011261284157600080fd5b81358181111561285057600080fd5b8860208260051b850101111561286557600080fd5b95989497505060200194505050565b6000806000806060858703121561288a57600080fd5b612893856125cc565b935060208501356001600160401b03808211156128af57600080fd5b6128bb888389016127be565b945060408701359150808211156128d157600080fd5b818701915087601f8301126128e557600080fd5b8135818111156128f457600080fd5b88602082850101111561286557600080fd5b6000806000806080858703121561291c57600080fd5b8435612927816125e3565b93506020850135612937816125e3565b92506040850135612947816125e3565b91506060850135612957816125e3565b939692955090935050565b600080600080600060e0868803121561297a57600080fd5b612983866125cc565b945060208601356001600160401b0381111561299e57600080fd5b6129aa888289016127be565b9450506129ba87604088016125bb565b92506129c987608088016125bb565b9497939650919460c0013592915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215612a1857600080fd5b813560048110611dd057600080fd5b604080519081016001600160401b0381118282101715612a4957612a496129da565b60405290565b600082601f830112612a6057600080fd5b604051604081018181106001600160401b0382111715612a8257612a826129da565b8060405250806040840185811115612a9957600080fd5b845b81811015612aba57612aac816125cc565b835260209283019201612a9b565b509195945050505050565b600060808284031215612ad757600080fd5b604051604081018181106001600160401b0382111715612af957612af96129da565b604052601f83018413612b0b57600080fd5b612b13612a27565b806040850186811115612b2557600080fd5b855b81811015612b3f578035845260209384019301612b27565b50818452612b4d8782612a4f565b6020850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681811415612b9057612b90612b5d565b6001019392505050565b634e487b7160e01b600052600160045260246000fd5b604081833760006040838101828152908301915b6002811015612bf3576001600160401b03612bde846125cc565b16825260209283019290910190600101612bc4565b5050505050565b6101008101612c098285612bb0565b611dd06080830184612bb0565b600060208083528351808285015260005b81811015612c4357858101830151858201604001528201612c27565b81811115612c55576000604083870101525b50601f01601f1916929092016040019392505050565b6020810160048310612c7f57612c7f6126be565b91905290565b6020808252600b908201526a21a420a62fa9a2a72222a960a91b604082015260600190565b6020808252600d908201526c4348414c5f444541444c494e4560981b604082015260600190565b6020808252600e908201526d4348414c5f4e4f545f424c4f434b60901b604082015260600190565b60208082526012908201527121a420a62fa727aa2fa2ac22a1aaaa24a7a760711b604082015260600190565b6000808335601e19843603018112612d3c57600080fd5b8301803591506001600160401b03821115612d5657600080fd5b6020019150600581901b3603821315612d6e57600080fd5b9250929050565b6020808252600990820152684249535f535441544560b81b604082015260600190565b600082821015612daa57612daa612b5d565b500390565b6020808252601190820152704241445f4348414c4c454e47455f504f5360781b604082015260600190565b60008219821115612ded57612ded612b5d565b500190565b602080825260089082015267544f4f5f4c4f4e4760c01b604082015260600190565b8551815260018060a01b03602087015116602082015284604082015283606082015260a060808201528160a0820152818360c0830137600081830160c090810191909152601f909201601f19160101949350505050565b600060208284031215612e7d57600080fd5b5051919050565b6000606082018583526020858185015260606040850152818551808452608086019150828701935060005b81811015612ecb57845183529383019391830191600101612eaf565b509098975050505050505050565b83815260006020848184015260408301845182860160005b82811015612f0d57815184529284019290840190600101612ef1565b509198975050505050505050565b634e487b7160e01b600052601260045260246000fd5b600082612f4057612f40612f1b565b500490565b6000816000190483118215151615612f5f57612f5f612b5d565b500290565b600082612f7357612f73612f1b565b500690565b7026b0b1b434b732903334b734b9b432b21d60791b8152601181019190915260310190565b6000600019821415612fb157612fb1612b5d565b5060010190565b652b30b63ab29d60d11b8152600060078410612fd657612fd66126be565b5060f89290921b600683015260078201526027019056fea2646970667358221220828e2b65d1a8865296e78f84a3366e612f1a6c9e97a5a7227c1fdbd34fce24de64736f6c63430008090033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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