ETH Price: $2,680.97 (-0.59%)

Contract

0x03870C6f98a8eB75B0Ed66d4B4Bc1B0F08696EEF
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Episodes

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 17 : Episodes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

/******************************************************************************

        ███╗   ██╗███████╗██████╗ ██╗   ██╗ ██████╗ ██╗   ██╗███████╗
        ████╗  ██║██╔════╝██╔══██╗██║   ██║██╔═══██╗██║   ██║██╔════╝
        ██╔██╗ ██║█████╗  ██████╔╝██║   ██║██║   ██║██║   ██║███████╗
        ██║╚██╗██║██╔══╝  ██╔══██╗╚██╗ ██╔╝██║   ██║██║   ██║╚════██║
        ██║ ╚████║███████╗██║  ██║ ╚████╔╝ ╚██████╔╝╚██████╔╝███████║
        ╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝  ╚═══╝   ╚═════╝  ╚═════╝ ╚══════╝
  
                                 ██╗  ██╗
                                 ╚██╗██╔╝
                                  ╚███╔╝
                                  ██╔██╗
                                 ██╔╝ ██╗
                                 ╚═╝  ╚═╝

___/\/\/\/\____/\/\/\/\/\__________/\/\/\/\/\/\______/\/\/\/\/\/\__/\/\______/\/\_
_/\/\____/\/\__________/\/\______________/\/\________/\/\__________/\/\/\__/\/\/\_
___/\/\/\/\/\____/\/\/\/\______________/\/\__________/\/\/\/\/\____/\/\/\/\/\/\/\_
_________/\/\__/\/\__________/\/\____/\/\____________/\/\__________/\/\__/\__/\/\_
___/\/\/\/\____/\/\/\/\/\/\__/\/\__/\/\______________/\/\__________/\/\______/\/\_
__________________________________________________________________________________    

       ______  ______  _____  _______ ______  ______ _ ______  _______ 
      (____  \(_____ \(_____)(_______|______)/ _____) (______)(_______)
       ____)  )_____) )  __ _ _______ _     ( (____ | |_     _ _____   
      |  __  (|  __  / |/ /| |  ___  | |   | \____ \| | |   | |  ___)  
      | |__)  ) |  \ \   /_| | |   | | |__/ /_____) ) | |__/ /| |_____ 
      |______/|_|   |_\_____/|_|   |_|_____/(______/|_|_____/ |_______)
           

  nervous.net :: [email protected] // [email protected]
  mono-koto.com :: [email protected]
******************************************************************************/

import "./Bones.sol";
import "./IEpisodes.sol";
import "./IOwnedToken.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";

