ETH Price: $3,195.56 (-13.77%)

Token

AIcrostics (AICS)
 

Overview

Max Total Supply

9,988 AICS

Holders

3,283

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 AICS
0x7610a4e306e987256cff7d12746bb3e54c96fefb
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
AIcrostics

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : AIcrostics.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "erc721psi/contracts/ERC721Psi.sol";
import "erc721psi/contracts/extension/ERC721PsiBurnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {OperatorFilterer} from "closedsea/src/OperatorFilterer.sol";

contract AIcrostics is ERC721Psi, ERC721PsiBurnable, OperatorFilterer, Ownable {
    uint256 public MINT_PRICE = 0.003 ether;
    uint256 public MAX_SUPPLY = 9999;
    uint256 public MAX_MINT_PER_WALLET = 5;

    mapping(address => uint256) private _tokensMinted;
    mapping(uint256 => uint256[]) private _tokenHalves;

    bool public operatorFilteringEnabled;

    bool _mintEnabled = false;
    bool _mergeEnabled = false;
    bool _uriIsSealed = false;

    constructor() ERC721Psi() {
        _registerForOperatorFiltering();
        operatorFilteringEnabled = true;
        _setDefaultRoyalty(msg.sender, 500);
        _safeMint(msg.sender, 10);
    }

    function mint(uint256 _amount) external payable {
        uint256 tokensMinted = _tokensMinted[msg.sender];
        uint256 price = (MINT_PRICE * _amount) -
            (tokensMinted < 1 ? 0.003 ether : 0);
        require(_mintEnabled == true, "AIcrostics: Mint disabled.");
        require(
            tokensMinted + _amount <= MAX_MINT_PER_WALLET,
            "AIcrostics: Minting more than allowed per wallet"
        );
        require(
            (_currentIndex - 1) + _amount <= MAX_SUPPLY,
            "AIcrostics: Max supply exceeded"
        );
        require(price <= msg.value, "AIcrostics: Not enough ETH sent");

        _safeMint(msg.sender, _amount);
        _tokensMinted[msg.sender] += _amount;
    }

    function merge(uint256 tokenId1, uint256 tokendId2) external {
        require(_mintEnabled == false, "AIcrostics: Mint still ongoing.");
        require(_mergeEnabled == true, "AIcrostics: Merge not enabled.");
        require(tokenId1 < _secondEdStartTokenId && tokendId2 < _secondEdStartTokenId, "AIcrostics: Trying to merge an 8-line poem.");
        require(
            ownerOf(tokenId1) == msg.sender,
            "AIcrostics: You do not own the first token"
        );

        require(
            ownerOf(tokendId2) == msg.sender,
            "AIcrostics: You do not own the second token"
        );
        _burn(tokenId1);
        _burn(tokendId2);
        _safeMint(msg.sender, 1);
        _tokenHalves[_nextTokenId()] = [tokenId1, tokendId2];
    }

    function enableMint() public onlyOwner {
        _mintEnabled = true;
    }

    function disableMint() public onlyOwner {
        _mintEnabled = false;
    }

    function enableMerge() public onlyOwner {
        _mergeEnabled = true;
    }

    function disableMerge() public onlyOwner {
        _mergeEnabled = false;
    }

    function setSecondEdStartTokenId() public onlyOwner {
        _secondEdStartTokenId = _nextTokenId();
    }

    function setFirstEdBaseURI(string memory baseURI) public onlyOwner {
        require(_uriIsSealed == false, "Base URI can no longer be changed.");
        _firstEdBaseURI = baseURI;
    }

    function setSecondEdBaseURI(string memory baseURI) public onlyOwner {
        require(_uriIsSealed == false, "Base URI can no longer be changed.");
        _secondEdBaseURI = baseURI;
    }

    function sealUri() public onlyOwner {
        _uriIsSealed = true;
    }

    function updateCollectionMetadata() public onlyOwner {
        emit BatchMetadataUpdate(1, totalSupply());
    }

    function withdraw() public onlyOwner {
        require(address(this).balance > 0, "Balance is zero.");
        payable(owner()).transfer(address(this).balance);
    }

    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);
        _resetTokenRoyalty(tokenId);
    }

    function tokensMintedByAddress(address minter)
        public
        view
        returns (uint256)
    {
        return _tokensMinted[minter];
    }

    function tokenHalves(uint256 tokenId)
        public
        view
        returns (uint256[] memory)
    {
        return _tokenHalves[tokenId];
    }

    function uriIsSealed() public view returns (bool) {
        return _uriIsSealed;
    }

    function totalSupply()
        public
        view
        override(ERC721Psi, ERC721PsiBurnable)
        returns (uint256)
    {
        return super.totalSupply();
    }

    function _exists(uint256 tokenId)
        internal
        view
        override(ERC721Psi, ERC721PsiBurnable)
        returns (bool)
    {
        return super._exists(tokenId);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        override
        onlyAllowedOperatorApproval(operator)
    {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId)
        public
        override
        onlyAllowedOperatorApproval(operator)
    {
        super.approve(operator, tokenId);
    }

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

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

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

    function setOperatorFilteringEnabled(bool value) public onlyOwner {
        operatorFilteringEnabled = value;
    }

    function _operatorFilteringEnabled() internal view override returns (bool) {
        return operatorFilteringEnabled;
    }

    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}

