ETH Price: $2,444.12 (-1.24%)
Gas: 5.47 Gwei
 

Overview

TokenID

2155

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
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:
DHVN

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

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

import "./interface/IRouter.sol";
import "./ERC721BasicFrame.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./libs/BitOperator.sol";

contract DHVN is ERC721BasicFrame {
    using Strings for uint256;
    using BitOperator for uint256;
    /*
     * @dev Token aux for routing parameter : bit layout
     * 0..7     update index like burnin without changing token id
     */
    uint256 private constant BITPOS_AUX_UPDATE_INDEX = 0;
    
    /*
     * @dev Routing parameter bit layout
     * 0        bool of lock status
     * 1        update index like burnin without changing token id
     * 2..9     currentUpdateIndex
     */
    uint256 private constant BITPOS_LOCK_STATUS = 0;
    uint256 private constant BITPOS_UPDATE_INDEX = BITPOS_LOCK_STATUS + 1;
    uint256 private constant BITPOS_CURRENT_UPDATE_INDEX = BITPOS_UPDATE_INDEX + 8;

    uint8 public currentUpdateIndex;
    IRouter public router;

    event UpdateToken(uint256 indexed tokenId, uint8 indexed updateIndex);
    event IncreaseUpdateIndex(uint8 indexed updateIndex);
    
    error InvalidUpdateIndex();
    error ZeroUpdateIndex();
    error RouterNotSet();
    
    ///////////////////////////////////////////////////////////////////////////
    // Constructor
    ///////////////////////////////////////////////////////////////////////////
    constructor() ERC721BasicFrame("DAO Heaven", "DHV", 777) {
        // default royalty set
        _setDefaultRoyalty(
            IEIP2981RoyaltyOverride.TokenRoyalty({bps: 1000, recipient: 0xFBb189698A54570d5c82399486049b6f5D008923})
        );
        // Grants minter and burner role for owner address
        _grantRole(MINTER_ROLE, msg.sender);
        _grantRole(BURNER_ROLE, msg.sender);
        _grantRole(UPDATER_ROLE, msg.sender);
        // Please burn by yourself for token number starts from 1
        _mint(msg.sender, 1);   // tokenId 0
        _mint(0x2F4F52FCb7C752d6847B9d333c47A77a49E3977C, 20);
        _mint(0x108BE80b8f2E44034171723AC720A7177b002FAE, 15);
        _mint(0x45E39b215C7F4890A4F8f9b35e5d963c61B97828, 10);
        _mint(0x36839f9a73C8305ad4626f712cB011FD8B448310, 9);
        _mint(0x2ab41637C245950ace453fB2C1863F3641FCE83b, 8);
        _mint(0x24aae0A135985Dc8aE6B8BaC64051aF645C2b3f9, 7);
        _mint(0x2c45a206f3Ba662c69e9Ae9831B56f6242e2b16F, 7);
        _mint(0x4519a5973d718C184Fe8823e95A3549b8B48A5be, 5);
        _mint(0x74087c451c335645D9DF705DF4B8567425d36fEE, 5);
        _mint(0xBb6Ac8101DF081AC7A2639168734Bc18Aaaf06Da, 3);
        _mint(0xA581532f474915867eC82059242CcCc7d5118DFf, 2);
        _mint(0xdf6e1e8945bcB7f1B17f4D83e36Ab79a5d724607, 1);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Setter functions : router
    ///////////////////////////////////////////////////////////////////////////
    function setRouter(IRouter _router) external onlyAdmin{
        router = _router;
    }

    /**
      * @dev Allow administrators to change the lock status so that locked tokens are not listed in the marketplace.
      */
    function setTokenLockByAdmin(uint256[] calldata tokenIds, LockStatus lockStatus)
        external
        onlyAdmin
    {
        // _setTokenLock call _exists(tokenId) in ownerOf() function.
        // So this function calls internal function without checking token existance
        _setTokenLock(tokenIds, lockStatus);
    }
    ///////////////////////////////////////////////////////////////////////////
    // Update Index functions
    ///////////////////////////////////////////////////////////////////////////
    function getTokenUpdateIndex(uint256 tokenId) external view virtual returns(uint8){
        if (!_exists(tokenId)) revert TokenNonexistent(tokenId);
        return _getTokenUpdateIndex(tokenId);
    }

    function _getTokenUpdateIndex(uint256 tokenId) internal view virtual returns(uint8){
        return _getTokenAux(tokenId).getBitValueUint8(BITPOS_AUX_UPDATE_INDEX);
    }

    function updateToken(uint256 tokenId)
        external
        virtual
        onlyRole(UPDATER_ROLE)
    {
        // Grab from strage
        uint8 index = currentUpdateIndex;
        uint256 aux = _getTokenAux(tokenId);

        if (!_exists(tokenId)) revert TokenNonexistent(tokenId);
        if (index == 0) revert ZeroUpdateIndex();
        if (aux.getBitValueUint8(BITPOS_AUX_UPDATE_INDEX) >= index) revert InvalidUpdateIndex();
        emit UpdateToken(tokenId, index);
        _setTokenAux(tokenId, aux.setBitValueUint8(BITPOS_AUX_UPDATE_INDEX, index));
    }

    function increaseCurrentUpdateIndex()
        external
        virtual
        onlyRole(UPDATER_ROLE)
        returns(uint8)
    {
        uint8 newIndex = currentUpdateIndex++;
        emit IncreaseUpdateIndex(newIndex);
        return newIndex;
    }

    ///////////////////////////////////////////////////////////////////////////
    // Metadata functions
    ///////////////////////////////////////////////////////////////////////////
    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        if (address(router) == address(0)) revert RouterNotSet();
        if (!_exists(tokenId)) revert TokenNonexistent(tokenId);

        uint256 param = isLocked(tokenId) ? 1 : 0;
        param = param.setBitValueUint8(BITPOS_UPDATE_INDEX, _getTokenUpdateIndex(tokenId));
        param = param.setBitValueUint8(BITPOS_CURRENT_UPDATE_INDEX,currentUpdateIndex);

        return router.tokenURI(tokenId,param);
    }
}

File 2 of 35 : IRoyaltyOverride.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * Simple EIP2981 reference override implementation
 */
interface IEIP2981RoyaltyOverride is IERC165 {
    event TokenRoyaltyRemoved(uint256 tokenId);
    event TokenRoyaltySet(uint256 tokenId, address recipient, uint16 bps);
    event DefaultRoyaltySet(address recipient, uint16 bps);

    struct TokenRoyalty {
        address recipient;
        uint16 bps;
    }

    struct TokenRoyaltyConfig {
        uint256 tokenId;
        address recipient;
        uint16 bps;
    }

    /**
     * @dev Set per token royalties.  Passing a recipient of address(0) will delete any existing configuration
     */
    function setTokenRoyalties(TokenRoyaltyConfig[] calldata royalties) external;

    /**
     * @dev Get the number of token specific overrides.  Used to enumerate over all configurations
     */
    function getTokenRoyaltiesCount() external view returns (uint256);

    /**
     * @dev Get a token royalty configuration by index.  Use in conjunction with getTokenRoyaltiesCount to get all per token configurations
     */
    function getTokenRoyaltyByIndex(uint256 index) external view returns (TokenRoyaltyConfig memory);

    /**
     * @dev Set a default royalty configuration.  Will be used if no token specific configuration is set
     */
    function setDefaultRoyalty(TokenRoyalty calldata royalty) external;
}

File 3 of 35 : RoyaltyOverrideCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import "./IRoyaltyOverride.sol";
import "../specs/IEIP2981.sol";

/**
 * Simple EIP2981 reference override implementation
 */
abstract contract EIP2981RoyaltyOverrideCore is IEIP2981, IEIP2981RoyaltyOverride, ERC165 {
    using EnumerableSet for EnumerableSet.UintSet;

    TokenRoyalty public defaultRoyalty;
    mapping(uint256 => TokenRoyalty) private _tokenRoyalties;
    EnumerableSet.UintSet private _tokensWithRoyalties;

    function supportsInterface(bytes4 interfaceId) public view virtual override (ERC165, IERC165) returns (bool) {
        return interfaceId == type(IEIP2981).interfaceId || interfaceId == type(IEIP2981RoyaltyOverride).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Sets token royalties. When you override this in the implementation contract
     * ensure that you access restrict it to the contract owner or admin
     */
    function _setTokenRoyalties(TokenRoyaltyConfig[] memory royaltyConfigs) internal {
        for (uint256 i = 0; i < royaltyConfigs.length; i++) {
            TokenRoyaltyConfig memory royaltyConfig = royaltyConfigs[i];
            require(royaltyConfig.bps < 10000, "Invalid bps");
            if (royaltyConfig.recipient == address(0)) {
                delete _tokenRoyalties[royaltyConfig.tokenId];
                _tokensWithRoyalties.remove(royaltyConfig.tokenId);
                emit TokenRoyaltyRemoved(royaltyConfig.tokenId);
            } else {
                _tokenRoyalties[royaltyConfig.tokenId] = TokenRoyalty(royaltyConfig.recipient, royaltyConfig.bps);
                _tokensWithRoyalties.add(royaltyConfig.tokenId);
                emit TokenRoyaltySet(royaltyConfig.tokenId, royaltyConfig.recipient, royaltyConfig.bps);
            }
        }
    }

    /**
     * @dev Sets default royalty. When you override this in the implementation contract
     * ensure that you access restrict it to the contract owner or admin
     */
    function _setDefaultRoyalty(TokenRoyalty memory royalty) internal {
        require(royalty.bps < 10000, "Invalid bps");
        defaultRoyalty = TokenRoyalty(royalty.recipient, royalty.bps);
        emit DefaultRoyaltySet(royalty.recipient, royalty.bps);
    }

    /**
     * @dev See {IEIP2981RoyaltyOverride-getTokenRoyaltiesCount}.
     */
    function getTokenRoyaltiesCount() external view override returns (uint256) {
        return _tokensWithRoyalties.length();
    }

    /**
     * @dev See {IEIP2981RoyaltyOverride-getTokenRoyaltyByIndex}.
     */
    function getTokenRoyaltyByIndex(uint256 index) external view override returns (TokenRoyaltyConfig memory) {
        uint256 tokenId = _tokensWithRoyalties.at(index);
        TokenRoyalty memory royalty = _tokenRoyalties[tokenId];
        return TokenRoyaltyConfig(tokenId, royalty.recipient, royalty.bps);
    }

    /**
     * @dev See {IEIP2981RoyaltyOverride-royaltyInfo}.
     */
    function royaltyInfo(uint256 tokenId, uint256 value) public view override returns (address, uint256) {
        if (_tokenRoyalties[tokenId].recipient != address(0)) {
            return (_tokenRoyalties[tokenId].recipient, value * _tokenRoyalties[tokenId].bps / 10000);
        }
        if (defaultRoyalty.recipient != address(0) && defaultRoyalty.bps != 0) {
            return (defaultRoyalty.recipient, value * defaultRoyalty.bps / 10000);
        }
        return (address(0), 0);
    }
}

File 4 of 35 : IEIP2981.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * EIP-2981
 */
interface IEIP2981 {
    /**
     * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
     *
     * => 0x2a55205a = 0x2a55205a
     */
    function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);
}

File 5 of 35 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 6 of 35 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 7 of 35 : 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 8 of 35 : 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 9 of 35 : 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 10 of 35 : 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 11 of 35 : 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 12 of 35 : 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 13 of 35 : 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 14 of 35 : 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 15 of 35 : 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 16 of 35 : 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 17 of 35 : 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 18 of 35 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 19 of 35 : IContractAllowListProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

interface IContractAllowListProxy {
    function isAllowed(address _transferer, uint256 _level)
        external
        view
        returns (bool);
}

File 20 of 35 : ERC721AntiScam.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./IERC721AntiScam.sol";
import "./lockable/ERC721Lockable.sol";
import "./restrictApprove/ERC721RestrictApprove.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/// @title AntiScam機能付きERC721A
/// @dev Readmeを見てください。

abstract contract ERC721AntiScam is
    IERC721AntiScam,
    ERC721Lockable,
    ERC721RestrictApprove,
    Ownable
{

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
        returns (bool)
    {
        if (isLocked(owner) || !_isAllowed(owner, operator)) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        require(
            isLocked(msg.sender) == false || approved == false,
            "Can not approve locked token"
        );
        require(
            _isAllowed(operator) || approved == false,
            "RestrictApprove: Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(address to, uint256 tokenId)
        internal
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        ERC721Lockable._beforeApprove(to, tokenId);
        ERC721RestrictApprove._beforeApprove(to, tokenId);
    }

    function approve(address to, uint256 tokenId)
        public
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        _beforeApprove(to, tokenId);
        ERC721Psi.approve(to, tokenId);
    }

    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override(ERC721Psi, ERC721Lockable) {
        ERC721Lockable._beforeTokenTransfers(from, to, startTokenId, quantity);
    }

    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override(ERC721Lockable, ERC721RestrictApprove) {
        ERC721Lockable._afterTokenTransfers(from, to, startTokenId, quantity);
        ERC721RestrictApprove._afterTokenTransfers(from, to, startTokenId, quantity);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
        returns (bool)
    {
        return
            ERC721Psi.supportsInterface(interfaceId) ||
            ERC721Lockable.supportsInterface(interfaceId) ||
            ERC721RestrictApprove.supportsInterface(interfaceId) ||
            interfaceId == type(IERC721AntiScam).interfaceId;
    }
}

File 21 of 35 : IERC721AntiScam.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./lockable/IERC721Lockable.sol";
import "./restrictApprove/IERC721RestrictApprove.sol";

/// @title IERC721AntiScam
/// @dev 詐欺防止機能付きコントラクトのインターフェース
/// @author hayatti.eth

interface IERC721AntiScam is IERC721Lockable, IERC721RestrictApprove {
}

File 22 of 35 : ERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.8;

import "./IERC721Lockable.sol";
import "erc721psi/contracts/extension/ERC721PsiBurnable.sol";

/// @title トークンのtransfer抑止機能付きコントラクト
/// @dev Readmeを見てください。

abstract contract ERC721Lockable is ERC721PsiBurnable, IERC721Lockable {
    /*//////////////////////////////////////////////////////////////
    ロック変数。トークンごとに個別ロック設定を行う
    //////////////////////////////////////////////////////////////*/
    bool public enableLock = true;
    LockStatus public contractLockStatus = LockStatus.UnLock;

    // token lock
    mapping(uint256 => LockStatus) public tokenLock;

    // wallet lock
    mapping(address => LockStatus) public walletLock;

    /*//////////////////////////////////////////////////////////////
    modifier
    //////////////////////////////////////////////////////////////*/
    modifier existToken(uint256 tokenId) {
        require(
            _exists(tokenId),
            "Lockable: locking query for nonexistent token"
        );
        _;
    }

    /*///////////////////////////////////////////////////////////////
    ロック機能ロジック
    //////////////////////////////////////////////////////////////*/

    // function getLockStatus(uint256 tokenId) external view returns (LockStatus) existToken(tokenId) {
    //     return _getLockStatus(ownerOf(tokenId), tokenId);
    // }

    function isLocked(uint256 tokenId)
        public
        view
        virtual
        existToken(tokenId)
        returns (bool)
    {
        if (!enableLock) {
            return false;
        }

        if (
            tokenLock[tokenId] == LockStatus.Lock ||
            (tokenLock[tokenId] == LockStatus.UnSet &&
                isLocked(ownerOf(tokenId)))
        ) {
            return true;
        }

        return false;
    }

    function isLocked(address holder) public view virtual returns (bool) {
        if (!enableLock) {
            return false;
        }

        if (
            walletLock[holder] == LockStatus.Lock ||
            (walletLock[holder] == LockStatus.UnSet &&
                contractLockStatus == LockStatus.Lock)
        ) {
            return true;
        }

        return false;
    }

    function getTokensUnderLock()
        public
        view
        virtual
        returns (uint256[] memory)
    {
        uint256 start = _startTokenId();
        uint256 end = _nextTokenId();

        return getTokensUnderLock(start, end);
    }

    function getTokensUnderLock(uint256 start, uint256 end)
        public
        view
        virtual
        returns (uint256[] memory)
    {
        bool[] memory lockList = new bool[](end - start + 1);
        uint256 i = 0;
        uint256 lockCount = 0;
        for (uint256 tokenId = start; tokenId <= end; tokenId++) {
            if (_exists(tokenId) && isLocked(tokenId)) {
                lockList[i] = true;
                lockCount++;
            } else {
                lockList[i] = false;
            }

            i++;
        }

        uint256[] memory tokensUnderLock = new uint256[](lockCount);

        i = 0;
        uint256 j = 0;
        for (uint256 tokenId = start; tokenId <= end; tokenId++) {
            if (lockList[i]) {
                tokensUnderLock[j] = tokenId;
                j++;
            }

            i++;
        }

        return tokensUnderLock;
    }

    function _deleteTokenLock(uint256 tokenId) internal virtual {
        delete tokenLock[tokenId];
    }

    function _setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus)
        internal
        virtual
    {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            tokenLock[tokenIds[i]] = lockStatus;
            emit TokenLock(
                ownerOf(tokenIds[i]),
                tokenIds[i],
                lockStatus,
                block.timestamp
            );
        }
    }

    function _setWalletLock(address to, LockStatus lockStatus)
        internal
        virtual
    {
        walletLock[to] = lockStatus;
        emit WalletLock(to, msg.sender, lockStatus);
    }

    function _setContractLock(LockStatus lockStatus) internal virtual {
        contractLockStatus = lockStatus;
    }

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        if (isLocked(owner)) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(
            isLocked(msg.sender) == false || approved == false,
            "Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(
        address, /**to**/
        uint256 tokenId
    ) internal virtual {
        require(
            isLocked(tokenId) == false,
            "Lockable: Can not approve locked token"
        );
    }

    function approve(address to, uint256 tokenId) public virtual override {
        _beforeApprove(to, tokenId);
        super.approve(to, tokenId);
    }

    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0) && to != address(0)) {
            // トークンがロックされている場合、転送を許可しない
            require(
                isLocked(startTokenId) == false,
                "Lockable: Can not transfer locked token"
            );
        }
    }

    function _afterTokenTransfers(
        address from,
        address, /*to*/
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0)) {
            // ロックをデフォルトに戻す。
            _deleteTokenLock(startTokenId);
        }
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC721Lockable).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 23 of 35 : IERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.8;

/**
 * @title IERC721Lockable
 * @dev トークンのtransfer抑止機能付きコントラクトのインターフェース
 * @author Lavulite
 */
interface IERC721Lockable {

   enum LockStatus {
      UnSet,
      UnLock,
      Lock
   }

    /**
     * @dev 個別ロックが指定された場合のイベント
     */
    //event TokenLock(address indexed holder, address indexed operator, LockStatus lockStatus, uint256 indexed tokenId);
    event TokenLock(address indexed holder, uint256 indexed tokenId, LockStatus indexed lockStatus, uint256 timestamp);
    
    /**
     * @dev ウォレットロックが指定された場合のイベント
     */
    event WalletLock(address indexed holder, address indexed operator, LockStatus lockStatus);

