ETH Price: $3,410.84 (+2.98%)

Contract

0xbd4323C256bEF291Ba10d2A02a0B19ba84BEb4D9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize165651112023-02-05 20:56:23657 days ago1675630583IN
0xbd4323C2...a84BEb4D9
0 ETH0.0052857223.86309375
0x60806040165353662023-02-01 17:10:23661 days ago1675271423IN
 Create: LPUpgradeable
0 ETH0.0879097725

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LPUpgradeable

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 27 : LPUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "./DefaultOperatorFiltererUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";

contract LPUpgradeable is
    ERC721EnumerableUpgradeable,
    DefaultOperatorFiltererUpgradeable,
    OwnableUpgradeable,
    ReentrancyGuardUpgradeable,
    PausableUpgradeable,
    IERC2981
{
    using Strings for uint256;
    using MerkleProof for bytes32[];

    // Whitelists
    bytes32 public phase2Root;

    // Sale settings
    uint256 public airdropPrice;
    uint256 public price;

    uint256 public phase1Start;
    uint256 public phase1End;
    uint256 public phase2Start;
    uint256 public phase3Start;
    uint256 public phase3End;

    // Collection settings
    string private _contractBaseURI;
    string private _contractURI;

    uint256 public maxSupply;

    // Royalty settings
    uint256 private royaltyBps;
    address private royaltyReceiver;

    IERC20 private weth;

    // Phase 2 mapping
    mapping(address => uint256) public userMinted;

    address private minter;

    // Burn lock
    bool public isBurnLocked;

    function initialize() public initializer {
        __ERC721_init("LoudPunx", "LOUD");
        __ERC721Enumerable_init();
        __Ownable_init();
        __ReentrancyGuard_init();
        __Pausable_init();
        __DefaultOperatorFilterer_init();
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    )
        public
        override(ERC721Upgradeable, IERC721Upgradeable)
        onlyAllowedOperator(from)
    {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    )
        public
        override(ERC721Upgradeable, IERC721Upgradeable)
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    )
        public
        override(ERC721Upgradeable, IERC721Upgradeable)
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    // Mint functions
    function airdrop(address[] calldata receivers) external {
        require(msg.sender == minter, "Not minter");
        uint256 newTokenId = totalSupply() + 1;
        for (uint256 i = 0; i < receivers.length; i++) {
            weth.transferFrom(receivers[i], address(this), airdropPrice);
            _safeMint(receivers[i], newTokenId);
            newTokenId += 1;
        }
    }

    function phase2Mint(
        address to,
        bytes32[] calldata proof,
        uint256 quantity
    ) external payable nonReentrant whenNotPaused {
        require(msg.value == quantity * price, "Wrong price");

        validatePhase2Mint(to, proof, quantity);

        _internalMint(to, quantity);

        userMinted[to] += quantity;
    }

    function phase3Mint(address to, uint256 quantity)
        external
        payable
        nonReentrant
        whenNotPaused
    {
        require(msg.value == quantity * price, "Wrong price");

        validatePhase3Mint(quantity);

        _internalMint(to, quantity);
    }

    function adminMint(address to, uint256 qty) external onlyOwner {
        _internalMint(to, qty);
    }

    function _internalMint(address to, uint256 quantity) internal {
        uint256 counter = totalSupply();
        for (uint256 i = 0; i < quantity; i++) {
            counter++;
            _safeMint(to, counter);
        }
    }

    // Token functions
    function exists(uint256 _tokenId) external view returns (bool) {
        return _exists(_tokenId);
    }

    function tokenURI(uint256 _tokenId)
        public
        view
        override(ERC721Upgradeable)
        returns (string memory)
    {
        require(
            _exists(_tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );
        return string(abi.encodePacked(_contractBaseURI, _tokenId.toString()));
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    function setBaseURI(string memory newBaseURI) external onlyOwner {
        _contractBaseURI = newBaseURI;
    }

    function setContractURI(string memory newContractURI) external onlyOwner {
        _contractURI = newContractURI;
    }

    // Reclaim functions
    function reclaimERC20(IERC20 erc20Token) external onlyOwner {
        erc20Token.transfer(msg.sender, erc20Token.balanceOf(address(this)));
    }

    function reclaimERC721(IERC721 erc721Token, uint256 id) external onlyOwner {
        erc721Token.safeTransferFrom(address(this), msg.sender, id);
    }

    function reclaimERC1155(
        address erc1155Token,
        uint256 id,
        uint256 amount
    ) public onlyOwner {
        IERC1155(erc1155Token).safeTransferFrom(
            address(this),
            msg.sender,
            id,
            amount,
            ""
        );
    }

    function withdrawEarnings(address to, uint256 balance) external onlyOwner {
        payable(to).transfer(balance);
    }

    // Sale settings
    function pause() external onlyOwner {
        _pause();
    }

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

    function setPhaseTime(
        uint256 _phase1Start,
        uint256 _phase1End,
        uint256 _phase2Start,
        uint256 _phase3Start,
        uint256 _phase3End
    ) external onlyOwner {
        phase1Start = _phase1Start;
        phase1End = _phase1End;
        phase2Start = _phase2Start;
        phase3Start = _phase3Start;
        phase3End = _phase3End;
    }

    function setPhase2Root(bytes32 root) external onlyOwner {
        phase2Root = root;
    }

    function setMaxSupply(uint256 newSupply) external onlyOwner {
        maxSupply = newSupply;
    }

    function setWethAddress(address _weth) external onlyOwner {
        weth = IERC20(_weth);
    }

    function setMinter(address _minter) external onlyOwner {
        minter = _minter;
    }

    function setPrice(uint256 _price, uint256 _airdropPrice)
        external
        onlyOwner
    {
        price = _price;
        airdropPrice = _airdropPrice;
    }

    function setBurnLocked(bool _isLocked) external onlyOwner {
        isBurnLocked = _isLocked;
    }

    // Utility functions
    function isMintValid(
        address _to,
        bytes32[] memory _proof,
        bytes32 root
    ) internal pure returns (bool) {
        bytes32 leaf = keccak256(abi.encodePacked(_to));

        return _proof.verify(root, leaf);
    }

    function validatePhase2Mint(
        address to,
        bytes32[] calldata proof,
        uint256 quantity
    ) public view {
        require(
            phase2Start <= block.timestamp && block.timestamp < phase3Start,
            "Phase 2 inactive"
        );
        require(isMintValid(to, proof, phase2Root), "Not in phase 2 whitelist");
        require(quantity <= 2, "Max 2 at once");
        require(userMinted[to] + quantity <= 2, "Max 2 per wallet");
        require(totalSupply() + quantity <= maxSupply, "Exceeds supply");
    }

    function validatePhase3Mint(uint256 quantity) public view {
        require(
            phase3Start <= block.timestamp && block.timestamp < phase3End,
            "Phase 3 inactive"
        );
        require(quantity <= 20, "Max 20 at once");
        require(totalSupply() + quantity <= maxSupply, "Exceeds supply");
    }

    // Royalties
    function setRoyaltyReceiver(address _royaltyReceiver) external onlyOwner {
        royaltyReceiver = _royaltyReceiver;
    }

    function setRoyaltyBps(uint256 _royaltyBps) external onlyOwner {
        royaltyBps = _royaltyBps;
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(IERC165,ERC721EnumerableUpgradeable)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        returns (address, uint256 royaltyAmount)
    {
        royaltyAmount = (_salePrice / 10000) * royaltyBps;
        return (royaltyReceiver, royaltyAmount);
    }

    // Burning
    function burn(uint256 tokenId) public virtual {
        require(!isBurnLocked, "Burn is locked");
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: caller is not token owner or approved"
        );
        _burn(tokenId);
    }

}

File 2 of 27 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal onlyInitializing {
    }

    function __ERC721Enumerable_init_unchained() internal onlyInitializing {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721Upgradeable.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }

    /**
     * @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[46] private __gap;
}

File 3 of 27 : DefaultOperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./OperatorFiltererUpgradeable.sol";

abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    function __DefaultOperatorFilterer_init() public onlyInitializing {
        OperatorFiltererUpgradeable.__OperatorFilterer_init(DEFAULT_SUBSCRIPTION, true);
    }
}

File 4 of 27 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 5 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 6 of 27 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 7 of 27 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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

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

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

    uint256 private _status;

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

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

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

File 8 of 27 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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 9 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 10 of 27 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.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 IERC1155 is IERC165 {
    /**
     * @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 be 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 11 of 27 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 12 of 27 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 13 of 27 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721Upgradeable.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @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[44] private __gap;
}

File 14 of 27 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 15 of 27 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

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.
 *
 * 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 initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 16 of 27 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 17 of 27 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 18 of 27 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 19 of 27 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 20 of 27 : 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 21 of 27 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 22 of 27 : 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 23 of 27 : 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 24 of 27 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "./IOperatorFilterRegistry.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

abstract contract OperatorFiltererUpgradeable is Initializable {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) public onlyInitializing {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (!operatorFilterRegistry.isRegistered(address(this))) {
                if (subscribe) {
                    operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    if (subscriptionOrRegistrantToCopy != address(0)) {
                        operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                    } else {
                        operatorFilterRegistry.register(address(this));
                    }
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (
                !(
                    operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)
                        && operatorFilterRegistry.isOperatorAllowed(address(this), from)
                )
            ) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }
}

File 25 of 27 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

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

pragma solidity ^0.8.0;

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

File 27 of 27 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"__DefaultOperatorFilterer_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subscriptionOrRegistrantToCopy","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"}],"name":"__OperatorFilterer_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"receivers","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airdropPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBurnLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","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":"phase1End","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase1Start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"phase2Mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"phase2Root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase2Start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase3End","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"phase3Mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"phase3Start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc1155Token","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reclaimERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20Token","type":"address"}],"name":"reclaimERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"erc721Token","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"reclaimERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isLocked","type":"bool"}],"name":"setBurnLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setPhase2Root","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_phase1Start","type":"uint256"},{"internalType":"uint256","name":"_phase1End","type":"uint256"},{"internalType":"uint256","name":"_phase2Start","type":"uint256"},{"internalType":"uint256","name":"_phase3Start","type":"uint256"},{"internalType":"uint256","name":"_phase3End","type":"uint256"}],"name":"setPhaseTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_airdropPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyBps","type":"uint256"}],"name":"setRoyaltyBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyReceiver","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weth","type":"address"}],"name":"setWethAddress","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":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","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":"address","name":"","type":"address"}],"name":"userMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"validatePhase2Mint","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"validatePhase3Mint","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"withdrawEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50613ea3806100206000396000f3fe6080604052600436106103a25760003560e01c8063729ad39e116101e7578063bd3c996b1161010d578063e722ba75116100a0578063f7d975771161006f578063f7d9757714610a9b578063fca3b5aa14610abb578063ff57d87314610adb578063ff633d5514610af257600080fd5b8063e722ba75146109fd578063e8a3d48514610a1d578063e985e9c514610a32578063f2fde38b14610a7b57600080fd5b8063d5abeb01116100dc578063d5abeb011461099c578063d6aef481146109b3578063ddd5fe72146109c6578063e58306f9146109dd57600080fd5b8063bd3c996b14610923578063c87b56dd14610945578063c9211c8214610965578063d5884ccb1461098557600080fd5b80638dc251e311610185578063a22cb46511610154578063a22cb465146108b0578063a96e2423146108d0578063b88d4fde146108f0578063ba4f20861461091057600080fd5b80638dc251e314610844578063938e3d7b1461086457806395d89b4114610884578063a035b1fe1461089957600080fd5b80638456cb59116101c15780638456cb59146107da57806386dca336146107ef5780638905fd4f146108065780638da5cb5b1461082657600080fd5b8063729ad39e1461078e5780637eff25e4146107ae5780638129fc1c146107c557600080fd5b806327105ea5116102cc5780634f6ccce71161026a5780636b7d2470116102395780636b7d2470146107195780636f8b44b01461073957806370a0823114610759578063715018a61461077957600080fd5b80634f6ccce7146106a057806355f804b3146106c05780635c975abb146106e05780636352211e146106f957600080fd5b80633f4ba83a116102a65780633f4ba83a1461062b57806342842e0e1461064057806342966c68146106605780634f558e791461068057600080fd5b806327105ea5146105b55780632a55205a146105cc5780632f745c591461060b57600080fd5b806318160ddd116103445780631c8e7d2a116103135780631c8e7d2a146105355780631c8fd50e146105555780631f72d8311461057557806323b872dd1461059557600080fd5b806318160ddd146104b257806318bcceb1146104c75780631aa5e872146104e75780631c6ff2da1461051557600080fd5b806306fdde031161038057806306fdde0314610413578063081812fc14610435578063095ea7b31461046d5780631352cd1c1461048d57600080fd5b806301ffc9a7146103a757806303eaebec146103dc57806303feff59146103f3575b600080fd5b3480156103b357600080fd5b506103c76103c236600461353e565b610b12565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b3d565b005b3480156103ff57600080fd5b506103f161040e366004613562565b610b8e565b34801561041f57600080fd5b50610428610c7e565b6040516103d391906135cb565b34801561044157600080fd5b50610455610450366004613562565b610d10565b6040516001600160a01b0390911681526020016103d3565b34801561047957600080fd5b506103f16104883660046135f3565b610da5565b34801561049957600080fd5b506104a46101665481565b6040519081526020016103d3565b3480156104be57600080fd5b506099546104a4565b3480156104d357600080fd5b506103f16104e2366004613562565b610eba565b3480156104f357600080fd5b506104a461050236600461361f565b61016d6020526000908152604090205481565b34801561052157600080fd5b506103f161053036600461363c565b610eea565b34801561054157600080fd5b506103f1610550366004613677565b610f30565b34801561056157600080fd5b506103f16105703660046136f1565b610fda565b34801561058157600080fd5b506103f1610590366004613562565b6111c3565b3480156105a157600080fd5b506103f16105b036600461374d565b6111f3565b3480156105c157600080fd5b506104a46101605481565b3480156105d857600080fd5b506105ec6105e736600461378e565b611342565b604080516001600160a01b0390931683526020830191909152016103d3565b34801561061757600080fd5b506104a46106263660046135f3565b61137a565b34801561063757600080fd5b506103f1611410565b34801561064c57600080fd5b506103f161065b36600461374d565b611442565b34801561066c57600080fd5b506103f161067b366004613562565b61158c565b34801561068c57600080fd5b506103c761069b366004613562565b61164e565b3480156106ac57600080fd5b506104a46106bb366004613562565b61166d565b3480156106cc57600080fd5b506103f16106db36600461383c565b611700565b3480156106ec57600080fd5b5061012d5460ff166103c7565b34801561070557600080fd5b50610455610714366004613562565b61173b565b34801561072557600080fd5b506103f16107343660046135f3565b6117b2565b34801561074557600080fd5b506103f1610754366004613562565b611847565b34801561076557600080fd5b506104a461077436600461361f565b611877565b34801561078557600080fd5b506103f16118fe565b34801561079a57600080fd5b506103f16107a9366004613885565b611932565b3480156107ba57600080fd5b506104a46101635481565b3480156107d157600080fd5b506103f1611a9f565b3480156107e657600080fd5b506103f1611bc5565b3480156107fb57600080fd5b506104a46101655481565b34801561081257600080fd5b506103f161082136600461361f565b611bf7565b34801561083257600080fd5b5060c9546001600160a01b0316610455565b34801561085057600080fd5b506103f161085f36600461361f565b611d02565b34801561087057600080fd5b506103f161087f36600461383c565b611d4f565b34801561089057600080fd5b50610428611d86565b3480156108a557600080fd5b506104a46101615481565b3480156108bc57600080fd5b506103f16108cb3660046138d5565b611d95565b3480156108dc57600080fd5b506103f16108eb36600461361f565b611da0565b3480156108fc57600080fd5b506103f161090b36600461390e565b611ded565b6103f161091e3660046136f1565b611f45565b34801561092f57600080fd5b5061016e546103c790600160a01b900460ff1681565b34801561095157600080fd5b50610428610960366004613562565b612059565b34801561097157600080fd5b506103f16109803660046135f3565b61210b565b34801561099157600080fd5b506104a461015f5481565b3480156109a857600080fd5b506104a46101695481565b6103f16109c13660046135f3565b61216b565b3480156109d257600080fd5b506104a46101625481565b3480156109e957600080fd5b506103f16109f83660046135f3565b61224c565b348015610a0957600080fd5b506103f1610a1836600461398e565b612280565b348015610a2957600080fd5b506104286122c9565b348015610a3e57600080fd5b506103c7610a4d3660046139ab565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610a8757600080fd5b506103f1610a9636600461361f565b6122d9565b348015610aa757600080fd5b506103f1610ab636600461378e565b612371565b348015610ac757600080fd5b506103f1610ad636600461361f565b6123a8565b348015610ae757600080fd5b506104a46101645481565b348015610afe57600080fd5b506103f1610b0d3660046138d5565b6123f5565b60006001600160e01b0319821663152a902d60e11b1480610b375750610b3782612550565b92915050565b600054610100900460ff16610b6d5760405162461bcd60e51b8152600401610b64906139d9565b60405180910390fd5b610b8c733cc6cdda760b79bafa08df41ecfa224f810dceb660016123f5565b565b426101655411158015610ba357506101665442105b610be25760405162461bcd60e51b815260206004820152601060248201526f5068617365203320696e61637469766560801b6044820152606401610b64565b6014811115610c245760405162461bcd60e51b815260206004820152600e60248201526d4d6178203230206174206f6e636560901b6044820152606401610b64565b6101695481610c3260995490565b610c3c9190613a3a565b1115610c7b5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b64565b50565b606060658054610c8d90613a4d565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb990613a4d565b8015610d065780601f10610cdb57610100808354040283529160200191610d06565b820191906000526020600020905b815481529060010190602001808311610ce957829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b0316610d895760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b64565b506000908152606960205260409020546001600160a01b031690565b6000610db08261173b565b9050806001600160a01b0316836001600160a01b031603610e1d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b64565b336001600160a01b0382161480610e395750610e398133610a4d565b610eab5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b64565b610eb58383612575565b505050565b60c9546001600160a01b03163314610ee45760405162461bcd60e51b8152600401610b6490613a87565b61015f55565b60c9546001600160a01b03163314610f145760405162461bcd60e51b8152600401610b6490613a87565b6101629490945561016392909255610164556101655561016655565b60c9546001600160a01b03163314610f5a5760405162461bcd60e51b8152600401610b6490613a87565b604051637921219560e11b8152306004820152336024820152604481018390526064810182905260a06084820152600060a48201526001600160a01b0384169063f242432a9060c401600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b50505050505050565b426101645411158015610fef57506101655442105b61102e5760405162461bcd60e51b815260206004820152601060248201526f5068617365203220696e61637469766560801b6044820152606401610b64565b611070848484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061015f5491506125e39050565b6110bc5760405162461bcd60e51b815260206004820152601860248201527f4e6f7420696e20706861736520322077686974656c69737400000000000000006044820152606401610b64565b60028111156110fd5760405162461bcd60e51b815260206004820152600d60248201526c4d61782032206174206f6e636560981b6044820152606401610b64565b6001600160a01b038416600090815261016d6020526040902054600290611125908390613a3a565b11156111665760405162461bcd60e51b815260206004820152601060248201526f13585e080c881c195c881dd85b1b195d60821b6044820152606401610b64565b610169548161117460995490565b61117e9190613a3a565b11156111bd5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b64565b50505050565b60c9546001600160a01b031633146111ed5760405162461bcd60e51b8152600401610b6490613a87565b61016a55565b826daaeb6d7670e522a718067333cd4e3b1561133757336001600160a01b0382160361122957611224848484612635565b6111bd565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061125c9030903390600401613abc565b602060405180830381865afa158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190613ad6565b80156113185750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906112d79030908590600401613abc565b602060405180830381865afa1580156112f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113189190613ad6565b61133757604051633b79c77360e21b8152336004820152602401610b64565b6111bd848484612635565b60008061016a54612710846113579190613b09565b6113619190613b1d565b61016b546001600160a01b0316925090505b9250929050565b600061138583611877565b82106113e75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b64565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b60c9546001600160a01b0316331461143a5760405162461bcd60e51b8152600401610b6490613a87565b610b8c612665565b826daaeb6d7670e522a718067333cd4e3b1561158157336001600160a01b03821603611473576112248484846126fa565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906114a69030903390600401613abc565b602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e79190613ad6565b80156115625750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906115219030908590600401613abc565b602060405180830381865afa15801561153e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115629190613ad6565b61158157604051633b79c77360e21b8152336004820152602401610b64565b6111bd8484846126fa565b61016e54600160a01b900460ff16156115d85760405162461bcd60e51b815260206004820152600e60248201526d109d5c9b881a5cc81b1bd8dad95960921b6044820152606401610b64565b6115e3335b82612715565b6116455760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b64565b610c7b8161280c565b6000818152606760205260408120546001600160a01b03161515610b37565b600061167860995490565b82106116db5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b64565b609982815481106116ee576116ee613b34565b90600052602060002001549050919050565b60c9546001600160a01b0316331461172a5760405162461bcd60e51b8152600401610b6490613a87565b6101676117378282613b90565b5050565b6000818152606760205260408120546001600160a01b031680610b375760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b64565b60c9546001600160a01b031633146117dc5760405162461bcd60e51b8152600401610b6490613a87565b604051632142170760e11b8152306004820152336024820152604481018290526001600160a01b038316906342842e0e906064015b600060405180830381600087803b15801561182b57600080fd5b505af115801561183f573d6000803e3d6000fd5b505050505050565b60c9546001600160a01b031633146118715760405162461bcd60e51b8152600401610b6490613a87565b61016955565b60006001600160a01b0382166118e25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b64565b506001600160a01b031660009081526068602052604090205490565b60c9546001600160a01b031633146119285760405162461bcd60e51b8152600401610b6490613a87565b610b8c60006128b3565b61016e546001600160a01b0316331461197a5760405162461bcd60e51b815260206004820152600a6024820152692737ba1036b4b73a32b960b11b6044820152606401610b64565b600061198560995490565b611990906001613a3a565b905060005b828110156111bd5761016c546001600160a01b03166323b872dd8585848181106119c1576119c1613b34565b90506020020160208101906119d6919061361f565b610160546040516001600160e01b031960e085901b1681526001600160a01b03909216600483015230602483015260448201526064016020604051808303816000875af1158015611a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4f9190613ad6565b50611a80848483818110611a6557611a65613b34565b9050602002016020810190611a7a919061361f565b83612905565b611a8b600183613a3a565b915080611a9781613c50565b915050611995565b600054610100900460ff16611aba5760005460ff1615611abe565b303b155b611b215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b64565b600054610100900460ff16158015611b43576000805461ffff19166101011790555b611b8960405180604001604052806008815260200167098deeac8a0eadcf60c31b815250604051806040016040528060048152602001631313d55160e21b81525061291f565b611b91612950565b611b99612977565b611ba16129a6565b611ba96129d5565b611bb1610b3d565b8015610c7b576000805461ff001916905550565b60c9546001600160a01b03163314611bef5760405162461bcd60e51b8152600401610b6490613a87565b610b8c612a04565b60c9546001600160a01b03163314611c215760405162461bcd60e51b8152600401610b6490613a87565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c939190613c69565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611cde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117379190613ad6565b60c9546001600160a01b03163314611d2c5760405162461bcd60e51b8152600401610b6490613a87565b61016b80546001600160a01b0319166001600160a01b0392909216919091179055565b60c9546001600160a01b03163314611d795760405162461bcd60e51b8152600401610b6490613a87565b6101686117378282613b90565b606060668054610c8d90613a4d565b611737338383612a5e565b60c9546001600160a01b03163314611dca5760405162461bcd60e51b8152600401610b6490613a87565b61016c80546001600160a01b0319166001600160a01b0392909216919091179055565b836daaeb6d7670e522a718067333cd4e3b15611f3257336001600160a01b03821603611e2457611e1f85858585612b2c565b611f3e565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611e579030903390600401613abc565b602060405180830381865afa158015611e74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e989190613ad6565b8015611f135750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611ed29030908590600401613abc565b602060405180830381865afa158015611eef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f139190613ad6565b611f3257604051633b79c77360e21b8152336004820152602401610b64565b611f3e85858585612b2c565b5050505050565b600260fb5403611f975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b64565b600260fb5561012d5460ff1615611fc05760405162461bcd60e51b8152600401610b6490613c82565b61016154611fce9082613b1d565b341461200a5760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b6044820152606401610b64565b61201684848484610fda565b6120208482612b5e565b6001600160a01b038416600090815261016d602052604081208054839290612049908490613a3a565b9091555050600160fb5550505050565b6000818152606760205260409020546060906001600160a01b03166120d85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b64565b6101676120e483612b9f565b6040516020016120f5929190613cac565b6040516020818303038152906040529050919050565b60c9546001600160a01b031633146121355760405162461bcd60e51b8152600401610b6490613a87565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610eb5573d6000803e3d6000fd5b600260fb54036121bd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b64565b600260fb5561012d5460ff16156121e65760405162461bcd60e51b8152600401610b6490613c82565b610161546121f49082613b1d565b34146122305760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b6044820152606401610b64565b61223981610b8e565b6122438282612b5e565b5050600160fb55565b60c9546001600160a01b031633146122765760405162461bcd60e51b8152600401610b6490613a87565b6117378282612b5e565b60c9546001600160a01b031633146122aa5760405162461bcd60e51b8152600401610b6490613a87565b61016e8054911515600160a01b0260ff60a01b19909216919091179055565b60606101688054610c8d90613a4d565b60c9546001600160a01b031633146123035760405162461bcd60e51b8152600401610b6490613a87565b6001600160a01b0381166123685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b64565b610c7b816128b3565b60c9546001600160a01b0316331461239b5760405162461bcd60e51b8152600401610b6490613a87565b6101619190915561016055565b60c9546001600160a01b031633146123d25760405162461bcd60e51b8152600401610b6490613a87565b61016e80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1661241c5760405162461bcd60e51b8152600401610b64906139d9565b6daaeb6d7670e522a718067333cd4e3b156117375760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af115801561247c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a09190613ad6565b6117375780156124dd57604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe906118119030908690600401613abc565b6001600160a01b0382161561251f5760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af2903906118119030908690600401613abc565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401611811565b60006001600160e01b0319821663780e9d6360e01b1480610b375750610b3782612ca0565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125aa8261173b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6040516bffffffffffffffffffffffff19606085901b166020820152600090819060340160408051601f198184030181529190528051602090910120905061262c848483612cf0565b95945050505050565b61263e336115dd565b61265a5760405162461bcd60e51b8152600401610b6490613d33565b610eb5838383612d06565b61012d5460ff166126af5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b64565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610eb583838360405180602001604052806000815250611ded565b6000818152606760205260408120546001600160a01b031661278e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b64565b60006127998361173b565b9050806001600160a01b0316846001600160a01b031614806127d45750836001600160a01b03166127c984610d10565b6001600160a01b0316145b8061280457506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b60006128178261173b565b905061282581600084612ead565b612830600083612575565b6001600160a01b0381166000908152606860205260408120805460019290612859908490613d84565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611737828260405180602001604052806000815250612f65565b600054610100900460ff166129465760405162461bcd60e51b8152600401610b64906139d9565b6117378282612f98565b600054610100900460ff16610b8c5760405162461bcd60e51b8152600401610b64906139d9565b600054610100900460ff1661299e5760405162461bcd60e51b8152600401610b64906139d9565b610b8c612fd8565b600054610100900460ff166129cd5760405162461bcd60e51b8152600401610b64906139d9565b610b8c613008565b600054610100900460ff166129fc5760405162461bcd60e51b8152600401610b64906139d9565b610b8c613036565b61012d5460ff1615612a285760405162461bcd60e51b8152600401610b6490613c82565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126dd3390565b816001600160a01b0316836001600160a01b031603612abf5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b64565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612b363383612715565b612b525760405162461bcd60e51b8152600401610b6490613d33565b6111bd8484848461306a565b6000612b6960995490565b905060005b828110156111bd5781612b8081613c50565b925050612b8d8483612905565b80612b9781613c50565b915050612b6e565b606081600003612bc65750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bf05780612bda81613c50565b9150612be99050600a83613b09565b9150612bca565b60008167ffffffffffffffff811115612c0b57612c0b6137b0565b6040519080825280601f01601f191660200182016040528015612c35576020820181803683370190505b5090505b841561280457612c4a600183613d84565b9150612c57600a86613d97565b612c62906030613a3a565b60f81b818381518110612c7757612c77613b34565b60200101906001600160f81b031916908160001a905350612c99600a86613b09565b9450612c39565b60006001600160e01b031982166380ac58cd60e01b1480612cd157506001600160e01b03198216635b5e139f60e01b145b80610b3757506301ffc9a760e01b6001600160e01b0319831614610b37565b600082612cfd858461309d565b14949350505050565b826001600160a01b0316612d198261173b565b6001600160a01b031614612d7d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b64565b6001600160a01b038216612ddf5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b64565b612dea838383612ead565b612df5600082612575565b6001600160a01b0383166000908152606860205260408120805460019290612e1e908490613d84565b90915550506001600160a01b0382166000908152606860205260408120805460019290612e4c908490613a3a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038316612f0857612f0381609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f2b565b816001600160a01b0316836001600160a01b031614612f2b57612f2b8382613149565b6001600160a01b038216612f4257610eb5816131e6565b826001600160a01b0316826001600160a01b031614610eb557610eb58282613295565b612f6f83836132d9565b612f7c6000848484613427565b610eb55760405162461bcd60e51b8152600401610b6490613dab565b600054610100900460ff16612fbf5760405162461bcd60e51b8152600401610b64906139d9565b6065612fcb8382613b90565b506066610eb58282613b90565b600054610100900460ff16612fff5760405162461bcd60e51b8152600401610b64906139d9565b610b8c336128b3565b600054610100900460ff1661302f5760405162461bcd60e51b8152600401610b64906139d9565b600160fb55565b600054610100900460ff1661305d5760405162461bcd60e51b8152600401610b64906139d9565b61012d805460ff19169055565b613075848484612d06565b61308184848484613427565b6111bd5760405162461bcd60e51b8152600401610b6490613dab565b600081815b84518110156131415760008582815181106130bf576130bf613b34565b6020026020010151905080831161310157604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061312e565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061313981613c50565b9150506130a2565b509392505050565b6000600161315684611877565b6131609190613d84565b6000838152609860205260409020549091508082146131b3576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b6099546000906131f890600190613d84565b6000838152609a60205260408120546099805493945090928490811061322057613220613b34565b90600052602060002001549050806099838154811061324157613241613b34565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061327957613279613dfd565b6001900381819060005260206000200160009055905550505050565b60006132a083611877565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b03821661332f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b64565b6000818152606760205260409020546001600160a01b0316156133945760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b64565b6133a060008383612ead565b6001600160a01b03821660009081526068602052604081208054600192906133c9908490613a3a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561351d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061346b903390899088908890600401613e13565b6020604051808303816000875af19250505080156134a6575060408051601f3d908101601f191682019092526134a391810190613e50565b60015b613503573d8080156134d4576040519150601f19603f3d011682016040523d82523d6000602084013e6134d9565b606091505b5080516000036134fb5760405162461bcd60e51b8152600401610b6490613dab565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612804565b506001949350505050565b6001600160e01b031981168114610c7b57600080fd5b60006020828403121561355057600080fd5b813561355b81613528565b9392505050565b60006020828403121561357457600080fd5b5035919050565b60005b8381101561359657818101518382015260200161357e565b50506000910152565b600081518084526135b781602086016020860161357b565b601f01601f19169290920160200192915050565b60208152600061355b602083018461359f565b6001600160a01b0381168114610c7b57600080fd5b6000806040838503121561360657600080fd5b8235613611816135de565b946020939093013593505050565b60006020828403121561363157600080fd5b813561355b816135de565b600080600080600060a0868803121561365457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561368c57600080fd5b8335613697816135de565b95602085013595506040909401359392505050565b60008083601f8401126136be57600080fd5b50813567ffffffffffffffff8111156136d657600080fd5b6020830191508360208260051b850101111561137357600080fd5b6000806000806060858703121561370757600080fd5b8435613712816135de565b9350602085013567ffffffffffffffff81111561372e57600080fd5b61373a878288016136ac565b9598909750949560400135949350505050565b60008060006060848603121561376257600080fd5b833561376d816135de565b9250602084013561377d816135de565b929592945050506040919091013590565b600080604083850312156137a157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156137e1576137e16137b0565b604051601f8501601f19908116603f01168101908282118183101715613809576138096137b0565b8160405280935085815286868601111561382257600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561384e57600080fd5b813567ffffffffffffffff81111561386557600080fd5b8201601f8101841361387657600080fd5b612804848235602084016137c6565b6000806020838503121561389857600080fd5b823567ffffffffffffffff8111156138af57600080fd5b6138bb858286016136ac565b90969095509350505050565b8015158114610c7b57600080fd5b600080604083850312156138e857600080fd5b82356138f3816135de565b91506020830135613903816138c7565b809150509250929050565b6000806000806080858703121561392457600080fd5b843561392f816135de565b9350602085013561393f816135de565b925060408501359150606085013567ffffffffffffffff81111561396257600080fd5b8501601f8101871361397357600080fd5b613982878235602084016137c6565b91505092959194509250565b6000602082840312156139a057600080fd5b813561355b816138c7565b600080604083850312156139be57600080fd5b82356139c9816135de565b91506020830135613903816135de565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b3757610b37613a24565b600181811c90821680613a6157607f821691505b602082108103613a8157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b0392831681529116602082015260400190565b600060208284031215613ae857600080fd5b815161355b816138c7565b634e487b7160e01b600052601260045260246000fd5b600082613b1857613b18613af3565b500490565b8082028115828204841417610b3757610b37613a24565b634e487b7160e01b600052603260045260246000fd5b601f821115610eb557600081815260208120601f850160051c81016020861015613b715750805b601f850160051c820191505b8181101561183f57828155600101613b7d565b815167ffffffffffffffff811115613baa57613baa6137b0565b613bbe81613bb88454613a4d565b84613b4a565b602080601f831160018114613bf35760008415613bdb5750858301515b600019600386901b1c1916600185901b17855561183f565b600085815260208120601f198616915b82811015613c2257888601518255948401946001909101908401613c03565b5085821015613c405787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201613c6257613c62613a24565b5060010190565b600060208284031215613c7b57600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6000808454613cba81613a4d565b60018281168015613cd25760018114613ce757613d16565b60ff1984168752821515830287019450613d16565b8860005260208060002060005b85811015613d0d5781548a820152908401908201613cf4565b50505082870194505b505050508351613d2a81836020880161357b565b01949350505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b81810381811115610b3757610b37613a24565b600082613da657613da6613af3565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e469083018461359f565b9695505050505050565b600060208284031215613e6257600080fd5b815161355b8161352856fea264697066735822122091fbf256865f8ed053b17f368e088a7fb52ba8e9937d967551a7dd8b7152b05764736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103a25760003560e01c8063729ad39e116101e7578063bd3c996b1161010d578063e722ba75116100a0578063f7d975771161006f578063f7d9757714610a9b578063fca3b5aa14610abb578063ff57d87314610adb578063ff633d5514610af257600080fd5b8063e722ba75146109fd578063e8a3d48514610a1d578063e985e9c514610a32578063f2fde38b14610a7b57600080fd5b8063d5abeb01116100dc578063d5abeb011461099c578063d6aef481146109b3578063ddd5fe72146109c6578063e58306f9146109dd57600080fd5b8063bd3c996b14610923578063c87b56dd14610945578063c9211c8214610965578063d5884ccb1461098557600080fd5b80638dc251e311610185578063a22cb46511610154578063a22cb465146108b0578063a96e2423146108d0578063b88d4fde146108f0578063ba4f20861461091057600080fd5b80638dc251e314610844578063938e3d7b1461086457806395d89b4114610884578063a035b1fe1461089957600080fd5b80638456cb59116101c15780638456cb59146107da57806386dca336146107ef5780638905fd4f146108065780638da5cb5b1461082657600080fd5b8063729ad39e1461078e5780637eff25e4146107ae5780638129fc1c146107c557600080fd5b806327105ea5116102cc5780634f6ccce71161026a5780636b7d2470116102395780636b7d2470146107195780636f8b44b01461073957806370a0823114610759578063715018a61461077957600080fd5b80634f6ccce7146106a057806355f804b3146106c05780635c975abb146106e05780636352211e146106f957600080fd5b80633f4ba83a116102a65780633f4ba83a1461062b57806342842e0e1461064057806342966c68146106605780634f558e791461068057600080fd5b806327105ea5146105b55780632a55205a146105cc5780632f745c591461060b57600080fd5b806318160ddd116103445780631c8e7d2a116103135780631c8e7d2a146105355780631c8fd50e146105555780631f72d8311461057557806323b872dd1461059557600080fd5b806318160ddd146104b257806318bcceb1146104c75780631aa5e872146104e75780631c6ff2da1461051557600080fd5b806306fdde031161038057806306fdde0314610413578063081812fc14610435578063095ea7b31461046d5780631352cd1c1461048d57600080fd5b806301ffc9a7146103a757806303eaebec146103dc57806303feff59146103f3575b600080fd5b3480156103b357600080fd5b506103c76103c236600461353e565b610b12565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b3d565b005b3480156103ff57600080fd5b506103f161040e366004613562565b610b8e565b34801561041f57600080fd5b50610428610c7e565b6040516103d391906135cb565b34801561044157600080fd5b50610455610450366004613562565b610d10565b6040516001600160a01b0390911681526020016103d3565b34801561047957600080fd5b506103f16104883660046135f3565b610da5565b34801561049957600080fd5b506104a46101665481565b6040519081526020016103d3565b3480156104be57600080fd5b506099546104a4565b3480156104d357600080fd5b506103f16104e2366004613562565b610eba565b3480156104f357600080fd5b506104a461050236600461361f565b61016d6020526000908152604090205481565b34801561052157600080fd5b506103f161053036600461363c565b610eea565b34801561054157600080fd5b506103f1610550366004613677565b610f30565b34801561056157600080fd5b506103f16105703660046136f1565b610fda565b34801561058157600080fd5b506103f1610590366004613562565b6111c3565b3480156105a157600080fd5b506103f16105b036600461374d565b6111f3565b3480156105c157600080fd5b506104a46101605481565b3480156105d857600080fd5b506105ec6105e736600461378e565b611342565b604080516001600160a01b0390931683526020830191909152016103d3565b34801561061757600080fd5b506104a46106263660046135f3565b61137a565b34801561063757600080fd5b506103f1611410565b34801561064c57600080fd5b506103f161065b36600461374d565b611442565b34801561066c57600080fd5b506103f161067b366004613562565b61158c565b34801561068c57600080fd5b506103c761069b366004613562565b61164e565b3480156106ac57600080fd5b506104a46106bb366004613562565b61166d565b3480156106cc57600080fd5b506103f16106db36600461383c565b611700565b3480156106ec57600080fd5b5061012d5460ff166103c7565b34801561070557600080fd5b50610455610714366004613562565b61173b565b34801561072557600080fd5b506103f16107343660046135f3565b6117b2565b34801561074557600080fd5b506103f1610754366004613562565b611847565b34801561076557600080fd5b506104a461077436600461361f565b611877565b34801561078557600080fd5b506103f16118fe565b34801561079a57600080fd5b506103f16107a9366004613885565b611932565b3480156107ba57600080fd5b506104a46101635481565b3480156107d157600080fd5b506103f1611a9f565b3480156107e657600080fd5b506103f1611bc5565b3480156107fb57600080fd5b506104a46101655481565b34801561081257600080fd5b506103f161082136600461361f565b611bf7565b34801561083257600080fd5b5060c9546001600160a01b0316610455565b34801561085057600080fd5b506103f161085f36600461361f565b611d02565b34801561087057600080fd5b506103f161087f36600461383c565b611d4f565b34801561089057600080fd5b50610428611d86565b3480156108a557600080fd5b506104a46101615481565b3480156108bc57600080fd5b506103f16108cb3660046138d5565b611d95565b3480156108dc57600080fd5b506103f16108eb36600461361f565b611da0565b3480156108fc57600080fd5b506103f161090b36600461390e565b611ded565b6103f161091e3660046136f1565b611f45565b34801561092f57600080fd5b5061016e546103c790600160a01b900460ff1681565b34801561095157600080fd5b50610428610960366004613562565b612059565b34801561097157600080fd5b506103f16109803660046135f3565b61210b565b34801561099157600080fd5b506104a461015f5481565b3480156109a857600080fd5b506104a46101695481565b6103f16109c13660046135f3565b61216b565b3480156109d257600080fd5b506104a46101625481565b3480156109e957600080fd5b506103f16109f83660046135f3565b61224c565b348015610a0957600080fd5b506103f1610a1836600461398e565b612280565b348015610a2957600080fd5b506104286122c9565b348015610a3e57600080fd5b506103c7610a4d3660046139ab565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610a8757600080fd5b506103f1610a9636600461361f565b6122d9565b348015610aa757600080fd5b506103f1610ab636600461378e565b612371565b348015610ac757600080fd5b506103f1610ad636600461361f565b6123a8565b348015610ae757600080fd5b506104a46101645481565b348015610afe57600080fd5b506103f1610b0d3660046138d5565b6123f5565b60006001600160e01b0319821663152a902d60e11b1480610b375750610b3782612550565b92915050565b600054610100900460ff16610b6d5760405162461bcd60e51b8152600401610b64906139d9565b60405180910390fd5b610b8c733cc6cdda760b79bafa08df41ecfa224f810dceb660016123f5565b565b426101655411158015610ba357506101665442105b610be25760405162461bcd60e51b815260206004820152601060248201526f5068617365203320696e61637469766560801b6044820152606401610b64565b6014811115610c245760405162461bcd60e51b815260206004820152600e60248201526d4d6178203230206174206f6e636560901b6044820152606401610b64565b6101695481610c3260995490565b610c3c9190613a3a565b1115610c7b5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b64565b50565b606060658054610c8d90613a4d565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb990613a4d565b8015610d065780601f10610cdb57610100808354040283529160200191610d06565b820191906000526020600020905b815481529060010190602001808311610ce957829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b0316610d895760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b64565b506000908152606960205260409020546001600160a01b031690565b6000610db08261173b565b9050806001600160a01b0316836001600160a01b031603610e1d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b64565b336001600160a01b0382161480610e395750610e398133610a4d565b610eab5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b64565b610eb58383612575565b505050565b60c9546001600160a01b03163314610ee45760405162461bcd60e51b8152600401610b6490613a87565b61015f55565b60c9546001600160a01b03163314610f145760405162461bcd60e51b8152600401610b6490613a87565b6101629490945561016392909255610164556101655561016655565b60c9546001600160a01b03163314610f5a5760405162461bcd60e51b8152600401610b6490613a87565b604051637921219560e11b8152306004820152336024820152604481018390526064810182905260a06084820152600060a48201526001600160a01b0384169063f242432a9060c401600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b50505050505050565b426101645411158015610fef57506101655442105b61102e5760405162461bcd60e51b815260206004820152601060248201526f5068617365203220696e61637469766560801b6044820152606401610b64565b611070848484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061015f5491506125e39050565b6110bc5760405162461bcd60e51b815260206004820152601860248201527f4e6f7420696e20706861736520322077686974656c69737400000000000000006044820152606401610b64565b60028111156110fd5760405162461bcd60e51b815260206004820152600d60248201526c4d61782032206174206f6e636560981b6044820152606401610b64565b6001600160a01b038416600090815261016d6020526040902054600290611125908390613a3a565b11156111665760405162461bcd60e51b815260206004820152601060248201526f13585e080c881c195c881dd85b1b195d60821b6044820152606401610b64565b610169548161117460995490565b61117e9190613a3a565b11156111bd5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b64565b50505050565b60c9546001600160a01b031633146111ed5760405162461bcd60e51b8152600401610b6490613a87565b61016a55565b826daaeb6d7670e522a718067333cd4e3b1561133757336001600160a01b0382160361122957611224848484612635565b6111bd565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061125c9030903390600401613abc565b602060405180830381865afa158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190613ad6565b80156113185750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906112d79030908590600401613abc565b602060405180830381865afa1580156112f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113189190613ad6565b61133757604051633b79c77360e21b8152336004820152602401610b64565b6111bd848484612635565b60008061016a54612710846113579190613b09565b6113619190613b1d565b61016b546001600160a01b0316925090505b9250929050565b600061138583611877565b82106113e75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b64565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b60c9546001600160a01b0316331461143a5760405162461bcd60e51b8152600401610b6490613a87565b610b8c612665565b826daaeb6d7670e522a718067333cd4e3b1561158157336001600160a01b03821603611473576112248484846126fa565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906114a69030903390600401613abc565b602060405180830381865afa1580156114c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e79190613ad6565b80156115625750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906115219030908590600401613abc565b602060405180830381865afa15801561153e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115629190613ad6565b61158157604051633b79c77360e21b8152336004820152602401610b64565b6111bd8484846126fa565b61016e54600160a01b900460ff16156115d85760405162461bcd60e51b815260206004820152600e60248201526d109d5c9b881a5cc81b1bd8dad95960921b6044820152606401610b64565b6115e3335b82612715565b6116455760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610b64565b610c7b8161280c565b6000818152606760205260408120546001600160a01b03161515610b37565b600061167860995490565b82106116db5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b64565b609982815481106116ee576116ee613b34565b90600052602060002001549050919050565b60c9546001600160a01b0316331461172a5760405162461bcd60e51b8152600401610b6490613a87565b6101676117378282613b90565b5050565b6000818152606760205260408120546001600160a01b031680610b375760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b64565b60c9546001600160a01b031633146117dc5760405162461bcd60e51b8152600401610b6490613a87565b604051632142170760e11b8152306004820152336024820152604481018290526001600160a01b038316906342842e0e906064015b600060405180830381600087803b15801561182b57600080fd5b505af115801561183f573d6000803e3d6000fd5b505050505050565b60c9546001600160a01b031633146118715760405162461bcd60e51b8152600401610b6490613a87565b61016955565b60006001600160a01b0382166118e25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b64565b506001600160a01b031660009081526068602052604090205490565b60c9546001600160a01b031633146119285760405162461bcd60e51b8152600401610b6490613a87565b610b8c60006128b3565b61016e546001600160a01b0316331461197a5760405162461bcd60e51b815260206004820152600a6024820152692737ba1036b4b73a32b960b11b6044820152606401610b64565b600061198560995490565b611990906001613a3a565b905060005b828110156111bd5761016c546001600160a01b03166323b872dd8585848181106119c1576119c1613b34565b90506020020160208101906119d6919061361f565b610160546040516001600160e01b031960e085901b1681526001600160a01b03909216600483015230602483015260448201526064016020604051808303816000875af1158015611a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4f9190613ad6565b50611a80848483818110611a6557611a65613b34565b9050602002016020810190611a7a919061361f565b83612905565b611a8b600183613a3a565b915080611a9781613c50565b915050611995565b600054610100900460ff16611aba5760005460ff1615611abe565b303b155b611b215760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b64565b600054610100900460ff16158015611b43576000805461ffff19166101011790555b611b8960405180604001604052806008815260200167098deeac8a0eadcf60c31b815250604051806040016040528060048152602001631313d55160e21b81525061291f565b611b91612950565b611b99612977565b611ba16129a6565b611ba96129d5565b611bb1610b3d565b8015610c7b576000805461ff001916905550565b60c9546001600160a01b03163314611bef5760405162461bcd60e51b8152600401610b6490613a87565b610b8c612a04565b60c9546001600160a01b03163314611c215760405162461bcd60e51b8152600401610b6490613a87565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c939190613c69565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611cde573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117379190613ad6565b60c9546001600160a01b03163314611d2c5760405162461bcd60e51b8152600401610b6490613a87565b61016b80546001600160a01b0319166001600160a01b0392909216919091179055565b60c9546001600160a01b03163314611d795760405162461bcd60e51b8152600401610b6490613a87565b6101686117378282613b90565b606060668054610c8d90613a4d565b611737338383612a5e565b60c9546001600160a01b03163314611dca5760405162461bcd60e51b8152600401610b6490613a87565b61016c80546001600160a01b0319166001600160a01b0392909216919091179055565b836daaeb6d7670e522a718067333cd4e3b15611f3257336001600160a01b03821603611e2457611e1f85858585612b2c565b611f3e565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611e579030903390600401613abc565b602060405180830381865afa158015611e74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e989190613ad6565b8015611f135750604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611ed29030908590600401613abc565b602060405180830381865afa158015611eef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f139190613ad6565b611f3257604051633b79c77360e21b8152336004820152602401610b64565b611f3e85858585612b2c565b5050505050565b600260fb5403611f975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b64565b600260fb5561012d5460ff1615611fc05760405162461bcd60e51b8152600401610b6490613c82565b61016154611fce9082613b1d565b341461200a5760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b6044820152606401610b64565b61201684848484610fda565b6120208482612b5e565b6001600160a01b038416600090815261016d602052604081208054839290612049908490613a3a565b9091555050600160fb5550505050565b6000818152606760205260409020546060906001600160a01b03166120d85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b64565b6101676120e483612b9f565b6040516020016120f5929190613cac565b6040516020818303038152906040529050919050565b60c9546001600160a01b031633146121355760405162461bcd60e51b8152600401610b6490613a87565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610eb5573d6000803e3d6000fd5b600260fb54036121bd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b64565b600260fb5561012d5460ff16156121e65760405162461bcd60e51b8152600401610b6490613c82565b610161546121f49082613b1d565b34146122305760405162461bcd60e51b815260206004820152600b60248201526a57726f6e6720707269636560a81b6044820152606401610b64565b61223981610b8e565b6122438282612b5e565b5050600160fb55565b60c9546001600160a01b031633146122765760405162461bcd60e51b8152600401610b6490613a87565b6117378282612b5e565b60c9546001600160a01b031633146122aa5760405162461bcd60e51b8152600401610b6490613a87565b61016e8054911515600160a01b0260ff60a01b19909216919091179055565b60606101688054610c8d90613a4d565b60c9546001600160a01b031633146123035760405162461bcd60e51b8152600401610b6490613a87565b6001600160a01b0381166123685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b64565b610c7b816128b3565b60c9546001600160a01b0316331461239b5760405162461bcd60e51b8152600401610b6490613a87565b6101619190915561016055565b60c9546001600160a01b031633146123d25760405162461bcd60e51b8152600401610b6490613a87565b61016e80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff1661241c5760405162461bcd60e51b8152600401610b64906139d9565b6daaeb6d7670e522a718067333cd4e3b156117375760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af115801561247c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a09190613ad6565b6117375780156124dd57604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe906118119030908690600401613abc565b6001600160a01b0382161561251f5760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af2903906118119030908690600401613abc565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401611811565b60006001600160e01b0319821663780e9d6360e01b1480610b375750610b3782612ca0565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125aa8261173b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6040516bffffffffffffffffffffffff19606085901b166020820152600090819060340160408051601f198184030181529190528051602090910120905061262c848483612cf0565b95945050505050565b61263e336115dd565b61265a5760405162461bcd60e51b8152600401610b6490613d33565b610eb5838383612d06565b61012d5460ff166126af5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b64565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610eb583838360405180602001604052806000815250611ded565b6000818152606760205260408120546001600160a01b031661278e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b64565b60006127998361173b565b9050806001600160a01b0316846001600160a01b031614806127d45750836001600160a01b03166127c984610d10565b6001600160a01b0316145b8061280457506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b60006128178261173b565b905061282581600084612ead565b612830600083612575565b6001600160a01b0381166000908152606860205260408120805460019290612859908490613d84565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611737828260405180602001604052806000815250612f65565b600054610100900460ff166129465760405162461bcd60e51b8152600401610b64906139d9565b6117378282612f98565b600054610100900460ff16610b8c5760405162461bcd60e51b8152600401610b64906139d9565b600054610100900460ff1661299e5760405162461bcd60e51b8152600401610b64906139d9565b610b8c612fd8565b600054610100900460ff166129cd5760405162461bcd60e51b8152600401610b64906139d9565b610b8c613008565b600054610100900460ff166129fc5760405162461bcd60e51b8152600401610b64906139d9565b610b8c613036565b61012d5460ff1615612a285760405162461bcd60e51b8152600401610b6490613c82565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126dd3390565b816001600160a01b0316836001600160a01b031603612abf5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b64565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612b363383612715565b612b525760405162461bcd60e51b8152600401610b6490613d33565b6111bd8484848461306a565b6000612b6960995490565b905060005b828110156111bd5781612b8081613c50565b925050612b8d8483612905565b80612b9781613c50565b915050612b6e565b606081600003612bc65750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bf05780612bda81613c50565b9150612be99050600a83613b09565b9150612bca565b60008167ffffffffffffffff811115612c0b57612c0b6137b0565b6040519080825280601f01601f191660200182016040528015612c35576020820181803683370190505b5090505b841561280457612c4a600183613d84565b9150612c57600a86613d97565b612c62906030613a3a565b60f81b818381518110612c7757612c77613b34565b60200101906001600160f81b031916908160001a905350612c99600a86613b09565b9450612c39565b60006001600160e01b031982166380ac58cd60e01b1480612cd157506001600160e01b03198216635b5e139f60e01b145b80610b3757506301ffc9a760e01b6001600160e01b0319831614610b37565b600082612cfd858461309d565b14949350505050565b826001600160a01b0316612d198261173b565b6001600160a01b031614612d7d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b64565b6001600160a01b038216612ddf5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b64565b612dea838383612ead565b612df5600082612575565b6001600160a01b0383166000908152606860205260408120805460019290612e1e908490613d84565b90915550506001600160a01b0382166000908152606860205260408120805460019290612e4c908490613a3a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038316612f0857612f0381609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612f2b565b816001600160a01b0316836001600160a01b031614612f2b57612f2b8382613149565b6001600160a01b038216612f4257610eb5816131e6565b826001600160a01b0316826001600160a01b031614610eb557610eb58282613295565b612f6f83836132d9565b612f7c6000848484613427565b610eb55760405162461bcd60e51b8152600401610b6490613dab565b600054610100900460ff16612fbf5760405162461bcd60e51b8152600401610b64906139d9565b6065612fcb8382613b90565b506066610eb58282613b90565b600054610100900460ff16612fff5760405162461bcd60e51b8152600401610b64906139d9565b610b8c336128b3565b600054610100900460ff1661302f5760405162461bcd60e51b8152600401610b64906139d9565b600160fb55565b600054610100900460ff1661305d5760405162461bcd60e51b8152600401610b64906139d9565b61012d805460ff19169055565b613075848484612d06565b61308184848484613427565b6111bd5760405162461bcd60e51b8152600401610b6490613dab565b600081815b84518110156131415760008582815181106130bf576130bf613b34565b6020026020010151905080831161310157604080516020810185905290810182905260600160405160208183030381529060405280519060200120925061312e565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061313981613c50565b9150506130a2565b509392505050565b6000600161315684611877565b6131609190613d84565b6000838152609860205260409020549091508082146131b3576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b6099546000906131f890600190613d84565b6000838152609a60205260408120546099805493945090928490811061322057613220613b34565b90600052602060002001549050806099838154811061324157613241613b34565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061327957613279613dfd565b6001900381819060005260206000200160009055905550505050565b60006132a083611877565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b03821661332f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b64565b6000818152606760205260409020546001600160a01b0316156133945760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b64565b6133a060008383612ead565b6001600160a01b03821660009081526068602052604081208054600192906133c9908490613a3a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561351d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061346b903390899088908890600401613e13565b6020604051808303816000875af19250505080156134a6575060408051601f3d908101601f191682019092526134a391810190613e50565b60015b613503573d8080156134d4576040519150601f19603f3d011682016040523d82523d6000602084013e6134d9565b606091505b5080516000036134fb5760405162461bcd60e51b8152600401610b6490613dab565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612804565b506001949350505050565b6001600160e01b031981168114610c7b57600080fd5b60006020828403121561355057600080fd5b813561355b81613528565b9392505050565b60006020828403121561357457600080fd5b5035919050565b60005b8381101561359657818101518382015260200161357e565b50506000910152565b600081518084526135b781602086016020860161357b565b601f01601f19169290920160200192915050565b60208152600061355b602083018461359f565b6001600160a01b0381168114610c7b57600080fd5b6000806040838503121561360657600080fd5b8235613611816135de565b946020939093013593505050565b60006020828403121561363157600080fd5b813561355b816135de565b600080600080600060a0868803121561365457600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060006060848603121561368c57600080fd5b8335613697816135de565b95602085013595506040909401359392505050565b60008083601f8401126136be57600080fd5b50813567ffffffffffffffff8111156136d657600080fd5b6020830191508360208260051b850101111561137357600080fd5b6000806000806060858703121561370757600080fd5b8435613712816135de565b9350602085013567ffffffffffffffff81111561372e57600080fd5b61373a878288016136ac565b9598909750949560400135949350505050565b60008060006060848603121561376257600080fd5b833561376d816135de565b9250602084013561377d816135de565b929592945050506040919091013590565b600080604083850312156137a157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156137e1576137e16137b0565b604051601f8501601f19908116603f01168101908282118183101715613809576138096137b0565b8160405280935085815286868601111561382257600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561384e57600080fd5b813567ffffffffffffffff81111561386557600080fd5b8201601f8101841361387657600080fd5b612804848235602084016137c6565b6000806020838503121561389857600080fd5b823567ffffffffffffffff8111156138af57600080fd5b6138bb858286016136ac565b90969095509350505050565b8015158114610c7b57600080fd5b600080604083850312156138e857600080fd5b82356138f3816135de565b91506020830135613903816138c7565b809150509250929050565b6000806000806080858703121561392457600080fd5b843561392f816135de565b9350602085013561393f816135de565b925060408501359150606085013567ffffffffffffffff81111561396257600080fd5b8501601f8101871361397357600080fd5b613982878235602084016137c6565b91505092959194509250565b6000602082840312156139a057600080fd5b813561355b816138c7565b600080604083850312156139be57600080fd5b82356139c9816135de565b91506020830135613903816135de565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b3757610b37613a24565b600181811c90821680613a6157607f821691505b602082108103613a8157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b0392831681529116602082015260400190565b600060208284031215613ae857600080fd5b815161355b816138c7565b634e487b7160e01b600052601260045260246000fd5b600082613b1857613b18613af3565b500490565b8082028115828204841417610b3757610b37613a24565b634e487b7160e01b600052603260045260246000fd5b601f821115610eb557600081815260208120601f850160051c81016020861015613b715750805b601f850160051c820191505b8181101561183f57828155600101613b7d565b815167ffffffffffffffff811115613baa57613baa6137b0565b613bbe81613bb88454613a4d565b84613b4a565b602080601f831160018114613bf35760008415613bdb5750858301515b600019600386901b1c1916600185901b17855561183f565b600085815260208120601f198616915b82811015613c2257888601518255948401946001909101908401613c03565b5085821015613c405787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201613c6257613c62613a24565b5060010190565b600060208284031215613c7b57600080fd5b5051919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6000808454613cba81613a4d565b60018281168015613cd25760018114613ce757613d16565b60ff1984168752821515830287019450613d16565b8860005260208060002060005b85811015613d0d5781548a820152908401908201613cf4565b50505082870194505b505050508351613d2a81836020880161357b565b01949350505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b81810381811115610b3757610b37613a24565b600082613da657613da6613af3565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e469083018461359f565b9695505050505050565b600060208284031215613e6257600080fd5b815161355b8161352856fea264697066735822122091fbf256865f8ed053b17f368e088a7fb52ba8e9937d967551a7dd8b7152b05764736f6c63430008110033

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
[ Download: CSV Export  ]

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