File 2 of 21 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
    /// @dev The default OpenSea operator blocklist subscription.
    address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev The OpenSea operator filter registry.
    address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E;

    /// @dev Registers the current contract to OpenSea's operator filter,
    /// and subscribe to the default OpenSea operator blocklist.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering() internal virtual {
        _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
    }

    /// @dev Registers the current contract to OpenSea's operator filter.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        virtual
    {
        /// @solidity memory-safe-assembly
        assembly {
            let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.

            // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
            subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy))

            for {} iszero(subscribe) {} {
                if iszero(subscriptionOrRegistrantToCopy) {
                    functionSelector := 0x4420e486 // `register(address)`.
                    break
                }
                functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
                break
            }
            // Store the function selector.
            mstore(0x00, shl(224, functionSelector))
            // Store the `address(this)`.
            mstore(0x04, address())
            // Store the `subscriptionOrRegistrantToCopy`.
            mstore(0x24, subscriptionOrRegistrantToCopy)
            // Register into the registry.
            if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) {
                // If the function selector has not been overwritten,
                // it is an out-of-gas error.
                if eq(shr(224, mload(0x00)), functionSelector) {
                    // To prevent gas under-estimation.
                    revert(0, 0)
                }
            }
            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, because of Solidity's memory size limits.
            mstore(0x24, 0)
        }
    }

    /// @dev Modifier to guard a function and revert if the caller is a blocked operator.
    modifier onlyAllowedOperator(address from) virtual {
        if (from != msg.sender) {
            if (!_isPriorityOperator(msg.sender)) {
                if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
            }
        }
        _;
    }

    /// @dev Modifier to guard a function from approving a blocked operator..
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        if (!_isPriorityOperator(operator)) {
            if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
        }
        _;
    }

    /// @dev Helper function that reverts if the `operator` is blocked by the registry.
    function _revertIfBlocked(address operator) private view {
        /// @solidity memory-safe-assembly
        assembly {
            // Store the function selector of `isOperatorAllowed(address,address)`,
            // shifted left by 6 bytes, which is enough for 8tb of memory.
            // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
            mstore(0x00, 0xc6171134001122334455)
            // Store the `address(this)`.
            mstore(0x1a, address())
            // Store the `operator`.
            mstore(0x3a, operator)

            // `isOperatorAllowed` always returns true if it does not revert.
            if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) {
                // Bubble up the revert if the staticcall reverts.
                returndatacopy(0x00, 0x00, returndatasize())
                revert(0x00, returndatasize())
            }

            // We'll skip checking if `from` is inside the blacklist.
            // Even though that can block transferring out of wrapper contracts,
            // we don't want tokens to be stuck.

            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, if less than 8tb of memory is used.
            mstore(0x3a, 0)
        }
    }

    /// @dev For deriving contracts to override, so that operator filtering
    /// can be turned on / off.
    /// Returns true by default.
    function _operatorFilteringEnabled() internal view virtual returns (bool) {
        return true;
    }

    /// @dev For deriving contracts to override, so that preferred marketplaces can
    /// skip operator filtering, helping users save gas.
    /// Returns false for all inputs by default.
    function _isPriorityOperator(address) internal view virtual returns (bool) {
        return false;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/Context.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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

File 4 of 21 : ERC721PsiBurnable.sol
// SPDX-License-Identifier: MIT
/**
  ______ _____   _____ ______ ___  __ _  _  _ 
 |  ____|  __ \ / ____|____  |__ \/_ | || || |
 | |__  | |__) | |        / /   ) || | \| |/ |
 |  __| |  _  /| |       / /   / / | |\_   _/ 
 | |____| | \ \| |____  / /   / /_ | |  | |   
 |______|_|  \_\\_____|/_/   |____||_|  |_|   
                                              
                                            
 */
pragma solidity ^0.8.0;

import "solidity-bits/contracts/BitMaps.sol";
import "../ERC721Psi.sol";


abstract contract ERC721PsiBurnable is ERC721Psi {
    using BitMaps for BitMaps.BitMap;
    BitMaps.BitMap private _burnedToken;

    /**
     * @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 from = ownerOf(tokenId);
        _beforeTokenTransfers(from, address(0), tokenId, 1);
        _burnedToken.set(tokenId);
        
        emit Transfer(from, address(0), tokenId);

        _afterTokenTransfers(from, address(0), tokenId, 1);
    }

    /**
     * @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 override virtual returns (bool){
        if(_burnedToken.get(tokenId)) {
            return false;
        } 
        return super._exists(tokenId);
    }

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

    /**
     * @dev Returns number of token burned.
     */
    function _burned() internal view returns (uint256 burned){
        uint256 startBucket = _startTokenId() >> 8;
        uint256 lastBucket = (_nextTokenId() >> 8) + 1;

        for(uint256 i=startBucket; i < lastBucket; i++) {
            uint256 bucket = _burnedToken.getBucket(i);
            burned += _popcount(bucket);
        }
    }

    /**
     * @dev Returns number of set bits.
     */
    function _popcount(uint256 x) private pure returns (uint256 count) {
        unchecked{
            for (count=0; x!=0; count++)
                x &= x - 1;
        }
    }
}

File 5 of 21 : ERC721Psi.sol
// SPDX-License-Identifier: MIT
/**
  ______ _____   _____ ______ ___  __ _  _  _ 
 |  ____|  __ \ / ____|____  |__ \/_ | || || |
 | |__  | |__) | |        / /   ) || | \| |/ |
 |  __| |  _  /| |       / /   / / | |\_   _/ 
 | |____| | \ \| |____  / /   / /_ | |  | |   
 |______|_|  \_\\_____|/_/   |____||_|  |_|   

 - github: https://github.com/estarriolvetch/ERC721Psi
 - npm: https://www.npmjs.com/package/erc721psi
                                          
 */

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "solidity-bits/contracts/BitMaps.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";

contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, ERC2981 {
    using Address for address;
    using Strings for uint256;
    using BitMaps for BitMaps.BitMap;

    BitMaps.BitMap private _batchHead;
    BitMaps.BitMap private _mintBatchHead;

    string private _name;
    string private _symbol;

    uint256 _secondEdStartTokenId = 0;

    string _firstEdBaseURI = "";
    string _secondEdBaseURI = "";

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

    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor() {
        _name = "AIcrostics";
        _symbol = "AICS";
        _currentIndex = _startTokenId();
    }

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal pure returns (uint256) {
        // It will become modifiable in the future versions
        return 1;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        return _currentIndex - _startTokenId();
    }

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

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

        uint256 count;
        for (uint256 i = _startTokenId(); i < _nextTokenId(); ++i) {
            if (_exists(i)) {
                if (owner == ownerOf(i)) {
                    ++count;
                }
            }
        }
        return count;
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        (address owner, ) = _ownerAndBatchHeadOf(tokenId);
        return owner;
    }

    function _ownerAndBatchHeadOf(uint256 tokenId)
        internal
        view
        returns (address owner, uint256 tokenIdBatchHead)
    {
        require(
            _exists(tokenId),
            "ERC721Psi: owner query for nonexistent token"
        );
        tokenIdBatchHead = _getBatchHead(tokenId);
        owner = _owners[tokenIdBatchHead];
    }

    function mintersOf(uint256 minTokenId, uint256 maxTokenId)
        public
        view
        returns (address[] memory)
    {
        uint256 arrayLength = maxTokenId - minTokenId + 1;
        address[] memory addressArray = new address[](arrayLength);
        for (uint256 i = 0; i < arrayLength; i++) {
            addressArray[i] = minterOf(i + minTokenId);
        }
        return addressArray;
    }

    function minterOf(uint256 tokenId) public view returns (address) {
        address minter = _minterOf(tokenId);
        return minter;
    }

    function _minterOf(uint256 tokenId) internal view returns (address minter) {
        require(
            _wasMinted(tokenId),
            "ERC721Psi: owner query for nonexistent token"
        );
        uint256 tokenIdBatchHead = _getMintBatchHead(tokenId);
        minter = _minters[tokenIdBatchHead];
    }

    /**
     * @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), "ERC721Psi: URI query for nonexistent token");

        string memory baseURI;
        if (_secondEdStartTokenId != 0 && tokenId >= _secondEdStartTokenId) {
            baseURI = _secondEdBaseURI;
        } else {
            baseURI = _firstEdBaseURI;
        }

        return
            bytes(baseURI).length > 0
                ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json"))
                : string(
                    abi.encodePacked(
                        "data:application/json;base64,",
                        Base64.encode(
                            bytes(
                                abi.encodePacked(
                                    '{"name": "AIcrostic #',
                                    Strings.toString(tokenId), '"',
                                    ',"description": "Acrostic poems generated by Chat GPT. The last four characters of the wallet address are used to dictate the first letter of each line. The four-line poems can then be merged with each other to create eight line poems with combined themes.","image": "https://tempimageurl.mumbledev.repl.co/gettempimage/',
                                    Strings.toString(tokenId),
                                    '"',
                                    "}"
                                )
                            )
                        )
                    )
                );
    }

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

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721Psi: 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),
            "ERC721Psi: approved query for nonexistent token"
        );

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(operator != _msgSender(), "ERC721Psi: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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),
            "ERC721Psi: 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),
            "ERC721Psi: 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, 1, _data),
            "ERC721Psi: 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`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return tokenId < _nextTokenId() && _startTokenId() <= tokenId;
    }

    function _wasMinted(uint256 tokenId) internal view returns (bool) {
        return tokenId < _nextTokenId() && _startTokenId() <= tokenId;
    }

    /**
     * @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),
            "ERC721Psi: operator query for nonexistent token"
        );
        address owner = ownerOf(tokenId);
        return (spender == owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, "");
    }

    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        uint256 nextTokenId = _nextTokenId();
        _mint(to, quantity);
        require(
            _checkOnERC721Received(
                address(0),
                to,
                nextTokenId,
                quantity,
                _data
            ),
            "ERC721Psi: transfer to non ERC721Receiver implementer"
        );
    }

    function _mint(address to, uint256 quantity) internal virtual {
        uint256 nextTokenId = _nextTokenId();

        require(quantity > 0, "ERC721Psi: quantity must be greater 0");
        require(to != address(0), "ERC721Psi: mint to the zero address");

        _beforeTokenTransfers(address(0), to, nextTokenId, quantity);
        _currentIndex += quantity;
        _owners[nextTokenId] = to;
        _minters[nextTokenId] = to;
        _batchHead.set(nextTokenId);
        _mintBatchHead.set(nextTokenId);
        _afterTokenTransfers(address(0), to, nextTokenId, quantity);

        // Emit events
        for (
            uint256 tokenId = nextTokenId;
            tokenId < nextTokenId + quantity;
            tokenId++
        ) {
            emit Transfer(address(0), to, 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 {
        (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(
            tokenId
        );

        require(owner == from, "ERC721Psi: transfer of token that is not own");
        require(to != address(0), "ERC721Psi: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        uint256 subsequentTokenId = tokenId + 1;

        if (
            !_batchHead.get(subsequentTokenId) &&
            subsequentTokenId < _nextTokenId()
        ) {
            _owners[subsequentTokenId] = from;
            _batchHead.set(subsequentTokenId);
        }

        _owners[tokenId] = to;
        if (tokenId != tokenIdBatchHead) {
            _batchHead.set(tokenId);
        }

        emit Transfer(from, to, tokenId);

        _afterTokenTransfers(from, to, tokenId, 1);
    }

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

    /**
     * @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 startTokenId uint256 the first ID of the tokens to be transferred
     * @param quantity uint256 amount of the tokens to be transfered.
     * @param _data bytes optional data to send along with the call
     * @return r bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity,
        bytes memory _data
    ) private returns (bool r) {
        if (to.isContract()) {
            r = true;
            for (
                uint256 tokenId = startTokenId;
                tokenId < startTokenId + quantity;
                tokenId++
            ) {
                try
                    IERC721Receiver(to).onERC721Received(
                        _msgSender(),
                        from,
                        tokenId,
                        _data
                    )
                returns (bytes4 retval) {
                    r =
                        r &&
                        retval == IERC721Receiver.onERC721Received.selector;
                } catch (bytes memory reason) {
                    if (reason.length == 0) {
                        revert(
                            "ERC721Psi: transfer to non ERC721Receiver implementer"
                        );
                    } else {
                        assembly {
                            revert(add(32, reason), mload(reason))
                        }
                    }
                }
            }
            return r;
        } else {
            return true;
        }
    }

    function _getBatchHead(uint256 tokenId)
        internal
        view
        returns (uint256 tokenIdBatchHead)
    {
        tokenIdBatchHead = _batchHead.scanForward(tokenId);
    }

    function _getMintBatchHead(uint256 tokenId)
        internal
        view
        returns (uint256 tokenIdBatchHead)
    {
        tokenIdBatchHead = _mintBatchHead.scanForward(tokenId);
    }

    function totalSupply() public view virtual returns (uint256) {
        return _totalMinted();
    }

    function totalMinted() public view returns (uint256) {
        return _totalMinted();
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * This function is compatiable with ERC721AQueryable.
     */
    function tokensOfOwner(address owner)
        external
        view
        virtual
        returns (uint256[] memory)
    {
        unchecked {
            uint256 tokenIdsIdx;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            for (
                uint256 i = _startTokenId();
                tokenIdsIdx != tokenIdsLength;
                ++i
            ) {
                if (_exists(i)) {
                    if (ownerOf(i) == owner) {
                        tokenIds[tokenIdsIdx++] = i;
                    }
                }
            }
            return tokenIds;
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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`.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 6 of 21 : BitMaps.sol
// SPDX-License-Identifier: MIT
/**
   _____       ___     ___ __           ____  _ __      
  / ___/____  / (_)___/ (_) /___  __   / __ )(_) /______
  \__ \/ __ \/ / / __  / / __/ / / /  / __  / / __/ ___/
 ___/ / /_/ / / / /_/ / / /_/ /_/ /  / /_/ / / /_(__  ) 
/____/\____/_/_/\__,_/_/\__/\__, /  /_____/_/\__/____/  
                           /____/                        

- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits

 */
pragma solidity ^0.8.0;

import "./BitScan.sol";
import "./Popcount.sol";

/**
 * @dev This Library is a modified version of Openzeppelin's BitMaps library with extra features.
 *
 * 1. Functions of finding the index of the closest set bit from a given index are added.
 *    The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB.
 *    The modification of indexing makes finding the closest previous set bit more efficient in gas usage.
 * 2. Setting and unsetting the bitmap consecutively.
 * 3. Accounting number of set bits within a given range.   
 *
*/

/**
 * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential.
 * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor].
 */

library BitMaps {
    using BitScan for uint256;
    uint256 private constant MASK_INDEX_ZERO = (1 << 255);
    uint256 private constant MASK_FULL = type(uint256).max;

    struct BitMap {
        mapping(uint256 => uint256) _data;
    }

    /**
     * @dev Returns whether the bit at `index` is set.
     */
    function get(BitMap storage bitmap, uint256 index) internal view returns (bool) {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        return bitmap._data[bucket] & mask != 0;
    }

    /**
     * @dev Sets the bit at `index` to the boolean `value`.
     */
    function setTo(
        BitMap storage bitmap,
        uint256 index,
        bool value
    ) internal {
        if (value) {
            set(bitmap, index);
        } else {
            unset(bitmap, index);
        }
    }

    /**
     * @dev Sets the bit at `index`.
     */
    function set(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        bitmap._data[bucket] |= mask;
    }

    /**
     * @dev Unsets the bit at `index`.
     */
    function unset(BitMap storage bitmap, uint256 index) internal {
        uint256 bucket = index >> 8;
        uint256 mask = MASK_INDEX_ZERO >> (index & 0xff);
        bitmap._data[bucket] &= ~mask;
    }


    /**
     * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`.
     */    
    function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex;
            } else {
                bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex;
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    bitmap._data[bucket] = MASK_FULL;
                    amount -= 256;
                    bucket++;
                }

                bitmap._data[bucket] |= MASK_FULL << (256 - amount);
            }
        }
    }


    /**
     * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`.
     */    
    function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex);
            } else {
                bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex);
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    bitmap._data[bucket] = 0;
                    amount -= 256;
                    bucket++;
                }

                bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount));
            }
        }
    }

    /**
     * @dev Returns number of set bits within a range.
     */
    function popcountA(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                count +=  Popcount.popcount256A(
                    bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex)
                );
            } else {
                count += Popcount.popcount256A(
                    bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex)
                );
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    count += Popcount.popcount256A(bitmap._data[bucket]);
                    amount -= 256;
                    bucket++;
                }
                count += Popcount.popcount256A(
                    bitmap._data[bucket] & (MASK_FULL << (256 - amount))
                );
            }
        }
    }

    /**
     * @dev Returns number of set bits within a range.
     */
    function popcountB(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal view returns(uint256 count) {
        uint256 bucket = startIndex >> 8;

        uint256 bucketStartIndex = (startIndex & 0xff);

        unchecked {
            if(bucketStartIndex + amount < 256) {
                count +=  Popcount.popcount256B(
                    bitmap._data[bucket] & (MASK_FULL << (256 - amount) >> bucketStartIndex)
                );
            } else {
                count += Popcount.popcount256B(
                    bitmap._data[bucket] & (MASK_FULL >> bucketStartIndex)
                );
                amount -= (256 - bucketStartIndex);
                bucket++;

                while(amount > 256) {
                    count += Popcount.popcount256B(bitmap._data[bucket]);
                    amount -= 256;
                    bucket++;
                }
                count += Popcount.popcount256B(
                    bitmap._data[bucket] & (MASK_FULL << (256 - amount))
                );
            }
        }
    }


    /**
     * @dev Find the closest index of the set bit before `index`.
     */
    function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) {
        uint256 bucket = index >> 8;

        // index within the bucket
        uint256 bucketIndex = (index & 0xff);

        // load a bitboard from the bitmap.
        uint256 bb = bitmap._data[bucket];

        // offset the bitboard to scan from `bucketIndex`.
        bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex)
        
        if(bb > 0) {
            unchecked {
                setBitIndex = (bucket << 8) | (bucketIndex -  bb.bitScanForward256());    
            }
        } else {
            while(true) {
                require(bucket > 0, "BitMaps: The set bit before the index doesn't exist.");
                unchecked {
                    bucket--;
                }
                // No offset. Always scan from the least significiant bit now.
                bb = bitmap._data[bucket];
                
                if(bb > 0) {
                    unchecked {
                        setBitIndex = (bucket << 8) | (255 -  bb.bitScanForward256());
                        break;
                    }
                } 
            }
        }
    }

    function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) {
        return bitmap._data[bucket];
    }
}

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

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 8 of 21 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 9 of 21 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

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

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

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

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