    /**
     * @dev 該当トークンIDのロックステータスを変更する。
     */
    function setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus) external;

    /**
     * @dev 該当ウォレットのロックステータスを変更する。
     */
    function setWalletLock(address to, LockStatus lockStatus) external;

    /**
     * @dev コントラクトのロックステータスを変更する。
     */
    function setContractLock(LockStatus lockStatus) external;

    /**
     * @dev 該当トークンIDがロックされているかを返す
     */
    function isLocked(uint256 tokenId) external view returns (bool);
    
    /**
     * @dev ウォレットロックを行っているかを返す
     */
    function isLocked(address holder) external view returns (bool);

    /**
     * @dev 転送が拒否されているトークンを全て返す
     */
    function getTokensUnderLock() external view returns (uint256[] memory);

    /**
     * @dev 転送が拒否されているstartからstopまでのトークンIDを返す
     */
    function getTokensUnderLock(uint256 start, uint256 end) external view returns (uint256[] memory);

}

File 24 of 35 : ERC721RestrictApprove.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "erc721psi/contracts/extension/ERC721PsiBurnable.sol";
import "./IERC721RestrictApprove.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
// import "../../proxy/interface/IContractAllowListProxy.sol";
import "contract-allow-list/contracts/proxy/interface/IContractAllowListProxy.sol";

/// @title AntiScam機能付きERC721A
/// @dev Readmeを見てください。

abstract contract ERC721RestrictApprove is ERC721PsiBurnable, IERC721RestrictApprove {
    using EnumerableSet for EnumerableSet.AddressSet;

    IContractAllowListProxy public CAL;
    EnumerableSet.AddressSet localAllowedAddresses;

    modifier onlyHolder(uint256 tokenId) {
        require(
            msg.sender == ownerOf(tokenId),
            "RestrictApprove: operation is only holder."
        );
        _;
    }

    /*//////////////////////////////////////////////////////////////
    変数
    //////////////////////////////////////////////////////////////*/
    bool public enableRestrict = true;

    // token lock
    mapping(uint256 => uint256) public tokenCALLevel;

    // wallet lock
    mapping(address => uint256) public walletCALLevel;

    // contract lock
    uint256 public CALLevel = 1;

    /*///////////////////////////////////////////////////////////////
    Approve抑制機能ロジック
    //////////////////////////////////////////////////////////////*/
    function _addLocalContractAllowList(address transferer)
        internal
        virtual
    {
        localAllowedAddresses.add(transferer);
        emit LocalCalAdded(msg.sender, transferer);
    }

    function _removeLocalContractAllowList(address transferer)
        internal
        virtual
    {
        localAllowedAddresses.remove(transferer);
        emit LocalCalRemoved(msg.sender, transferer);
    }

    function _getLocalContractAllowList()
        internal
        virtual
        view
        returns(address[] memory)
    {
        return localAllowedAddresses.values();
    }

    function _isLocalAllowed(address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        return localAllowedAddresses.contains(transferer);
    }

    function _isAllowed(address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        return _isAllowed(msg.sender, transferer);
    }

    function _isAllowed(uint256 tokenId, address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        uint256 level = _getCALLevel(msg.sender, tokenId);
        return _isAllowed(transferer, level);
    }

    function _isAllowed(address holder, address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        uint256 level = _getCALLevel(holder);
        return _isAllowed(transferer, level);
    }

    function _isAllowed(address transferer, uint256 level)
        internal
        view
        virtual
        returns (bool)
    {
        if (!enableRestrict) {
            return true;
        }

        return _isLocalAllowed(transferer) || CAL.isAllowed(transferer, level);
    }

    function _getCALLevel(address holder, uint256 tokenId)
        internal
        view
        virtual
        returns (uint256)
    {
        if (tokenCALLevel[tokenId] > 0) {
            return tokenCALLevel[tokenId];
        }

        return _getCALLevel(holder);
    }

    function _getCALLevel(address holder)
        internal
        view
        virtual
        returns (uint256)
    {
        if (walletCALLevel[holder] > 0) {
            return walletCALLevel[holder];
        }

        return CALLevel;
    }

    function _setCAL(address _cal) internal virtual {
        CAL = IContractAllowListProxy(_cal);
    }

    function _deleteTokenCALLevel(uint256 tokenId) internal virtual {
        delete tokenCALLevel[tokenId];
    }

    function setTokenCALLevel(uint256 tokenId, uint256 level)
        external
        virtual
        onlyHolder(tokenId)
    {
        tokenCALLevel[tokenId] = level;
    }

    function setWalletCALLevel(uint256 level)
        external
        virtual
    {
        walletCALLevel[msg.sender] = level;
    }

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        if (_isAllowed(owner, operator) == false) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(
            _isAllowed(operator) || approved == false,
            "RestrictApprove: Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(address to, uint256 tokenId)
        internal
        virtual
    {
        if (to != address(0)) {
            require(_isAllowed(tokenId, to), "RestrictApprove: The contract is not allowed.");
        }
    }

    function approve(address to, uint256 tokenId)
        public
        virtual
        override
    {
        _beforeApprove(to, tokenId);
        super.approve(to, tokenId);
    }

    function _afterTokenTransfers(
        address from,
        address, /*to*/
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0)) {
            // CALレベルをデフォルトに戻す。
            _deleteTokenCALLevel(startTokenId);
        }
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC721RestrictApprove).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 25 of 35 : IERC721RestrictApprove.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title IERC721RestrictApprove
/// @dev Approve抑制機能付きコントラクトのインターフェース
/// @author Lavulite

interface IERC721RestrictApprove {
    /**
     * @dev CALレベルが変更された場合のイベント
     */
    event CalLevelChanged(address indexed operator, uint256 indexed level);
    
    /**
     * @dev LocalContractAllowListnに追加された場合のイベント
     */
    event LocalCalAdded(address indexed operator, address indexed transferer);

    /**
     * @dev LocalContractAllowListnに削除された場合のイベント
     */
    event LocalCalRemoved(address indexed operator, address indexed transferer);

    /**
     * @dev CALを利用する場合のCALのレベルを設定する。レベルが高いほど、許可されるコントラクトの範囲が狭い。
     */
    function setCALLevel(uint256 level) external;

    /**
     * @dev CALのアドレスをセットする。
     */
    function setCAL(address calAddress) external;

    /**
     * @dev CALのリストに無い独自の許可アドレスを追加する場合、こちらにアドレスを記載する。
     */
    function addLocalContractAllowList(address transferer) external;

    /**
     * @dev CALのリストにある独自の許可アドレスを削除する場合、こちらにアドレスを記載する。
     */
    function removeLocalContractAllowList(address transferer) external;

    /**
     * @dev CALのリストにある独自の許可アドレスの一覧を取得する。
     */
    function getLocalContractAllowList() external view returns(address[] memory);

}

File 26 of 35 : ERC721AntiScamAddressData.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
// import "contract-allow-list/contracts/ERC721AntiScam/ERC721AntiScam.sol";
import "./base/ERC721AntiScam/ERC721AntiScam.sol";