/// @title BROADSIDE Phase 1: Episodes
/// @author nervous.net / mono-koto.com
contract Episodes is
    IEpisodes,
    ERC1155Upgradeable,
    ERC2981Upgradeable,
    OwnableUpgradeable,
    PausableUpgradeable
{
    struct Episode {
        string uri;
        uint256 totalSupply;
        uint256 __gap;
    }

    struct WalletMeta {
        uint8 forewordMints;
        bool isCreator;
        uint240 __gap;
    }

    event SetWarHe4d(address indexed warHe4d);
    event SetBurner(address indexed burner);
    event Pause();
    event Unpause();
    event SetEpisodeCreator(address indexed creator, bool isCreator);
    event SetContractURI(string uri);
    event ConfigureForeword(uint40 startDate, uint40 endDate, uint8 limit);

    // --- Constants ---

    /// Private
    uint256 private constant FOREWORD_ID = 0;
    uint40 private constant DEFAULT_FOREWORD_MINT_START_DATE = 1667577600;
    uint40 private constant DEFAULT_FOREWORD_MINT_DURATION = 72 hours;
    uint40 private constant DEFAULT_FOREWORD_MINT_END_DATE =
        DEFAULT_FOREWORD_MINT_START_DATE + DEFAULT_FOREWORD_MINT_DURATION;
    uint8 private constant DEFAULT_FOREWORD_WALLET_MINT_LIMIT = 3;

    string public constant _NERVOUS_ =
        "We are Nervous. Are you? Let us help you with your next NFT project -> [email protected]";
    string public constant name = "BROADSIDE Phase 1: Episodes";
    string public constant symbol = "BSIDE1-EPS";

    // --- Storage ---

    /// Private
    mapping(address => WalletMeta) private _walletMeta;
    mapping(uint256 => Episode) private _episodes;
    mapping(uint256 => uint256) private _pfpMeta;

    /// Public
    string public contractURI;
    IOwnedToken public warHe4d;
    uint40 public forewordMintStartDate;
    uint40 public forewordMintEndDate;
    uint8 public forewordWalletMintLimit;
    address public burner;

    constructor() {
        _disableInitializers();
    }

    function initialize() external initializer {
        __ERC1155_init_unchained("");
        __ERC2981_init_unchained();
        __Ownable_init_unchained();
        __Pausable_init_unchained();
        forewordMintStartDate = DEFAULT_FOREWORD_MINT_START_DATE;
        forewordMintEndDate = DEFAULT_FOREWORD_MINT_END_DATE;
        forewordWalletMintLimit = DEFAULT_FOREWORD_WALLET_MINT_LIMIT;
    }

    //// STANDARD ERC1155 + EXTENSION FUNCTIONS

    function uri(uint256 id) public view override returns (string memory) {
        return _episodes[id].uri;
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC1155Upgradeable, ERC2981Upgradeable)
        returns (bool)
    {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC2981Upgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    //// MINTING

    /// @notice Free mint of the foreword episode.
    /// @param quantity The number of foreword episodes to mint.
    ///                 Limited to `forewordWalletMintLimit` per wallet.
    ///                 Only available during mint window.
    function mintForeword(uint8 quantity) external whenNotPaused {
        require(
            block.timestamp >= forewordMintStartDate,
            "Foreword mint not started"
        );
        require(block.timestamp <= forewordMintEndDate, "Foreword mint ended");

        WalletMeta storage meta = _walletMeta[_msgSender()];
        require(
            meta.forewordMints + quantity <= forewordWalletMintLimit,
            "Exceeds max mint per wallet"
        );
        _episodes[FOREWORD_ID].totalSupply += quantity;
        meta.forewordMints += quantity;

        _mint(_msgSender(), FOREWORD_ID, quantity, "");
    }

    /// @notice WAR HE4D claim of episodes
    /// @param episodeId Episode ID to claim. Must have a URL set and cannot be foreword.
    /// @param tokenId   The WAR HE4D token ID to claim with. Can only be used once.
    function claim(uint8 episodeId, uint256 tokenId) external whenNotPaused {
        Episode storage episode = _episodes[episodeId];
        require(episodeId != FOREWORD_ID, "Invalid episode");
        require(bytes(episode.uri).length > 0, "Episode not found");
        require(address(warHe4d) != address(0), "No WAR HE4D");
        require(
            _msgSender() == warHe4d.ownerOf(tokenId),
            "Only WAR HE4D owner"
        );
        require(!warHe4dHasClaimed(episodeId, tokenId), "Already claimed");

        _markClaimed(episodeId, tokenId);
        ++episode.totalSupply;
        _mint(_msgSender(), episodeId, 1, "");
    }

    //// GETTERS

    /// @notice Check whether the given account is a creator
    /// @param account The wallet address
    /// @return Whether the account is a creator
    function isEpisodeCreator(address account) external view returns (bool) {
        return _walletMeta[account].isCreator;
    }

    /// @notice Get the number of forewords a wallet has minted
    /// @param wallet The wallet address
    /// @return The number of forewords minted
    function mintedForewords(address wallet) external view returns (uint256) {
        return _walletMeta[wallet].forewordMints;
    }

    /// @notice Total quantity of episode minted
    /// @dev Returns 0 if the episode does not exist
    /// @param episodeId The episode ID
    /// @return Quantity of episode minted
    function episodeSupply(uint8 episodeId) public view returns (uint256) {
        return _episodes[episodeId].totalSupply;
    }

    /// @notice Whether WAR HE4D has claimed a episode
    /// @dev Returns false if the episode does not exist
    /// @param episodeId The episode ID
    /// @param tokenId The WAR HE4D token ID
    /// @return Whether the WAR HE4D has claimed the episode
    function warHe4dHasClaimed(uint8 episodeId, uint256 tokenId)
        public
        view
        returns (bool)
    {
        return _pfpMeta[tokenId] & (1 << episodeId) != 0;
    }

    //// ADMIN OPERATIONS

    function setWarHe4d(IOwnedToken owned) external onlyOwner {
        warHe4d = owned;
        emit SetWarHe4d(address(owned));
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    function setBurner(address _burner) external onlyOwner {
        burner = _burner;
        emit SetBurner(_burner);
    }

    function setEpisodeCreator(address creator, bool isCreator)
        external
        onlyOwner
    {
        _walletMeta[creator].isCreator = isCreator;
        emit SetEpisodeCreator(creator, isCreator);
    }

    /// @notice Sets the URI for contract-level metadata
    /// @param _contractURI The contract URI
    function setContractURI(string calldata _contractURI) external onlyOwner {
        contractURI = _contractURI;
        emit SetContractURI(_contractURI);
    }

    /// @notice Set the default EIP-2981 royalty
    /// @dev Can only be called by the owner
    function setDefaultRoyalty(address receiver, uint96 feeNumerator)
        external
        onlyOwner
    {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    /// @notice Delete the default EIP-2981 royalty
    /// @dev Can only be called by the owner
    function deleteDefaultRoyalty() external onlyOwner {
        _deleteDefaultRoyalty();
    }

    /// @notice Set the royalty for a specific token
    /// @dev Can only be called by the owner
    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    /// @notice Reset the royalty for a specific token
    /// @dev Can only be called by the owner
    function resetTokenRoyalty(uint256 tokenId) external onlyOwner {
        _resetTokenRoyalty(tokenId);
    }

    /// @notice Configure the foreword mint
    /// @dev Only the owner role can call this function
    /// @param _forewordMintStartDate The start date of the foreword mint
    /// @param _forewordMintDuration The duration of the foreword mint in seconds
    /// @param _forewordWalletMintLimit The max number of foreword tokens that can be minted per wallet
    function configureForewordMint(
        uint40 _forewordMintStartDate,
        uint40 _forewordMintDuration,
        uint8 _forewordWalletMintLimit
    ) external onlyOwner {
        require(
            type(uint40).max - _forewordMintDuration >= _forewordMintStartDate,
            "Invalid duration"
        );
        forewordMintStartDate = _forewordMintStartDate;
        forewordMintEndDate = _forewordMintStartDate + _forewordMintDuration;
        forewordWalletMintLimit = _forewordWalletMintLimit;
        emit ConfigureForeword(
            _forewordMintStartDate,
            forewordMintEndDate,
            _forewordWalletMintLimit
        );
    }

    /// @notice Configure a new episode URI
    /// @dev Only the owner role can call this function
    /// @param id The episode ID
    /// @param _uri The episode URI
    function setURI(uint256 id, string memory _uri) external {
        require(
            _msgSender() == owner() || _walletMeta[_msgSender()].isCreator,
            "Not authorized"
        );
        Episode storage episode = _episodes[id];
        episode.uri = _uri;
        emit URI(_uri, id);
    }

    //// COLLECTION BURNER OPS

    /// @notice Burn a sequence of episodes.
    ///         Reverts if any episode is not owned by the caller.
    /// @dev Only callable by the burner role.
    /// @param ownerId The owner of the episodes to burn
    function burnEpisodes(address ownerId, uint256[] calldata episodeIds)
        external
    {
        require(_msgSender() == burner, "Only burner");
        uint256[] memory amounts = new uint256[](episodeIds.length);
        for (uint256 i = 0; i < episodeIds.length; ++i) {
            --_episodes[i].totalSupply;
            amounts[i] = 1;
        }
        _burnBatch(ownerId, episodeIds, amounts);
    }

    //// PRIVATE

    function _markClaimed(uint256 episodeId, uint256 tokenId) private {
        _pfpMeta[tokenId] |= (1 << episodeId);
    }
}

File 2 of 17 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

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

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

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

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

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

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

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

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

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

File 3 of 17 : IERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981Upgradeable is IERC165Upgradeable {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0-rc.2) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

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

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

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

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

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

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

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

    /**
     * @dev Internal function that returns the initialized version. Returns `_initialized`
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initializing`
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 5 of 17 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    bool private _paused;

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

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

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

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

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

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

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

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

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

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

File 6 of 17 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0-rc.2) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155Upgradeable.sol";
import "./IERC1155ReceiverUpgradeable.sol";
import "./extensions/IERC1155MetadataURIUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    using AddressUpgradeable for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    function __ERC1155_init(string memory uri_) internal onlyInitializing {
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }

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

File 7 of 17 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 17 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 9 of 17 : IERC1155MetadataURIUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 10 of 17 : ERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981Upgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable {
    function __ERC2981_init() internal onlyInitializing {
    }

    function __ERC2981_init_unchained() internal onlyInitializing {
    }
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) {
        return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @inheritdoc IERC2981Upgradeable
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }

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

File 11 of 17 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0-rc.2) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

File 12 of 17 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

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

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

File 13 of 17 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

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

File 14 of 17 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 15 of 17 : Bones.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

/*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXKoccccccccccccccccclokXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWXkoccccccccccccccccccdXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXWc                     'dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKl.                     oWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                       :XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXK;                       lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                       .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXd                        lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:             .,;:::::::l0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXOc::::::;'.              lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:          .:ool:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::clol'            lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:         'xo.                                                                          :xc           lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:        .ko                                                                             ,kc          lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:        lk.                                                                              lk.         lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXNc       .ko                                                                               ,O:         oWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXx.      'Oc                                                                               .kl        .OXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXWx'     ,O:                 ..                            .                               .ko       ,kWXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxc;''l0:    :OOOOx:. .:x000kc. ;OOo. ,kO;.oO00000O;.:x000x;      'xO:  'xO:.oOOOOd,    .xO:,',;lkNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWNWN:    oWXXXXX;.oWXXXXXWx.cWXWk.cNWl'OXKdllll':NXOcokc.     ;XXo  ;XXo'OXXXXXX;   .xXXWNWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    oWXXXWx..OXXXXXXXK,cWXXWkkNWl'OXKdlc;. 'OWXxc.       ;XXd  ;XXo'OXXXXXN:   .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    oWXXXW0:,OXXXXXXXK,cWWKKWWXXl'OXN0Oko'  .;dKWXo.     ;XXd  ;XXl'OXWNXOc.   .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    lWXXXXX0:xXXXXXXXO'cWWl;0XXXl'OX0c;;,'..:l;:0XNc     '0X0:,xWWc'OXO;.      .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    lWWWWWXo.'xXWXWXk, cNNc ,OWWc.OWNNXXXXc'xXNXNXx'      :0WWWWXo.'OWx.       .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    :XXXX0l.  'xNXWO:  ;KXd. :KXc.xNXXXXXXl ,kNXNk,      .lkxc;lxx,.xN0xoc.    .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    cNXXXXX; ;KXXXXXNd.:NXNd.;XXo.kXNOkkkk;,0XKdOXd.     ,KXx. ,KXd'kXXXXXK;   .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    cNXXXW0,.xXXXXXXXX;:NXXWxoXXo.kXKc;,,. ,KXKl;'       ,KXx. ,KXd'kXXXXXWo   .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    cNXXXWO;.kXXXXXXXN::NWXNWNWXo.kXWNNX0:  'lONNO:.     ,KXx. ,KXd'kXXXXNk'   .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    cNXXXXXK:xXXXXXXXX;:NXdcKXXXo.kXKc;;,.  .,,;OXNc     '0XO'.cNXo.kXKo;'     .xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    cNXXXXWO',0WXXXXNo.:NXo ;KXXo.kXNK00O0c'xWXkKXX:      cXWX0NW0'.kXO.       .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:    .cllll:.  .;looc'  .cl'  'll' ,lllllll' .:lolc.        'cool:.  ;l;.       .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                                                                               .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                                                                               .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNc                                                                               .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx.                                                                              :XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNd.                                                                            ,0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWO;                                                                         .lKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNOl,.                               .oko'                              .;o0WXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXW0l.                           .oXXXXXx'                           .oXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWKOkkk0NXXXXWO:.                          .oXXXXXXXXXd'                           ;kNXXXXN0kxkOXWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNx;.    .'l0WKc.                           .xWXXXXWXXXXXO.                            :KWOc.     .:kNXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXK:          .xK;                             :0NXOc,ckXNKl.                            cKd.          cXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXWo            '0k.                             ...     .'.                 .           .OO.           .dXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:            .kO.         .;;                                            lOl.         '0x.            lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:            .kXkdddl:' .:OWX:                   ,od,                   cXXW0c..'cldddkNx.            lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:             ';;;;:cdOk0WXXXXd,.                oXXo                .,dNXXXXWKOkdc;;;;;.             lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                     .cKXXXXXXN0l.   .ox'       oXXd       .xd.   .oKNXXXXXXW0:.                     lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                       ;KXXXXXXX0'   .OX;       oXXd       ;KO.   '0XXXXXXXX0,                       lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                       .xXXXXXXXWo.  .OX;       oXXd       ;KO.  .dWXXXXXXXXd                        lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                       .OXXXXXXXXWk:.'OX;       oXXd       ;KO'.:kWXXXXXXXXXk.                       lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXN:                      .xWXXXXXXXXXXWK0NWOddddddxKXXKxddddddOWN0KWXXXXXXXXXXXNd.                      lWXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXWd.                 ..,oKWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXW0l,.                  .kXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXWKOOOOOOOOOOOOOOOOO0KWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXWK0OOOOOOOOOOOOOOOOOKWXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/

File 16 of 17 : IEpisodes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IEpisodes {
    function burnEpisodes(address ownerId, uint256[] calldata episodeIds)
        external;
}

File 17 of 17 : IOwnedToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IOwnedToken {
    function ownerOf(uint256) external view returns (address);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint40","name":"startDate","type":"uint40"},{"indexed":false,"internalType":"uint40","name":"endDate","type":"uint40"},{"indexed":false,"internalType":"uint8","name":"limit","type":"uint8"}],"name":"ConfigureForeword","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"}],"name":"SetBurner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"bool","name":"isCreator","type":"bool"}],"name":"SetEpisodeCreator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"warHe4d","type":"address"}],"name":"SetWarHe4d","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"_NERVOUS_","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerId","type":"address"},{"internalType":"uint256[]","name":"episodeIds","type":"uint256[]"}],"name":"burnEpisodes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"episodeId","type":"uint8"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint40","name":"_forewordMintStartDate","type":"uint40"},{"internalType":"uint40","name":"_forewordMintDuration","type":"uint40"},{"internalType":"uint8","name":"_forewordWalletMintLimit","type":"uint8"}],"name":"configureForewordMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"episodeId","type":"uint8"}],"name":"episodeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forewordMintEndDate","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forewordMintStartDate","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forewordWalletMintLimit","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isEpisodeCreator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"mintForeword","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"mintedForewords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burner","type":"address"}],"name":"setBurner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"bool","name":"isCreator","type":"bool"}],"name":"setEpisodeCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOwnedToken","name":"owned","type":"address"}],"name":"setWarHe4d","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warHe4d","outputs":[{"internalType":"contract IOwnedToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"episodeId","type":"uint8"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"warHe4dHasClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61335480620000f46000396000f3fe608060405234801561001057600080fd5b506004361061025d5760003560e01c80638456cb5911610146578063a996d6ce116100c3578063e51a598c11610087578063e51a598c14610617578063e8a3d4851461062a578063e985e9c514610632578063ea0968da1461066e578063f242432a14610681578063f2fde38b1461069457600080fd5b8063a996d6ce146105c8578063aa1b103f146105db578063bf705296146105e3578063d2c1e110146105fc578063dbc7d8fd1461060457600080fd5b8063938e3d7b1161010a578063938e3d7b1461053757806395d89b411461054a578063a01a99b114610573578063a22cb465146105a2578063a34a3fb4146105b557600080fd5b80638456cb59146104e45780638537dd7f146104ec578063862440e2146105005780638a616bc0146105135780638da5cb5b1461052657600080fd5b80632eb2c2d6116101df5780634e1273f4116101a35780634e1273f41461046f5780635944c7531461048f5780635c975abb146104a2578063715018a6146104ad578063717a8cd4146104b55780638129fc1c146104dc57600080fd5b80632eb2c2d6146103e15780633042837f146103f45780633f4ba83a1461042257806340482bfa1461042a578063454ec2f71461045c57600080fd5b8063088b8adb11610226578063088b8adb1461031c5780630e89341c1461034957806327810b6e1461035c5780632a55205a146103885780632eb08f2b146103ba57600080fd5b8062fdd58e1461026257806301ffc9a71461028857806304634d8d146102ab578063054271e6146102c057806306fdde03146102d3575b600080fd5b610275610270366004612470565b6106a7565b6040519081526020015b60405180910390f35b61029b6102963660046124b2565b610742565b604051901515815260200161027f565b6102be6102b93660046124f2565b610782565b005b6102be6102ce366004612527565b610798565b61030f6040518060400160405280601b81526020017f42524f41445349444520506861736520313a20457069736f646573000000000081525081565b60405161027f919061258a565b61027561032a366004612527565b6001600160a01b0316600090815261012d602052604090205460ff1690565b61030f61035736600461259d565b6107eb565b61013254610370906001600160a01b031681565b6040516001600160a01b03909116815260200161027f565b61039b6103963660046125b6565b61088e565b604080516001600160a01b03909316835260208301919091520161027f565b6102756103c83660046125e9565b60ff16600090815261012e602052604090206001015490565b6102be6103ef366004612757565b61093a565b61029b610402366004612804565b600081815261012f6020526040902054600160ff84161b16151592915050565b6102be610986565b61029b610438366004612527565b6001600160a01b0316600090815261012d6020526040902054610100900460ff1690565b6102be61046a366004612820565b610998565b61048261047d36600461285e565b610a0c565b60405161027f9190612965565b6102be61049d366004612978565b610b35565b60fb5460ff1661029b565b6102be610b4d565b610131546104ca90600160f01b900460ff1681565b60405160ff909116815260200161027f565b6102be610b5f565b6102be610cfa565b61013154610370906001600160a01b031681565b6102be61050e3660046129b6565b610d0a565b6102be61052136600461259d565b610dcd565b60c9546001600160a01b0316610370565b6102be610545366004612a06565b610de6565b61030f6040518060400160405280600a8152602001694253494445312d45505360b01b81525081565b6101315461058c90600160a01b900464ffffffffff1681565b60405164ffffffffff909116815260200161027f565b6102be6105b0366004612820565b610e3a565b6102be6105c33660046125e9565b610e45565b6102be6105d6366004612527565b61101d565b6102be611070565b6101315461058c90600160c81b900464ffffffffff1681565b61030f611082565b6102be610612366004612804565b61109e565b6102be610625366004612a8c565b6112fd565b61030f61141f565b61029b610640366004612ac6565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6102be61067c366004612af4565b6114ae565b6102be61068f366004612b7b565b6115ed565b6102be6106a2366004612527565b611632565b60006001600160a01b0383166107175760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061077357506001600160e01b0319821663152a902d60e11b145b8061073c575061073c826116a8565b61078a6116cd565b6107948282611727565b5050565b6107a06116cd565b61013180546001600160a01b0319166001600160a01b0383169081179091556040517fc1666341e1a1597601ca5be1720e94693e94dcebbf6ffbb3504a12e96661252290600090a250565b600081815261012e6020526040902080546060919061080990612be3565b80601f016020809104026020016040519081016040528092919081815260200182805461083590612be3565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b50505050509050919050565b60008281526098602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109035750604080518082019091526097546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610922906001600160601b031687612c33565b61092c9190612c4a565b915196919550909350505050565b6001600160a01b03851633148061095657506109568533610640565b6109725760405162461bcd60e51b815260040161070e90612c6c565b61097f85858585856117e1565b5050505050565b61098e6116cd565b610996611980565b565b6109a06116cd565b6001600160a01b038216600081815261012d60205260409081902080548415156101000261ff0019909116179055517f6d7ca490ebfe428deeedabdf0f2882f747769278ba7110bc10f7c5e224c7a6fe90610a0090841515815260200190565b60405180910390a25050565b60608151835114610a715760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161070e565b600083516001600160401b03811115610a8c57610a8c612604565b604051908082528060200260200182016040528015610ab5578160200160208202803683370190505b50905060005b8451811015610b2d57610b00858281518110610ad957610ad9612cba565b6020026020010151858381518110610af357610af3612cba565b60200260200101516106a7565b828281518110610b1257610b12612cba565b6020908102919091010152610b2681612cd0565b9050610abb565b509392505050565b610b3d6116cd565b610b488383836119d2565b505050565b610b556116cd565b6109966000611a9d565b600054610100900460ff1615808015610b7f5750600054600160ff909116105b80610b995750303b158015610b99575060005460ff166001145b610bfc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161070e565b6000805460ff191660011790558015610c1f576000805461ff0019166101001790555b610c3760405180602001604052806000815250611aef565b610c3f611b1f565b610c47611b46565b610c4f611b76565b610131805464ffffffffff60a01b19166263653760a81b179055610c7a6203f4806363653700612ce9565b610131805465ffffffffffff60c81b1916600160c81b64ffffffffff939093169290920260ff60f01b191691909117600360f01b1790558015610cf7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610d026116cd565b610996611ba9565b60c9546001600160a01b0316331480610d38575033600090815261012d6020526040902054610100900460ff165b610d755760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015260640161070e565b600082815261012e6020526040902080610d8f8382612d54565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b83604051610dc0919061258a565b60405180910390a2505050565b610dd56116cd565b600090815260986020526040812055565b610dee6116cd565b610130610dfc828483612e13565b507f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea528282604051610e2e929190612ed2565b60405180910390a15050565b610794338383611be6565b610e4d611cc6565b61013154600160a01b900464ffffffffff16421015610eae5760405162461bcd60e51b815260206004820152601960248201527f466f7265776f7264206d696e74206e6f74207374617274656400000000000000604482015260640161070e565b61013154600160c81b900464ffffffffff16421115610f055760405162461bcd60e51b8152602060048201526013602482015272119bdc995ddbdc99081b5a5b9d08195b991959606a1b604482015260640161070e565b33600090815261012d6020526040902061013154815460ff600160f01b909204821691610f3491859116612f01565b60ff161115610f855760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178206d696e74207065722077616c6c65740000000000604482015260640161070e565b600080805261012e6020527f05487a880b40ff61e5c065c22c3608319ddddfc383570aaf3e5899db942a555f805460ff85169290610fc4908490612f1a565b9091555050805482908290600090610fe090849060ff16612f01565b92506101000a81548160ff021916908360ff1602179055506107946110023390565b60008460ff1660405180602001604052806000815250611d0c565b6110256116cd565b61013280546001600160a01b0319166001600160a01b0383169081179091556040517f5d02513563a6890385b0d6684a867cbf8032b19adbd10bca1f78f430db041e3790600090a250565b6110786116cd565b6109966000609755565b6040518060800160405280605881526020016132c76058913981565b6110a6611cc6565b60ff8216600081815261012e60205260409020906110f85760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420657069736f646560881b604482015260640161070e565b600081600001805461110990612be3565b90501161114c5760405162461bcd60e51b8152602060048201526011602482015270115c1a5cdbd919481b9bdd08199bdd5b99607a1b604482015260640161070e565b610131546001600160a01b03166111935760405162461bcd60e51b815260206004820152600b60248201526a139bc815d0548812114d1160aa1b604482015260640161070e565b610131546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112019190612f2d565b6001600160a01b0316336001600160a01b0316146112575760405162461bcd60e51b815260206004820152601360248201527227b7363c902ba0a91024229a221037bbb732b960691b604482015260640161070e565b600082815261012f6020526040902054600160ff85161b16156112ae5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161070e565b600082815261012f602052604090208054600160ff86161b17905580600101600081546112da90612cd0565b90915550610b48338460ff16600160405180602001604052806000815250611d0c565b6113056116cd565b8264ffffffffff168264ffffffffff61131e9190612f4a565b64ffffffffff1610156113665760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b604482015260640161070e565b610131805464ffffffffff60a01b1916600160a01b64ffffffffff8616021790556113918284612ce9565b610131805465ffffffffffff60c81b1916600160c81b64ffffffffff938416810260ff60f01b191691909117600160f01b60ff86169081029190911792839055604080518886168152929093049093166020820152908101919091527f0a2dec8ed0b7fdade37b532ac5e8c7d81d8524db1ab581c0d6708f8451eb73249060600160405180910390a1505050565b610130805461142d90612be3565b80601f016020809104026020016040519081016040528092919081815260200182805461145990612be3565b80156114a65780601f1061147b576101008083540402835291602001916114a6565b820191906000526020600020905b81548152906001019060200180831161148957829003601f168201915b505050505081565b610132546001600160a01b0316336001600160a01b0316146115005760405162461bcd60e51b815260206004820152600b60248201526a27b7363c90313ab93732b960a91b604482015260640161070e565b6000816001600160401b0381111561151a5761151a612604565b604051908082528060200260200182016040528015611543578160200160208202803683370190505b50905060005b828110156115a757600081815261012e60205260408120600101805490919061157190612f68565b91905081905550600182828151811061158c5761158c612cba565b60209081029190910101526115a081612cd0565b9050611549565b506115e784848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250611e22915050565b50505050565b6001600160a01b03851633148061160957506116098533610640565b6116255760405162461bcd60e51b815260040161070e90612c6c565b61097f8585858585612027565b61163a6116cd565b6001600160a01b03811661169f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070e565b610cf781611a9d565b60006001600160e01b0319821663152a902d60e11b148061073c575061073c82612155565b60c9546001600160a01b031633146109965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070e565b6127106001600160601b03821611156117525760405162461bcd60e51b815260040161070e90612f7f565b6001600160a01b0382166117a85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161070e565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217609755565b81518351146118025760405162461bcd60e51b815260040161070e90612fc9565b6001600160a01b0384166118285760405162461bcd60e51b815260040161070e90613011565b3360005b845181101561191257600085828151811061184957611849612cba565b60200260200101519050600085838151811061186757611867612cba565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156118b85760405162461bcd60e51b815260040161070e90613056565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906118f7908490612f1a565b925050819055505050508061190b90612cd0565b905061182c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516119629291906130a0565b60405180910390a46119788187878787876121a5565b505050505050565b611988612300565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6127106001600160601b03821611156119fd5760405162461bcd60e51b815260040161070e90612f7f565b6001600160a01b038216611a535760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161070e565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752609890529190942093519051909116600160a01b029116179055565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611b165760405162461bcd60e51b815260040161070e906130ce565b610cf781612349565b600054610100900460ff166109965760405162461bcd60e51b815260040161070e906130ce565b600054610100900460ff16611b6d5760405162461bcd60e51b815260040161070e906130ce565b61099633611a9d565b600054610100900460ff16611b9d5760405162461bcd60e51b815260040161070e906130ce565b60fb805460ff19169055565b611bb1611cc6565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119b53390565b816001600160a01b0316836001600160a01b031603611c595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161070e565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60fb5460ff16156109965760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161070e565b6001600160a01b038416611d6c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161070e565b336000611d7885612355565b90506000611d8585612355565b905060008681526065602090815260408083206001600160a01b038b16845290915281208054879290611db9908490612f1a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e19836000898989896123a0565b50505050505050565b6001600160a01b038316611e845760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161070e565b8051825114611ea55760405162461bcd60e51b815260040161070e90612fc9565b604080516020810190915260009081905233905b8351811015611fba576000848281518110611ed657611ed6612cba565b602002602001015190506000848381518110611ef457611ef4612cba565b60209081029190910181015160008481526065835260408082206001600160a01b038c168352909352919091205490915081811015611f815760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161070e565b60009283526065602090815260408085206001600160a01b038b1686529091529092209103905580611fb281612cd0565b915050611eb9565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161200b9291906130a0565b60405180910390a46040805160208101909152600090526115e7565b6001600160a01b03841661204d5760405162461bcd60e51b815260040161070e90613011565b33600061205985612355565b9050600061206685612355565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156120ab5760405162461bcd60e51b815260040161070e90613056565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120ea908490612f1a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461214a848a8a8a8a8a6123a0565b505050505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061218657506001600160e01b031982166303a24d0760e21b145b8061073c57506301ffc9a760e01b6001600160e01b031983161461073c565b6001600160a01b0384163b156119785760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121e99089908990889088908890600401613119565b6020604051808303816000875af1925050508015612224575060408051601f3d908101601f1916820190925261222191810190613177565b60015b6122d057612230613194565b806308c379a00361226957506122446131b0565b8061224f575061226b565b8060405162461bcd60e51b815260040161070e919061258a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161070e565b6001600160e01b0319811663bc197c8160e01b14611e195760405162461bcd60e51b815260040161070e90613239565b60fb5460ff166109965760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161070e565b60676107948282612d54565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061238f5761238f612cba565b602090810291909101015292915050565b6001600160a01b0384163b156119785760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906123e49089908990889088908890600401613281565b6020604051808303816000875af192505050801561241f575060408051601f3d908101601f1916820190925261241c91810190613177565b60015b61242b57612230613194565b6001600160e01b0319811663f23a6e6160e01b14611e195760405162461bcd60e51b815260040161070e90613239565b6001600160a01b0381168114610cf757600080fd5b6000806040838503121561248357600080fd5b823561248e8161245b565b946020939093013593505050565b6001600160e01b031981168114610cf757600080fd5b6000602082840312156124c457600080fd5b81356124cf8161249c565b9392505050565b80356001600160601b03811681146124ed57600080fd5b919050565b6000806040838503121561250557600080fd5b82356125108161245b565b915061251e602084016124d6565b90509250929050565b60006020828403121561253957600080fd5b81356124cf8161245b565b6000815180845260005b8181101561256a5760208185018101518683018201520161254e565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006124cf6020830184612544565b6000602082840312156125af57600080fd5b5035919050565b600080604083850312156125c957600080fd5b50508035926020909101359150565b803560ff811681146124ed57600080fd5b6000602082840312156125fb57600080fd5b6124cf826125d8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561263f5761263f612604565b6040525050565b60006001600160401b0382111561265f5761265f612604565b5060051b60200190565b600082601f83011261267a57600080fd5b8135602061268782612646565b604051612694828261261a565b83815260059390931b85018201928281019150868411156126b457600080fd5b8286015b848110156126cf57803583529183019183016126b8565b509695505050505050565b60006001600160401b038311156126f3576126f3612604565b60405161270a601f8501601f19166020018261261a565b80915083815284848401111561271f57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261274857600080fd5b6124cf838335602085016126da565b600080600080600060a0868803121561276f57600080fd5b853561277a8161245b565b9450602086013561278a8161245b565b935060408601356001600160401b03808211156127a657600080fd5b6127b289838a01612669565b945060608801359150808211156127c857600080fd5b6127d489838a01612669565b935060808801359150808211156127ea57600080fd5b506127f788828901612737565b9150509295509295909350565b6000806040838503121561281757600080fd5b61248e836125d8565b6000806040838503121561283357600080fd5b823561283e8161245b565b91506020830135801515811461285357600080fd5b809150509250929050565b6000806040838503121561287157600080fd5b82356001600160401b038082111561288857600080fd5b818501915085601f83011261289c57600080fd5b813560206128a982612646565b6040516128b6828261261a565b83815260059390931b85018201928281019150898411156128d657600080fd5b948201945b838610156128fd5785356128ee8161245b565b825294820194908201906128db565b9650508601359250508082111561291357600080fd5b5061292085828601612669565b9150509250929050565b600081518084526020808501945080840160005b8381101561295a5781518752958201959082019060010161293e565b509495945050505050565b6020815260006124cf602083018461292a565b60008060006060848603121561298d57600080fd5b83359250602084013561299f8161245b565b91506129ad604085016124d6565b90509250925092565b600080604083850312156129c957600080fd5b8235915060208301356001600160401b038111156129e657600080fd5b8301601f810185136129f757600080fd5b612920858235602084016126da565b60008060208385031215612a1957600080fd5b82356001600160401b0380821115612a3057600080fd5b818501915085601f830112612a4457600080fd5b813581811115612a5357600080fd5b866020828501011115612a6557600080fd5b60209290920196919550909350505050565b803564ffffffffff811681146124ed57600080fd5b600080600060608486031215612aa157600080fd5b612aaa84612a77565b9250612ab860208501612a77565b91506129ad604085016125d8565b60008060408385031215612ad957600080fd5b8235612ae48161245b565b915060208301356128538161245b565b600080600060408486031215612b0957600080fd5b8335612b148161245b565b925060208401356001600160401b0380821115612b3057600080fd5b818601915086601f830112612b4457600080fd5b813581811115612b5357600080fd5b8760208260051b8501011115612b6857600080fd5b6020830194508093505050509250925092565b600080600080600060a08688031215612b9357600080fd5b8535612b9e8161245b565b94506020860135612bae8161245b565b9350604086013592506060860135915060808601356001600160401b03811115612bd757600080fd5b6127f788828901612737565b600181811c90821680612bf757607f821691505b602082108103612c1757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761073c5761073c612c1d565b600082612c6757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201612ce257612ce2612c1d565b5060010190565b64ffffffffff818116838216019080821115612d0757612d07612c1d565b5092915050565b601f821115610b4857600081815260208120601f850160051c81016020861015612d355750805b601f850160051c820191505b8181101561197857828155600101612d41565b81516001600160401b03811115612d6d57612d6d612604565b612d8181612d7b8454612be3565b84612d0e565b602080601f831160018114612db65760008415612d9e5750858301515b600019600386901b1c1916600185901b178555611978565b600085815260208120601f198616915b82811015612de557888601518255948401946001909101908401612dc6565b5085821015612e035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160401b03831115612e2a57612e2a612604565b612e3e83612e388354612be3565b83612d0e565b6000601f841160018114612e725760008515612e5a5750838201355b600019600387901b1c1916600186901b17835561097f565b600083815260209020601f19861690835b82811015612ea35786850135825560209485019460019092019101612e83565b5086821015612ec05760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60ff818116838216019081111561073c5761073c612c1d565b8082018082111561073c5761073c612c1d565b600060208284031215612f3f57600080fd5b81516124cf8161245b565b64ffffffffff828116828216039080821115612d0757612d07612c1d565b600081612f7757612f77612c1d565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006130b3604083018561292a565b82810360208401526130c5818561292a565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906131459083018661292a565b8281036060840152613157818661292a565b9050828103608084015261316b8185612544565b98975050505050505050565b60006020828403121561318957600080fd5b81516124cf8161249c565b600060033d11156131ad5760046000803e5060005160e01c5b90565b600060443d10156131be5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156131ed57505050505090565b82850191508151818111156132055750505050505090565b843d870101602082850101111561321f5750505050505090565b61322e6020828601018761261a565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132bb90830184612544565b97965050505050505056fe576520617265204e6572766f75732e2041726520796f753f204c65742075732068656c7020796f75207769746820796f7572206e657874204e46542070726f6a656374202d3e2064796c616e406e6572766f75732e6e6574a2646970667358221220d859b6257d0d748c79308f0862c63a86ebab471be0a8b38e37b8e1739949129b64736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025d5760003560e01c80638456cb5911610146578063a996d6ce116100c3578063e51a598c11610087578063e51a598c14610617578063e8a3d4851461062a578063e985e9c514610632578063ea0968da1461066e578063f242432a14610681578063f2fde38b1461069457600080fd5b8063a996d6ce146105c8578063aa1b103f146105db578063bf705296146105e3578063d2c1e110146105fc578063dbc7d8fd1461060457600080fd5b8063938e3d7b1161010a578063938e3d7b1461053757806395d89b411461054a578063a01a99b114610573578063a22cb465146105a2578063a34a3fb4146105b557600080fd5b80638456cb59146104e45780638537dd7f146104ec578063862440e2146105005780638a616bc0146105135780638da5cb5b1461052657600080fd5b80632eb2c2d6116101df5780634e1273f4116101a35780634e1273f41461046f5780635944c7531461048f5780635c975abb146104a2578063715018a6146104ad578063717a8cd4146104b55780638129fc1c146104dc57600080fd5b80632eb2c2d6146103e15780633042837f146103f45780633f4ba83a1461042257806340482bfa1461042a578063454ec2f71461045c57600080fd5b8063088b8adb11610226578063088b8adb1461031c5780630e89341c1461034957806327810b6e1461035c5780632a55205a146103885780632eb08f2b146103ba57600080fd5b8062fdd58e1461026257806301ffc9a71461028857806304634d8d146102ab578063054271e6146102c057806306fdde03146102d3575b600080fd5b610275610270366004612470565b6106a7565b6040519081526020015b60405180910390f35b61029b6102963660046124b2565b610742565b604051901515815260200161027f565b6102be6102b93660046124f2565b610782565b005b6102be6102ce366004612527565b610798565b61030f6040518060400160405280601b81526020017f42524f41445349444520506861736520313a20457069736f646573000000000081525081565b60405161027f919061258a565b61027561032a366004612527565b6001600160a01b0316600090815261012d602052604090205460ff1690565b61030f61035736600461259d565b6107eb565b61013254610370906001600160a01b031681565b6040516001600160a01b03909116815260200161027f565b61039b6103963660046125b6565b61088e565b604080516001600160a01b03909316835260208301919091520161027f565b6102756103c83660046125e9565b60ff16600090815261012e602052604090206001015490565b6102be6103ef366004612757565b61093a565b61029b610402366004612804565b600081815261012f6020526040902054600160ff84161b16151592915050565b6102be610986565b61029b610438366004612527565b6001600160a01b0316600090815261012d6020526040902054610100900460ff1690565b6102be61046a366004612820565b610998565b61048261047d36600461285e565b610a0c565b60405161027f9190612965565b6102be61049d366004612978565b610b35565b60fb5460ff1661029b565b6102be610b4d565b610131546104ca90600160f01b900460ff1681565b60405160ff909116815260200161027f565b6102be610b5f565b6102be610cfa565b61013154610370906001600160a01b031681565b6102be61050e3660046129b6565b610d0a565b6102be61052136600461259d565b610dcd565b60c9546001600160a01b0316610370565b6102be610545366004612a06565b610de6565b61030f6040518060400160405280600a8152602001694253494445312d45505360b01b81525081565b6101315461058c90600160a01b900464ffffffffff1681565b60405164ffffffffff909116815260200161027f565b6102be6105b0366004612820565b610e3a565b6102be6105c33660046125e9565b610e45565b6102be6105d6366004612527565b61101d565b6102be611070565b6101315461058c90600160c81b900464ffffffffff1681565b61030f611082565b6102be610612366004612804565b61109e565b6102be610625366004612a8c565b6112fd565b61030f61141f565b61029b610640366004612ac6565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b6102be61067c366004612af4565b6114ae565b6102be61068f366004612b7b565b6115ed565b6102be6106a2366004612527565b611632565b60006001600160a01b0383166107175760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061077357506001600160e01b0319821663152a902d60e11b145b8061073c575061073c826116a8565b61078a6116cd565b6107948282611727565b5050565b6107a06116cd565b61013180546001600160a01b0319166001600160a01b0383169081179091556040517fc1666341e1a1597601ca5be1720e94693e94dcebbf6ffbb3504a12e96661252290600090a250565b600081815261012e6020526040902080546060919061080990612be3565b80601f016020809104026020016040519081016040528092919081815260200182805461083590612be3565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b50505050509050919050565b60008281526098602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109035750604080518082019091526097546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610922906001600160601b031687612c33565b61092c9190612c4a565b915196919550909350505050565b6001600160a01b03851633148061095657506109568533610640565b6109725760405162461bcd60e51b815260040161070e90612c6c565b61097f85858585856117e1565b5050505050565b61098e6116cd565b610996611980565b565b6109a06116cd565b6001600160a01b038216600081815261012d60205260409081902080548415156101000261ff0019909116179055517f6d7ca490ebfe428deeedabdf0f2882f747769278ba7110bc10f7c5e224c7a6fe90610a0090841515815260200190565b60405180910390a25050565b60608151835114610a715760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161070e565b600083516001600160401b03811115610a8c57610a8c612604565b604051908082528060200260200182016040528015610ab5578160200160208202803683370190505b50905060005b8451811015610b2d57610b00858281518110610ad957610ad9612cba565b6020026020010151858381518110610af357610af3612cba565b60200260200101516106a7565b828281518110610b1257610b12612cba565b6020908102919091010152610b2681612cd0565b9050610abb565b509392505050565b610b3d6116cd565b610b488383836119d2565b505050565b610b556116cd565b6109966000611a9d565b600054610100900460ff1615808015610b7f5750600054600160ff909116105b80610b995750303b158015610b99575060005460ff166001145b610bfc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161070e565b6000805460ff191660011790558015610c1f576000805461ff0019166101001790555b610c3760405180602001604052806000815250611aef565b610c3f611b1f565b610c47611b46565b610c4f611b76565b610131805464ffffffffff60a01b19166263653760a81b179055610c7a6203f4806363653700612ce9565b610131805465ffffffffffff60c81b1916600160c81b64ffffffffff939093169290920260ff60f01b191691909117600360f01b1790558015610cf7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b610d026116cd565b610996611ba9565b60c9546001600160a01b0316331480610d38575033600090815261012d6020526040902054610100900460ff165b610d755760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015260640161070e565b600082815261012e6020526040902080610d8f8382612d54565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b83604051610dc0919061258a565b60405180910390a2505050565b610dd56116cd565b600090815260986020526040812055565b610dee6116cd565b610130610dfc828483612e13565b507f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea528282604051610e2e929190612ed2565b60405180910390a15050565b610794338383611be6565b610e4d611cc6565b61013154600160a01b900464ffffffffff16421015610eae5760405162461bcd60e51b815260206004820152601960248201527f466f7265776f7264206d696e74206e6f74207374617274656400000000000000604482015260640161070e565b61013154600160c81b900464ffffffffff16421115610f055760405162461bcd60e51b8152602060048201526013602482015272119bdc995ddbdc99081b5a5b9d08195b991959606a1b604482015260640161070e565b33600090815261012d6020526040902061013154815460ff600160f01b909204821691610f3491859116612f01565b60ff161115610f855760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178206d696e74207065722077616c6c65740000000000604482015260640161070e565b600080805261012e6020527f05487a880b40ff61e5c065c22c3608319ddddfc383570aaf3e5899db942a555f805460ff85169290610fc4908490612f1a565b9091555050805482908290600090610fe090849060ff16612f01565b92506101000a81548160ff021916908360ff1602179055506107946110023390565b60008460ff1660405180602001604052806000815250611d0c565b6110256116cd565b61013280546001600160a01b0319166001600160a01b0383169081179091556040517f5d02513563a6890385b0d6684a867cbf8032b19adbd10bca1f78f430db041e3790600090a250565b6110786116cd565b6109966000609755565b6040518060800160405280605881526020016132c76058913981565b6110a6611cc6565b60ff8216600081815261012e60205260409020906110f85760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420657069736f646560881b604482015260640161070e565b600081600001805461110990612be3565b90501161114c5760405162461bcd60e51b8152602060048201526011602482015270115c1a5cdbd919481b9bdd08199bdd5b99607a1b604482015260640161070e565b610131546001600160a01b03166111935760405162461bcd60e51b815260206004820152600b60248201526a139bc815d0548812114d1160aa1b604482015260640161070e565b610131546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112019190612f2d565b6001600160a01b0316336001600160a01b0316146112575760405162461bcd60e51b815260206004820152601360248201527227b7363c902ba0a91024229a221037bbb732b960691b604482015260640161070e565b600082815261012f6020526040902054600160ff85161b16156112ae5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161070e565b600082815261012f602052604090208054600160ff86161b17905580600101600081546112da90612cd0565b90915550610b48338460ff16600160405180602001604052806000815250611d0c565b6113056116cd565b8264ffffffffff168264ffffffffff61131e9190612f4a565b64ffffffffff1610156113665760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b604482015260640161070e565b610131805464ffffffffff60a01b1916600160a01b64ffffffffff8616021790556113918284612ce9565b610131805465ffffffffffff60c81b1916600160c81b64ffffffffff938416810260ff60f01b191691909117600160f01b60ff86169081029190911792839055604080518886168152929093049093166020820152908101919091527f0a2dec8ed0b7fdade37b532ac5e8c7d81d8524db1ab581c0d6708f8451eb73249060600160405180910390a1505050565b610130805461142d90612be3565b80601f016020809104026020016040519081016040528092919081815260200182805461145990612be3565b80156114a65780601f1061147b576101008083540402835291602001916114a6565b820191906000526020600020905b81548152906001019060200180831161148957829003601f168201915b505050505081565b610132546001600160a01b0316336001600160a01b0316146115005760405162461bcd60e51b815260206004820152600b60248201526a27b7363c90313ab93732b960a91b604482015260640161070e565b6000816001600160401b0381111561151a5761151a612604565b604051908082528060200260200182016040528015611543578160200160208202803683370190505b50905060005b828110156115a757600081815261012e60205260408120600101805490919061157190612f68565b91905081905550600182828151811061158c5761158c612cba565b60209081029190910101526115a081612cd0565b9050611549565b506115e784848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250611e22915050565b50505050565b6001600160a01b03851633148061160957506116098533610640565b6116255760405162461bcd60e51b815260040161070e90612c6c565b61097f8585858585612027565b61163a6116cd565b6001600160a01b03811661169f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070e565b610cf781611a9d565b60006001600160e01b0319821663152a902d60e11b148061073c575061073c82612155565b60c9546001600160a01b031633146109965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070e565b6127106001600160601b03821611156117525760405162461bcd60e51b815260040161070e90612f7f565b6001600160a01b0382166117a85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161070e565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217609755565b81518351146118025760405162461bcd60e51b815260040161070e90612fc9565b6001600160a01b0384166118285760405162461bcd60e51b815260040161070e90613011565b3360005b845181101561191257600085828151811061184957611849612cba565b60200260200101519050600085838151811061186757611867612cba565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156118b85760405162461bcd60e51b815260040161070e90613056565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906118f7908490612f1a565b925050819055505050508061190b90612cd0565b905061182c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516119629291906130a0565b60405180910390a46119788187878787876121a5565b505050505050565b611988612300565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6127106001600160601b03821611156119fd5760405162461bcd60e51b815260040161070e90612f7f565b6001600160a01b038216611a535760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161070e565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752609890529190942093519051909116600160a01b029116179055565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611b165760405162461bcd60e51b815260040161070e906130ce565b610cf781612349565b600054610100900460ff166109965760405162461bcd60e51b815260040161070e906130ce565b600054610100900460ff16611b6d5760405162461bcd60e51b815260040161070e906130ce565b61099633611a9d565b600054610100900460ff16611b9d5760405162461bcd60e51b815260040161070e906130ce565b60fb805460ff19169055565b611bb1611cc6565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119b53390565b816001600160a01b0316836001600160a01b031603611c595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161070e565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60fb5460ff16156109965760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161070e565b6001600160a01b038416611d6c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161070e565b336000611d7885612355565b90506000611d8585612355565b905060008681526065602090815260408083206001600160a01b038b16845290915281208054879290611db9908490612f1a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e19836000898989896123a0565b50505050505050565b6001600160a01b038316611e845760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161070e565b8051825114611ea55760405162461bcd60e51b815260040161070e90612fc9565b604080516020810190915260009081905233905b8351811015611fba576000848281518110611ed657611ed6612cba565b602002602001015190506000848381518110611ef457611ef4612cba565b60209081029190910181015160008481526065835260408082206001600160a01b038c168352909352919091205490915081811015611f815760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161070e565b60009283526065602090815260408085206001600160a01b038b1686529091529092209103905580611fb281612cd0565b915050611eb9565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161200b9291906130a0565b60405180910390a46040805160208101909152600090526115e7565b6001600160a01b03841661204d5760405162461bcd60e51b815260040161070e90613011565b33600061205985612355565b9050600061206685612355565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156120ab5760405162461bcd60e51b815260040161070e90613056565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906120ea908490612f1a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461214a848a8a8a8a8a6123a0565b505050505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061218657506001600160e01b031982166303a24d0760e21b145b8061073c57506301ffc9a760e01b6001600160e01b031983161461073c565b6001600160a01b0384163b156119785760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121e99089908990889088908890600401613119565b6020604051808303816000875af1925050508015612224575060408051601f3d908101601f1916820190925261222191810190613177565b60015b6122d057612230613194565b806308c379a00361226957506122446131b0565b8061224f575061226b565b8060405162461bcd60e51b815260040161070e919061258a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161070e565b6001600160e01b0319811663bc197c8160e01b14611e195760405162461bcd60e51b815260040161070e90613239565b60fb5460ff166109965760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161070e565b60676107948282612d54565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061238f5761238f612cba565b602090810291909101015292915050565b6001600160a01b0384163b156119785760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906123e49089908990889088908890600401613281565b6020604051808303816000875af192505050801561241f575060408051601f3d908101601f1916820190925261241c91810190613177565b60015b61242b57612230613194565b6001600160e01b0319811663f23a6e6160e01b14611e195760405162461bcd60e51b815260040161070e90613239565b6001600160a01b0381168114610cf757600080fd5b6000806040838503121561248357600080fd5b823561248e8161245b565b946020939093013593505050565b6001600160e01b031981168114610cf757600080fd5b6000602082840312156124c457600080fd5b81356124cf8161249c565b9392505050565b80356001600160601b03811681146124ed57600080fd5b919050565b6000806040838503121561250557600080fd5b82356125108161245b565b915061251e602084016124d6565b90509250929050565b60006020828403121561253957600080fd5b81356124cf8161245b565b6000815180845260005b8181101561256a5760208185018101518683018201520161254e565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006124cf6020830184612544565b6000602082840312156125af57600080fd5b5035919050565b600080604083850312156125c957600080fd5b50508035926020909101359150565b803560ff811681146124ed57600080fd5b6000602082840312156125fb57600080fd5b6124cf826125d8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561263f5761263f612604565b6040525050565b60006001600160401b0382111561265f5761265f612604565b5060051b60200190565b600082601f83011261267a57600080fd5b8135602061268782612646565b604051612694828261261a565b83815260059390931b85018201928281019150868411156126b457600080fd5b8286015b848110156126cf57803583529183019183016126b8565b509695505050505050565b60006001600160401b038311156126f3576126f3612604565b60405161270a601f8501601f19166020018261261a565b80915083815284848401111561271f57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261274857600080fd5b6124cf838335602085016126da565b600080600080600060a0868803121561276f57600080fd5b853561277a8161245b565b9450602086013561278a8161245b565b935060408601356001600160401b03808211156127a657600080fd5b6127b289838a01612669565b945060608801359150808211156127c857600080fd5b6127d489838a01612669565b935060808801359150808211156127ea57600080fd5b506127f788828901612737565b9150509295509295909350565b6000806040838503121561281757600080fd5b61248e836125d8565b6000806040838503121561283357600080fd5b823561283e8161245b565b91506020830135801515811461285357600080fd5b809150509250929050565b6000806040838503121561287157600080fd5b82356001600160401b038082111561288857600080fd5b818501915085601f83011261289c57600080fd5b813560206128a982612646565b6040516128b6828261261a565b83815260059390931b85018201928281019150898411156128d657600080fd5b948201945b838610156128fd5785356128ee8161245b565b825294820194908201906128db565b9650508601359250508082111561291357600080fd5b5061292085828601612669565b9150509250929050565b600081518084526020808501945080840160005b8381101561295a5781518752958201959082019060010161293e565b509495945050505050565b6020815260006124cf602083018461292a565b60008060006060848603121561298d57600080fd5b83359250602084013561299f8161245b565b91506129ad604085016124d6565b90509250925092565b600080604083850312156129c957600080fd5b8235915060208301356001600160401b038111156129e657600080fd5b8301601f810185136129f757600080fd5b612920858235602084016126da565b60008060208385031215612a1957600080fd5b82356001600160401b0380821115612a3057600080fd5b818501915085601f830112612a4457600080fd5b813581811115612a5357600080fd5b866020828501011115612a6557600080fd5b60209290920196919550909350505050565b803564ffffffffff811681146124ed57600080fd5b600080600060608486031215612aa157600080fd5b612aaa84612a77565b9250612ab860208501612a77565b91506129ad604085016125d8565b60008060408385031215612ad957600080fd5b8235612ae48161245b565b915060208301356128538161245b565b600080600060408486031215612b0957600080fd5b8335612b148161245b565b925060208401356001600160401b0380821115612b3057600080fd5b818601915086601f830112612b4457600080fd5b813581811115612b5357600080fd5b8760208260051b8501011115612b6857600080fd5b6020830194508093505050509250925092565b600080600080600060a08688031215612b9357600080fd5b8535612b9e8161245b565b94506020860135612bae8161245b565b9350604086013592506060860135915060808601356001600160401b03811115612bd757600080fd5b6127f788828901612737565b600181811c90821680612bf757607f821691505b602082108103612c1757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761073c5761073c612c1d565b600082612c6757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201612ce257612ce2612c1d565b5060010190565b64ffffffffff818116838216019080821115612d0757612d07612c1d565b5092915050565b601f821115610b4857600081815260208120601f850160051c81016020861015612d355750805b601f850160051c820191505b8181101561197857828155600101612d41565b81516001600160401b03811115612d6d57612d6d612604565b612d8181612d7b8454612be3565b84612d0e565b602080601f831160018114612db65760008415612d9e5750858301515b600019600386901b1c1916600185901b178555611978565b600085815260208120601f198616915b82811015612de557888601518255948401946001909101908401612dc6565b5085821015612e035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160401b03831115612e2a57612e2a612604565b612e3e83612e388354612be3565b83612d0e565b6000601f841160018114612e725760008515612e5a5750838201355b600019600387901b1c1916600186901b17835561097f565b600083815260209020601f19861690835b82811015612ea35786850135825560209485019460019092019101612e83565b5086821015612ec05760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60ff818116838216019081111561073c5761073c612c1d565b8082018082111561073c5761073c612c1d565b600060208284031215612f3f57600080fd5b81516124cf8161245b565b64ffffffffff828116828216039080821115612d0757612d07612c1d565b600081612f7757612f77612c1d565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006130b3604083018561292a565b82810360208401526130c5818561292a565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906131459083018661292a565b8281036060840152613157818661292a565b9050828103608084015261316b8185612544565b98975050505050505050565b60006020828403121561318957600080fd5b81516124cf8161249c565b600060033d11156131ad5760046000803e5060005160e01c5b90565b600060443d10156131be5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156131ed57505050505090565b82850191508151818111156132055750505050505090565b843d870101602082850101111561321f5750505050505090565b61322e6020828601018761261a565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132bb90830184612544565b97965050505050505056fe576520617265204e6572766f75732e2041726520796f753f204c65742075732068656c7020796f75207769746820796f7572206e657874204e46542070726f6a656374202d3e2064796c616e406e6572766f75732e6e6574a2646970667358221220d859b6257d0d748c79308f0862c63a86ebab471be0a8b38e37b8e1739949129b64736f6c63430008110033

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
Loading...
Loading

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