File 10 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.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 ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 13 of 21 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @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 15 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 IERC721Receiver {
    /**
     * @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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 17 of 21 : Popcount.sol
// SPDX-License-Identifier: MIT
/**
   _____       ___     ___ __           ____  _ __      
  / ___/____  / (_)___/ (_) /___  __   / __ )(_) /______
  \__ \/ __ \/ / / __  / / __/ / / /  / __  / / __/ ___/
 ___/ / /_/ / / / /_/ / / /_/ /_/ /  / /_/ / / /_(__  ) 
/____/\____/_/_/\__,_/_/\__/\__, /  /_____/_/\__/____/  
                           /____/                        

- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits

 */

pragma solidity ^0.8.0;

library Popcount {
    uint256 private constant m1 = 0x5555555555555555555555555555555555555555555555555555555555555555;
    uint256 private constant m2 = 0x3333333333333333333333333333333333333333333333333333333333333333;
    uint256 private constant m4 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f;
    uint256 private constant h01 = 0x0101010101010101010101010101010101010101010101010101010101010101;

    function popcount256A(uint256 x) internal pure returns (uint256 count) {
        unchecked{
            for (count=0; x!=0; count++)
                x &= x - 1;
        }
    }

    function popcount256B(uint256 x) internal pure returns (uint256) {
        if (x == type(uint256).max) {
            return 256;
        }
        unchecked {
            x -= (x >> 1) & m1;             //put count of each 2 bits into those 2 bits
            x = (x & m2) + ((x >> 2) & m2); //put count of each 4 bits into those 4 bits 
            x = (x + (x >> 4)) & m4;        //put count of each 8 bits into those 8 bits 
            x = (x * h01) >> 248;  //returns left 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ... 
        }
        return x;
    }
}

File 18 of 21 : BitScan.sol
// SPDX-License-Identifier: MIT
/**
   _____       ___     ___ __           ____  _ __      
  / ___/____  / (_)___/ (_) /___  __   / __ )(_) /______
  \__ \/ __ \/ / / __  / / __/ / / /  / __  / / __/ ___/
 ___/ / /_/ / / / /_/ / / /_/ /_/ /  / /_/ / / /_(__  ) 
/____/\____/_/_/\__,_/_/\__/\__, /  /_____/_/\__/____/  
                           /____/                        

- npm: https://www.npmjs.com/package/solidity-bits
- github: https://github.com/estarriolvetch/solidity-bits

 */

pragma solidity ^0.8.0;


library BitScan {
    uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff;
    bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8";

    /**
        @dev Isolate the least significant set bit.
     */ 
    function isolateLS1B256(uint256 bb) pure internal returns (uint256) {
        require(bb > 0);
        unchecked {
            return bb & (0 - bb);
        }
    } 

    /**
        @dev Isolate the most significant set bit.
     */ 
    function isolateMS1B256(uint256 bb) pure internal returns (uint256) {
        require(bb > 0);
        unchecked {
            bb |= bb >> 128;
            bb |= bb >> 64;
            bb |= bb >> 32;
            bb |= bb >> 16;
            bb |= bb >> 8;
            bb |= bb >> 4;
            bb |= bb >> 2;
            bb |= bb >> 1;
            
            return (bb >> 1) + 1;
        }
    } 

    /**
        @dev Find the index of the lest significant set bit. (trailing zero count)
     */ 
    function bitScanForward256(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]);
        }   
    }

    /**
        @dev Find the index of the most significant set bit.
     */ 
    function bitScanReverse256(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]);
        }   
    }

    function log2(uint256 bb) pure internal returns (uint8) {
        unchecked {
            return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]);
        } 
    }
}