abstract contract ERC721AntiScamAddressData is ERC721AntiScam{
    /* ==================================================================
     * This section is derived from ERC721PsiAddressData
     * Splits the aux to record sales information on the "allow list"
     * ==================================================================*/
    // Mapping owner address to address data
    mapping(address => AddressData) _addressData;

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        //uint64 aux;
        // Keeps track of recent sale index
        uint16 saleIndex;
        // Keeps track of the consumed amount of allocations in the recent sale
        uint16 numberConsumedInRecentSale;
        // New aux
        uint32 aux;
    }

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

    /**
     * @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 override virtual {
        require(quantity < 2 ** 64);
        uint64 _quantity = uint64(quantity);

        if(from != address(0)){
            _addressData[from].balance -= _quantity;
        } else {
            // Mint
            _addressData[to].numberMinted += _quantity;
        }

        if(to != address(0)){
            _addressData[to].balance += _quantity;
        } else {
            // Burn
            _addressData[from].numberBurned += _quantity;
        }
        super._afterTokenTransfers(from, to, startTokenId, quantity);
    }
}

File 27 of 35 : ERC721BasicFrame.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@manifoldxyz/royalty-registry-solidity/contracts/overrides/RoyaltyOverrideCore.sol";
import "contract-allow-list/contracts/proxy/interface/IContractAllowListProxy.sol";
import "./ERC721AntiScamAddressData.sol";
import "./interface/ISalesItem.sol";
import "./interface/IERC4906.sol";

abstract contract ERC721BasicFrameControlable is 
    ISalesItem,
    AccessControl,
    Ownable,
    ERC721AntiScamAddressData,
    EIP2981RoyaltyOverrideCore,
    IERC4906
{

    ///////////////////////////////////////////////////////////////////////////
    // Constants
    ///////////////////////////////////////////////////////////////////////////
    bytes32 public constant ADMIN = keccak256("ADMIN");  
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
    bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
    bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
    bytes32 public constant LOCK_ROLE = keccak256("LOCK_ROLE");

    constructor(uint256 _maxSupply){
        maxSupply = _maxSupply;
    }

    ///////////////////////////////////////////////////////////////////////////
    // Variables
    ///////////////////////////////////////////////////////////////////////////
    uint256 public maxSupply;

    // Mapping from tokenId to uint256 aux
    mapping(uint256 => uint256) private _tokenAux;

    // Allow direct contract lock
    bool public isDirectContractLock;   // default:false
    /* time lock  */
    uint256 public unlockLeadTime = 3 hours;
	// tokenId -> unlock time
	mapping(uint256 => uint256) internal unlockTokenTimestamp;

	// wallet -> unlock time
	mapping(address => uint256) internal unlockWalletTimestamp;

    // SBT
    bool public isSBT;  // default:false

    ///////////////////////////////////////////////////////////////////////////
    // Error Functions
    ///////////////////////////////////////////////////////////////////////////
    error MaxSupplyExceeded();
    error ProhibitedBecauseSBT();
    error NotTokenHolder();
    error TokenNonexistent(uint256 tokenId);

    ///////////////////////////////////////////////////////////////////////////
    // External Mint / Burn function
    ///////////////////////////////////////////////////////////////////////////
    function externalMint(address to, uint256 quantity) external onlyRole(MINTER_ROLE) {
        _mint(to, quantity);
    }

    function sellerMint(address to, uint256 quantity) external onlyRole(SELLER_ROLE) {
        _mint(to, quantity);
    }

    function externalBurn(uint256 tokenId) external onlyRole(BURNER_ROLE) {
        _burn(tokenId);
    }

    function sellerBurn(uint256 tokenId) external onlyRole(SELLER_ROLE) {
        _burn(tokenId);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Override function : _mint
    ///////////////////////////////////////////////////////////////////////////
    function _mint(address to, uint256 quantity) internal override {
        if (quantity + totalSupply() > maxSupply) revert MaxSupplyExceeded();
        super._mint(to, quantity);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Number burned function
    ///////////////////////////////////////////////////////////////////////////
    function burned() external view returns(uint256){
        return _burned();
    }

    ///////////////////////////////////////////////////////////////////////////
    // Setter functions : Aux region of _addressData
    ///////////////////////////////////////////////////////////////////////////

    function setConsumedAllocation(address _target, uint16 _currentSaleIndex, uint16 _consumed)
        external
        virtual
        onlyRole(SELLER_ROLE)
    {
        // Grab memory
        AddressData memory data = _addressData[_target];
        data.saleIndex = _currentSaleIndex;
        data.numberConsumedInRecentSale = _consumed;
        _addressData[_target] = data;
    }

    function addConsumedAllocation(address _target, uint16 _currentSaleIndex, uint16 _consumed)
        external
        virtual
        onlyRole(SELLER_ROLE)
    {
        // Grab memory
        AddressData memory data = _addressData[_target];
        // If previous sale was recorded in the data, updates it with the current sale
        if (data.saleIndex != _currentSaleIndex){
            data.saleIndex = _currentSaleIndex;
            data.numberConsumedInRecentSale = _consumed;
        } else {
            data.numberConsumedInRecentSale += _consumed;
        }
        _addressData[_target] = data;
    }

    function _setAddressAux(address _target, uint32 _aux)
        internal
        virtual
    {
        _addressData[_target].aux = _aux;
    }

    ///////////////////////////////////////////////////////////////////////////
    // Setter functions : TokenId Aux
    ///////////////////////////////////////////////////////////////////////////
    function _setTokenAux(uint256 tokenId, uint256 aux) internal virtual{
        _tokenAux[tokenId] = aux;
    }

    ///////////////////////////////////////////////////////////////////////////
    // ERC-4906
    ///////////////////////////////////////////////////////////////////////////
	function refreshMetadata(uint256 _tokenId) external onlyAdmin {
		emit MetadataUpdate(_tokenId);
	}

	function refreshMetadata(uint256 _fromTokenId, uint256 _toTokenId) external onlyAdmin {
		emit BatchMetadataUpdate(_fromTokenId, _toTokenId);
	}

    ///////////////////////////////////////////////////////////////////////////
    // EIP2981RoyaltyOverrideCore
    ///////////////////////////////////////////////////////////////////////////
    function setTokenRoyalties(TokenRoyaltyConfig[] calldata royaltyConfigs)
        external
        override
        onlyAdmin
    {
        _setTokenRoyalties(royaltyConfigs);
    }

    function setDefaultRoyalty(TokenRoyalty calldata royalty)
        external
        override
        onlyAdmin
    {
        _setDefaultRoyalty(royalty);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Setter functions : basic
    ///////////////////////////////////////////////////////////////////////////
    function setMaxSupply(uint256 _value) external onlyAdmin {
        maxSupply = _value;
    }

    function setDirectContractLock(bool _state) external onlyAdmin {
        isDirectContractLock = _state;
    }

    function setUnlockLeadTime(uint256 _value) external onlyAdmin {
		unlockLeadTime = _value;
	}

    function setIsSBT(bool _state) external onlyAdmin {
        isSBT = _state;
    }

    ///////////////////////////////////////////////////////////////////////////
    // Essential getter functions
    ///////////////////////////////////////////////////////////////////////////
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl, IERC165, ERC721AntiScam,EIP2981RoyaltyOverrideCore)
        returns (bool)
    {
        return
            interfaceId == type(ISalesItem).interfaceId ||
            ERC721AntiScam.supportsInterface(interfaceId) ||
            AccessControl.supportsInterface(interfaceId) ||
            EIP2981RoyaltyOverrideCore.supportsInterface(interfaceId) ||
            super.supportsInterface(interfaceId);
    }

    ///////////////////////////////////////////////////////////////////////////
    // AntiScam functions : Enabler
    ///////////////////////////////////////////////////////////////////////////
    function setEnableRestrict(bool value) external onlyAdmin {
        enableRestrict = value;
    }

    function setEnableLock(bool value) external onlyAdmin {
        enableLock = value;
    }

    ///////////////////////////////////////////////////////////////////////////
    // Override functions : IERC721RestrictApprove
    ///////////////////////////////////////////////////////////////////////////
    function setCALLevel(uint256 level) external onlyAdmin{
        CALLevel = level;
    }

    function setCAL(address calAddress) external onlyAdmin{
        _setCAL(calAddress);
    }

    function addLocalContractAllowList(address transferer) external onlyAdmin{
        _addLocalContractAllowList(transferer);
    }

    function removeLocalContractAllowList(address transferer) external onlyAdmin{
        _removeLocalContractAllowList(transferer);
    }

    function getLocalContractAllowList() external view returns(address[] memory){
        return _getLocalContractAllowList();
    }

    ///////////////////////////////////////////////////////////////////////////
    // external functions : Locable
    ///////////////////////////////////////////////////////////////////////////
    function setTokenLockEx(uint256[] calldata _tokenIds, uint256 _lockStatus)
        external
        onlyRole(LOCK_ROLE)
    {
        LockStatus _lockStatusCnvert;
        if(_lockStatus == uint256(LockStatus.UnSet)){
            _lockStatusCnvert = LockStatus.UnSet;
        }else if(_lockStatus == uint256(LockStatus.UnLock)){
            _lockStatusCnvert = LockStatus.UnLock;
        }else{  // Lock
            _lockStatusCnvert = LockStatus.Lock;
        }
        _setTokenLock(_tokenIds, _lockStatusCnvert);

        for (uint256 i = 0; i < _tokenIds.length; i++) {
			emit MetadataUpdate(_tokenIds[i]);
		}
    }

    function setWalletLockEx(address _to, uint256 _lockStatus)
        external
        onlyRole(LOCK_ROLE)
    {
        LockStatus _lockStatusCnvert;
        if(_lockStatus == uint256(LockStatus.UnSet)){
            _lockStatusCnvert = LockStatus.UnSet;
        }else if(_lockStatus == uint256(LockStatus.UnLock)){
            _lockStatusCnvert = LockStatus.UnLock;
        }else{  // Lock
            _lockStatusCnvert = LockStatus.Lock;
        }
        _setWalletLock(_to, _lockStatusCnvert);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Override functions : ERC721Locable
    ///////////////////////////////////////////////////////////////////////////
    function setTokenLock(uint256[] calldata _tokenIds, LockStatus _lockStatus)
        external
        virtual
        override
    {
        require(isDirectContractLock == true,"not allow");
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            if (msg.sender != ownerOf(_tokenIds[i])) revert NotTokenHolder();
        }

        for (uint256 i = 0; i < _tokenIds.length; i++) {
			if (_isTokenLockToUnlock(_tokenIds[i], _lockStatus)) {
				unlockTokenTimestamp[_tokenIds[i]] = block.timestamp;
			}
		}

        _setTokenLock(_tokenIds, _lockStatus);

        for (uint256 i = 0; i < _tokenIds.length; i++) {
			emit MetadataUpdate(_tokenIds[i]);
		}
    }

    function setWalletLock(address _to, LockStatus _lockStatus)
        external
        virtual
        override
    {
        require(isDirectContractLock == true,"not allow");
        require(_to == msg.sender, "not yourself.");

        if (walletLock[_to] == LockStatus.Lock && _lockStatus != LockStatus.Lock) {
			unlockWalletTimestamp[_to] = block.timestamp;
		}

        _setWalletLock(_to, _lockStatus);
    }

    function setContractLock(LockStatus lockStatus) external onlyAdmin{
        _setContractLock(lockStatus);
    }

    function _isTokenLockToUnlock(uint256 _tokenId, LockStatus _newLockStatus) private view returns (bool) {
		if (_newLockStatus == LockStatus.UnLock) {
			LockStatus currentWalletLock = walletLock[msg.sender];
			bool isWalletLock_TokenLockOrUnset = (currentWalletLock == LockStatus.Lock &&
				tokenLock[_tokenId] != LockStatus.UnLock);
			bool isWalletUnlockOrUnset_TokenLock = (currentWalletLock != LockStatus.Lock &&
				tokenLock[_tokenId] == LockStatus.Lock);

			return isWalletLock_TokenLockOrUnset || isWalletUnlockOrUnset_TokenLock;
		} else if (_newLockStatus == LockStatus.UnSet) {
			LockStatus currentWalletLock = walletLock[msg.sender];
			bool isNotWalletLock = currentWalletLock != LockStatus.Lock;
			bool isTokenLock = tokenLock[_tokenId] == LockStatus.Lock;

			return isNotWalletLock && isTokenLock;
		} else {
			return false;
		}
	}

	function _isTokenTimeLock(uint256 _tokenId) private view returns (bool) {
		return unlockTokenTimestamp[_tokenId] + unlockLeadTime > block.timestamp;
	}

	function _isWalletTimeLock(uint256 _tokenId) private view returns (bool) {
		return unlockWalletTimestamp[ownerOf(_tokenId)] + unlockLeadTime > block.timestamp;
	}

	function isLocked(uint256 _tokenId) public view override(IERC721Lockable, ERC721Lockable) returns (bool) {
        if(isDirectContractLock == true){
            // TimeLock
            return ERC721Lockable.isLocked(_tokenId) || _isTokenTimeLock(_tokenId) || _isWalletTimeLock(_tokenId);
        }else{
            return ERC721Lockable.isLocked(_tokenId);
        }
	}

    ///////////////////////////////////////////////////////////////////////////
    // Queriable (for block gas limit)
    ///////////////////////////////////////////////////////////////////////////
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view virtual returns (uint256[] memory) {
        unchecked {
            require(start < stop, "start must be greater than stop.");
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }

            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }

            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }

            for (
                uint256 i = start;
                i != stop && tokenIdsIdx != tokenIdsMaxLength;
                ++i
            ) {
                if (_exists(i)) {
                    if (ownerOf(i) == owner) {
                        tokenIds[tokenIdsIdx++] = i;
                    }
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    ///////////////////////////////////////////////////////////////////////////
    // Internal State functions : TokenId Aux
    ///////////////////////////////////////////////////////////////////////////
    function _getAddressAux(address _target) internal virtual view returns(uint32){
        return _addressData[_target].aux;
    }
    
    function _getTokenAux(uint256 tokenId) internal virtual view returns(uint256){
        return _tokenAux[tokenId];
    }

    ///////////////////////////////////////////////////////////////////////////
    // override AccessControl
    ///////////////////////////////////////////////////////////////////////////
    function grantRole(bytes32 role, address account)
        public
        override
        onlyAdmin
    {
        require(role != ADMIN, "not admin only.");
        _grantRole(role, account);
    }

    function revokeRole(bytes32 role, address account)
        public
        override
        onlyAdmin
    {
        require(role != ADMIN, "not admin only.");
        _revokeRole(role, account);
    }

    function grantAdmin(address account) external onlyOwner {
        _grantRole(ADMIN, account);
    }

    function revokeAdmin(address account) external onlyOwner {
        _revokeRole(ADMIN, account);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Modifiers
    ///////////////////////////////////////////////////////////////////////////
    modifier onlyAdmin() {
        _checkRole(ADMIN);
        _;
    }

}

abstract contract ERC721BasicFrame is ERC721BasicFrameControlable {
    using Strings for uint256;

    ///////////////////////////////////////////////////////////////////////////
    // Constructor
    ///////////////////////////////////////////////////////////////////////////
    constructor(string memory _name, string memory _symbol, uint256 maxSupply) 
        ERC721Psi(_name, _symbol)
        ERC721BasicFrameControlable(maxSupply)
    {
        _grantRole(ADMIN, msg.sender);
    }

    ///////////////////////////////////////////////////////////////////////////
    // State functions : Aux region of _addressData
    ///////////////////////////////////////////////////////////////////////////
    /*
     * @dev Returns consumed allocation in the current sale
     */
    function getConsumedAllocation(address _target, uint16 _currentSaleIndex) external view virtual returns(uint16){
        // Grab stuck
        AddressData memory data = _addressData[_target];
        // If previous sale was recorded in the data, updates it with the current sale
        if (data.saleIndex != _currentSaleIndex){
            return 0;
        } 
        return data.numberConsumedInRecentSale;
    }
    
    ///////////////////////////////////////////////////////////////////////////
    // Transfer functions
    ///////////////////////////////////////////////////////////////////////////
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override {
        if (
            isSBT &&
            from != address(0) &&
            to != address(0x000000000000000000000000000000000000dEaD)
        ) revert ProhibitedBecauseSBT();
        super._beforeTokenTransfers(from, to, startTokenId, quantity);
    }

    ///////////////////////////////////////////////////////////////////////////
    // Approve functions
    ///////////////////////////////////////////////////////////////////////////
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        if (approved){
            if (isSBT) revert ProhibitedBecauseSBT();
        }
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId)
        public
        virtual
        override
    {
        if (operator != address(0)) {
            if (isSBT) revert ProhibitedBecauseSBT();
        }
        super.approve(operator, tokenId);
    }
}

File 28 of 35 : IERC4906.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity >=0.7.0 <0.9.0;
import { IERC165, ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/// @title EIP-721 Metadata Update Extension
interface IERC4906 is IERC165 {
	/// @dev This event emits when the metadata of a token is changed.
	/// So that the third-party platforms such as NFT market could
	/// timely update the images and related attributes of the NFT.
	event MetadataUpdate(uint256 _tokenId);

	/// @dev This event emits when the metadata of a range of tokens is changed.
	/// So that the third-party platforms such as NFT market could
	/// timely update the images and related attributes of the NFTs.
	event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}

File 29 of 35 : IRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

interface IRouter{
    function tokenURI(uint256 _tokenId) external view returns(string memory);
    function tokenURI(uint256 _tokenId,uint256 _param) external view returns(string memory);
}

File 30 of 35 : ISalesItem.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

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

interface ISalesItem is IERC165{
    function sellerMint(address to, uint256 quantity) external;
    function sellerBurn(uint256 tokenId) external;
    function burned() external view returns(uint256);
    function getConsumedAllocation(address _target, uint16 _currentSaleIndex) external view returns(uint16);
    function setConsumedAllocation(address _target, uint16 _currentSaleIndex, uint16 _consumed) external;
    function addConsumedAllocation(address _target, uint16 _currentSaleIndex, uint16 _consumed) external;
    function updateToken(uint256 tokenId) external;
}

File 31 of 35 : BitOperator.sol
//// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

library BitOperator{
    string private constant ERROR_OVERFLOW = "position should overflow";
    function getBitValueUint8(uint256 value, uint256 pos) internal pure returns(uint8){
        if (pos > 248) revert(ERROR_OVERFLOW);
        // return uint8(value >> (pos*8));
        return uint8(value >> pos);
    }

    function getBitValueBool(uint256 value, uint256 pos) internal pure returns(bool){
        if (pos > 255) revert(ERROR_OVERFLOW);
        return ((value >> pos) & 0x01 == 1);
    }

    function setBitValueUint8(uint256 value, uint256 pos, uint8 set) internal pure returns(uint256){
        if (pos > 248) revert(ERROR_OVERFLOW);
        // return (value & ~(0xFF << (pos*8))) | (uint256(set) << (pos*8));
        return (value & ~(0xFF << pos)) | (uint256(set) << pos);
    }

    function setBitValueBool(uint256 value, uint256 pos, bool set) internal pure returns(uint256){
        if (pos > 255) revert(ERROR_OVERFLOW);
        return (value & ~(0x01 << pos)) | ((set ? uint256(1) : uint256(0)) << pos);
    }

}

File 32 of 35 : 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 "solidity-bits/contracts/BitMaps.sol";


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

    BitMaps.BitMap private _batchHead;

    string private _name;
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) internal _owners;
    uint256 private _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(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _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 0;
    }

    /**
     * @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)
        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 (uint) 
    {
        require(owner != address(0), "ERC721Psi: balance query for the zero address");

        uint count;
        for( uint 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];
    }

    /**
     * @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 = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

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


    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = 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;
    }

    /**
     * @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;
        _batchHead.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 totalSupply() public virtual 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 33 of 35 : 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 34 of 35 : 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";

/**
 * @dev This Library is a modified version of Openzeppelin's BitMaps library.
 * 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.
*/

/**
 * @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 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 35 of 35 : 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]);
        } 
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidUpdateIndex","type":"error"},{"inputs":[],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"NotTokenHolder","type":"error"},{"inputs":[],"name":"ProhibitedBecauseSBT","type":"error"},{"inputs":[],"name":"RouterNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNonexistent","type":"error"},{"inputs":[],"name":"ZeroUpdateIndex","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"}],"name":"CalLevelChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint16","name":"bps","type":"uint16"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"updateIndex","type":"uint8"}],"name":"IncreaseUpdateIndex","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"transferer","type":"address"}],"name":"LocalCalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"transferer","type":"address"}],"name":"LocalCalRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokenLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenRoyaltyRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint16","name":"bps","type":"uint16"}],"name":"TokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"updateIndex","type":"uint8"}],"name":"UpdateToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"WalletLock","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CAL","outputs":[{"internalType":"contract IContractAllowListProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SELLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"uint16","name":"_currentSaleIndex","type":"uint16"},{"internalType":"uint16","name":"_consumed","type":"uint16"}],"name":"addConsumedAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"addLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","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":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractLockStatus","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentUpdateIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyalty","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableRestrict","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"externalBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"externalMint","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":"_target","type":"address"},{"internalType":"uint16","name":"_currentSaleIndex","type":"uint16"}],"name":"getConsumedAllocation","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLocalContractAllowList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenRoyaltiesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getTokenRoyaltyByIndex","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyaltyConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenUpdateIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"increaseCurrentUpdateIndex","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDirectContractLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSBT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"refreshMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"refreshMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"removeLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"sellerBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"sellerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"calAddress","type":"address"}],"name":"setCAL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"uint16","name":"_currentSaleIndex","type":"uint16"},{"internalType":"uint16","name":"_consumed","type":"uint16"}],"name":"setConsumedAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setContractLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyalty","name":"royalty","type":"tuple"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setDirectContractLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setEnableLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setEnableRestrict","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setIsSBT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRouter","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setTokenCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"enum IERC721Lockable.LockStatus","name":"_lockStatus","type":"uint8"}],"name":"setTokenLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setTokenLockByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_lockStatus","type":"uint256"}],"name":"setTokenLockEx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct IEIP2981RoyaltyOverride.TokenRoyaltyConfig[]","name":"royaltyConfigs","type":"tuple[]"}],"name":"setTokenRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setUnlockLeadTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setWalletCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"enum IERC721Lockable.LockStatus","name":"_lockStatus","type":"uint8"}],"name":"setWalletLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_lockStatus","type":"uint256"}],"name":"setWalletLockEx","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":"","type":"uint256"}],"name":"tokenCALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenLock","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"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":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","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":"unlockLeadTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"updateToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletCALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletLock","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

608060405234620024c75762000014620024cc565b600a8152692220a7902432b0bb32b760b11b602082015262000035620024cc565b600381526222242b60e91b602082015281516001600160401b038111620023c557600254600181811c91168015620024bc575b6020821014620023a457601f811162002452575b50602092601f8211600114620023e75792819293600092620023db575b50508160011b916000199060031b1c1916176002555b80516001600160401b038111620023c557600354600181811c91168015620023ba575b6020821014620023a457601f81116200233a575b50602091601f8211600114620022d057918192600092620022c4575b50508160011b916000199060031b1c1916176003555b600060055561010161ffff196009541617600955600160ff19600f541617600f5560016012556013543360018060a01b0319821617601355339060018060a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3612a30601c556103096019553360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b760205260409020547fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff161562002280575b507f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe41604062000214620024cc565b61ffff73fbb189698a54570d5c82399486049b6f5d00892391828152602081019260206103e89182865262000248620024cc565b9081520152601580546001600160b01b0319167503e8fbb189698a54570d5c82399486049b6f5d00892317905551915183516001600160a01b03939093168352166020820152a13360009081527f0781d7cac9c378efa22a7481e4d4d29704a680ddf504b3bc50b517700ee11e6c60205260409020547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69060ff16156200223c575b503360009081527f6bc61e8d8a7feeba9a3dfbe950298fbca23cf0136992f9ef92f1b5529ac870ae60205260409020547f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8489060ff1615620021f8575b503360009081527f738678fe42df6a4211eb7628ac9b056229141839eb4f4ef4cc249f1d36e8c92160205260409020547f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab9060ff1615620021b4575b50600554600060018260081c018260081c1162001d3757805b60018360081c0182106200216f57620003d69150826200250a565b6001018060011162001c9f576019541062001cd95733156200211e5760ff601f54168062002115575b8062002108575b62001cb55760018101811162001c9f576001810160055580600052600460205260406000203360018060a01b03198254161790558060081c60005260016020526040600020600160ff1b60ff83161c81541790553360005260146020526040600020805460018060401b036001808060401b038360401c16011162001c9f57600160401b600160801b03198116604091821c6001600160401b039081166001908101841b6fffffffffffffffff00000000000000001692909217909355336000908152601460205291909120805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600101909116179055805b60018201821162001c9f57600182018110156200054257806200053c91336000600080516020620084a18339815191528180a4620024fa565b62000503565b600554600060018260081c018260081c1162001d3757805b60018360081c018210620020c357620005759150826200250a565b6014018060141162001c9f576019541062001cd95760ff601f541680620020ba575b80620020b1575b62001cb55760148101811162001c9f576014818101600555600082815260046020908152604080832080546001600160a01b031916732f4f52fcb7c752d6847b9d333c47a77a49e3977c908117909155600886901c8452600183528184208054600160ff1b60ff89161c179055909252829052600080516020620084218339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116601490810190931b6fffffffffffffffff00000000000000001691909117909255732f4f52fcb7c752d6847b9d333c47a77a49e3977c600052602081905260008051602062008421833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216601401909116179055805b60148201821162001c9f57601482018110156200072e57806200072891732f4f52fcb7c752d6847b9d333c47a77a49e3977c6000600080516020620084a18339815191528180a4620024fa565b620006db565b600554600060018260081c018260081c1162001d3757805b60018360081c0182106200206c57620007619150826200250a565b600f0180600f1162001c9f576019541062001cd95760ff601f54168062002063575b806200205a575b62001cb557600f8101811162001c9f57600f818101600555600082815260046020908152604080832080546001600160a01b03191673108be80b8f2e44034171723ac720a7177b002fae908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084818339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600f90810190931b6fffffffffffffffff0000000000000000169190911790925573108be80b8f2e44034171723ac720a7177b002fae600052601460205260008051602062008481833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600f01909116179055805b600f8201821162001c9f57600f82018110156200091b5780620009159173108be80b8f2e44034171723ac720a7177b002fae6000600080516020620084a18339815191528180a4620024fa565b620008c8565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062002015576200094e9150826200250a565b600a0180600a1162001c9f576019541062001cd95760ff601f5416806200200c575b8062002003575b62001cb557600a8101811162001c9f57600a818101600555600082815260046020908152604080832080546001600160a01b0319167345e39b215c7f4890a4f8f9b35e5d963c61b97828908117909155600886901c8452600183528184208054600160ff1b60ff89161c179055909252601490527f68e6a706a0f1c28f3a3a7a42a02c00e84eba3bdac9c18de86faeb0769eb0a94d8054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600a90810190931b6fffffffffffffffff000000000000000016919091179092557345e39b215c7f4890a4f8f9b35e5d963c61b9782860005260146020527f68e6a706a0f1c28f3a3a7a42a02c00e84eba3bdac9c18de86faeb0769eb0a94d805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600a01909116179055805b600a8201821162001c9f57600a820181101562000b2a578062000b24917345e39b215c7f4890a4f8f9b35e5d963c61b978286000600080516020620084a18339815191528180a4620024fa565b62000ad7565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001fbe5762000b5d9150826200250a565b6009018060091162001c9f576019541062001cd95760ff601f54168062001fb5575b8062001fac575b62001cb55760098101811162001c9f576009818101600555600082815260046020908152604080832080546001600160a01b0319167336839f9a73c8305ad4626f712cb011fd8b448310908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084418339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600990810190931b6fffffffffffffffff000000000000000016919091179092557336839f9a73c8305ad4626f712cb011fd8b448310600052601460205260008051602062008441833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600901909116179055805b60098201821162001c9f576009820181101562000d17578062000d11917336839f9a73c8305ad4626f712cb011fd8b4483106000600080516020620084a18339815191528180a4620024fa565b62000cc4565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001f675762000d4a9150826200250a565b6008018060081162001c9f576019541062001cd95760ff601f54168062001f5e575b8062001f55575b62001cb55760088101811162001c9f576008818101600555600082815260046020908152604080832080546001600160a01b031916732ab41637c245950ace453fb2c1863f3641fce83b90811790915585851c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084018339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600890810190931b6fffffffffffffffff00000000000000001691909117909255732ab41637c245950ace453fb2c1863f3641fce83b600052601460205260008051602062008401833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600801909116179055805b60088201821162001c9f576008820181101562000f02578062000efc91732ab41637c245950ace453fb2c1863f3641fce83b6000600080516020620084a18339815191528180a4620024fa565b62000eaf565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001f105762000f359150826200250a565b8060070160071162001c9f57601954906007011162001cd95760ff601f54168062001f07575b8062001efe575b62001cb55760078101811162001c9f576007818101600555600082815260046020908152604080832080546001600160a01b0319167324aae0a135985dc8ae6b8bac64051af645c2b3f9908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084c18339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600790810190931b6fffffffffffffffff000000000000000016919091179092557324aae0a135985dc8ae6b8bac64051af645c2b3f96000526014602052600080516020620084c1833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600701909116179055805b60078201821162001c9f5760078201811015620010f35780620010ed917324aae0a135985dc8ae6b8bac64051af645c2b3f96000600080516020620084a18339815191528180a4620024fa565b620010a0565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001eb957620011269150826200250a565b6007018060071162001c9f576019541062001cd95760ff601f54168062001eb0575b8062001ea7575b62001cb55760078101811162001c9f576007818101600555600082815260046020908152604080832080546001600160a01b031916732c45a206f3ba662c69e9ae9831b56f6242e2b16f908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620083e18339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600790810190931b6fffffffffffffffff00000000000000001691909117909255732c45a206f3ba662c69e9ae9831b56f6242e2b16f6000526014602052600080516020620083e1833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600701909116179055805b60078201821162001c9f5760078201811015620012e05780620012da91732c45a206f3ba662c69e9ae9831b56f6242e2b16f6000600080516020620084a18339815191528180a4620024fa565b6200128d565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001e6257620013139150826200250a565b6005018060051162001c9f576019541062001cd95760ff601f54168062001e59575b8062001e50575b62001cb55760058101811162001c9f5760058181018155600082815260046020908152604080832080546001600160a01b031916734519a5973d718c184fe8823e95a3549b8b48a5be908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084618339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600590810190931b6fffffffffffffffff00000000000000001691909117909255734519a5973d718c184fe8823e95a3549b8b48a5be600052601460205260008051602062008461833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600501909116179055805b60058201821162001c9f5760058201811015620014cc5780620014c691734519a5973d718c184fe8823e95a3549b8b48a5be6000600080516020620084a18339815191528180a4620024fa565b62001479565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001e0b57620014ff9150826200250a565b6005018060051162001c9f576019541062001cd95760ff601f54168062001e02575b8062001df9575b62001cb55760058101811162001c9f5760058181018155600082815260046020908152604080832080546001600160a01b0319167374087c451c335645d9df705df4b8567425d36fee908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620084e18339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600590810190931b6fffffffffffffffff000000000000000016919091179092557374087c451c335645d9df705df4b8567425d36fee6000526014602052600080516020620084e1833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600501909116179055805b60058201821162001c9f5760058201811015620016b85780620016b2917374087c451c335645d9df705df4b8567425d36fee6000600080516020620084a18339815191528180a4620024fa565b62001665565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001db457620016eb9150826200250a565b6003018060031162001c9f576019541062001cd95760ff601f54168062001dab575b8062001da2575b62001cb55760038101811162001c9f576003818101600555600082815260046020908152604080832080546001600160a01b03191673bb6ac8101df081ac7a2639168734bc18aaaf06da908117909155600886901c8452600183528184208054600160ff1b60ff89161c179055909252601490527f7b6bbefdbb7b39df3121b2004cc39935ef2e82bb2684974aa14f497eeb3fb60c8054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600390810190931b6fffffffffffffffff0000000000000000169190911790925573bb6ac8101df081ac7a2639168734bc18aaaf06da60005260146020527f7b6bbefdbb7b39df3121b2004cc39935ef2e82bb2684974aa14f497eeb3fb60c805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600301909116179055805b60038201821162001c9f5760038201811015620018c75780620018c19173bb6ac8101df081ac7a2639168734bc18aaaf06da6000600080516020620084a18339815191528180a4620024fa565b62001874565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001d5d57620018fa9150826200250a565b6002018060021162001c9f576019541062001cd95760ff601f54168062001d54575b8062001d4b575b62001cb55760028101811162001c9f576002818101600555600082815260046020908152604080832080546001600160a01b03191673a581532f474915867ec82059242cccc7d5118dff908117909155600886901c8452600183528184208054600160ff1b60ff89161c17905590925260149052600080516020620083c18339815191528054909290916001600160401b039083901c81169091011162001c9f57600160401b600160801b03198116604091821c6001600160401b03908116600290810190931b6fffffffffffffffff0000000000000000169190911790925573a581532f474915867ec82059242cccc7d5118dff6000526014602052600080516020620083c1833981519152805490929091828216011162001c9f576001600160401b031981166001600160401b03918216600201909116179055805b60028201821162001c9f576002820181101562001ab4578062001aae9173a581532f474915867ec82059242cccc7d5118dff6000600080516020620084a18339815191528180a4620024fa565b62001a61565b600554600060018260081c018260081c1162001d3757805b60018360081c01821062001ceb5762001ae79150826200250a565b6001018060011162001c9f576019541062001cd95760ff601f54168062001cd0575b8062001cc7575b62001cb55760018101811162001c9f576001818101600555600082815260046020908152604080832080546001600160a01b03191673df6e1e8945bcb7f1b17f4d83e36ab79a5d724607908117909155600886901c84528483528184208054600160ff1b60ff89161c179055909252601490526000805160206200850183398151915280549092909182901c6001600160401b0390811690910190811162001c9f57600160401b600160801b031990911660409190911b6fffffffffffffffff00000000000000001617905573df6e1e8945bcb7f1b17f4d83e36ab79a5d72460760005260146020526000805160206200850183398151915280546001600160401b0380821660010190811162001c9f576001600160401b03166001600160401b031991909116179055805b60018201821162001c9f576001820181101562001c8f578062001c899173df6e1e8945bcb7f1b17f4d83e36ab79a5d7246076000600080516020620084a18339815191528180a4620024fa565b62001c3c565b604051615e889081620025198239f35b634e487b7160e01b600052601160045260246000fd5b60405163f30c72c560e01b8152600490fd5b50600162001b10565b50600062001b09565b604051638a164f6360e01b8152600490fd5b81600052600860205260406000205490816000925b62001d24575062001d1d9162001d1691620024ec565b91620024fa565b9062001acc565b6001909201916000198101168062001d00565b634e487b7160e01b81526011600452602490fd5b50600162001923565b5060006200191c565b81600052600860205260406000205490816000925b62001d8f575062001d889162001d1691620024ec565b90620018df565b6001909201916000198101168062001d72565b50600162001714565b5060006200170d565b81600052600860205260406000205490816000925b62001de6575062001ddf9162001d1691620024ec565b90620016d0565b6001909201916000198101168062001dc9565b50600162001528565b50600062001521565b81600052600860205260406000205490816000925b62001e3d575062001e369162001d1691620024ec565b90620014e4565b6001909201916000198101168062001e20565b5060016200133c565b50600062001335565b81600052600860205260406000205490816000925b62001e94575062001e8d9162001d1691620024ec565b90620012f8565b6001909201916000198101168062001e77565b5060016200114f565b50600062001148565b81600052600860205260406000205490816000925b62001eeb575062001ee49162001d1691620024ec565b906200110b565b6001909201916000198101168062001ece565b50600162000f62565b50600062000f5b565b81600052600860205260406000205490816000925b62001f42575062001f3b9162001d1691620024ec565b9062000f1a565b6001909201916000198101168062001f25565b50600162000d73565b50600062000d6c565b81600052600860205260406000205490816000925b62001f99575062001f929162001d1691620024ec565b9062000d2f565b6001909201916000198101168062001f7c565b50600162000b86565b50600062000b7f565b81600052600860205260406000205490816000925b62001ff0575062001fe99162001d1691620024ec565b9062000b42565b6001909201916000198101168062001fd3565b50600162000977565b50600062000970565b81600052600860205260406000205490816000925b620020475750620020409162001d1691620024ec565b9062000933565b600190920191600019810116806200202a565b5060016200078a565b50600062000783565b81600052600860205260406000205490816000925b6200209e5750620020979162001d1691620024ec565b9062000746565b6001909201916000198101168062002081565b5060016200059e565b50600062000597565b81600052600860205260406000205490816000925b620020f55750620020ee9162001d1691620024ec565b906200055a565b60019092019160001981011680620020d8565b5061dead33141562000406565b506000620003ff565b60405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b81600052600860205260406000205490816000925b620021a157506200219a9162001d1691620024ec565b90620003bb565b6001909201916000198101168062002184565b8060005260006020526040600020336000526020526040600020600160ff1982541617905533903390600080516020620083a1833981519152600080a438620003a2565b8060005260006020526040600020336000526020526040600020600160ff1982541617905533903390600080516020620083a1833981519152600080a43862000346565b8060005260006020526040600020336000526020526040600020600160ff1982541617905533903390600080516020620083a1833981519152600080a438620002ea565b8060005260006020526040600020336000526020526040600020600160ff1982541617905533903390600080516020620083a1833981519152600080a438620001e6565b01519050388062000102565b601f19821692600360005260206000209160005b858110620023215750836001951062002307575b505050811b0160035562000118565b015160001960f88460031b161c19169055388080620022f8565b91926020600181928685015181550194019201620022e4565b60036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841062002399575b601f0160051c01905b8181106200238c5750620000e6565b600081556001016200237d565b909150819062002374565b634e487b7160e01b600052602260045260246000fd5b90607f1690620000d2565b634e487b7160e01b600052604160045260246000fd5b01519050388062000099565b601f19821693600260005260206000209160005b8681106200243957508360019596106200241f575b505050811b01600255620000af565b015160001960f88460031b161c1916905538808062002410565b91926020600181928685015181550194019201620023fb565b60026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c81019160208410620024b1575b601f0160051c01905b818110620024a457506200007c565b6000815560010162002495565b90915081906200248c565b90607f169062000068565b600080fd5b60408051919082016001600160401b03811183821017620023c557604052565b9190820180921162001c9f57565b600019811462001c9f5760010190565b9190820391821162001c9f5756fe60806040526004361015610013575b600080fd5b60003560e01c80623f332f1461072e57806301ffc9a714610725578063025e332e1461071c5780630653aca51461071357806306fdde031461070a5780630726538914610701578063081812fc146106f8578063095ea7b3146106ef5780630f4345e2146106e657806310c395bf146106dd57806313c52826146106d457806315ba0352146106cb57806318160ddd146106c25780632398f843146106b957806323b872dd146106b0578063248a9ca3146106a7578063282c51f31461069e5780632a0acc6a146106955780632a55205a1461068c5780632d345670146106835780632f286b1b1461067a5780632f2ff15d1461067157806335bb3e161461066857806336568abe1461065f578063374032a114610656578063396e8f531461064d5780633cf40df31461064457806342842e0e1461063b57806344f71db21461063257806347e63380146106295780634a4fbeec146106205780634b81d8bd146106175780634c14f9c51461060e5780634f3db346146106055780634fdaf052146105fc5780635136dcc7146105f3578063526d5ca7146105ea57806357000972146105e15780636352211e146105d857806364a86512146105cf57806369bfdcdf146105c65780636f8b44b0146105bd57806370a08231146105b4578063715018a6146105ab57806371745b62146105a257806372b44d711461059957806373f42561146105905780637885fdc714610587578063798842691461057e5780637c3dc173146105755780637e9803421461056c5780638462151c14610563578063874a8b021461055a57806387866447146105515780638d5b98d5146105485780638da5cb5b1461053f57806391d148541461053657806392edd22e1461052d578063953232391461052457806395d89b411461051b57806399a2557a1461051257806399f9889814610509578063a059b16414610500578063a217fddf146104f7578063a22cb465146104ee578063a352ca69146104e5578063a35c23ad146104dc578063a41216ac146104d3578063aa0e2ad6146104ca578063b31391cb146104c1578063b88d4fde146104b8578063bc98a00f146104af578063c0d78655146104a6578063c87b56dd1461049d578063ca6932d514610494578063d53913931461048b578063d547741f14610482578063d5abeb0114610479578063d8ffd54314610470578063d95ba42f14610467578063dbe4613d1461045e578063e985e9c514610455578063ea3b31341461044c578063eb05629714610443578063ef60ceaf1461043a578063f2fde38b14610431578063f3b3059e14610428578063f6aacfb11461041f578063f887ea4014610416578063fcd1aac91461040d5763ff7682121461040557600080fd5b61000e6131d5565b5061000e61319a565b5061000e61316c565b5061000e61314d565b5061000e61301e565b5061000e612f50565b5061000e612e2f565b5061000e612d41565b5061000e612c7a565b5061000e612c45565b5061000e612c09565b5061000e612bc1565b5061000e612b14565b5061000e612af5565b5061000e612aaa565b5061000e612a6e565b5061000e612a4f565b5061000e612920565b5061000e6128d1565b5061000e61281e565b5061000e61278d565b5061000e612668565b5061000e612643565b5061000e612608565b5061000e6125df565b5061000e61258e565b5061000e6123ee565b5061000e6123d1565b5061000e612396565b5061000e612205565b5061000e6121c8565b5061000e612104565b5061000e6120a4565b5061000e612069565b5061000e612008565b5061000e611fde565b5061000e611efb565b5061000e611ed7565b5061000e611de4565b5061000e611d54565b5061000e611d35565b5061000e611c99565b5061000e611c64565b5061000e611c2d565b5061000e611c11565b5061000e611bb0565b5061000e611b90565b5061000e611ac6565b5061000e611a9e565b5061000e611a7c565b5061000e611a25565b5061000e61192f565b5061000e6118c4565b5061000e611845565b5061000e6117c7565b5061000e6116f6565b5061000e6116b6565b5061000e611688565b5061000e61164b565b5061000e611507565b5061000e61149a565b5061000e61145e565b5061000e611304565b5061000e6112bd565b5061000e611299565b5061000e61126f565b5061000e61124b565b5061000e6111b4565b5061000e61113c565b5061000e611066565b5061000e61102a565b5061000e610f50565b5061000e610f13565b5061000e610ee9565b5061000e610ead565b5061000e610e7d565b5061000e610e53565b5061000e610de9565b5061000e610dc5565b5061000e610da3565b5061000e610d5d565b5061000e610d19565b5061000e610cc4565b5061000e610b90565b5061000e610b5f565b5061000e610b3b565b5061000e610a35565b5061000e6108fa565b5061000e6108b2565b5061000e610802565b503461000e576000806003193601126107ed576040518091600d549081835260208093018092600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590835b8181106107d95750505084610792910385612726565b60405193838594850191818652518092526040850193925b8281106107b957505050500390f35b83516001600160a01b0316855286955093810193928101926001016107aa565b82548452928601926001928301920161077c565b80fd5b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e576020600435610822816107f0565b6001600160e01b03198116631c03211160e31b14908115610890575b811561087f575b811561086e575b811561085e575b506040519015158152f35b61086891506142c1565b38610853565b9050610879816142c1565b9061084c565b905061088a81614305565b90610845565b905061089b81614863565b9061083e565b6001600160a01b0381160361000e57565b503461000e57602036600319011261000e576004356108d0816108a1565b6108d86134ab565b600c80546001600160a01b0319166001600160a01b0392909216919091179055005b503461000e57602036600319011261000e576109d56040600081805161091f816126ac565b8281528260208201520152610935600435613421565b90549060031b1c908160005260166020526109a260206109988360002084519061095e826126d4565b546001600160a01b03811680835260a09190911c61ffff1693909101839052610985612747565b9586526001600160a01b03166020860152565b61ffff1683830152565b51815181526020808301516001600160a01b03169082015260409182015161ffff16918101919091529081906060820190565b0390f35b60005b8381106109ec5750506000910152565b81810151838201526020016109dc565b90602091610a15815180928185528580860191016109d9565b601f01601f1916010190565b906020610a329281815201906109fc565b90565b503461000e576000806003193601126107ed5760405190806002549060019180831c92808216928315610b31575b6020928386108514610b1d578588526020880194908115610afc5750600114610aa3575b6109d587610a9781890382612726565b60405191829182610a21565b600260005294509192917f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b838610610aeb5750505091019050610a97826109d53880610a87565b805485870152948201948101610acf565b60ff191685525050505090151560051b019050610a97826109d53880610a87565b634e487b7160e01b82526022600452602482fd5b93607f1693610a63565b503461000e57600036600319011261000e57602060ff600f54166040519015158152f35b503461000e57602036600319011261000e576020610b7e600435614fa7565b6040516001600160a01b039091168152f35b503461000e57604036600319011261000e57600435610bae816108a1565b6024356001600160a01b038216151580610ca6575b610bcc826144a3565b610c5257610be0575b610bde91614ea1565b005b610bf3610bed8233614cf1565b83614bb8565b610bd55760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b6064820152608490fd5b60405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b6064820152608490fd5b60ff601f541615610bc3575b60405163f30c72c560e01b8152600490fd5b503461000e57602036600319011261000e57610cde6134ab565b600435601255005b60031115610cf057565b634e487b7160e01b600052602160045260246000fd5b919060208301926003821015610cf05752565b503461000e57600036600319011261000e576109d560ff60095460081c1660405191829182610d06565b6001600160a01b0316600090815260146020526040902090565b503461000e57602036600319011261000e57600435610d7b816108a1565b60018060a01b0316600052600b6020526109d560ff6040600020541660405191829182610d06565b503461000e57602036600319011261000e57610dbd6134ab565b600435601c55005b503461000e57600036600319011261000e576020610de1615b61565b604051908152f35b503461000e57602036600319011261000e57600435610e07816108a1565b60018060a01b031660005260116020526020604060002054604051908152f35b606090600319011261000e57600435610e3f816108a1565b90602435610e4c816108a1565b9060443590565b503461000e57610bde610e6536610e27565b91610e78610e738433615124565b61502d565b6156e4565b503461000e57602036600319011261000e5760043560005260006020526020600160406000200154604051908152f35b503461000e57600036600319011261000e5760206040517f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8488152f35b503461000e57600036600319011261000e576020604051600080516020615e138339815191528152f35b503461000e57604036600319011261000e57610f33602435600435613268565b604080516001600160a01b03939093168352602083019190915290f35b503461000e57602036600319011261000e57600435610f6e816108a1565b610f766133b2565b6001600160a01b03811660009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b76020526040812054909190600080516020615e138339815191529060ff16610fcc578280f35b808352602083815260408085206001600160a01b038516600090815292529020805460ff1916905533916001600160a01b0316907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a438808280f35b503461000e57600036600319011261000e5760206040517fee67e84f062f26b2e1ed715b7ab5b471f8978a749ac5fc5bc774f49acca5e7518152f35b503461000e57604036600319011261000e57600435602435611087816108a1565b61108f6134ab565b6110a9600080516020615e1383398151915283141561469b565b6000828152602081815260408083206001600160a01b0385168452909152812090929060ff905b5416156110db578280f35b808352602083815260408085206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57602036600319011261000e5760043561115a816108a1565b6111626133b2565b6001600160a01b03811660009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b760205260408120909190600080516020615e138339815191529060ff906110d0565b503461000e57604036600319011261000e576024356111d2816108a1565b336001600160a01b038216036111ee57610bde90600435613328565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461000e57600036600319011261000e57602060ff600954166040519015158152f35b503461000e57600036600319011261000e57600c546040516001600160a01b039091168152602090f35b503461000e57600036600319011261000e57602060ff601f54166040519015158152f35b503461000e57610bde6112cf36610e27565b9060405192602084018481106001600160401b038211176112f7575b60405260008452615096565b6112ff612695565b6112eb565b503461000e57602036600319011261000e573360009081527f6bc61e8d8a7feeba9a3dfbe950298fbca23cf0136992f9ef92f1b5529ac870ae60205260408120546004359060ff16156113b5578061135e6113b292614d5b565b5061136982826154f1565b61138f828060081c600052600860205260406000209060ff6001811b91161c8154179055565b81846001600160a01b038316600080516020615e338339815191528280a4615288565b80f35b61145a60486114426113c633613a28565b6114346113d1613aa7565b6040519485937f416363657373436f6e74726f6c3a206163636f756e742000000000000000000060208601526114118151809260206037890191016109d9565b84017001034b99036b4b9b9b4b733903937b6329607d1b60378201520190613911565b03601f198101835282612726565b60405162461bcd60e51b815291829160048301610a21565b0390fd5b503461000e57600036600319011261000e5760206040517f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab8152f35b503461000e57602036600319011261000e5760206114c26004356114bd816108a1565b6149d6565b6040519015158152f35b6020908160408183019282815285518094520193019160005b8281106114f3575050505090565b8351855293810193928101926001016114e5565b503461000e57604036600319011261000e5760043560243561153961153461152f8484614090565b613928565b614595565b600080845b848111156115c357506115519150614595565b9290600090815b8484111561156e57604051806109d588826114cc565b61158161157b8284613d56565b51151590565b61159e575b61159261159891613d3e565b93613d3e565b92611558565b916115926115ba82866115b4611598958b613d56565b52613d3e565b93915050611586565b906115cd82615b2e565b8061161c575b15611608576115fa611592611600926115f56115ef8789613d56565b60019052565b613d3e565b91613d3e565b91909161153e565b916115fa8160006115b46116009488613d56565b50611626826144a3565b6115d3565b6024359061ffff8216820361000e57565b359061ffff8216820361000e57565b503461000e57604036600319011261000e57602061167c60043561166e816108a1565b61167661162b565b906146d9565b61ffff60405191168152f35b503461000e57600036600319011261000e576020601254604051908152f35b60243590600382101561000e57565b503461000e57602036600319011261000e57600435600381101561000e576116dc6134ab565b61ff006009549160081b169061ff00191617600955600080f35b503461000e5760208060031936011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e5760609260248484028301019136831161000e5761174d6134ab565b61175684613d18565b9360409061176682519687612726565b855260248386019201915b84831061178157610bde86613db2565b868336031261000e578387918351611798816126ac565b85358152828601356117a9816108a1565b838201526117b885870161163c565b85820152815201920191611771565b503461000e57602036600319011261000e57610bde6004356117e7613591565b6117f081614d5b565b506117fb82826154f1565b611821828060081c600052600860205260406000209060ff6001811b91161c8154179055565b8160006001600160a01b038316600080516020615e338339815191528280a4615288565b503461000e57600036600319011261000e5761185f613671565b6020601f5460ff8160081c169060ff82146118b7575b61ff0019166001820160081b61ff001617601f5560405190807f39dedb493270cf57e3d892a36452ebba9db444e0d5406b467262f6b70448847b600080a28152f35b6118bf613236565b611875565b503461000e57602036600319011261000e5760206118e3600435614d5b565b506040516001600160a01b039091168152f35b606090600319011261000e5760043561190e816108a1565b9061ffff90602435828116810361000e5791604435908116810361000e5790565b503461000e57610bde6119fe611944366118f6565b61195093929193613591565b60018060a01b038216600052601460205260406000209360405194611974866126ef565b54906001600160401b038083168752808360401c1660208801528260801c1660408701526060860161ffff6119b2818560c01c16839061ffff169052565b6119d760808901946119cd838260d01c16879061ffff169052565b60e01c60a08a0152565b815161ffff16811690831614611a035761ffff9091169052610d4391905b9061ffff169052565b613c4e565b5050611a1d610d4392611a18835161ffff1690565b613d02565b61ffff169052565b503461000e57604036600319011261000e57611a3f6134ab565b60408051600435815260243560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91819081015b0390a1005b503461000e57602036600319011261000e57611a966134ab565b600435601955005b503461000e57602036600319011261000e576020610de1600435611ac1816108a1565b613ba2565b503461000e576000806003193601126107ed57611ae16133b2565b601380546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b604060031982011261000e57600435906001600160401b03821161000e57611b7f91600401611b25565b9091602435600381101561000e5790565b503461000e57610bde611ba236611b55565b91611bab6134ab565b614a87565b503461000e57602036600319011261000e57600435611bce816108a1565b611bd66134ab565b6001600160a01b0316611be881614157565b50337f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db857292600080a3005b503461000e57600036600319011261000e576020610de1615b80565b503461000e57600036600319011261000e57601554604080516001600160a01b038316815260a09290921c61ffff16602083015290f35b503461000e57602036600319011261000e57600435600052600a6020526109d560ff6040600020541660405191829182610d06565b503461000e57604036600319011261000e57600435611cb781614d5b565b506001600160a01b03163303611cdd576000526010602052602435604060002055600080f35b60405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b6064820152608490fd5b503461000e57600036600319011261000e576020601754604051908152f35b503461000e57602036600319011261000e57600435611d72816108a1565b6000611d7d82613ba2565b90611d8782614595565b92815b838303611d9f57604051806109d587826114cc565b80611dab600192615b2e565b611db6575b01611d8a565b611dbf81614d5b565b50828060a01b03808516911603611db05780611dde8386019588613d56565b52611db0565b503461000e57604036600319011261000e57600435611e02816108a1565b611e0a6116a7565b611e1d600160ff601b5416151514614349565b336001600160a01b03831603611ea257816002611e59611e52610bde9560018060a01b0316600052600b602052604060002090565b5460ff1690565b611e6281610ce6565b1480611e8e575b15614b23576001600160a01b0381166000908152601e60205260409020429055614b23565b50611e9882610ce6565b6002821415611e69565b60405162461bcd60e51b815260206004820152600d60248201526c3737ba103cb7bab939b2b6331760991b6044820152606490fd5b503461000e57600036600319011261000e57602060ff601b54166040519015158152f35b503461000e57602036600319011261000e57600435611f18613671565b601f5460081c60ff1690611f3681600052601a602052604060002090565b5491611f48611f4483615b2e565b1590565b611fc55760ff168015611fb3578060ff84161015611fa157610bde9281837f73eca9ff1b97607af9c8765c3a002b2d958a586d5e014ab7b861210d55b338c1600080a360ff19161790600052601a602052604060002055565b6040516376de221360e01b8152600490fd5b60405163038d6ce760e01b8152600490fd5b6040516308ac597760e01b815260048101839052602490fd5b503461000e57600036600319011261000e576013546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e57602060ff61205360243561202d816108a1565b6004356000526000845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b8015150361000e57565b503461000e57602036600319011261000e576004356120878161205f565b61208f6134ab565b60ff8019601b54169115151617601b55600080f35b503461000e57602036600319011261000e576004356120c281615b2e565b156120ec576120e1602091600052601a60205260ff6040600020541690565b60ff60405191168152f35b602490604051906308ac597760e01b82526004820152fd5b503461000e576000806003193601126107ed5760405190806003549060019180831c928082169283156121be575b6020928386108514610b1d578588526020880194908115610afc5750600114612165576109d587610a9781890382612726565b600360005294509192917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8386106121ad5750505091019050610a97826109d53880610a87565b805485870152948201948101612191565b93607f1693612132565b503461000e57606036600319011261000e576109d56121f96004356121ec816108a1565b60443590602435906145c7565b604051918291826114cc565b503461000e57604036600319011261000e57600435612223816108a1565b60243561222e613751565b612236615b61565b8101808211612389575b6019541061237757600554908015612324576001600160a01b038316926122e790829061226e8615156151e4565b612277816155a5565b6122896122848387613936565b600555565b6122c0816122a1876000526004602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b600885901c60009081526001602052604090208054600160ff1b60ff88161c179055615388565b81905b6122f48184613936565b821015610bde5761231d826122f493866000600080516020615e338339815191528180a4613d3e565b91506122ea565b60405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608490fd5b604051638a164f6360e01b8152600490fd5b612391613236565b612240565b503461000e57602036600319011261000e576004356123b48161205f565b6123bc6134ab565b60ff8019600f54169115151617600f55600080f35b503461000e57600036600319011261000e57602060405160008152f35b503461000e57604036600319011261000e5760043561240c816108a1565b602435806124198161205f565b612571575b612427336149d6565b158015612569575b612438906147b5565b612444610bed33614c74565b8015612561575b61245490614801565b612460610bed33614c74565b8015612559575b61247090614801565b612479336149d6565b158015612551575b61248a906147b5565b6001600160a01b0382169133831461250c57816124c96124da9233600052600760205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606490fd5b508015612481565b508015612467565b50801561244b565b50801561242f565b60ff601f54161561241e5760405163f30c72c560e01b8152600490fd5b503461000e57604036600319011261000e57610bde6004356125af816108a1565b6024356125ba613831565b806125c85750600090614b23565b6001036125d757600190614b23565b600290614b23565b503461000e57602036600319011261000e57336000526011602052600435604060002055600080f35b503461000e57602036600319011261000e576004356126268161205f565b61262e6134ab565b60ff8019600954169115151617600955600080f35b503461000e57600036600319011261000e57602060ff601f5460081c16604051908152f35b503461000e57602036600319011261000e5760043560005260106020526020604060002054604051908152f35b50634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b038211176126c757604052565b6126cf612695565b604052565b604081019081106001600160401b038211176126c757604052565b60c081019081106001600160401b038211176126c757604052565b61012081019081106001600160401b038211176126c757604052565b90601f801991011681019081106001600160401b038211176126c757604052565b60405190612754826126ac565b565b60405190612754826126d4565b6020906001600160401b038111612780575b601f01601f19160190565b612788612695565b612775565b503461000e57608036600319011261000e576004356127ab816108a1565b6024356127b7816108a1565b606435916001600160401b03831161000e573660238401121561000e578260040135916127e383612763565b926127f16040519485612726565b808452366024828701011161000e576020816000926024610bde9801838801378501015260443591615096565b503461000e57604036600319011261000e5760043561283c816108a1565b602435612847613591565b61284f615b61565b81018082116128c4575b6019541061237757600554908015612324576001600160a01b0383169261288790829061226e8615156151e4565b81905b6128948184613936565b821015610bde576128bd8261289493866000600080516020615e338339815191528180a4613d3e565b915061288a565b6128cc613236565b612859565b503461000e57602036600319011261000e576004356128ef816108a1565b6128f76134ab565b601f805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055005b503461000e57602036600319011261000e57601f54600435601082901c6001600160a01b03168015612a3d57612958611f4483615b2e565b611fc5576109d59260009161296c846144a3565b83908414612a3057506201fe006129ae60015b60ff61299988600052601a60205260ff6040600020541690565b9116906101fe9060011b16906101fe19161790565b6040516392cb829d60e01b815260048101969096526201fe00191660019390931b16919091176024840152829081806044810103915afa908115612a23575b600091612a02575b5060405191829182610a21565b612a1d913d8091833e612a158183612726565b810190613b37565b386129f5565b612a2b613b95565b6129ed565b6129ae6201fe009161297f565b60405163179ce99f60e01b8152600490fd5b503461000e57600036600319011261000e576020601c54604051908152f35b503461000e57600036600319011261000e5760206040517f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68152f35b503461000e57604036600319011261000e57610bde602435600435612ace826108a1565b612ad66134ab565b612af0600080516020615e1383398151915282141561469b565b613328565b503461000e57600036600319011261000e576020601954604051908152f35b503461000e57610bde610d436119fe612b2c366118f6565b612b37949194613591565b60018060a01b03831660005260146020526040600020946119f560405196612b5e886126ef565b54916001600160401b038084168952808460401c1660208a01528360801c166040890152606088016119f561ffff94612ba0868260c01c16849061ffff169052565b612bb760808c01968260d01c16879061ffff169052565b60e01c60a08b0152565b503461000e57602036600319011261000e57612bdb6134ab565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce760206040516004358152a1005b503461000e57600036600319011261000e5760206040517f43f25613eb2f15fb17222a5d424ca2655743e71265d98e4b93c05e5fb589ecde8152f35b503461000e57604036600319011261000e5760206114c2600435612c68816108a1565b60243590612c75826108a1565b61477e565b503461000e5760408060031936011261000e576004356001600160401b03811161000e57612cac903690600401611b25565b602435612cb7613831565b80612d265750612cca60005b8284614a87565b60005b818110612cd657005b807ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7612d19612d09612d21948688614331565b8751903581529081906020820190565b0390a1613d3e565b612ccd565b600103612d3757612cca6001612cc3565b612cca6002612cc3565b503461000e576000806003193601126107ed57600554612d6361153482613928565b8283845b84811115612dd95750612d7a9150614595565b92809181925b84841115612d9657604051806109d588826114cc565b612da361157b8284613d56565b612dba575b611592612db491613d3e565b92612d80565b91611592612dd082866115b4612db4958b613d56565b93915050612da8565b90612de382615b2e565b80612e20575b15612e0d576115fa611592612e05926115f56115ef8789613d56565b919091612d67565b916115fa81876115b4612e059488613d56565b50612e2a826144a3565b612de9565b503461000e57604036600319011261000e57612e496134ab565b7f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe41604051612e76816126d4565b600435612e82816108a1565b8152612f2b612f22612e9261162b565b926020810193808552612ead61271061ffff80931610613d78565b612ef660018060a01b03835116865192602060405191612ecc836126d4565b838352851691015260018060a01b03166bffffffffffffffffffffffff60a01b6015541617601555565b6015805461ffff60a01b191660a09290921b61ffff60a01b16919091179055516001600160a01b031690565b915161ffff1690565b604080516001600160a01b03909316835261ffff909116602083015281908101611a77565b503461000e57602036600319011261000e57600435612f6e816108a1565b612f766133b2565b6001600160a01b03908116908115612fca57601354826bffffffffffffffffffffffff60a01b821617601355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e5761302d36611b55565b613046600161303e601b5460ff1690565b151514614349565b60005b828110613109575060005b8281106130bc5750613067908284614a87565b60005b81811061307357005b807ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7612d196130a66130b7948688614331565b604051903581529081906020820190565b61306a565b806130d5836130cf6130de948789614331565b35614381565b6130e357613d3e565b613054565b426131036130f2838789614331565b35600052601d602052604060002090565b55613d3e565b61311d613117828587614331565b35614d5b565b506001600160a01b0316330361313b5761313690613d3e565b613049565b60405163e131a43f60e01b8152600490fd5b503461000e57602036600319011261000e5760206114c26004356144a3565b503461000e57600036600319011261000e57601f5460405160109190911c6001600160a01b03168152602090f35b503461000e57602036600319011261000e576004356131b88161205f565b6131c06134ab565b60ff8019601f54169115151617601f55600080f35b503461000e57602036600319011261000e576004356131f3816108a1565b6131fb6134ab565b6001600160a01b031661320d81613f72565b50337fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c600080a3005b50634e487b7160e01b600052601160045260246000fd5b8181029291811591840414171561326057565b612754613236565b6000818152601660205260409020546001600160a01b039392919084166132d7575060155492831692831515806132c7575b6132aa5750509050600090600090565b610a329161ffff6132bf9260a01c169061324d565b612710900490565b5061ffff8160a01c16151561329a565b92610a329161332261331b6133106132bf946132fd896000526016602052604060002090565b5416976000526016602052604060002090565b5460a01c61ffff1690565b61ffff1690565b9061324d565b6000818152602081815260408083206001600160a01b038616845290915281205490919060ff1661335857505050565b808252602082815260408084206001600160a01b038616600090815292529020805460ff1916905533926001600160a01b0316917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4565b6013546001600160a01b031633036133c657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b50634e487b7160e01b600052603260045260246000fd5b601754811015613459575b60176000527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150190600090565b61346161340a565b61342c565b600d5481101561349e575b600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50190600090565b6134a661340a565b613471565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b76020526040902054600080516020615e138339815191529060ff16156134f55750565b6134fe33613a28565b90613507613943565b9060306135138361397c565b53607861351f83613992565b5360415b600181116135425761145a604861144286611434876113d188156139dd565b9080600f61357f92166010811015613584575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b5360041c916139c2565b613523565b61358c61340a565b613555565b3360009081527f76a187d6a2b709324658910cc6e93f7bc2a670e53959e6ecbfa9a8f2b634cf9260205260409020547f43f25613eb2f15fb17222a5d424ca2655743e71265d98e4b93c05e5fb589ecde9060ff16156135ed5750565b6135f633613a28565b906135ff613943565b90603061360b8361397c565b53607861361783613992565b5360415b6001811161363a5761145a604861144286611434876113d188156139dd565b9080600f61366c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b61361b565b3360009081527f738678fe42df6a4211eb7628ac9b056229141839eb4f4ef4cc249f1d36e8c92160205260409020547f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab9060ff16156136cd5750565b6136d633613a28565b906136df613943565b9060306136eb8361397c565b5360786136f783613992565b5360415b6001811161371a5761145a604861144286611434876113d188156139dd565b9080600f61374c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6136fb565b3360009081527f0781d7cac9c378efa22a7481e4d4d29704a680ddf504b3bc50b517700ee11e6c60205260409020547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69060ff16156137ad5750565b6137b633613a28565b906137bf613943565b9060306137cb8361397c565b5360786137d783613992565b5360415b600181116137fa5761145a604861144286611434876113d188156139dd565b9080600f61382c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6137db565b3360009081527fa1076b852b121f59d9dbdf8969e97d0e71359c80699771550e8eb09cff0b398260205260409020547fee67e84f062f26b2e1ed715b7ab5b471f8978a749ac5fc5bc774f49acca5e7519060ff161561388d5750565b61389633613a28565b9061389f613943565b9060306138ab8361397c565b5360786138b783613992565b5360415b600181116138da5761145a604861144286611434876113d188156139dd565b9080600f61390c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6138bb565b90613924602092828151948592016109d9565b0190565b906001820180921161326057565b9190820180921161326057565b60405190608082018281106001600160401b0382111761396f575b604052604282526060366020840137565b613977612695565b61395e565b60209080511561398a570190565b61392461340a565b60219080516001101561398a570190565b9060209180518210156139b557010190565b6139bd61340a565b010190565b80156139d0575b6000190190565b6139d8613236565b6139c9565b156139e457565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b60405190613a35826126ac565b602a825260403660208401376030613a4c8361397c565b536078613a5883613992565b536029905b60018211613a7057610a329150156139dd565b80600f613aa192166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b90613a5d565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848613ad0613943565b906030613adc8361397c565b536078613ae883613992565b536041905b60018211613b0057610a329150156139dd565b80600f613b3192166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b90613aed565b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e578051613b6981612763565b92613b776040519485612726565b8184526020828401011161000e57610a3291602080850191016109d9565b506040513d6000823e3d90fd5b6001600160a01b03168015613bcb5760005260146020526001600160401b036040600020541690565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b9067ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b8151815467ffffffffffffffff19166001600160401b03918216178255909190613cae90613c828160208501511685613c26565b6040830151845467ffffffffffffffff60801b1916911660801b67ffffffffffffffff60801b16178355565b60608101518254608083015160a0909301516001600160c01b0390911660c09290921b61ffff60c01b169190911760d09290921b61ffff60d01b169190911760e09190911b6001600160e01b031916179055565b91909161ffff8080941691160191821161326057565b6020906001600160401b038111613d31575b60051b0190565b613d39612695565b613d2a565b6001906000198114613d4e570190565b613924613236565b6020918151811015613d6b575b60051b010190565b613d7361340a565b613d63565b15613d7f57565b60405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642062707360a81b6044820152606490fd5b906000805b8351811015613f6c5780613dce613e669286613d56565b51604090818101613df0612710613dea61331b845161ffff1690565b10613d78565b6020828101805190916001600160a01b039091169081613e6b57505050507fa2870857763bd9ae76c957f869f16b31c18dd3bb4c7b4d3a4496dc5c57c657f9918186613e4a612d1994516000526016602052604060002090565b55613e558151614225565b505190519081529081906020820190565b613db7565b613f398495613f1f7f389b70fb0887f01e83784eb1c4c589f740eca53b00ed0f45e41db5d079719abb9894613ed3613f4295613ead612d19999a5161ffff1690565b90613ec8613eb9612756565b6001600160a01b039095168552565b83019061ffff169052565b613ee883516000526016602052604060002090565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b613f298151614004565b505194516001600160a01b031690565b945161ffff1690565b90519283526001600160a01b03909316602083015261ffff90921660408201529081906060820190565b50509050565b80600052600e60205260406000205415600014613ffe5780600d54600160401b811015613ff1575b6001810180600d55811015613fe4575b7fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155600d5490600052600e602052604060002055600190565b613fec61340a565b613faa565b613ff9612695565b613f9a565b50600090565b80600052601860205260406000205415600014613ffe5780601754600160401b811015614083575b6001810180601755811015614076575b7fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150155601754906000526018602052604060002055600190565b61407e61340a565b61403c565b61408b612695565b61402c565b9190820391821161326057565b600d5480156140ef5760007fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb48119830192808410156140e2575b600d83520155600d55565b6140ea61340a565b6140d7565b634e487b7160e01b600052603160045260246000fd5b60175480156140ef5760007fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1481198301928084101561414a575b601783520155601755565b61415261340a565b61413f565b6000818152600e6020526040902054801561421e576000916141b291600019808201828111614211575b600d54918201918211614204575b8082036141b8575b5050506141a261409d565b600052600e602052604060002090565b55600190565b6141a26141e0916141d86141ce6141fb95613466565b90549060031b1c90565b928391613466565b90919082549060031b600019811b9283911b16911916179055565b55388080614197565b61420c613236565b61418f565b614219613236565b614181565b5050600090565b600081815260186020526040902054801561421e576000916141b2916000198082018281116142b4575b6017549182019182116142a7575b808203614280575b505050614270614105565b6000526018602052604060002090565b6142706141e0916142966141ce61429e95613421565b928391613421565b55388080614265565b6142af613236565b61425d565b6142bc613236565b61424f565b6001600160e01b0319811663152a902d60e11b8114919082156142f4575b5081156142ea575090565b610a329150614863565b63c69dbd8f60e01b149150386142df565b63ffffffff60e01b16637965db0b60e01b8114908115614323575090565b6301ffc9a760e01b14919050565b91908110156143415760051b0190565b613d3961340a565b1561435057565b60405162461bcd60e51b81526020600482015260096024820152686e6f7420616c6c6f7760b81b6044820152606490fd5b9061438b81610ce6565b6001810361443f5750336000908152600b602052604090206143ac90611e52565b906143b682610ce6565b6002821480928161440e575b6143cb90610ce6565b1590816143e3575b5081156143de575090565b905090565b60029150611e526143fe91600052600a602052604060002090565b61440781610ce6565b14386143d3565b92506143cb600161442c611e5285600052600a602052604060002090565b61443581610ce6565b14159390506143c2565b61444881610ce6565b613ffe57336000908152600b6020526040902061448990611e529060029061446d9083565b61447681610ce6565b141592600052600a602052604060002090565b61449281610ce6565b8161449b575090565b600291501490565b601b5460ff161515600103614541576144bb816148d8565b90811561450e575b81156144cd575090565b6144d79150614d5b565b506001600160a01b03166000908152601e6020526040902054601c54810190811061450157421090565b614509613236565b421090565b809150600052601d602052604060002054601c548101809111614534575b4210906144c3565b61453c613236565b61452c565b610a32906148d8565b1561455157565b606460405162461bcd60e51b815260206004820152602060248201527f7374617274206d7573742062652067726561746572207468616e2073746f702e6044820152fd5b9061459f82613d18565b6145ac6040519182612726565b82815280926145bd601f1991613d18565b0190602036910137565b9290926145d583851061454a565b600091600554808511614693575b506145ed82613ba2565b8486101561468c57858503818110614684575b505b61460b81614595565b95811561467b575b8581141580614671575b15614667578061462e600192615b2e565b614639575b01614613565b61464281614d5b565b50828060a01b038087169116036146335780614661838801978a613d56565b52614633565b5050918452509050565b508185141561461d565b50909350505050565b905038614600565b5082614602565b9350386145e3565b156146a257565b60405162461bcd60e51b815260206004820152600f60248201526e3737ba1030b236b4b71037b7363c9760891b6044820152606490fd5b60018060a01b03166000526014602052604060002090614765604051926146ff846126ef565b54926001600160401b038085168252808560401c1660208301528460801c16604082015261476d6060820161ffff938493614743858960c01c16849061ffff169052565b60a0608082019861475d878260d01c168b9061ffff169052565b60e01c910152565b5161ffff1690565b9216911603613ffe575161ffff1690565b90614788826149d6565b801561479c575b61421e57610a3291614c9f565b506147af6147a983614c74565b82614bb8565b1561478f565b156147bc57565b60405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606490fd5b1561480857565b60405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560448201526c103637b1b5b2b2103a37b5b2b760991b6064820152608490fd5b61486c81614d17565b9081156148c7575b8115614895575b8115614885575090565b6001600160e01b03191615919050565b90506001600160e01b03198116630101c11560e71b1480156148b8575b9061487b565b506148c281614b7a565b6148b2565b90506148d281614b7a565b90614874565b6148e181615b2e565b156148ef57610a329061494a565b60405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608490fd5b60ff6009541615613ffe5780600052600a602052600260ff6040600020541661497281610ce6565b1490811561498a575b5061498557600090565b600190565b905060ff6149a282600052600a602052604060002090565b54166149ad81610ce6565b1590816149bc575b503861497b565b6149d091506149ca90614d5b565b506149d6565b386149b5565b60095460ff81161561421e576001600160a01b0382166000908152600b602052604090205460029060ff16614a0a81610ce6565b14918215614a1e575b505061498557600090565b6001600160a01b03166000908152600b602052604090205490915060ff16614a4581610ce6565b159081614a55575b503880614a13565b6002915060081c60ff16614a6881610ce6565b1438614a4d565b906003811015610cf05760ff80198354169116179055565b9160005b828110614a985750505050565b614aa3818486614331565b35600052602090600a8252604091614abe8484600020614a6f565b614acc613117838789614331565b50614ad8838789614331565b35906003861015610cf0577fc2b9bdb88f6723b48e57bd5eee65bf3718ed64f8dcae05bb63a2c5c14e3c44eb8693614b1e96519242845260018060a01b031692a4613d3e565b614a8b565b6001600160a01b03166000818152600b60205260409020614b45908390614a6f565b7f9fdb14457e6a7bd3753c649831b026de987c06e52d16459a928540738c2ea34b60405180614b75339582610d06565b0390a3565b6001600160e01b03198116632742b5b960e01b14908115614b99575090565b610a329150614d17565b9081602091031261000e5751610a328161205f565b600f5490919060ff1615614c6d576001600160a01b0382166000908152600e60205260409020541515918215614bed57505090565b600c54604051630f8350ed60e41b81526001600160a01b039283166004820152602481019390935291925060209183916044918391165afa908115614c60575b600091614c38575090565b610a32915060203d8111614c59575b614c518183612726565b810190614ba3565b503d614c47565b614c68613b95565b614c2d565b5050600190565b6001600160a01b0316600090815260116020526040902054614c965760125490565b60406000205490565b90614cac6147a983614c74565b1561421e57610a3291614cbe816149d6565b61421e576001600160a01b039081166000908152600760209081526040808320939094168252919091522060ff90541690565b906000526010602052604060002054614d0d57610a3290614c74565b5060406000205490565b6001600160e01b031981166380ac58cd60e01b811491908215614d4a575b508115614d40575090565b610a329150614305565b635b5e139f60e01b14915038614d35565b614d6481615b2e565b15614e475760009060089160ff82841c9216908281526001908160205260408120548360ff181c91821515600014614dd7575050614da4614daa91615c7f565b60ff1690565b9003911b175b614dd4614dc7826000526004602052604060002090565b546001600160a01b031690565b91565b925093929050815b614dec575b505050614db0565b614df7811515615c16565b6000190190614e10826000526001602052604060002090565b5480614e1e57509081614ddf565b614e3c92939450614da49150614e3390615c7f565b60ff9081031690565b911b17388080614de4565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b90614eab81614d5b565b506001600160a01b038181169084168114614f56573314908115614f44575b5015614ed957612754916158c9565b60405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608490fd5b614f509150339061477e565b38614eca565b60405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608490fd5b614fb081615b2e565b15614fd0576000908152600660205260409020546001600160a01b031690565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b1561503457565b60405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6044820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b6064820152608490fd5b906150ba9392916150aa610e738433615124565b6150b58383836156e4565b6159a4565b156150c157565b60405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b6064820152608490fd5b61512d82615b2e565b156151875761513b82614d5b565b506001600160a01b03828116828216811494909190851561516f575b505050821561516557505090565b610a32925061477e565b61517c9192939550614fa7565b161491388080615157565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b156151eb57565b60405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b9060016001600160401b038093160191821161326057565b9190916001600160401b038080941691160191821161326057565b6001600160401b03908116600019019190821161326057565b61275491906001600160a01b03811615615346576001600160a01b03811660009081526014602052604090206152e6905b6152cc6001600160401b0382541661526f565b6001600160401b03166001600160401b0319825416179055565b6001600160a01b0381166000908152601460205260409020615341905b6153196001600160401b03825460801c1661523c565b815467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16179055565b615644565b60008052601460205261537660406000206001600160401b0390600182825460401c160191821161537b57613c26565b6152e6565b615383613236565b613c26565b90600160401b81101561000e576001600160a01b03821660009081526014602052604090206001600160401b0391821692906153d4906153ce8585835460401c16615254565b90613c26565b6001600160a01b0381161561540b576001600160a01b03166000908152601460205260409020612754926152cc9192835416615254565b5061531961275492600080526014602052604060002092835460801c16615254565b61275492916001600160a01b03828116156154ba576001600160a01b0383166000908152601460205260409020615463906152b9565b811615615498576001600160a01b03166000908152601460205260409020615341906152cc6001600160401b0382541661523c565b506001600160a01b038116600090815260146020526040902061534190615303565b6001600160a01b03821660009081526014602052604090206154ec906153ce6001600160401b03825460401c1661523c565b615463565b60ff601f541680615593575b8061558b575b610cb2576001600160a01b0316151580615583575b61551f5750565b615528906144a3565b61552e57565b60405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b6064820152608490fd5b506000615518565b506001615503565b506001600160a01b03811615156154fd565b60ff601f541690816155d5575b816155bf575b50610cb257565b6001600160a01b031661dead14159050386155b8565b600091506155b2565b60ff601f541680615632575b8061561d575b610cb2576001600160a01b0390811615159182615611575b505061551f5750565b16151590503880615608565b506001600160a01b03821661dead14156155f0565b506001600160a01b03811615156155ea565b6001600160a01b031615158061566d575b61565c5750565b600052601060205260006040812055565b81600052600a602052604060002060ff198154169055615655565b1561568f57565b60405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b91906156ef82614d5b565b6001600160a01b038086169592909190821686900361581a5761275495859285169161571c831515615688565b6157278487876155de565b61573084615874565b61573984613928565b615761611f44828060081c600052600160205260ff6001811b91161c60406000205416151590565b8061580f575b6157cb575b50615785866122a1866000526004602052604060002090565b83036157a4575b600080516020615e33833981519152600080a461542d565b600883901c60009081526001602052604090208054600160ff1b60ff86161c17905561578c565b806157e7876122a1615809946000526004602052604060002090565b8060081c600052600160205260406000209060ff6001811b91161c8154179055565b3861576c565b506005548110615767565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608490fd5b600081815260066020526040812080546001600160a01b031916905561589982614d5b565b506001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a4565b600082815260066020526040902080546001600160a01b0319166001600160a01b0383161790556158f982614d5b565b506001600160a01b0391821691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b9081602091031261000e5751610a32816107f0565b6001600160a01b039182168152911660208201526040810191909152608060608201819052610a32929101906109fc565b3d1561599f573d9061598582612763565b916159936040519384612726565b82523d6000602084013e565b606090565b9192813b15615b255790929160019081948285935b6159c7575b50505050505090565b6159d48697989596613928565b841015615b1c57604095865197630a85bd0160e11b998a8a5260209a8b60049b808d878c8c3393850193615a0794615943565b6000929184918391900381856001600160a01b038e165af1919282615aed575b5050615aae578c8c8c615a38615974565b80519384615aa857825162461bcd60e51b81528061145a81870160809060208152603560208201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b60608201520190565b84925001fd5b91939699509194979a50615acd9396995082615ad9575b505096613d3e565b928095929491956159b9565b6001600160e01b0319161490503880615ac5565b615b0d929350803d10615b15575b615b058183612726565b81019061592e565b90388e615a27565b503d615afb565b849796506159be565b50505050600190565b8060081c6000526008602052600160ff1b60ff82161c60406000205416613ffe576005541180615b5b5790565b50600190565b600554615b6c615b80565b8103908111615b785790565b610a32613236565b600090600060055490600891821c90600192838301809311615c09575b92919080935b828510615bb1575050505050565b909192939586835281602052604083205490818685915b615bf85750615be292508101809111615beb575b96613d3e565b93929190615ba3565b615bf3613236565b615bdc565b600019840190931692018683615bc8565b615c11613236565b615b9d565b15615c1d57565b60405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608490fd5b604051615c8b8161270a565b7ffd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f86101008083527e01020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7560208401527f06264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c960408401527f071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee360608401527f0e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf760808401527fff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c860a08401527f16365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f660c08401527ffe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf560e0840152820152811561000e57615dfe615e0c917e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff84610a3295600003160260f81c906139a3565b516001600160f81b03191690565b60f81c9056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220416b820d1f7f9774b50d7e0568a4d7524b3f3775d4712385efb7a67bef92184064736f6c634300081100332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0dfc56086c9b3114507ad93f926e9cdb47aedcbd18ec2d6aa005258d53fd3347cf7728f9f64f58b11b975e4a68097b762e6cc4de91aebd6769df0ce7ddc943d3742f3a2ff05b037bb49c2eb58a06541057a9887759f3bf5c332cd2345ef5d017d358d8ee0cd37a033e8f658fa08a19fb30a2af5f2dc001fc5825356531329d2578818f84a2796535f73cbad76a7cc336af099574a17d5d9e5dda2470b5276d2b39828dbdd508d8c721767e3621261f03399243ba1f0b200d79636d9c03dc9837cc35d7f01f9c6ee35aa7161a46f3f1103f888dcf73bac29d292240e96a5b38dd8fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef22feb1b3bc93a7169b8230efd57af32c78b5826f864a5af07f1d05256ad22a5b60f8f51ff80c5dd5a66d46513896ccb20586526c2a392bb02e4e3d34a0db156278345009e50bbba2d4088837d87234b687c276554b03b026d62caf6f732957db

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c80623f332f1461072e57806301ffc9a714610725578063025e332e1461071c5780630653aca51461071357806306fdde031461070a5780630726538914610701578063081812fc146106f8578063095ea7b3146106ef5780630f4345e2146106e657806310c395bf146106dd57806313c52826146106d457806315ba0352146106cb57806318160ddd146106c25780632398f843146106b957806323b872dd146106b0578063248a9ca3146106a7578063282c51f31461069e5780632a0acc6a146106955780632a55205a1461068c5780632d345670146106835780632f286b1b1461067a5780632f2ff15d1461067157806335bb3e161461066857806336568abe1461065f578063374032a114610656578063396e8f531461064d5780633cf40df31461064457806342842e0e1461063b57806344f71db21461063257806347e63380146106295780634a4fbeec146106205780634b81d8bd146106175780634c14f9c51461060e5780634f3db346146106055780634fdaf052146105fc5780635136dcc7146105f3578063526d5ca7146105ea57806357000972146105e15780636352211e146105d857806364a86512146105cf57806369bfdcdf146105c65780636f8b44b0146105bd57806370a08231146105b4578063715018a6146105ab57806371745b62146105a257806372b44d711461059957806373f42561146105905780637885fdc714610587578063798842691461057e5780637c3dc173146105755780637e9803421461056c5780638462151c14610563578063874a8b021461055a57806387866447146105515780638d5b98d5146105485780638da5cb5b1461053f57806391d148541461053657806392edd22e1461052d578063953232391461052457806395d89b411461051b57806399a2557a1461051257806399f9889814610509578063a059b16414610500578063a217fddf146104f7578063a22cb465146104ee578063a352ca69146104e5578063a35c23ad146104dc578063a41216ac146104d3578063aa0e2ad6146104ca578063b31391cb146104c1578063b88d4fde146104b8578063bc98a00f146104af578063c0d78655146104a6578063c87b56dd1461049d578063ca6932d514610494578063d53913931461048b578063d547741f14610482578063d5abeb0114610479578063d8ffd54314610470578063d95ba42f14610467578063dbe4613d1461045e578063e985e9c514610455578063ea3b31341461044c578063eb05629714610443578063ef60ceaf1461043a578063f2fde38b14610431578063f3b3059e14610428578063f6aacfb11461041f578063f887ea4014610416578063fcd1aac91461040d5763ff7682121461040557600080fd5b61000e6131d5565b5061000e61319a565b5061000e61316c565b5061000e61314d565b5061000e61301e565b5061000e612f50565b5061000e612e2f565b5061000e612d41565b5061000e612c7a565b5061000e612c45565b5061000e612c09565b5061000e612bc1565b5061000e612b14565b5061000e612af5565b5061000e612aaa565b5061000e612a6e565b5061000e612a4f565b5061000e612920565b5061000e6128d1565b5061000e61281e565b5061000e61278d565b5061000e612668565b5061000e612643565b5061000e612608565b5061000e6125df565b5061000e61258e565b5061000e6123ee565b5061000e6123d1565b5061000e612396565b5061000e612205565b5061000e6121c8565b5061000e612104565b5061000e6120a4565b5061000e612069565b5061000e612008565b5061000e611fde565b5061000e611efb565b5061000e611ed7565b5061000e611de4565b5061000e611d54565b5061000e611d35565b5061000e611c99565b5061000e611c64565b5061000e611c2d565b5061000e611c11565b5061000e611bb0565b5061000e611b90565b5061000e611ac6565b5061000e611a9e565b5061000e611a7c565b5061000e611a25565b5061000e61192f565b5061000e6118c4565b5061000e611845565b5061000e6117c7565b5061000e6116f6565b5061000e6116b6565b5061000e611688565b5061000e61164b565b5061000e611507565b5061000e61149a565b5061000e61145e565b5061000e611304565b5061000e6112bd565b5061000e611299565b5061000e61126f565b5061000e61124b565b5061000e6111b4565b5061000e61113c565b5061000e611066565b5061000e61102a565b5061000e610f50565b5061000e610f13565b5061000e610ee9565b5061000e610ead565b5061000e610e7d565b5061000e610e53565b5061000e610de9565b5061000e610dc5565b5061000e610da3565b5061000e610d5d565b5061000e610d19565b5061000e610cc4565b5061000e610b90565b5061000e610b5f565b5061000e610b3b565b5061000e610a35565b5061000e6108fa565b5061000e6108b2565b5061000e610802565b503461000e576000806003193601126107ed576040518091600d549081835260208093018092600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590835b8181106107d95750505084610792910385612726565b60405193838594850191818652518092526040850193925b8281106107b957505050500390f35b83516001600160a01b0316855286955093810193928101926001016107aa565b82548452928601926001928301920161077c565b80fd5b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e576020600435610822816107f0565b6001600160e01b03198116631c03211160e31b14908115610890575b811561087f575b811561086e575b811561085e575b506040519015158152f35b61086891506142c1565b38610853565b9050610879816142c1565b9061084c565b905061088a81614305565b90610845565b905061089b81614863565b9061083e565b6001600160a01b0381160361000e57565b503461000e57602036600319011261000e576004356108d0816108a1565b6108d86134ab565b600c80546001600160a01b0319166001600160a01b0392909216919091179055005b503461000e57602036600319011261000e576109d56040600081805161091f816126ac565b8281528260208201520152610935600435613421565b90549060031b1c908160005260166020526109a260206109988360002084519061095e826126d4565b546001600160a01b03811680835260a09190911c61ffff1693909101839052610985612747565b9586526001600160a01b03166020860152565b61ffff1683830152565b51815181526020808301516001600160a01b03169082015260409182015161ffff16918101919091529081906060820190565b0390f35b60005b8381106109ec5750506000910152565b81810151838201526020016109dc565b90602091610a15815180928185528580860191016109d9565b601f01601f1916010190565b906020610a329281815201906109fc565b90565b503461000e576000806003193601126107ed5760405190806002549060019180831c92808216928315610b31575b6020928386108514610b1d578588526020880194908115610afc5750600114610aa3575b6109d587610a9781890382612726565b60405191829182610a21565b600260005294509192917f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b838610610aeb5750505091019050610a97826109d53880610a87565b805485870152948201948101610acf565b60ff191685525050505090151560051b019050610a97826109d53880610a87565b634e487b7160e01b82526022600452602482fd5b93607f1693610a63565b503461000e57600036600319011261000e57602060ff600f54166040519015158152f35b503461000e57602036600319011261000e576020610b7e600435614fa7565b6040516001600160a01b039091168152f35b503461000e57604036600319011261000e57600435610bae816108a1565b6024356001600160a01b038216151580610ca6575b610bcc826144a3565b610c5257610be0575b610bde91614ea1565b005b610bf3610bed8233614cf1565b83614bb8565b610bd55760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b6064820152608490fd5b60405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b6064820152608490fd5b60ff601f541615610bc3575b60405163f30c72c560e01b8152600490fd5b503461000e57602036600319011261000e57610cde6134ab565b600435601255005b60031115610cf057565b634e487b7160e01b600052602160045260246000fd5b919060208301926003821015610cf05752565b503461000e57600036600319011261000e576109d560ff60095460081c1660405191829182610d06565b6001600160a01b0316600090815260146020526040902090565b503461000e57602036600319011261000e57600435610d7b816108a1565b60018060a01b0316600052600b6020526109d560ff6040600020541660405191829182610d06565b503461000e57602036600319011261000e57610dbd6134ab565b600435601c55005b503461000e57600036600319011261000e576020610de1615b61565b604051908152f35b503461000e57602036600319011261000e57600435610e07816108a1565b60018060a01b031660005260116020526020604060002054604051908152f35b606090600319011261000e57600435610e3f816108a1565b90602435610e4c816108a1565b9060443590565b503461000e57610bde610e6536610e27565b91610e78610e738433615124565b61502d565b6156e4565b503461000e57602036600319011261000e5760043560005260006020526020600160406000200154604051908152f35b503461000e57600036600319011261000e5760206040517f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8488152f35b503461000e57600036600319011261000e576020604051600080516020615e138339815191528152f35b503461000e57604036600319011261000e57610f33602435600435613268565b604080516001600160a01b03939093168352602083019190915290f35b503461000e57602036600319011261000e57600435610f6e816108a1565b610f766133b2565b6001600160a01b03811660009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b76020526040812054909190600080516020615e138339815191529060ff16610fcc578280f35b808352602083815260408085206001600160a01b038516600090815292529020805460ff1916905533916001600160a01b0316907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a438808280f35b503461000e57600036600319011261000e5760206040517fee67e84f062f26b2e1ed715b7ab5b471f8978a749ac5fc5bc774f49acca5e7518152f35b503461000e57604036600319011261000e57600435602435611087816108a1565b61108f6134ab565b6110a9600080516020615e1383398151915283141561469b565b6000828152602081815260408083206001600160a01b0385168452909152812090929060ff905b5416156110db578280f35b808352602083815260408085206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57602036600319011261000e5760043561115a816108a1565b6111626133b2565b6001600160a01b03811660009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b760205260408120909190600080516020615e138339815191529060ff906110d0565b503461000e57604036600319011261000e576024356111d2816108a1565b336001600160a01b038216036111ee57610bde90600435613328565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461000e57600036600319011261000e57602060ff600954166040519015158152f35b503461000e57600036600319011261000e57600c546040516001600160a01b039091168152602090f35b503461000e57600036600319011261000e57602060ff601f54166040519015158152f35b503461000e57610bde6112cf36610e27565b9060405192602084018481106001600160401b038211176112f7575b60405260008452615096565b6112ff612695565b6112eb565b503461000e57602036600319011261000e573360009081527f6bc61e8d8a7feeba9a3dfbe950298fbca23cf0136992f9ef92f1b5529ac870ae60205260408120546004359060ff16156113b5578061135e6113b292614d5b565b5061136982826154f1565b61138f828060081c600052600860205260406000209060ff6001811b91161c8154179055565b81846001600160a01b038316600080516020615e338339815191528280a4615288565b80f35b61145a60486114426113c633613a28565b6114346113d1613aa7565b6040519485937f416363657373436f6e74726f6c3a206163636f756e742000000000000000000060208601526114118151809260206037890191016109d9565b84017001034b99036b4b9b9b4b733903937b6329607d1b60378201520190613911565b03601f198101835282612726565b60405162461bcd60e51b815291829160048301610a21565b0390fd5b503461000e57600036600319011261000e5760206040517f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab8152f35b503461000e57602036600319011261000e5760206114c26004356114bd816108a1565b6149d6565b6040519015158152f35b6020908160408183019282815285518094520193019160005b8281106114f3575050505090565b8351855293810193928101926001016114e5565b503461000e57604036600319011261000e5760043560243561153961153461152f8484614090565b613928565b614595565b600080845b848111156115c357506115519150614595565b9290600090815b8484111561156e57604051806109d588826114cc565b61158161157b8284613d56565b51151590565b61159e575b61159261159891613d3e565b93613d3e565b92611558565b916115926115ba82866115b4611598958b613d56565b52613d3e565b93915050611586565b906115cd82615b2e565b8061161c575b15611608576115fa611592611600926115f56115ef8789613d56565b60019052565b613d3e565b91613d3e565b91909161153e565b916115fa8160006115b46116009488613d56565b50611626826144a3565b6115d3565b6024359061ffff8216820361000e57565b359061ffff8216820361000e57565b503461000e57604036600319011261000e57602061167c60043561166e816108a1565b61167661162b565b906146d9565b61ffff60405191168152f35b503461000e57600036600319011261000e576020601254604051908152f35b60243590600382101561000e57565b503461000e57602036600319011261000e57600435600381101561000e576116dc6134ab565b61ff006009549160081b169061ff00191617600955600080f35b503461000e5760208060031936011261000e576001600160401b0360043581811161000e573660238201121561000e57806004013591821161000e5760609260248484028301019136831161000e5761174d6134ab565b61175684613d18565b9360409061176682519687612726565b855260248386019201915b84831061178157610bde86613db2565b868336031261000e578387918351611798816126ac565b85358152828601356117a9816108a1565b838201526117b885870161163c565b85820152815201920191611771565b503461000e57602036600319011261000e57610bde6004356117e7613591565b6117f081614d5b565b506117fb82826154f1565b611821828060081c600052600860205260406000209060ff6001811b91161c8154179055565b8160006001600160a01b038316600080516020615e338339815191528280a4615288565b503461000e57600036600319011261000e5761185f613671565b6020601f5460ff8160081c169060ff82146118b7575b61ff0019166001820160081b61ff001617601f5560405190807f39dedb493270cf57e3d892a36452ebba9db444e0d5406b467262f6b70448847b600080a28152f35b6118bf613236565b611875565b503461000e57602036600319011261000e5760206118e3600435614d5b565b506040516001600160a01b039091168152f35b606090600319011261000e5760043561190e816108a1565b9061ffff90602435828116810361000e5791604435908116810361000e5790565b503461000e57610bde6119fe611944366118f6565b61195093929193613591565b60018060a01b038216600052601460205260406000209360405194611974866126ef565b54906001600160401b038083168752808360401c1660208801528260801c1660408701526060860161ffff6119b2818560c01c16839061ffff169052565b6119d760808901946119cd838260d01c16879061ffff169052565b60e01c60a08a0152565b815161ffff16811690831614611a035761ffff9091169052610d4391905b9061ffff169052565b613c4e565b5050611a1d610d4392611a18835161ffff1690565b613d02565b61ffff169052565b503461000e57604036600319011261000e57611a3f6134ab565b60408051600435815260243560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91819081015b0390a1005b503461000e57602036600319011261000e57611a966134ab565b600435601955005b503461000e57602036600319011261000e576020610de1600435611ac1816108a1565b613ba2565b503461000e576000806003193601126107ed57611ae16133b2565b601380546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b604060031982011261000e57600435906001600160401b03821161000e57611b7f91600401611b25565b9091602435600381101561000e5790565b503461000e57610bde611ba236611b55565b91611bab6134ab565b614a87565b503461000e57602036600319011261000e57600435611bce816108a1565b611bd66134ab565b6001600160a01b0316611be881614157565b50337f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db857292600080a3005b503461000e57600036600319011261000e576020610de1615b80565b503461000e57600036600319011261000e57601554604080516001600160a01b038316815260a09290921c61ffff16602083015290f35b503461000e57602036600319011261000e57600435600052600a6020526109d560ff6040600020541660405191829182610d06565b503461000e57604036600319011261000e57600435611cb781614d5b565b506001600160a01b03163303611cdd576000526010602052602435604060002055600080f35b60405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b6064820152608490fd5b503461000e57600036600319011261000e576020601754604051908152f35b503461000e57602036600319011261000e57600435611d72816108a1565b6000611d7d82613ba2565b90611d8782614595565b92815b838303611d9f57604051806109d587826114cc565b80611dab600192615b2e565b611db6575b01611d8a565b611dbf81614d5b565b50828060a01b03808516911603611db05780611dde8386019588613d56565b52611db0565b503461000e57604036600319011261000e57600435611e02816108a1565b611e0a6116a7565b611e1d600160ff601b5416151514614349565b336001600160a01b03831603611ea257816002611e59611e52610bde9560018060a01b0316600052600b602052604060002090565b5460ff1690565b611e6281610ce6565b1480611e8e575b15614b23576001600160a01b0381166000908152601e60205260409020429055614b23565b50611e9882610ce6565b6002821415611e69565b60405162461bcd60e51b815260206004820152600d60248201526c3737ba103cb7bab939b2b6331760991b6044820152606490fd5b503461000e57600036600319011261000e57602060ff601b54166040519015158152f35b503461000e57602036600319011261000e57600435611f18613671565b601f5460081c60ff1690611f3681600052601a602052604060002090565b5491611f48611f4483615b2e565b1590565b611fc55760ff168015611fb3578060ff84161015611fa157610bde9281837f73eca9ff1b97607af9c8765c3a002b2d958a586d5e014ab7b861210d55b338c1600080a360ff19161790600052601a602052604060002055565b6040516376de221360e01b8152600490fd5b60405163038d6ce760e01b8152600490fd5b6040516308ac597760e01b815260048101839052602490fd5b503461000e57600036600319011261000e576013546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e57602060ff61205360243561202d816108a1565b6004356000526000845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b8015150361000e57565b503461000e57602036600319011261000e576004356120878161205f565b61208f6134ab565b60ff8019601b54169115151617601b55600080f35b503461000e57602036600319011261000e576004356120c281615b2e565b156120ec576120e1602091600052601a60205260ff6040600020541690565b60ff60405191168152f35b602490604051906308ac597760e01b82526004820152fd5b503461000e576000806003193601126107ed5760405190806003549060019180831c928082169283156121be575b6020928386108514610b1d578588526020880194908115610afc5750600114612165576109d587610a9781890382612726565b600360005294509192917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8386106121ad5750505091019050610a97826109d53880610a87565b805485870152948201948101612191565b93607f1693612132565b503461000e57606036600319011261000e576109d56121f96004356121ec816108a1565b60443590602435906145c7565b604051918291826114cc565b503461000e57604036600319011261000e57600435612223816108a1565b60243561222e613751565b612236615b61565b8101808211612389575b6019541061237757600554908015612324576001600160a01b038316926122e790829061226e8615156151e4565b612277816155a5565b6122896122848387613936565b600555565b6122c0816122a1876000526004602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b600885901c60009081526001602052604090208054600160ff1b60ff88161c179055615388565b81905b6122f48184613936565b821015610bde5761231d826122f493866000600080516020615e338339815191528180a4613d3e565b91506122ea565b60405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608490fd5b604051638a164f6360e01b8152600490fd5b612391613236565b612240565b503461000e57602036600319011261000e576004356123b48161205f565b6123bc6134ab565b60ff8019600f54169115151617600f55600080f35b503461000e57600036600319011261000e57602060405160008152f35b503461000e57604036600319011261000e5760043561240c816108a1565b602435806124198161205f565b612571575b612427336149d6565b158015612569575b612438906147b5565b612444610bed33614c74565b8015612561575b61245490614801565b612460610bed33614c74565b8015612559575b61247090614801565b612479336149d6565b158015612551575b61248a906147b5565b6001600160a01b0382169133831461250c57816124c96124da9233600052600760205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606490fd5b508015612481565b508015612467565b50801561244b565b50801561242f565b60ff601f54161561241e5760405163f30c72c560e01b8152600490fd5b503461000e57604036600319011261000e57610bde6004356125af816108a1565b6024356125ba613831565b806125c85750600090614b23565b6001036125d757600190614b23565b600290614b23565b503461000e57602036600319011261000e57336000526011602052600435604060002055600080f35b503461000e57602036600319011261000e576004356126268161205f565b61262e6134ab565b60ff8019600954169115151617600955600080f35b503461000e57600036600319011261000e57602060ff601f5460081c16604051908152f35b503461000e57602036600319011261000e5760043560005260106020526020604060002054604051908152f35b50634e487b7160e01b600052604160045260246000fd5b606081019081106001600160401b038211176126c757604052565b6126cf612695565b604052565b604081019081106001600160401b038211176126c757604052565b60c081019081106001600160401b038211176126c757604052565b61012081019081106001600160401b038211176126c757604052565b90601f801991011681019081106001600160401b038211176126c757604052565b60405190612754826126ac565b565b60405190612754826126d4565b6020906001600160401b038111612780575b601f01601f19160190565b612788612695565b612775565b503461000e57608036600319011261000e576004356127ab816108a1565b6024356127b7816108a1565b606435916001600160401b03831161000e573660238401121561000e578260040135916127e383612763565b926127f16040519485612726565b808452366024828701011161000e576020816000926024610bde9801838801378501015260443591615096565b503461000e57604036600319011261000e5760043561283c816108a1565b602435612847613591565b61284f615b61565b81018082116128c4575b6019541061237757600554908015612324576001600160a01b0383169261288790829061226e8615156151e4565b81905b6128948184613936565b821015610bde576128bd8261289493866000600080516020615e338339815191528180a4613d3e565b915061288a565b6128cc613236565b612859565b503461000e57602036600319011261000e576004356128ef816108a1565b6128f76134ab565b601f805462010000600160b01b03191660109290921b62010000600160b01b0316919091179055005b503461000e57602036600319011261000e57601f54600435601082901c6001600160a01b03168015612a3d57612958611f4483615b2e565b611fc5576109d59260009161296c846144a3565b83908414612a3057506201fe006129ae60015b60ff61299988600052601a60205260ff6040600020541690565b9116906101fe9060011b16906101fe19161790565b6040516392cb829d60e01b815260048101969096526201fe00191660019390931b16919091176024840152829081806044810103915afa908115612a23575b600091612a02575b5060405191829182610a21565b612a1d913d8091833e612a158183612726565b810190613b37565b386129f5565b612a2b613b95565b6129ed565b6129ae6201fe009161297f565b60405163179ce99f60e01b8152600490fd5b503461000e57600036600319011261000e576020601c54604051908152f35b503461000e57600036600319011261000e5760206040517f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68152f35b503461000e57604036600319011261000e57610bde602435600435612ace826108a1565b612ad66134ab565b612af0600080516020615e1383398151915282141561469b565b613328565b503461000e57600036600319011261000e576020601954604051908152f35b503461000e57610bde610d436119fe612b2c366118f6565b612b37949194613591565b60018060a01b03831660005260146020526040600020946119f560405196612b5e886126ef565b54916001600160401b038084168952808460401c1660208a01528360801c166040890152606088016119f561ffff94612ba0868260c01c16849061ffff169052565b612bb760808c01968260d01c16879061ffff169052565b60e01c60a08b0152565b503461000e57602036600319011261000e57612bdb6134ab565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce760206040516004358152a1005b503461000e57600036600319011261000e5760206040517f43f25613eb2f15fb17222a5d424ca2655743e71265d98e4b93c05e5fb589ecde8152f35b503461000e57604036600319011261000e5760206114c2600435612c68816108a1565b60243590612c75826108a1565b61477e565b503461000e5760408060031936011261000e576004356001600160401b03811161000e57612cac903690600401611b25565b602435612cb7613831565b80612d265750612cca60005b8284614a87565b60005b818110612cd657005b807ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7612d19612d09612d21948688614331565b8751903581529081906020820190565b0390a1613d3e565b612ccd565b600103612d3757612cca6001612cc3565b612cca6002612cc3565b503461000e576000806003193601126107ed57600554612d6361153482613928565b8283845b84811115612dd95750612d7a9150614595565b92809181925b84841115612d9657604051806109d588826114cc565b612da361157b8284613d56565b612dba575b611592612db491613d3e565b92612d80565b91611592612dd082866115b4612db4958b613d56565b93915050612da8565b90612de382615b2e565b80612e20575b15612e0d576115fa611592612e05926115f56115ef8789613d56565b919091612d67565b916115fa81876115b4612e059488613d56565b50612e2a826144a3565b612de9565b503461000e57604036600319011261000e57612e496134ab565b7f2c5ea6e4103e78cb101e796fb2dace540362fc542cbff5145eaa24af7dd8fe41604051612e76816126d4565b600435612e82816108a1565b8152612f2b612f22612e9261162b565b926020810193808552612ead61271061ffff80931610613d78565b612ef660018060a01b03835116865192602060405191612ecc836126d4565b838352851691015260018060a01b03166bffffffffffffffffffffffff60a01b6015541617601555565b6015805461ffff60a01b191660a09290921b61ffff60a01b16919091179055516001600160a01b031690565b915161ffff1690565b604080516001600160a01b03909316835261ffff909116602083015281908101611a77565b503461000e57602036600319011261000e57600435612f6e816108a1565b612f766133b2565b6001600160a01b03908116908115612fca57601354826bffffffffffffffffffffffff60a01b821617601355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e5761302d36611b55565b613046600161303e601b5460ff1690565b151514614349565b60005b828110613109575060005b8281106130bc5750613067908284614a87565b60005b81811061307357005b807ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7612d196130a66130b7948688614331565b604051903581529081906020820190565b61306a565b806130d5836130cf6130de948789614331565b35614381565b6130e357613d3e565b613054565b426131036130f2838789614331565b35600052601d602052604060002090565b55613d3e565b61311d613117828587614331565b35614d5b565b506001600160a01b0316330361313b5761313690613d3e565b613049565b60405163e131a43f60e01b8152600490fd5b503461000e57602036600319011261000e5760206114c26004356144a3565b503461000e57600036600319011261000e57601f5460405160109190911c6001600160a01b03168152602090f35b503461000e57602036600319011261000e576004356131b88161205f565b6131c06134ab565b60ff8019601f54169115151617601f55600080f35b503461000e57602036600319011261000e576004356131f3816108a1565b6131fb6134ab565b6001600160a01b031661320d81613f72565b50337fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c600080a3005b50634e487b7160e01b600052601160045260246000fd5b8181029291811591840414171561326057565b612754613236565b6000818152601660205260409020546001600160a01b039392919084166132d7575060155492831692831515806132c7575b6132aa5750509050600090600090565b610a329161ffff6132bf9260a01c169061324d565b612710900490565b5061ffff8160a01c16151561329a565b92610a329161332261331b6133106132bf946132fd896000526016602052604060002090565b5416976000526016602052604060002090565b5460a01c61ffff1690565b61ffff1690565b9061324d565b6000818152602081815260408083206001600160a01b038616845290915281205490919060ff1661335857505050565b808252602082815260408084206001600160a01b038616600090815292529020805460ff1916905533926001600160a01b0316917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4565b6013546001600160a01b031633036133c657565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b50634e487b7160e01b600052603260045260246000fd5b601754811015613459575b60176000527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150190600090565b61346161340a565b61342c565b600d5481101561349e575b600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50190600090565b6134a661340a565b613471565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b76020526040902054600080516020615e138339815191529060ff16156134f55750565b6134fe33613a28565b90613507613943565b9060306135138361397c565b53607861351f83613992565b5360415b600181116135425761145a604861144286611434876113d188156139dd565b9080600f61357f92166010811015613584575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b5360041c916139c2565b613523565b61358c61340a565b613555565b3360009081527f76a187d6a2b709324658910cc6e93f7bc2a670e53959e6ecbfa9a8f2b634cf9260205260409020547f43f25613eb2f15fb17222a5d424ca2655743e71265d98e4b93c05e5fb589ecde9060ff16156135ed5750565b6135f633613a28565b906135ff613943565b90603061360b8361397c565b53607861361783613992565b5360415b6001811161363a5761145a604861144286611434876113d188156139dd565b9080600f61366c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b61361b565b3360009081527f738678fe42df6a4211eb7628ac9b056229141839eb4f4ef4cc249f1d36e8c92160205260409020547f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab9060ff16156136cd5750565b6136d633613a28565b906136df613943565b9060306136eb8361397c565b5360786136f783613992565b5360415b6001811161371a5761145a604861144286611434876113d188156139dd565b9080600f61374c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6136fb565b3360009081527f0781d7cac9c378efa22a7481e4d4d29704a680ddf504b3bc50b517700ee11e6c60205260409020547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69060ff16156137ad5750565b6137b633613a28565b906137bf613943565b9060306137cb8361397c565b5360786137d783613992565b5360415b600181116137fa5761145a604861144286611434876113d188156139dd565b9080600f61382c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6137db565b3360009081527fa1076b852b121f59d9dbdf8969e97d0e71359c80699771550e8eb09cff0b398260205260409020547fee67e84f062f26b2e1ed715b7ab5b471f8978a749ac5fc5bc774f49acca5e7519060ff161561388d5750565b61389633613a28565b9061389f613943565b9060306138ab8361397c565b5360786138b783613992565b5360415b600181116138da5761145a604861144286611434876113d188156139dd565b9080600f61390c92166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b6138bb565b90613924602092828151948592016109d9565b0190565b906001820180921161326057565b9190820180921161326057565b60405190608082018281106001600160401b0382111761396f575b604052604282526060366020840137565b613977612695565b61395e565b60209080511561398a570190565b61392461340a565b60219080516001101561398a570190565b9060209180518210156139b557010190565b6139bd61340a565b010190565b80156139d0575b6000190190565b6139d8613236565b6139c9565b156139e457565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b60405190613a35826126ac565b602a825260403660208401376030613a4c8361397c565b536078613a5883613992565b536029905b60018211613a7057610a329150156139dd565b80600f613aa192166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b90613a5d565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848613ad0613943565b906030613adc8361397c565b536078613ae883613992565b536041905b60018211613b0057610a329150156139dd565b80600f613b3192166010811015613584576f181899199a1a9b1b9c1cb0b131b232b360811b901a61357584866139a3565b90613aed565b60208183031261000e578051906001600160401b03821161000e570181601f8201121561000e578051613b6981612763565b92613b776040519485612726565b8184526020828401011161000e57610a3291602080850191016109d9565b506040513d6000823e3d90fd5b6001600160a01b03168015613bcb5760005260146020526001600160401b036040600020541690565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608490fd5b9067ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b8151815467ffffffffffffffff19166001600160401b03918216178255909190613cae90613c828160208501511685613c26565b6040830151845467ffffffffffffffff60801b1916911660801b67ffffffffffffffff60801b16178355565b60608101518254608083015160a0909301516001600160c01b0390911660c09290921b61ffff60c01b169190911760d09290921b61ffff60d01b169190911760e09190911b6001600160e01b031916179055565b91909161ffff8080941691160191821161326057565b6020906001600160401b038111613d31575b60051b0190565b613d39612695565b613d2a565b6001906000198114613d4e570190565b613924613236565b6020918151811015613d6b575b60051b010190565b613d7361340a565b613d63565b15613d7f57565b60405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642062707360a81b6044820152606490fd5b906000805b8351811015613f6c5780613dce613e669286613d56565b51604090818101613df0612710613dea61331b845161ffff1690565b10613d78565b6020828101805190916001600160a01b039091169081613e6b57505050507fa2870857763bd9ae76c957f869f16b31c18dd3bb4c7b4d3a4496dc5c57c657f9918186613e4a612d1994516000526016602052604060002090565b55613e558151614225565b505190519081529081906020820190565b613db7565b613f398495613f1f7f389b70fb0887f01e83784eb1c4c589f740eca53b00ed0f45e41db5d079719abb9894613ed3613f4295613ead612d19999a5161ffff1690565b90613ec8613eb9612756565b6001600160a01b039095168552565b83019061ffff169052565b613ee883516000526016602052604060002090565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b613f298151614004565b505194516001600160a01b031690565b945161ffff1690565b90519283526001600160a01b03909316602083015261ffff90921660408201529081906060820190565b50509050565b80600052600e60205260406000205415600014613ffe5780600d54600160401b811015613ff1575b6001810180600d55811015613fe4575b7fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50155600d5490600052600e602052604060002055600190565b613fec61340a565b613faa565b613ff9612695565b613f9a565b50600090565b80600052601860205260406000205415600014613ffe5780601754600160401b811015614083575b6001810180601755811015614076575b7fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150155601754906000526018602052604060002055600190565b61407e61340a565b61403c565b61408b612695565b61402c565b9190820391821161326057565b600d5480156140ef5760007fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb48119830192808410156140e2575b600d83520155600d55565b6140ea61340a565b6140d7565b634e487b7160e01b600052603160045260246000fd5b60175480156140ef5760007fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1481198301928084101561414a575b601783520155601755565b61415261340a565b61413f565b6000818152600e6020526040902054801561421e576000916141b291600019808201828111614211575b600d54918201918211614204575b8082036141b8575b5050506141a261409d565b600052600e602052604060002090565b55600190565b6141a26141e0916141d86141ce6141fb95613466565b90549060031b1c90565b928391613466565b90919082549060031b600019811b9283911b16911916179055565b55388080614197565b61420c613236565b61418f565b614219613236565b614181565b5050600090565b600081815260186020526040902054801561421e576000916141b2916000198082018281116142b4575b6017549182019182116142a7575b808203614280575b505050614270614105565b6000526018602052604060002090565b6142706141e0916142966141ce61429e95613421565b928391613421565b55388080614265565b6142af613236565b61425d565b6142bc613236565b61424f565b6001600160e01b0319811663152a902d60e11b8114919082156142f4575b5081156142ea575090565b610a329150614863565b63c69dbd8f60e01b149150386142df565b63ffffffff60e01b16637965db0b60e01b8114908115614323575090565b6301ffc9a760e01b14919050565b91908110156143415760051b0190565b613d3961340a565b1561435057565b60405162461bcd60e51b81526020600482015260096024820152686e6f7420616c6c6f7760b81b6044820152606490fd5b9061438b81610ce6565b6001810361443f5750336000908152600b602052604090206143ac90611e52565b906143b682610ce6565b6002821480928161440e575b6143cb90610ce6565b1590816143e3575b5081156143de575090565b905090565b60029150611e526143fe91600052600a602052604060002090565b61440781610ce6565b14386143d3565b92506143cb600161442c611e5285600052600a602052604060002090565b61443581610ce6565b14159390506143c2565b61444881610ce6565b613ffe57336000908152600b6020526040902061448990611e529060029061446d9083565b61447681610ce6565b141592600052600a602052604060002090565b61449281610ce6565b8161449b575090565b600291501490565b601b5460ff161515600103614541576144bb816148d8565b90811561450e575b81156144cd575090565b6144d79150614d5b565b506001600160a01b03166000908152601e6020526040902054601c54810190811061450157421090565b614509613236565b421090565b809150600052601d602052604060002054601c548101809111614534575b4210906144c3565b61453c613236565b61452c565b610a32906148d8565b1561455157565b606460405162461bcd60e51b815260206004820152602060248201527f7374617274206d7573742062652067726561746572207468616e2073746f702e6044820152fd5b9061459f82613d18565b6145ac6040519182612726565b82815280926145bd601f1991613d18565b0190602036910137565b9290926145d583851061454a565b600091600554808511614693575b506145ed82613ba2565b8486101561468c57858503818110614684575b505b61460b81614595565b95811561467b575b8581141580614671575b15614667578061462e600192615b2e565b614639575b01614613565b61464281614d5b565b50828060a01b038087169116036146335780614661838801978a613d56565b52614633565b5050918452509050565b508185141561461d565b50909350505050565b905038614600565b5082614602565b9350386145e3565b156146a257565b60405162461bcd60e51b815260206004820152600f60248201526e3737ba1030b236b4b71037b7363c9760891b6044820152606490fd5b60018060a01b03166000526014602052604060002090614765604051926146ff846126ef565b54926001600160401b038085168252808560401c1660208301528460801c16604082015261476d6060820161ffff938493614743858960c01c16849061ffff169052565b60a0608082019861475d878260d01c168b9061ffff169052565b60e01c910152565b5161ffff1690565b9216911603613ffe575161ffff1690565b90614788826149d6565b801561479c575b61421e57610a3291614c9f565b506147af6147a983614c74565b82614bb8565b1561478f565b156147bc57565b60405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606490fd5b1561480857565b60405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560448201526c103637b1b5b2b2103a37b5b2b760991b6064820152608490fd5b61486c81614d17565b9081156148c7575b8115614895575b8115614885575090565b6001600160e01b03191615919050565b90506001600160e01b03198116630101c11560e71b1480156148b8575b9061487b565b506148c281614b7a565b6148b2565b90506148d281614b7a565b90614874565b6148e181615b2e565b156148ef57610a329061494a565b60405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608490fd5b60ff6009541615613ffe5780600052600a602052600260ff6040600020541661497281610ce6565b1490811561498a575b5061498557600090565b600190565b905060ff6149a282600052600a602052604060002090565b54166149ad81610ce6565b1590816149bc575b503861497b565b6149d091506149ca90614d5b565b506149d6565b386149b5565b60095460ff81161561421e576001600160a01b0382166000908152600b602052604090205460029060ff16614a0a81610ce6565b14918215614a1e575b505061498557600090565b6001600160a01b03166000908152600b602052604090205490915060ff16614a4581610ce6565b159081614a55575b503880614a13565b6002915060081c60ff16614a6881610ce6565b1438614a4d565b906003811015610cf05760ff80198354169116179055565b9160005b828110614a985750505050565b614aa3818486614331565b35600052602090600a8252604091614abe8484600020614a6f565b614acc613117838789614331565b50614ad8838789614331565b35906003861015610cf0577fc2b9bdb88f6723b48e57bd5eee65bf3718ed64f8dcae05bb63a2c5c14e3c44eb8693614b1e96519242845260018060a01b031692a4613d3e565b614a8b565b6001600160a01b03166000818152600b60205260409020614b45908390614a6f565b7f9fdb14457e6a7bd3753c649831b026de987c06e52d16459a928540738c2ea34b60405180614b75339582610d06565b0390a3565b6001600160e01b03198116632742b5b960e01b14908115614b99575090565b610a329150614d17565b9081602091031261000e5751610a328161205f565b600f5490919060ff1615614c6d576001600160a01b0382166000908152600e60205260409020541515918215614bed57505090565b600c54604051630f8350ed60e41b81526001600160a01b039283166004820152602481019390935291925060209183916044918391165afa908115614c60575b600091614c38575090565b610a32915060203d8111614c59575b614c518183612726565b810190614ba3565b503d614c47565b614c68613b95565b614c2d565b5050600190565b6001600160a01b0316600090815260116020526040902054614c965760125490565b60406000205490565b90614cac6147a983614c74565b1561421e57610a3291614cbe816149d6565b61421e576001600160a01b039081166000908152600760209081526040808320939094168252919091522060ff90541690565b906000526010602052604060002054614d0d57610a3290614c74565b5060406000205490565b6001600160e01b031981166380ac58cd60e01b811491908215614d4a575b508115614d40575090565b610a329150614305565b635b5e139f60e01b14915038614d35565b614d6481615b2e565b15614e475760009060089160ff82841c9216908281526001908160205260408120548360ff181c91821515600014614dd7575050614da4614daa91615c7f565b60ff1690565b9003911b175b614dd4614dc7826000526004602052604060002090565b546001600160a01b031690565b91565b925093929050815b614dec575b505050614db0565b614df7811515615c16565b6000190190614e10826000526001602052604060002090565b5480614e1e57509081614ddf565b614e3c92939450614da49150614e3390615c7f565b60ff9081031690565b911b17388080614de4565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b90614eab81614d5b565b506001600160a01b038181169084168114614f56573314908115614f44575b5015614ed957612754916158c9565b60405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608490fd5b614f509150339061477e565b38614eca565b60405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608490fd5b614fb081615b2e565b15614fd0576000908152600660205260409020546001600160a01b031690565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b1561503457565b60405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6044820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b6064820152608490fd5b906150ba9392916150aa610e738433615124565b6150b58383836156e4565b6159a4565b156150c157565b60405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b6064820152608490fd5b61512d82615b2e565b156151875761513b82614d5b565b506001600160a01b03828116828216811494909190851561516f575b505050821561516557505090565b610a32925061477e565b61517c9192939550614fa7565b161491388080615157565b60405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608490fd5b156151eb57565b60405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b9060016001600160401b038093160191821161326057565b9190916001600160401b038080941691160191821161326057565b6001600160401b03908116600019019190821161326057565b61275491906001600160a01b03811615615346576001600160a01b03811660009081526014602052604090206152e6905b6152cc6001600160401b0382541661526f565b6001600160401b03166001600160401b0319825416179055565b6001600160a01b0381166000908152601460205260409020615341905b6153196001600160401b03825460801c1661523c565b815467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16179055565b615644565b60008052601460205261537660406000206001600160401b0390600182825460401c160191821161537b57613c26565b6152e6565b615383613236565b613c26565b90600160401b81101561000e576001600160a01b03821660009081526014602052604090206001600160401b0391821692906153d4906153ce8585835460401c16615254565b90613c26565b6001600160a01b0381161561540b576001600160a01b03166000908152601460205260409020612754926152cc9192835416615254565b5061531961275492600080526014602052604060002092835460801c16615254565b61275492916001600160a01b03828116156154ba576001600160a01b0383166000908152601460205260409020615463906152b9565b811615615498576001600160a01b03166000908152601460205260409020615341906152cc6001600160401b0382541661523c565b506001600160a01b038116600090815260146020526040902061534190615303565b6001600160a01b03821660009081526014602052604090206154ec906153ce6001600160401b03825460401c1661523c565b615463565b60ff601f541680615593575b8061558b575b610cb2576001600160a01b0316151580615583575b61551f5750565b615528906144a3565b61552e57565b60405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b6064820152608490fd5b506000615518565b506001615503565b506001600160a01b03811615156154fd565b60ff601f541690816155d5575b816155bf575b50610cb257565b6001600160a01b031661dead14159050386155b8565b600091506155b2565b60ff601f541680615632575b8061561d575b610cb2576001600160a01b0390811615159182615611575b505061551f5750565b16151590503880615608565b506001600160a01b03821661dead14156155f0565b506001600160a01b03811615156155ea565b6001600160a01b031615158061566d575b61565c5750565b600052601060205260006040812055565b81600052600a602052604060002060ff198154169055615655565b1561568f57565b60405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608490fd5b91906156ef82614d5b565b6001600160a01b038086169592909190821686900361581a5761275495859285169161571c831515615688565b6157278487876155de565b61573084615874565b61573984613928565b615761611f44828060081c600052600160205260ff6001811b91161c60406000205416151590565b8061580f575b6157cb575b50615785866122a1866000526004602052604060002090565b83036157a4575b600080516020615e33833981519152600080a461542d565b600883901c60009081526001602052604090208054600160ff1b60ff86161c17905561578c565b806157e7876122a1615809946000526004602052604060002090565b8060081c600052600160205260406000209060ff6001811b91161c8154179055565b3861576c565b506005548110615767565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608490fd5b600081815260066020526040812080546001600160a01b031916905561589982614d5b565b506001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a4565b600082815260066020526040902080546001600160a01b0319166001600160a01b0383161790556158f982614d5b565b506001600160a01b0391821691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b9081602091031261000e5751610a32816107f0565b6001600160a01b039182168152911660208201526040810191909152608060608201819052610a32929101906109fc565b3d1561599f573d9061598582612763565b916159936040519384612726565b82523d6000602084013e565b606090565b9192813b15615b255790929160019081948285935b6159c7575b50505050505090565b6159d48697989596613928565b841015615b1c57604095865197630a85bd0160e11b998a8a5260209a8b60049b808d878c8c3393850193615a0794615943565b6000929184918391900381856001600160a01b038e165af1919282615aed575b5050615aae578c8c8c615a38615974565b80519384615aa857825162461bcd60e51b81528061145a81870160809060208152603560208201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b60608201520190565b84925001fd5b91939699509194979a50615acd9396995082615ad9575b505096613d3e565b928095929491956159b9565b6001600160e01b0319161490503880615ac5565b615b0d929350803d10615b15575b615b058183612726565b81019061592e565b90388e615a27565b503d615afb565b849796506159be565b50505050600190565b8060081c6000526008602052600160ff1b60ff82161c60406000205416613ffe576005541180615b5b5790565b50600190565b600554615b6c615b80565b8103908111615b785790565b610a32613236565b600090600060055490600891821c90600192838301809311615c09575b92919080935b828510615bb1575050505050565b909192939586835281602052604083205490818685915b615bf85750615be292508101809111615beb575b96613d3e565b93929190615ba3565b615bf3613236565b615bdc565b600019840190931692018683615bc8565b615c11613236565b615b9d565b15615c1d57565b60405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608490fd5b604051615c8b8161270a565b7ffd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f86101008083527e01020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7560208401527f06264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c960408401527f071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee360608401527f0e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf760808401527fff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c860a08401527f16365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f660c08401527ffe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf560e0840152820152811561000e57615dfe615e0c917e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff84610a3295600003160260f81c906139a3565b516001600160f81b03191690565b60f81c9056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220416b820d1f7f9774b50d7e0568a4d7524b3f3775d4712385efb7a67bef92184064736f6c63430008110033

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