File 19 of 21 : 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 20 of 21 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","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":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"},{"inputs":[],"name":"MAX_MINT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":[],"name":"disableMerge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMerge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"tokenId1","type":"uint256"},{"internalType":"uint256","name":"tokendId2","type":"uint256"}],"name":"merge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"minterOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minTokenId","type":"uint256"},{"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"mintersOf","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"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":"","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":[],"name":"sealUri","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":"baseURI","type":"string"}],"name":"setFirstEdBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setSecondEdBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSecondEdStartTokenId","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":"tokenId","type":"uint256"}],"name":"tokenHalves","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":[{"internalType":"address","name":"minter","type":"address"}],"name":"tokensMintedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"updateCollectionMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriIsSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6000600681905560a060405260809081526007906200001f9082620007b1565b506040805160208101909152600081526008906200003e9082620007b1565b50660aa87bee53800060105561270f60115560056012556015805463ffffff00191690553480156200006f57600080fd5b5060408051808201909152600a815269414963726f737469637360b01b6020820152600490620000a09082620007b1565b506040805180820190915260048152634149435360e01b6020820152600590620000cb9082620007b1565b506001600b55620000dc3362000114565b620000e662000166565b6015805460ff1916600117905562000101336101f462000189565b6200010e33600a6200028e565b62000971565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000187733cc6cdda760b79bafa08df41ecfa224f810dceb66001620002b4565b565b6127106001600160601b0382161115620001fd5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002555760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001f4565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b620002b08282604051806020016040528060008152506200032e60201b60201c565b5050565b6001600160a01b0390911690637d3e3dbe81620002e45782620002dd5750634420e486620002e4565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af162000324578060005160e01c036200032457600080fd5b5060006024525050565b60006200033a600b5490565b9050620003488484620003c1565b620003586000858386866200057d565b620003bb5760405162461bcd60e51b8152602060048201526035602482015260008051602062003c7883398151915260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401620001f4565b50505050565b6000620003cd600b5490565b9050600082116200042f5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401620001f4565b6001600160a01b038316620004935760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401620001f4565b81600b6000828254620004a7919062000893565b9091555050600081815260096020908152604080832080546001600160a01b0388166001600160a01b03199182168117909255600a845282852080549091169091179055600884901c8352600282528083208054600160ff1b60ff87161c908117909155600390925290912080549091179055805b62000528838362000893565b811015620003bb5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806200057481620008af565b9150506200051c565b60006001600160a01b0385163b15620006ff57506001835b620005a1848662000893565b811015620006f857604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290620005dd9033908b9086908990600401620008cb565b6020604051808303816000875af19250505080156200061b575060408051601f3d908101601f1916820190925262000618918101906200093e565b60015b620006c2573d8080156200064c576040519150601f19603f3d011682016040523d82523d6000602084013e62000651565b606091505b508051600003620006ba5760405162461bcd60e51b8152602060048201526035602482015260008051602062003c7883398151915260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401620001f4565b805181602001fd5b828015620006e057506001600160e01b03198116630a85bd0160e11b145b92505080620006ef81620008af565b91505062000595565b5062000703565b5060015b95945050505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200073757607f821691505b6020821081036200075857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620007ac57600081815260208120601f850160051c81016020861015620007875750805b601f850160051c820191505b81811015620007a85782815560010162000793565b5050505b505050565b81516001600160401b03811115620007cd57620007cd6200070c565b620007e581620007de845462000722565b846200075e565b602080601f8311600181146200081d5760008415620008045750858301515b600019600386901b1c1916600185901b178555620007a8565b600085815260208120601f198616915b828110156200084e578886015182559484019460019091019084016200082d565b50858210156200086d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820180821115620008a957620008a96200087d565b92915050565b600060018201620008c457620008c46200087d565b5060010190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b828110156200091a5785810182015185820160a001528101620008fc565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b6000602082840312156200095157600080fd5b81516001600160e01b0319811681146200096a57600080fd5b9392505050565b6132f780620009816000396000f3fe6080604052600436106102515760003560e01c80638da5cb5b11610139578063b7c0b8e8116100b6578063d91a61d01161007a578063d91a61d0146106d3578063e5dbbdcd146106e8578063e985e9c5146106fd578063ed9ba19414610746578063f2fde38b1461075b578063fb796e6c1461077b57600080fd5b8063b7c0b8e81461063d578063b88d4fde1461065d578063c002d23d1461067d578063c87b56dd14610693578063d1c2babb146106b357600080fd5b8063a0712d68116100fd578063a0712d68146105c0578063a22cb465146105d3578063a2309ff8146105f3578063b19960e614610608578063b3aff9f31461061e57600080fd5b80638da5cb5b1461052057806395d89b411461053e578063996f6cea146105535780639ce89f6a146105735780639e942ace146105a057600080fd5b806334452f38116101d25780636352211e116101965780636352211e14610476578063667cadc41461049657806370a08231146104ab578063715018a6146104cb5780637c36200c146104e05780638462151c1461050057600080fd5b806334452f38146103e15780633ccfd60b146103f657806342842e0e1461040b57806344b28d591461042b5780635e8bf9f71461044057600080fd5b806318160ddd1161021957806318160ddd1461031c5780631914773e1461033f57806323b872dd1461036c5780632a55205a1461038c57806332cb6b0c146103cb57600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806313d8068e14610307575b600080fd5b34801561026257600080fd5b506102766102713660046127d0565b610795565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107db565b604051610282919061283d565b3480156102b957600080fd5b506102cd6102c8366004612850565b61086d565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004612880565b6108fd565b005b34801561031357600080fd5b50610305610921565b34801561032857600080fd5b5061033161093e565b604051908152602001610282565b34801561034b57600080fd5b5061035f61035a366004612850565b61094d565b60405161028291906128aa565b34801561037857600080fd5b506103056103873660046128ee565b6109af565b34801561039857600080fd5b506103ac6103a736600461292a565b6109e5565b604080516001600160a01b039093168352602083019190915201610282565b3480156103d757600080fd5b5061033160115481565b3480156103ed57600080fd5b50610305610a91565b34801561040257600080fd5b50610305610aa6565b34801561041757600080fd5b506103056104263660046128ee565b610b2d565b34801561043757600080fd5b50610305610b5d565b34801561044c57600080fd5b5061033161045b36600461294c565b6001600160a01b031660009081526013602052604090205490565b34801561048257600080fd5b506102cd610491366004612850565b610b76565b3480156104a257600080fd5b50610305610b8a565b3480156104b757600080fd5b506103316104c636600461294c565b610b9a565b3480156104d757600080fd5b50610305610c69565b3480156104ec57600080fd5b506103056104fb3660046129f3565b610c7d565b34801561050c57600080fd5b5061035f61051b36600461294c565b610cbf565b34801561052c57600080fd5b50600f546001600160a01b03166102cd565b34801561054a57600080fd5b506102a0610d86565b34801561055f57600080fd5b5061030561056e3660046129f3565b610d95565b34801561057f57600080fd5b5061059361058e36600461292a565b610dd3565b6040516102829190612a3c565b3480156105ac57600080fd5b506102cd6105bb366004612850565b610e89565b6103056105ce366004612850565b610e9c565b3480156105df57600080fd5b506103056105ee366004612a8d565b6110a8565b3480156105ff57600080fd5b506103316110c7565b34801561061457600080fd5b5061033160125481565b34801561062a57600080fd5b506015546301000000900460ff16610276565b34801561064957600080fd5b50610305610658366004612ac0565b6110d1565b34801561066957600080fd5b50610305610678366004612adb565b6110ec565b34801561068957600080fd5b5061033160105481565b34801561069f57600080fd5b506102a06106ae366004612850565b611124565b3480156106bf57600080fd5b506103056106ce36600461292a565b611362565b3480156106df57600080fd5b506103056115ca565b3480156106f457600080fd5b50610305611617565b34801561070957600080fd5b50610276610718366004612b57565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205460ff1690565b34801561075257600080fd5b50610305611632565b34801561076757600080fd5b5061030561077636600461294c565b611648565b34801561078757600080fd5b506015546102769060ff1681565b60006001600160e01b031982166380ac58cd60e01b14806107c657506001600160e01b03198216635b5e139f60e01b145b806107d557506107d5826116be565b92915050565b6060600480546107ea90612b81565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612b81565b80156108635780601f1061083857610100808354040283529160200191610863565b820191906000526020600020905b81548152906001019060200180831161084657829003601f168201915b5050505050905090565b6000610878826116f3565b6108e15760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600c60205260409020546001600160a01b031690565b8160155460ff161561091257610912816116fe565b61091c8383611742565b505050565b610929611854565b6015805463ff00000019166301000000179055565b60006109486118ae565b905090565b6000818152601460209081526040918290208054835181840281018401909452808452606093928301828280156109a357602002820191906000526020600020905b81548152602001906001019080831161098f575b50505050509050919050565b826001600160a01b03811633146109d45760155460ff16156109d4576109d4336116fe565b6109df8484846118ca565b50505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a5a5750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a79906001600160601b031687612bd1565b610a839190612be8565b915196919550909350505050565b610a99611854565b6015805461ff0019169055565b610aae611854565b60004711610af15760405162461bcd60e51b815260206004820152601060248201526f2130b630b731b29034b9903d32b9379760811b60448201526064016108d8565b600f546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610b2a573d6000803e3d6000fd5b50565b826001600160a01b0381163314610b525760155460ff1615610b5257610b52336116fe565b6109df8484846118fb565b610b65611854565b6015805461ff001916610100179055565b600080610b8283611916565b509392505050565b610b92611854565b600b54600655565b60006001600160a01b038216610c085760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b60648201526084016108d8565b600060015b600b54811015610c6257610c20816116f3565b15610c5257610c2e81610b76565b6001600160a01b0316846001600160a01b031603610c5257610c4f82612c0a565b91505b610c5b81612c0a565b9050610c0d565b5092915050565b610c71611854565b610c7b6000611968565b565b610c85611854565b6015546301000000900460ff1615610caf5760405162461bcd60e51b81526004016108d890612c23565b6008610cbb8282612cab565b5050565b6060600080610ccd84610b9a565b905060008167ffffffffffffffff811115610cea57610cea612967565b604051908082528060200260200182016040528015610d13578160200160208202803683370190505b50905060015b828414610d7d57610d29816116f3565b15610d7557856001600160a01b0316610d4182610b76565b6001600160a01b031603610d755780828580600101965081518110610d6857610d68612d6b565b6020026020010181815250505b600101610d19565b50949350505050565b6060600580546107ea90612b81565b610d9d611854565b6015546301000000900460ff1615610dc75760405162461bcd60e51b81526004016108d890612c23565b6007610cbb8282612cab565b60606000610de18484612d81565b610dec906001612d94565b905060008167ffffffffffffffff811115610e0957610e09612967565b604051908082528060200260200182016040528015610e32578160200160208202803683370190505b50905060005b82811015610d7d57610e4d6105bb8783612d94565b828281518110610e5f57610e5f612d6b565b6001600160a01b039092166020928302919091019091015280610e8181612c0a565b915050610e38565b600080610e95836119ba565b9392505050565b336000908152601360205260408120549060018210610ebc576000610ec5565b660aa87bee5380005b66ffffffffffffff1683601054610edc9190612bd1565b610ee69190612d81565b60155490915060ff610100909104161515600114610f465760405162461bcd60e51b815260206004820152601a60248201527f414963726f73746963733a204d696e742064697361626c65642e00000000000060448201526064016108d8565b601254610f538484612d94565b1115610fba5760405162461bcd60e51b815260206004820152603060248201527f414963726f73746963733a204d696e74696e67206d6f7265207468616e20616c60448201526f1b1bddd959081c195c881dd85b1b195d60821b60648201526084016108d8565b601154836001600b54610fcd9190612d81565b610fd79190612d94565b11156110255760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204d617820737570706c792065786365656465640060448201526064016108d8565b348111156110755760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204e6f7420656e6f756768204554482073656e740060448201526064016108d8565b61107f3384611a0b565b336000908152601360205260408120805485929061109e908490612d94565b9091555050505050565b8160155460ff16156110bd576110bd816116fe565b61091c8383611a25565b6000610948611ae9565b6110d9611854565b6015805460ff1916911515919091179055565b836001600160a01b03811633146111115760155460ff161561111157611111336116fe565b61111d85858585611afa565b5050505050565b606061112f826116f3565b61118e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016108d8565b60606006546000141580156111a557506006548310155b1561123c57600880546111b790612b81565b80601f01602080910402602001604051908101604052809291908181526020018280546111e390612b81565b80156112305780601f1061120557610100808354040283529160200191611230565b820191906000526020600020905b81548152906001019060200180831161121357829003601f168201915b505050505090506112ca565b6007805461124990612b81565b80601f016020809104026020016040519081016040528092919081815260200182805461127590612b81565b80156112c25780601f10611297576101008083540402835291602001916112c2565b820191906000526020600020905b8154815290600101906020018083116112a557829003601f168201915b505050505090505b60008151116113315761130d6112df84611b2c565b6112e885611b2c565b6040516020016112f9929190612dc3565b604051602081830303815290604052611bbf565b60405160200161131d9190612fae565b604051602081830303815290604052610e95565b8061133b84611b2c565b60405160200161134c929190612ff3565b6040516020818303038152906040529392505050565b601554610100900460ff16156113ba5760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204d696e74207374696c6c206f6e676f696e672e0060448201526064016108d8565b60155462010000900460ff1615156001146114175760405162461bcd60e51b815260206004820152601e60248201527f414963726f73746963733a204d65726765206e6f7420656e61626c65642e000060448201526064016108d8565b60065482108015611429575060065481105b6114895760405162461bcd60e51b815260206004820152602b60248201527f414963726f73746963733a20547279696e6720746f206d6572676520616e203860448201526a16b634b732903837b2b69760a91b60648201526084016108d8565b3361149383610b76565b6001600160a01b0316146114fc5760405162461bcd60e51b815260206004820152602a60248201527f414963726f73746963733a20596f7520646f206e6f74206f776e20746865206660448201526934b939ba103a37b5b2b760b11b60648201526084016108d8565b3361150682610b76565b6001600160a01b0316146115705760405162461bcd60e51b815260206004820152602b60248201527f414963726f73746963733a20596f7520646f206e6f74206f776e20746865207360448201526a32b1b7b732103a37b5b2b760a91b60648201526084016108d8565b61157982611d12565b61158281611d12565b61158d336001611a0b565b604051806040016040528083815260200182815250601460006115af600b5490565b8152602081019190915260400160002061091c91600261275a565b6115d2611854565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60016115fd61093e565b6040805192835260208301919091520160405180910390a1565b61161f611854565b6015805462ff0000191662010000179055565b61163a611854565b6015805462ff000019169055565b611650611854565b6001600160a01b0381166116b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d8565b610b2a81611968565b60006001600160e01b0319821663152a902d60e11b14806107d557506301ffc9a760e01b6001600160e01b03198316146107d5565b60006107d582611d2c565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa61173a573d6000803e3d6000fd5b6000603a5250565b600061174d82610b76565b9050806001600160a01b0316836001600160a01b0316036117bc5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016108d8565b336001600160a01b03821614806117d857506117d88133610718565b61184a5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016108d8565b61091c8383611d61565b600f546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108d8565b60006118b8611dcf565b6118c0611ae9565b6109489190612d81565b6118d43382611e31565b6118f05760405162461bcd60e51b81526004016108d890613032565b61091c838383611f1e565b61091c838383604051806020016040528060008152506110ec565b600080611922836116f3565b61193e5760405162461bcd60e51b81526004016108d890613086565b6119478361210c565b6000818152600960205260409020546001600160a01b031694909350915050565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006119c582612119565b6119e15760405162461bcd60e51b81526004016108d890613086565b60006119ec83612135565b6000908152600a60205260409020546001600160a01b03169392505050565b610cbb828260405180602001604052806000815250612142565b336001600160a01b03831603611a7d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016108d8565b336000818152600d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600b546109489190612d81565b611b043383611e31565b611b205760405162461bcd60e51b81526004016108d890613032565b6109df84848484612183565b60606000611b398361219c565b600101905060008167ffffffffffffffff811115611b5957611b59612967565b6040519080825280601f01601f191660200182016040528015611b83576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611b8d57509392505050565b60608151600003611bde57505060408051602081019091526000815290565b60006040518060600160405280604081526020016131826040913990506000600384516002611c0d9190612d94565b611c179190612be8565b611c22906004612bd1565b67ffffffffffffffff811115611c3a57611c3a612967565b6040519080825280601f01601f191660200182016040528015611c64576020820181803683370190505b509050600182016020820185865187015b80821015611cd0576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611c75565b5050600386510660018114611cec5760028114611cff57611d07565b603d6001830353603d6002830353611d07565b603d60018303535b509195945050505050565b611d1b81612274565b600090815260016020526040812055565b600881901c6000908152600e6020526040812054600160ff1b60ff84161c1615611d5857506000919050565b6107d582612119565b6000818152600c6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d9682610b76565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600b5460009081908190611de79060081c6001612d94565b9050815b81811015611e2b576000818152600e6020526040902054611e0b816122c8565b611e159086612d94565b9450508080611e2390612c0a565b915050611deb565b50505090565b6000611e3c826116f3565b611ea05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108d8565b6000611eab83610b76565b9050806001600160a01b0316846001600160a01b03161480611ee65750836001600160a01b0316611edb8461086d565b6001600160a01b0316145b80611f1657506001600160a01b038082166000908152600d602090815260408083209388168352929052205460ff165b949350505050565b600080611f2a83611916565b91509150846001600160a01b0316826001600160a01b031614611fa45760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b60648201526084016108d8565b6001600160a01b03841661200a5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b60648201526084016108d8565b612015600084611d61565b6000612022846001612d94565b600881901c600090815260026020526040902054909150600160ff1b60ff83161c161580156120525750600b5481105b1561208957600081815260096020526040902080546001600160a01b0319166001600160a01b0388161790556120896002826122e7565b600084815260096020526040902080546001600160a01b0319166001600160a01b0387161790558184146120c2576120c26002856122e7565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006107d5600283612313565b6000612124600b5490565b821080156107d55750506001111590565b60006107d5600383612313565b600061214d600b5490565b9050612159848461240b565b6121676000858386866125a1565b6109df5760405162461bcd60e51b81526004016108d8906130d2565b61218e848484611f1e565b6121678484846001856125a1565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106121db5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612207576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061222557662386f26fc10000830492506010015b6305f5e100831061223d576305f5e100830492506008015b612710831061225157612710830492506004015b60648310612263576064830492506002015b600a83106107d55760010192915050565b600061227f82610b76565b905061228c600e836122e7565b60405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60005b81156122e2576000198201909116906001016122cb565b919050565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600881901c60008181526020849052604081205490919060ff808516919082181c801561235557612343816126d8565b60ff168203600884901b179350612402565b600083116123c25760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b60648201526084016108d8565b5060001990910160008181526020869052604090205490919080156123fd576123ea816126d8565b60ff0360ff16600884901b179350612402565b612355565b50505092915050565b6000612416600b5490565b9050600082116124765760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b60648201526084016108d8565b6001600160a01b0383166124d85760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108d8565b81600b60008282546124ea9190612d94565b9091555050600081815260096020908152604080832080546001600160a01b0388166001600160a01b03199182168117909255600a9093529220805490911690911790556125396002826122e7565b6125446003826122e7565b805b6125508383612d94565b8110156109df5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061259981612c0a565b915050612546565b60006001600160a01b0385163b156126cb57506001835b6125c28486612d94565b8110156126c557604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906125fb9033908b9086908990600401613127565b6020604051808303816000875af1925050508015612636575060408051601f3d908101601f1916820190925261263391810190613164565b60015b612693573d808015612664576040519150601f19603f3d011682016040523d82523d6000602084013e612669565b606091505b50805160000361268b5760405162461bcd60e51b81526004016108d8906130d2565b805181602001fd5b8280156126b057506001600160e01b03198116630a85bd0160e11b145b925050806126bd81612c0a565b9150506125b8565b506126cf565b5060015b95945050505050565b600060405180610120016040528061010081526020016131c2610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61272185612742565b02901c8151811061273457612734612d6b565b016020015160f81c92915050565b600080821161275057600080fd5b5060008190031690565b828054828255906000526020600020908101928215612795579160200282015b8281111561279557825182559160200191906001019061277a565b506127a19291506127a5565b5090565b5b808211156127a157600081556001016127a6565b6001600160e01b031981168114610b2a57600080fd5b6000602082840312156127e257600080fd5b8135610e95816127ba565b60005b838110156128085781810151838201526020016127f0565b50506000910152565b600081518084526128298160208601602086016127ed565b601f01601f19169290920160200192915050565b602081526000610e956020830184612811565b60006020828403121561286257600080fd5b5035919050565b80356001600160a01b03811681146122e257600080fd5b6000806040838503121561289357600080fd5b61289c83612869565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156128e2578351835292840192918401916001016128c6565b50909695505050505050565b60008060006060848603121561290357600080fd5b61290c84612869565b925061291a60208501612869565b9150604084013590509250925092565b6000806040838503121561293d57600080fd5b50508035926020909101359150565b60006020828403121561295e57600080fd5b610e9582612869565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561299857612998612967565b604051601f8501601f19908116603f011681019082821181831017156129c0576129c0612967565b816040528093508581528686860111156129d957600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612a0557600080fd5b813567ffffffffffffffff811115612a1c57600080fd5b8201601f81018413612a2d57600080fd5b611f168482356020840161297d565b6020808252825182820181905260009190848201906040850190845b818110156128e25783516001600160a01b031683529284019291840191600101612a58565b803580151581146122e257600080fd5b60008060408385031215612aa057600080fd5b612aa983612869565b9150612ab760208401612a7d565b90509250929050565b600060208284031215612ad257600080fd5b610e9582612a7d565b60008060008060808587031215612af157600080fd5b612afa85612869565b9350612b0860208601612869565b925060408501359150606085013567ffffffffffffffff811115612b2b57600080fd5b8501601f81018713612b3c57600080fd5b612b4b8782356020840161297d565b91505092959194509250565b60008060408385031215612b6a57600080fd5b612b7383612869565b9150612ab760208401612869565b600181811c90821680612b9557607f821691505b602082108103612bb557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107d5576107d5612bbb565b600082612c0557634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612c1c57612c1c612bbb565b5060010190565b60208082526022908201527f42617365205552492063616e206e6f206c6f6e676572206265206368616e6765604082015261321760f11b606082015260800190565b601f82111561091c57600081815260208120601f850160051c81016020861015612c8c5750805b601f850160051c820191505b8181101561210457828155600101612c98565b815167ffffffffffffffff811115612cc557612cc5612967565b612cd981612cd38454612b81565b84612c65565b602080601f831160018114612d0e5760008415612cf65750858301515b600019600386901b1c1916600185901b178555612104565b600085815260208120601f198616915b82811015612d3d57888601518255948401946001909101908401612d1e565b5085821015612d5b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b818103818111156107d5576107d5612bbb565b808201808211156107d5576107d5612bbb565b60008151612db98185602086016127ed565b9290920192915050565b747b226e616d65223a2022414963726f73746963202360581b81528251600090612df48160158501602088016127ed565b601160f91b6015918401918201527f2c226465736372697074696f6e223a20224163726f7374696320706f656d732060168201527f67656e6572617465642062792043686174204750542e20546865206c6173742060368201527f666f75722063686172616374657273206f66207468652077616c6c657420616460568201527f647265737320617265207573656420746f20646963746174652074686520666960768201527f727374206c6574746572206f662065616368206c696e652e2054686520666f7560968201527f722d6c696e6520706f656d732063616e207468656e206265206d65726765642060b68201527f776974682065616368206f7468657220746f206372656174652065696768742060d68201527f6c696e6520706f656d73207769746820636f6d62696e6564207468656d65732e60f68201527f222c22696d616765223a202268747470733a2f2f74656d70696d61676575726c6101168201527f2e6d756d626c656465762e7265706c2e636f2f67657474656d70696d6167652f6101368201526126cf612fa1612f94610156840187612da7565b601160f91b815260010190565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612fe681601d8501602087016127ed565b91909101601d0192915050565b600083516130058184602088016127ed565b8351908301906130198183602088016127ed565b64173539b7b760d91b9101908152600501949350505050565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602c908201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061315a90830184612811565b9695505050505050565b60006020828403121561317657600080fd5b8151610e95816127ba56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220ea3a539f82c2667d6711d2fe48865435a4576f5e5ebc76ef9ca752ea64225f0f64736f6c634300081300334552433732315073693a207472616e7366657220746f206e6f6e204552433732

Deployed Bytecode

0x6080604052600436106102515760003560e01c80638da5cb5b11610139578063b7c0b8e8116100b6578063d91a61d01161007a578063d91a61d0146106d3578063e5dbbdcd146106e8578063e985e9c5146106fd578063ed9ba19414610746578063f2fde38b1461075b578063fb796e6c1461077b57600080fd5b8063b7c0b8e81461063d578063b88d4fde1461065d578063c002d23d1461067d578063c87b56dd14610693578063d1c2babb146106b357600080fd5b8063a0712d68116100fd578063a0712d68146105c0578063a22cb465146105d3578063a2309ff8146105f3578063b19960e614610608578063b3aff9f31461061e57600080fd5b80638da5cb5b1461052057806395d89b411461053e578063996f6cea146105535780639ce89f6a146105735780639e942ace146105a057600080fd5b806334452f38116101d25780636352211e116101965780636352211e14610476578063667cadc41461049657806370a08231146104ab578063715018a6146104cb5780637c36200c146104e05780638462151c1461050057600080fd5b806334452f38146103e15780633ccfd60b146103f657806342842e0e1461040b57806344b28d591461042b5780635e8bf9f71461044057600080fd5b806318160ddd1161021957806318160ddd1461031c5780631914773e1461033f57806323b872dd1461036c5780632a55205a1461038c57806332cb6b0c146103cb57600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806313d8068e14610307575b600080fd5b34801561026257600080fd5b506102766102713660046127d0565b610795565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107db565b604051610282919061283d565b3480156102b957600080fd5b506102cd6102c8366004612850565b61086d565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004612880565b6108fd565b005b34801561031357600080fd5b50610305610921565b34801561032857600080fd5b5061033161093e565b604051908152602001610282565b34801561034b57600080fd5b5061035f61035a366004612850565b61094d565b60405161028291906128aa565b34801561037857600080fd5b506103056103873660046128ee565b6109af565b34801561039857600080fd5b506103ac6103a736600461292a565b6109e5565b604080516001600160a01b039093168352602083019190915201610282565b3480156103d757600080fd5b5061033160115481565b3480156103ed57600080fd5b50610305610a91565b34801561040257600080fd5b50610305610aa6565b34801561041757600080fd5b506103056104263660046128ee565b610b2d565b34801561043757600080fd5b50610305610b5d565b34801561044c57600080fd5b5061033161045b36600461294c565b6001600160a01b031660009081526013602052604090205490565b34801561048257600080fd5b506102cd610491366004612850565b610b76565b3480156104a257600080fd5b50610305610b8a565b3480156104b757600080fd5b506103316104c636600461294c565b610b9a565b3480156104d757600080fd5b50610305610c69565b3480156104ec57600080fd5b506103056104fb3660046129f3565b610c7d565b34801561050c57600080fd5b5061035f61051b36600461294c565b610cbf565b34801561052c57600080fd5b50600f546001600160a01b03166102cd565b34801561054a57600080fd5b506102a0610d86565b34801561055f57600080fd5b5061030561056e3660046129f3565b610d95565b34801561057f57600080fd5b5061059361058e36600461292a565b610dd3565b6040516102829190612a3c565b3480156105ac57600080fd5b506102cd6105bb366004612850565b610e89565b6103056105ce366004612850565b610e9c565b3480156105df57600080fd5b506103056105ee366004612a8d565b6110a8565b3480156105ff57600080fd5b506103316110c7565b34801561061457600080fd5b5061033160125481565b34801561062a57600080fd5b506015546301000000900460ff16610276565b34801561064957600080fd5b50610305610658366004612ac0565b6110d1565b34801561066957600080fd5b50610305610678366004612adb565b6110ec565b34801561068957600080fd5b5061033160105481565b34801561069f57600080fd5b506102a06106ae366004612850565b611124565b3480156106bf57600080fd5b506103056106ce36600461292a565b611362565b3480156106df57600080fd5b506103056115ca565b3480156106f457600080fd5b50610305611617565b34801561070957600080fd5b50610276610718366004612b57565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205460ff1690565b34801561075257600080fd5b50610305611632565b34801561076757600080fd5b5061030561077636600461294c565b611648565b34801561078757600080fd5b506015546102769060ff1681565b60006001600160e01b031982166380ac58cd60e01b14806107c657506001600160e01b03198216635b5e139f60e01b145b806107d557506107d5826116be565b92915050565b6060600480546107ea90612b81565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612b81565b80156108635780601f1061083857610100808354040283529160200191610863565b820191906000526020600020905b81548152906001019060200180831161084657829003601f168201915b5050505050905090565b6000610878826116f3565b6108e15760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600c60205260409020546001600160a01b031690565b8160155460ff161561091257610912816116fe565b61091c8383611742565b505050565b610929611854565b6015805463ff00000019166301000000179055565b60006109486118ae565b905090565b6000818152601460209081526040918290208054835181840281018401909452808452606093928301828280156109a357602002820191906000526020600020905b81548152602001906001019080831161098f575b50505050509050919050565b826001600160a01b03811633146109d45760155460ff16156109d4576109d4336116fe565b6109df8484846118ca565b50505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a5a5750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a79906001600160601b031687612bd1565b610a839190612be8565b915196919550909350505050565b610a99611854565b6015805461ff0019169055565b610aae611854565b60004711610af15760405162461bcd60e51b815260206004820152601060248201526f2130b630b731b29034b9903d32b9379760811b60448201526064016108d8565b600f546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610b2a573d6000803e3d6000fd5b50565b826001600160a01b0381163314610b525760155460ff1615610b5257610b52336116fe565b6109df8484846118fb565b610b65611854565b6015805461ff001916610100179055565b600080610b8283611916565b509392505050565b610b92611854565b600b54600655565b60006001600160a01b038216610c085760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b60648201526084016108d8565b600060015b600b54811015610c6257610c20816116f3565b15610c5257610c2e81610b76565b6001600160a01b0316846001600160a01b031603610c5257610c4f82612c0a565b91505b610c5b81612c0a565b9050610c0d565b5092915050565b610c71611854565b610c7b6000611968565b565b610c85611854565b6015546301000000900460ff1615610caf5760405162461bcd60e51b81526004016108d890612c23565b6008610cbb8282612cab565b5050565b6060600080610ccd84610b9a565b905060008167ffffffffffffffff811115610cea57610cea612967565b604051908082528060200260200182016040528015610d13578160200160208202803683370190505b50905060015b828414610d7d57610d29816116f3565b15610d7557856001600160a01b0316610d4182610b76565b6001600160a01b031603610d755780828580600101965081518110610d6857610d68612d6b565b6020026020010181815250505b600101610d19565b50949350505050565b6060600580546107ea90612b81565b610d9d611854565b6015546301000000900460ff1615610dc75760405162461bcd60e51b81526004016108d890612c23565b6007610cbb8282612cab565b60606000610de18484612d81565b610dec906001612d94565b905060008167ffffffffffffffff811115610e0957610e09612967565b604051908082528060200260200182016040528015610e32578160200160208202803683370190505b50905060005b82811015610d7d57610e4d6105bb8783612d94565b828281518110610e5f57610e5f612d6b565b6001600160a01b039092166020928302919091019091015280610e8181612c0a565b915050610e38565b600080610e95836119ba565b9392505050565b336000908152601360205260408120549060018210610ebc576000610ec5565b660aa87bee5380005b66ffffffffffffff1683601054610edc9190612bd1565b610ee69190612d81565b60155490915060ff610100909104161515600114610f465760405162461bcd60e51b815260206004820152601a60248201527f414963726f73746963733a204d696e742064697361626c65642e00000000000060448201526064016108d8565b601254610f538484612d94565b1115610fba5760405162461bcd60e51b815260206004820152603060248201527f414963726f73746963733a204d696e74696e67206d6f7265207468616e20616c60448201526f1b1bddd959081c195c881dd85b1b195d60821b60648201526084016108d8565b601154836001600b54610fcd9190612d81565b610fd79190612d94565b11156110255760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204d617820737570706c792065786365656465640060448201526064016108d8565b348111156110755760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204e6f7420656e6f756768204554482073656e740060448201526064016108d8565b61107f3384611a0b565b336000908152601360205260408120805485929061109e908490612d94565b9091555050505050565b8160155460ff16156110bd576110bd816116fe565b61091c8383611a25565b6000610948611ae9565b6110d9611854565b6015805460ff1916911515919091179055565b836001600160a01b03811633146111115760155460ff161561111157611111336116fe565b61111d85858585611afa565b5050505050565b606061112f826116f3565b61118e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016108d8565b60606006546000141580156111a557506006548310155b1561123c57600880546111b790612b81565b80601f01602080910402602001604051908101604052809291908181526020018280546111e390612b81565b80156112305780601f1061120557610100808354040283529160200191611230565b820191906000526020600020905b81548152906001019060200180831161121357829003601f168201915b505050505090506112ca565b6007805461124990612b81565b80601f016020809104026020016040519081016040528092919081815260200182805461127590612b81565b80156112c25780601f10611297576101008083540402835291602001916112c2565b820191906000526020600020905b8154815290600101906020018083116112a557829003601f168201915b505050505090505b60008151116113315761130d6112df84611b2c565b6112e885611b2c565b6040516020016112f9929190612dc3565b604051602081830303815290604052611bbf565b60405160200161131d9190612fae565b604051602081830303815290604052610e95565b8061133b84611b2c565b60405160200161134c929190612ff3565b6040516020818303038152906040529392505050565b601554610100900460ff16156113ba5760405162461bcd60e51b815260206004820152601f60248201527f414963726f73746963733a204d696e74207374696c6c206f6e676f696e672e0060448201526064016108d8565b60155462010000900460ff1615156001146114175760405162461bcd60e51b815260206004820152601e60248201527f414963726f73746963733a204d65726765206e6f7420656e61626c65642e000060448201526064016108d8565b60065482108015611429575060065481105b6114895760405162461bcd60e51b815260206004820152602b60248201527f414963726f73746963733a20547279696e6720746f206d6572676520616e203860448201526a16b634b732903837b2b69760a91b60648201526084016108d8565b3361149383610b76565b6001600160a01b0316146114fc5760405162461bcd60e51b815260206004820152602a60248201527f414963726f73746963733a20596f7520646f206e6f74206f776e20746865206660448201526934b939ba103a37b5b2b760b11b60648201526084016108d8565b3361150682610b76565b6001600160a01b0316146115705760405162461bcd60e51b815260206004820152602b60248201527f414963726f73746963733a20596f7520646f206e6f74206f776e20746865207360448201526a32b1b7b732103a37b5b2b760a91b60648201526084016108d8565b61157982611d12565b61158281611d12565b61158d336001611a0b565b604051806040016040528083815260200182815250601460006115af600b5490565b8152602081019190915260400160002061091c91600261275a565b6115d2611854565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60016115fd61093e565b6040805192835260208301919091520160405180910390a1565b61161f611854565b6015805462ff0000191662010000179055565b61163a611854565b6015805462ff000019169055565b611650611854565b6001600160a01b0381166116b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d8565b610b2a81611968565b60006001600160e01b0319821663152a902d60e11b14806107d557506301ffc9a760e01b6001600160e01b03198316146107d5565b60006107d582611d2c565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa61173a573d6000803e3d6000fd5b6000603a5250565b600061174d82610b76565b9050806001600160a01b0316836001600160a01b0316036117bc5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b60648201526084016108d8565b336001600160a01b03821614806117d857506117d88133610718565b61184a5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c000000000060648201526084016108d8565b61091c8383611d61565b600f546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108d8565b60006118b8611dcf565b6118c0611ae9565b6109489190612d81565b6118d43382611e31565b6118f05760405162461bcd60e51b81526004016108d890613032565b61091c838383611f1e565b61091c838383604051806020016040528060008152506110ec565b600080611922836116f3565b61193e5760405162461bcd60e51b81526004016108d890613086565b6119478361210c565b6000818152600960205260409020546001600160a01b031694909350915050565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006119c582612119565b6119e15760405162461bcd60e51b81526004016108d890613086565b60006119ec83612135565b6000908152600a60205260409020546001600160a01b03169392505050565b610cbb828260405180602001604052806000815250612142565b336001600160a01b03831603611a7d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c65720000000060448201526064016108d8565b336000818152600d602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600b546109489190612d81565b611b043383611e31565b611b205760405162461bcd60e51b81526004016108d890613032565b6109df84848484612183565b60606000611b398361219c565b600101905060008167ffffffffffffffff811115611b5957611b59612967565b6040519080825280601f01601f191660200182016040528015611b83576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611b8d57509392505050565b60608151600003611bde57505060408051602081019091526000815290565b60006040518060600160405280604081526020016131826040913990506000600384516002611c0d9190612d94565b611c179190612be8565b611c22906004612bd1565b67ffffffffffffffff811115611c3a57611c3a612967565b6040519080825280601f01601f191660200182016040528015611c64576020820181803683370190505b509050600182016020820185865187015b80821015611cd0576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611c75565b5050600386510660018114611cec5760028114611cff57611d07565b603d6001830353603d6002830353611d07565b603d60018303535b509195945050505050565b611d1b81612274565b600090815260016020526040812055565b600881901c6000908152600e6020526040812054600160ff1b60ff84161c1615611d5857506000919050565b6107d582612119565b6000818152600c6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d9682610b76565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600b5460009081908190611de79060081c6001612d94565b9050815b81811015611e2b576000818152600e6020526040902054611e0b816122c8565b611e159086612d94565b9450508080611e2390612c0a565b915050611deb565b50505090565b6000611e3c826116f3565b611ea05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108d8565b6000611eab83610b76565b9050806001600160a01b0316846001600160a01b03161480611ee65750836001600160a01b0316611edb8461086d565b6001600160a01b0316145b80611f1657506001600160a01b038082166000908152600d602090815260408083209388168352929052205460ff165b949350505050565b600080611f2a83611916565b91509150846001600160a01b0316826001600160a01b031614611fa45760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b60648201526084016108d8565b6001600160a01b03841661200a5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b60648201526084016108d8565b612015600084611d61565b6000612022846001612d94565b600881901c600090815260026020526040902054909150600160ff1b60ff83161c161580156120525750600b5481105b1561208957600081815260096020526040902080546001600160a01b0319166001600160a01b0388161790556120896002826122e7565b600084815260096020526040902080546001600160a01b0319166001600160a01b0387161790558184146120c2576120c26002856122e7565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60006107d5600283612313565b6000612124600b5490565b821080156107d55750506001111590565b60006107d5600383612313565b600061214d600b5490565b9050612159848461240b565b6121676000858386866125a1565b6109df5760405162461bcd60e51b81526004016108d8906130d2565b61218e848484611f1e565b6121678484846001856125a1565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106121db5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612207576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061222557662386f26fc10000830492506010015b6305f5e100831061223d576305f5e100830492506008015b612710831061225157612710830492506004015b60648310612263576064830492506002015b600a83106107d55760010192915050565b600061227f82610b76565b905061228c600e836122e7565b60405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60005b81156122e2576000198201909116906001016122cb565b919050565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600881901c60008181526020849052604081205490919060ff808516919082181c801561235557612343816126d8565b60ff168203600884901b179350612402565b600083116123c25760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b60648201526084016108d8565b5060001990910160008181526020869052604090205490919080156123fd576123ea816126d8565b60ff0360ff16600884901b179350612402565b612355565b50505092915050565b6000612416600b5490565b9050600082116124765760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b60648201526084016108d8565b6001600160a01b0383166124d85760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108d8565b81600b60008282546124ea9190612d94565b9091555050600081815260096020908152604080832080546001600160a01b0388166001600160a01b03199182168117909255600a9093529220805490911690911790556125396002826122e7565b6125446003826122e7565b805b6125508383612d94565b8110156109df5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061259981612c0a565b915050612546565b60006001600160a01b0385163b156126cb57506001835b6125c28486612d94565b8110156126c557604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906125fb9033908b9086908990600401613127565b6020604051808303816000875af1925050508015612636575060408051601f3d908101601f1916820190925261263391810190613164565b60015b612693573d808015612664576040519150601f19603f3d011682016040523d82523d6000602084013e612669565b606091505b50805160000361268b5760405162461bcd60e51b81526004016108d8906130d2565b805181602001fd5b8280156126b057506001600160e01b03198116630a85bd0160e11b145b925050806126bd81612c0a565b9150506125b8565b506126cf565b5060015b95945050505050565b600060405180610120016040528061010081526020016131c2610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61272185612742565b02901c8151811061273457612734612d6b565b016020015160f81c92915050565b600080821161275057600080fd5b5060008190031690565b828054828255906000526020600020908101928215612795579160200282015b8281111561279557825182559160200191906001019061277a565b506127a19291506127a5565b5090565b5b808211156127a157600081556001016127a6565b6001600160e01b031981168114610b2a57600080fd5b6000602082840312156127e257600080fd5b8135610e95816127ba565b60005b838110156128085781810151838201526020016127f0565b50506000910152565b600081518084526128298160208601602086016127ed565b601f01601f19169290920160200192915050565b602081526000610e956020830184612811565b60006020828403121561286257600080fd5b5035919050565b80356001600160a01b03811681146122e257600080fd5b6000806040838503121561289357600080fd5b61289c83612869565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156128e2578351835292840192918401916001016128c6565b50909695505050505050565b60008060006060848603121561290357600080fd5b61290c84612869565b925061291a60208501612869565b9150604084013590509250925092565b6000806040838503121561293d57600080fd5b50508035926020909101359150565b60006020828403121561295e57600080fd5b610e9582612869565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561299857612998612967565b604051601f8501601f19908116603f011681019082821181831017156129c0576129c0612967565b816040528093508581528686860111156129d957600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612a0557600080fd5b813567ffffffffffffffff811115612a1c57600080fd5b8201601f81018413612a2d57600080fd5b611f168482356020840161297d565b6020808252825182820181905260009190848201906040850190845b818110156128e25783516001600160a01b031683529284019291840191600101612a58565b803580151581146122e257600080fd5b60008060408385031215612aa057600080fd5b612aa983612869565b9150612ab760208401612a7d565b90509250929050565b600060208284031215612ad257600080fd5b610e9582612a7d565b60008060008060808587031215612af157600080fd5b612afa85612869565b9350612b0860208601612869565b925060408501359150606085013567ffffffffffffffff811115612b2b57600080fd5b8501601f81018713612b3c57600080fd5b612b4b8782356020840161297d565b91505092959194509250565b60008060408385031215612b6a57600080fd5b612b7383612869565b9150612ab760208401612869565b600181811c90821680612b9557607f821691505b602082108103612bb557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107d5576107d5612bbb565b600082612c0557634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612c1c57612c1c612bbb565b5060010190565b60208082526022908201527f42617365205552492063616e206e6f206c6f6e676572206265206368616e6765604082015261321760f11b606082015260800190565b601f82111561091c57600081815260208120601f850160051c81016020861015612c8c5750805b601f850160051c820191505b8181101561210457828155600101612c98565b815167ffffffffffffffff811115612cc557612cc5612967565b612cd981612cd38454612b81565b84612c65565b602080601f831160018114612d0e5760008415612cf65750858301515b600019600386901b1c1916600185901b178555612104565b600085815260208120601f198616915b82811015612d3d57888601518255948401946001909101908401612d1e565b5085821015612d5b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b818103818111156107d5576107d5612bbb565b808201808211156107d5576107d5612bbb565b60008151612db98185602086016127ed565b9290920192915050565b747b226e616d65223a2022414963726f73746963202360581b81528251600090612df48160158501602088016127ed565b601160f91b6015918401918201527f2c226465736372697074696f6e223a20224163726f7374696320706f656d732060168201527f67656e6572617465642062792043686174204750542e20546865206c6173742060368201527f666f75722063686172616374657273206f66207468652077616c6c657420616460568201527f647265737320617265207573656420746f20646963746174652074686520666960768201527f727374206c6574746572206f662065616368206c696e652e2054686520666f7560968201527f722d6c696e6520706f656d732063616e207468656e206265206d65726765642060b68201527f776974682065616368206f7468657220746f206372656174652065696768742060d68201527f6c696e6520706f656d73207769746820636f6d62696e6564207468656d65732e60f68201527f222c22696d616765223a202268747470733a2f2f74656d70696d61676575726c6101168201527f2e6d756d626c656465762e7265706c2e636f2f67657474656d70696d6167652f6101368201526126cf612fa1612f94610156840187612da7565b601160f91b815260010190565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612fe681601d8501602087016127ed565b91909101601d0192915050565b600083516130058184602088016127ed565b8351908301906130198183602088016127ed565b64173539b7b760d91b9101908152600501949350505050565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602c908201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061315a90830184612811565b9695505050505050565b60006020828403121561317657600080fd5b8151610e95816127ba56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220ea3a539f82c2667d6711d2fe48865435a4576f5e5ebc76ef9ca752ea64225f0f64736f6c63430008130033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.