ETH Price: $2,410.77 (-2.87%)
 

Overview

Max Total Supply

9,300 BCG

Holders

1,133

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
3 BCG
0xdcea2a0baef09252c30ba97d7f309f5ca4c2af46
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:
BlueChipGenesis

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 33 : BlueChipGenesis.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "./contract-allow-list/ERC721AntiScam.sol";
import "./interface/ITokenURI.sol";

error MaxSupplyOver();

contract BlueChipGenesis is AccessControl, Pausable, ERC721AntiScam, DefaultOperatorFilterer, ERC2981 {
    bytes32 public constant ADMIN = keccak256("ADMIN");
    bytes32 public constant MINTER = keccak256("MINTER");
    uint256 constant MAX_SUPPLY = 26000;
    uint256 public baseTime;

    using Strings for uint256;

    string public baseURI = "https://bluechip-genesis.s3.ap-northeast-1.amazonaws.com/metadata/";
    string public baseExtension = ".json";
    ITokenURI public tokenuri;

    address constant TREASURY_ADDRESS = 0x4f4823F3639DdCC2B14093a28802E214C7C28D03;
    address public royaltyReceiver = 0x4f4823F3639DdCC2B14093a28802E214C7C28D03;

    constructor() ERC721Psi("BLUECHIP-GENESIS-", "BCG") {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(ADMIN, msg.sender);
        _grantRole(ADMIN, 0x407211BeF7cbca2C8897C580EC16c80F2ad5c966);
        _grantRole(ADMIN, 0x11F51b553ed8175Bf26faD5Eec20BEbAB31c0893);
        _grantRole(MINTER, msg.sender);

        _safeMint(TREASURY_ADDRESS, 782);

        _pause();

        _setDefaultRoyalty(royaltyReceiver, 1000); // 10%

        baseTime = block.timestamp;
    }

    /**
     * ミント関数
     */
    /// @dev MINTERによるミント関数
    function mint(address _to, uint256 _amount) external onlyRole(MINTER) {
        /**
         * @notice ミント用コントラクトでコントラクトからのミントをrevertしているので
         *         _safeMint()ではなく_mint()を使用しています
         */
        if (_amount + totalSupply() > MAX_SUPPLY) revert MaxSupplyOver();
        _mint(_to, _amount);
    }

    /// @dev エアドロミント関数
    function adminMint(address[] calldata _airdropAddresses, uint256[] calldata _UserMintAmount)
        external
        onlyRole(ADMIN)
    {
        require(_airdropAddresses.length == _UserMintAmount.length, "array length unmatch");

        uint256 _totalAmmount;

        for (uint256 i = 0; i < _UserMintAmount.length; i++) {
            require(_UserMintAmount[i] > 0, "amount 0 address exists!");

            // adminがボケた引数を入れないことが大前提
            unchecked {
                _totalAmmount += _UserMintAmount[i];
            }

            if (_totalAmmount + totalSupply() > MAX_SUPPLY) revert MaxSupplyOver();

            _safeMint(_airdropAddresses[i], _UserMintAmount[i]);
        }
    }

    /**
     * ADMIN用 setter関数
     */
    /// @dev メタデータフォルダーのsetter(..../まで)
    function setBaseURI(string memory _value) external onlyRole(ADMIN) {
        baseURI = _value;
    }

    /// @dev メタデータファイル拡張子のsetter(デフォルトは.json)
    function setBaseExtension(string memory _value) external onlyRole(ADMIN) {
        baseExtension = _value;
    }

    /// @dev オンチェーンメタデータ用のコントラクトsetter関数
    function setOnChainTokenURI(address _tokenUriContract) external onlyRole(ADMIN) {
        tokenuri = ITokenURI(_tokenUriContract);
    }

    /// @dev transferを禁止するsetter関数(ミントも止まります)
    function pause() external onlyRole(ADMIN) {
        _pause();
    }

    /// @dev transferを禁止を解除するsetter関数
    function unpause() external onlyRole(ADMIN) {
        _unpause();
    }

    /// @dev sAFA抑止機能のON/OFF(基本はONですが、念のため)
    function setEnableRestrict(bool value) external onlyRole(ADMIN) {
        enableRestrict = value;
    }

    /// @dev ロック機構のON/OFF(基本はONですが、念のため)
    function setEnableLock(bool value) external onlyRole(ADMIN) {
        enableLock = value;
    }

    /**
     * OVERRIDES ERC721Lockable functions
     */
    /**
     * @notice setTokenLock()とsetWalletLock()は持ち主に加え、ADMINも操作できるようにしました
     *         setContractLock()はownerでなく、ADMINが使えるようにしました
     */
    function setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus) external override {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(msg.sender == ownerOf(tokenIds[i]) || hasRole(ADMIN, msg.sender), "not owner or admin.");
        }
        _setTokenLock(tokenIds, lockStatus);
    }

    function setWalletLock(address to, LockStatus lockStatus) external override {
        require(to == msg.sender || hasRole(ADMIN, msg.sender), "not yourself or admin.");
        _setWalletLock(to, lockStatus);
    }

    function setContractLock(LockStatus lockStatus) external override onlyRole(ADMIN) {
        _setContractLock(lockStatus);
    }

    /**
     * OVERRIDES ERC721RestrictApprove functions
     */
    function addLocalContractAllowList(address transferer) external override onlyRole(ADMIN) {
        _addLocalContractAllowList(transferer);
    }

    function removeLocalContractAllowList(address transferer) external override onlyRole(ADMIN) {
        _removeLocalContractAllowList(transferer);
    }

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

    function setCALLevel(uint256 level) external override onlyRole(ADMIN) {
        CALLevel = level;
    }

    function setCAL(address calAddress) external override onlyRole(ADMIN) {
        _setCAL(calAddress);
    }

    /**
     * OVERRIDES OperatorFilter functions
     */
    function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

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

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

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

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

    /**
     * ERC2981のSetter関数
     */
    function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(ADMIN) {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function deleteDefaultRoyalty() external onlyRole(ADMIN) {
        _deleteDefaultRoyalty();
    }

    /**
     * その他の関数
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl, ERC721AntiScam, ERC2981)
        returns (bool)
    {
        return (
            AccessControl.supportsInterface(interfaceId) || ERC721AntiScam.supportsInterface(interfaceId)
                || ERC2981.supportsInterface(interfaceId) || super.supportsInterface(interfaceId)
        );
    }

    function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");

        if (address(tokenuri) != address(0)) {
            return tokenuri.tokenURI(_tokenId);
        }

        return string(abi.encodePacked(ERC721Psi.tokenURI(_tokenId), baseExtension));
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    /// @notice pause()でtransfer禁止
    function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity)
        internal
        override
        whenNotPaused
    {
        super._beforeTokenTransfers(from, to, startTokenId, quantity);
    }
}

File 2 of 33 : 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 3 of 33 : 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 4 of 33 : 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 5 of 33 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 8 of 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 33 : 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 20 of 33 : IERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @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);
    
    /**
     * @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 21 of 33 : 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 22 of 33 : 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 23 of 33 : ERC721AntiScam.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @notice ERC721PsiBurnableをERC721Psiに変更しました
 */

import "contract-allow-list/contracts/ERC721AntiScam/IERC721AntiScam.sol";
import "./ERC721Lockable.sol";
import "./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 24 of 33 : ERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @notice ERC721PsiBurnableをERC721Psiに変更しました
 */

// import "./IERC721Lockable.sol";
import "contract-allow-list/contracts/ERC721AntiScam/lockable/IERC721Lockable.sol";
import "erc721psi/contracts/ERC721Psi.sol";
// import "erc721psi/contracts/extension/ERC721PsiBurnable.sol";

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

abstract contract ERC721Lockable is ERC721Psi, IERC721Lockable {
// 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]),
                msg.sender,
                lockStatus,
                tokenIds[i]
            );
        }
    }

    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 25 of 33 : ERC721RestrictApprove.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @notice ERC721PsiBurnableをERC721Psiに変更しました
 */

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

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

abstract contract ERC721RestrictApprove is ERC721Psi, IERC721RestrictApprove {
// 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 26 of 33 : ITokenURI.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.7.0 <0.9.0;

interface ITokenURI{
    function tokenURI(uint256 _tokenId) external view returns(string memory);
}

File 27 of 33 : 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 (uint256) {
        require(owner != address(0), "ERC721Psi: balance query for the zero address");

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

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

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

    /**
     * @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 view virtual 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 28 of 33 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol";
/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}

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

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 30 of 33 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 31 of 33 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

File 32 of 33 : 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 33 of 33 : 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
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MaxSupplyOver","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"}],"name":"CalLevelChanged","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"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":"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":"MINTER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"addLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_UserMintAmount","type":"uint256[]"}],"name":"adminMint","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":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractLockStatus","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","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":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"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":"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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_value","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_value","type":"string"}],"name":"setBaseURI","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":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setContractLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"address","name":"_tokenUriContract","type":"address"}],"name":"setOnChainTokenURI","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":"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":"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":[],"name":"tokenuri","outputs":[{"internalType":"contract ITokenURI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"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"}]

6009805461ffff1916610101179055600f805460ff1916600190811790915560125561010060405260426080818152906200580c60a039601790620000459082620010df565b50604080518082019091526005815264173539b7b760d91b6020820152601890620000719082620010df565b50601a80546001600160a01b031916734f4823f3639ddcc2b14093a28802e214c7c28d03179055348015620000a557600080fd5b506040805180820182526011815270424c5545434849502d47454e455349532d60781b602080830191909152825180840190935260038084526242434760e81b918401919091526001805460ff19168155733cc6cdda760b79bafa08df41ecfa224f810dceb6939092916200011b8382620010df565b5060046200012a8282620010df565b50506000600655506200013d3362000387565b6daaeb6d7670e522a718067333cd4e3b1562000282578015620001d057604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620001b157600080fd5b505af1158015620001c6573d6000803e3d6000fd5b5050505062000282565b6001600160a01b03821615620002215760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000196565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200026857600080fd5b505af11580156200027d573d6000803e3d6000fd5b505050505b50620002929050600033620003d9565b620002ad6000805160206200584e83398151915233620003d9565b620002dc6000805160206200584e83398151915273407211bef7cbca2c8897c580ec16c80f2ad5c966620003d9565b6200030b6000805160206200584e8339815191527311f51b553ed8175bf26fad5eec20bebab31c0893620003d9565b620003377ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc933620003d9565b62000359734f4823f3639ddcc2b14093a28802e214c7c28d0361030e62000462565b6200036362000484565b601a546200037d906001600160a01b03166103e8620004cf565b42601655620012af565b601380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620003e58282620005d4565b6200045e576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200041d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6200045e828260405180602001604052806000815250620005ff60201b60201c565b6200048e62000692565b6001805460ff1916811790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6127106001600160601b0382161115620005435760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200059b5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200053a565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601455565b6000828152602081815260408083206001600160a01b038516845290915290205460ff165b92915050565b60006200060b60065490565b9050620006198484620006dc565b620006296000858386866200088b565b6200068c5760405162461bcd60e51b815260206004820152603560248201526000805160206200586e83398151915260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016200053a565b50505050565b60015460ff1615620006da5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016200053a565b565b6000620006e860065490565b9050600082116200074a5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b60648201526084016200053a565b6001600160a01b038316620007ae5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b60648201526084016200053a565b620007bd600084838562000a2e565b8160066000828254620007d19190620011c1565b9091555050600081815260056020908152604090912080546001600160a01b0319166001600160a01b0386161790556200081990600290839062000a51811b62001ab417901c565b62000828600084838562000a7d565b805b620008368383620011c1565b8110156200068c5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806200088281620011d7565b9150506200082a565b6000620008ac856001600160a01b031662000aaf60201b62001ae01760201c565b1562000a2157506001835b620008c38486620011c1565b81101562000a1a57604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290620008ff9033908b9086908990600401620011f3565b6020604051808303816000875af19250505080156200093d575060408051601f3d908101601f191682019092526200093a9181019062001266565b60015b620009e4573d8080156200096e576040519150601f19603f3d011682016040523d82523d6000602084013e62000973565b606091505b508051600003620009dc5760405162461bcd60e51b815260206004820152603560248201526000805160206200586e83398151915260448201527f31526563656976657220696d706c656d656e746572000000000000000000000060648201526084016200053a565b805181602001fd5b82801562000a0257506001600160e01b03198116630a85bd0160e11b145b9250508062000a1181620011d7565b915050620008b7565b5062000a25565b5060015b95945050505050565b62000a3862000692565b6200068c8484848462000abe60201b62001aef1760201c565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b62000a968484848462000ad760201b62001afb1760201c565b6200068c8484848462000b0360201b62001b251760201c565b6001600160a01b03163b151590565b6200068c8484848462000b2860201b62001b481760201c565b6001600160a01b038416156200068c576000828152600a60205260409020805460ff191690556200068c565b6001600160a01b038416156200068c576000828152601060205260408120556200068c565b6001600160a01b0384161580159062000b4957506001600160a01b03831615155b156200068c5762000b5a8262000bb9565b156200068c5760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b60648201526084016200053a565b60008162000bc78162000ccf565b62000c2b5760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084016200053a565b60095460ff1662000c40576000915062000cc9565b60026000848152600a602052604090205460ff16600281111562000c685762000c686200102a565b148062000cb457506000838152600a602052604081205460ff16600281111562000c965762000c966200102a565b14801562000cb4575062000cb462000cae8462000ced565b62000d03565b1562000cc4576001915062000cc9565b600091505b50919050565b600062000cdb60065490565b82108015620005f95750600192915050565b60008062000cfb8362000dc5565b509392505050565b60095460009060ff1662000d1957506000919050565b60026001600160a01b0383166000908152600b602052604090205460ff16600281111562000d4b5762000d4b6200102a565b148062000daf57506001600160a01b0382166000908152600b602052604081205460ff16600281111562000d835762000d836200102a565b14801562000daf57506002600954610100900460ff16600281111562000dad5762000dad6200102a565b145b1562000dbd57506001919050565b506000919050565b60008062000dd38362000ccf565b62000e365760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016200053a565b62000e418362000e62565b6000818152600560205260409020546001600160a01b031694909350915050565b6000620005f982600262000e7f60201b62001bd31790919060201c565b600881901c60008181526020849052604081205490919060ff808516919082181c801562000ed05762000ebd8162000fa160201b62001ccb1760201c565b60ff168203600884901b17935062000f98565b6000831162000f485760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e00000000000000000000000060648201526084016200053a565b50600019909101600081815260208690526040902054909190801562000f925762000f7e8162000fa160201b62001ccb1760201c565b60ff0360ff16600884901b17935062000f98565b62000ed0565b50505092915050565b600060405180610120016040528061010081526020016200588e610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff62000fed8562001011565b02901c8151811062001003576200100362001299565b016020015160f81c92915050565b60008082116200102057600080fd5b5060008190031690565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200106b57607f821691505b60208210810362000cc957634e487b7160e01b600052602260045260246000fd5b601f821115620010da57600081815260208120601f850160051c81016020861015620010b55750805b601f850160051c820191505b81811015620010d657828155600101620010c1565b5050505b505050565b81516001600160401b03811115620010fb57620010fb62001040565b62001113816200110c845462001056565b846200108c565b602080601f8311600181146200114b5760008415620011325750858301515b600019600386901b1c1916600185901b178555620010d6565b600085815260208120601f198616915b828110156200117c578886015182559484019460019091019084016200115b565b50858210156200119b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820180821115620005f957620005f9620011ab565b600060018201620011ec57620011ec620011ab565b5060010190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620012425785810182015185820160a00152810162001224565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b6000602082840312156200127957600080fd5b81516001600160e01b0319811681146200129257600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b61454d80620012bf6000396000f3fe608060405234801561001057600080fd5b50600436106103fb5760003560e01c80636a98de4c11610215578063a35c23ad11610125578063d547741f116100b8578063f2fde38b11610087578063f2fde38b146108ed578063f3b3059e14610900578063f6aacfb114610913578063fe6d812414610926578063ff7682121461094d57600080fd5b8063d547741f146108ac578063da3ef23f146108bf578063e985e9c5146108d2578063eb056297146108e557600080fd5b8063b31391cb116100f4578063b31391cb1461085e578063b88d4fde1461087e578063c668286214610891578063c87b56dd1461089957600080fd5b8063a35c23ad14610810578063a41216ac14610830578063a49340cc14610843578063aa1b103f1461085657600080fd5b80638462151c116101a857806395d89b411161017757806395d89b41146107c75780639fbc8713146107cf578063a059b164146107e2578063a217fddf146107f5578063a22cb465146107fd57600080fd5b80638462151c1461077d578063874a8b02146107905780638da5cb5b146107a357806391d14854146107b457600080fd5b806372b44d71116101e457806372b44d711461072c578063798842691461073f5780637c3dc173146107625780638456cb591461077557600080fd5b80636a98de4c146106f65780636c0360eb1461070957806370a0823114610711578063715018a61461072457600080fd5b80632a0acc6a1161031057806341f43434116102a35780634f3db346116102725780634f3db346146106a95780634fdaf052146106b257806355f804b3146106c55780635c975abb146106d85780636352211e146106e357600080fd5b806341f434341461064e57806342842e0e146106635780634a4fbeec146106765780634b81d8bd1461068957600080fd5b8063374032a1116102df578063374032a114610613578063396e8f53146106205780633f4ba83a1461063357806340c10f191461063b57600080fd5b80632a0acc6a146105a65780632a55205a146105bb5780632f2ff15d146105ed57806336568abe1461060057600080fd5b8063095ea7b31161039357806313c528261161036257806313c528261461052557806318160ddd146105485780632398f8431461055057806323b872dd14610570578063248a9ca31461058357600080fd5b8063095ea7b3146104cd5780630ac10203146104e05780630f4345e2146104f357806310c395bf1461050657600080fd5b806306fdde03116103cf57806306fdde0314610469578063072653891461047e578063081812fc1461048b57806308b096a0146104b657600080fd5b80623f332f1461040057806301ffc9a71461041e578063025e332e1461044157806304634d8d14610456575b600080fd5b610408610960565b60405161041591906138fd565b60405180910390f35b61043161042c366004613960565b61096f565b6040519015158152602001610415565b61045461044f366004613999565b6109ad565b005b6104546104643660046139b4565b6109e8565b610471610a0f565b6040516104159190613a47565b600f546104319060ff1681565b61049e610499366004613a5a565b610aa1565b6040516001600160a01b039091168152602001610415565b6104bf60165481565b604051908152602001610415565b6104546104db366004613a73565b610b31565b6104546104ee366004613999565b610b45565b610454610501366004613a5a565b610b80565b60095461051890610100900460ff1681565b6040516104159190613ab3565b610518610533366004613999565b600b6020526000908152604090205460ff1681565b6104bf610b9e565b6104bf61055e366004613999565b60116020526000908152604090205481565b61045461057e366004613adb565b610ba8565b6104bf610591366004613a5a565b60009081526020819052604090206001015490565b6104bf6000805160206143f883398151915281565b6105ce6105c9366004613b17565b610bd3565b604080516001600160a01b039093168352602083019190915201610415565b6104546105fb366004613b39565b610c81565b61045461060e366004613b39565b610ca6565b6009546104319060ff1681565b600c5461049e906001600160a01b031681565b610454610d20565b610454610649366004613a73565b610d43565b61049e6daaeb6d7670e522a718067333cd4e81565b610454610671366004613adb565b610dab565b610431610684366004613999565b610dd0565b61069c610697366004613b17565b610e85565b6040516104159190613b65565b6104bf60125481565b6104546106c0366004613bac565b611053565b6104546106d3366004613c72565b611074565b60015460ff16610431565b61049e6106f1366004613a5a565b611098565b60195461049e906001600160a01b031681565b6104716110ac565b6104bf61071f366004613999565b61113a565b610454611208565b61045461073a366004613999565b61121c565b61051861074d366004613a5a565b600a6020526000908152604090205460ff1681565b610454610770366004613b17565b61123d565b6104546112cd565b61069c61078b366004613999565b6112ed565b61045461079e366004613cba565b6113b3565b6013546001600160a01b031661049e565b6104316107c2366004613b39565b61142c565b610471611455565b601a5461049e906001600160a01b031681565b6104546107f0366004613cf2565b611464565b6104bf600081565b61045461080b366004613d0f565b611490565b61045461081e366004613a5a565b33600090815260116020526040902055565b61045461083e366004613cf2565b6114a4565b610454610851366004613d7f565b6114d0565b610454611656565b6104bf61086c366004613a5a565b60106020526000908152604090205481565b61045461088c366004613dea565b611678565b6104716116a5565b6104716108a7366004613a5a565b6116b2565b6104546108ba366004613b39565b6117bd565b6104546108cd366004613c72565b6117e2565b6104316108e0366004613e65565b611806565b61069c611841565b6104546108fb366004613999565b611862565b61045461090e366004613e8f565b6118d8565b610431610921366004613a5a565b611996565b6104bf7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b61045461095b366004613999565b611a93565b606061096a611d35565b905090565b600061097a82611d41565b80610989575061098982611d76565b80610998575061099882611db4565b806109a757506109a782611db4565b92915050565b6000805160206143f88339815191526109c581611dd9565b600c80546001600160a01b0319166001600160a01b0384161790555050565b5050565b6000805160206143f8833981519152610a0081611dd9565b610a0a8383611de3565b505050565b606060038054610a1e90613ee2565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4a90613ee2565b8015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b5050505050905090565b6000610aac82611ee0565b610b155760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600760205260409020546001600160a01b031690565b81610b3b81611efc565b610a0a8383611fb5565b6000805160206143f8833981519152610b5d81611dd9565b50601980546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206143f8833981519152610b9881611dd9565b50601255565b600061096a611fc9565b826001600160a01b0381163314610bc257610bc233611efc565b610bcd848484611fd9565b50505050565b60008281526015602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c485750604080518082019091526014546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610c67906001600160601b031687613f2c565b610c719190613f43565b91519350909150505b9250929050565b600082815260208190526040902060010154610c9c81611dd9565b610a0a838361200a565b6001600160a01b0381163314610d165760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b0c565b6109e4828261208e565b6000805160206143f8833981519152610d3881611dd9565b610d406120f3565b50565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9610d6d81611dd9565b616590610d78610b9e565b610d829084613f65565b1115610da157604051638353b89160e01b815260040160405180910390fd5b610a0a8383612145565b826001600160a01b0381163314610dc557610dc533611efc565b610bcd8484846122d2565b60095460009060ff16610de557506000919050565b60026001600160a01b0383166000908152600b602052604090205460ff166002811115610e1457610e14613a9d565b1480610e7057506001600160a01b0382166000908152600b602052604081205460ff166002811115610e4857610e48613a9d565b148015610e7057506002600954610100900460ff166002811115610e6e57610e6e613a9d565b145b15610e7d57506001919050565b506000919050565b60606000610e938484613f78565b610e9e906001613f65565b6001600160401b03811115610eb557610eb5613bc7565b604051908082528060200260200182016040528015610ede578160200160208202803683370190505b509050600080855b858111610f8657610ef681611ee0565b8015610f065750610f0681611996565b15610f41576001848481518110610f1f57610f1f613f8b565b9115156020928302919091019091015281610f3981613fa1565b925050610f66565b6000848481518110610f5557610f55613f8b565b911515602092830291909101909101525b82610f7081613fa1565b9350508080610f7e90613fa1565b915050610ee6565b506000816001600160401b03811115610fa157610fa1613bc7565b604051908082528060200260200182016040528015610fca578160200160208202803683370190505b5060009350905082875b87811161104657858581518110610fed57610fed613f8b565b602002602001015115611026578083838151811061100d5761100d613f8b565b60209081029190910101528161102281613fa1565b9250505b8461103081613fa1565b955050808061103e90613fa1565b915050610fd4565b5090979650505050505050565b6000805160206143f883398151915261106b81611dd9565b6109e4826122ed565b6000805160206143f883398151915261108c81611dd9565b6017610a0a8382614000565b6000806110a483612316565b509392505050565b601780546110b990613ee2565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613ee2565b80156111325780601f1061110757610100808354040283529160200191611132565b820191906000526020600020905b81548152906001019060200180831161111557829003601f168201915b505050505081565b60006001600160a01b0382166111a85760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610b0c565b6000805b600654811015611201576111bf81611ee0565b156111f1576111cd81611098565b6001600160a01b0316846001600160a01b0316036111f1576111ee82613fa1565b91505b6111fa81613fa1565b90506111ac565b5092915050565b6112106123ad565b61121a6000612407565b565b6000805160206143f883398151915261123481611dd9565b6109e482612459565b8161124781611098565b6001600160a01b0316336001600160a01b0316146112ba5760405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b6064820152608401610b0c565b5060009182526010602052604090912055565b6000805160206143f88339815191526112e581611dd9565b610d4061249e565b60606000806112fb8461113a565b90506000816001600160401b0381111561131757611317613bc7565b604051908082528060200260200182016040528015611340578160200160208202803683370190505b50905060005b8284146113aa5761135681611ee0565b156113a257856001600160a01b031661136e82611098565b6001600160a01b0316036113a2578082858060010196508151811061139557611395613f8b565b6020026020010181815250505b600101611346565b50949350505050565b6001600160a01b0382163314806113dd57506113dd6000805160206143f88339815191523361142c565b6114225760405162461bcd60e51b81526020600482015260166024820152753737ba103cb7bab939b2b6331037b91030b236b4b71760511b6044820152606401610b0c565b6109e482826124d9565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060048054610a1e90613ee2565b6000805160206143f883398151915261147c81611dd9565b50600f805460ff1916911515919091179055565b8161149a81611efc565b610a0a8383612562565b6000805160206143f88339815191526114bc81611dd9565b506009805460ff1916911515919091179055565b6000805160206143f88339815191526114e881611dd9565b83821461152e5760405162461bcd60e51b81526020600482015260146024820152730c2e4e4c2f240d8cadccee8d040eadcdac2e8c6d60631b6044820152606401610b0c565b6000805b8381101561164d57600085858381811061154e5761154e613f8b565b90506020020135116115a25760405162461bcd60e51b815260206004820152601860248201527f616d6f756e7420302061646472657373206578697374732100000000000000006044820152606401610b0c565b8484828181106115b4576115b4613f8b565b90506020020135820191506165906115ca610b9e565b6115d49084613f65565b11156115f357604051638353b89160e01b815260040160405180910390fd5b61163b87878381811061160857611608613f8b565b905060200201602081019061161d9190613999565b86868481811061162f5761162f613f8b565b905060200201356125f9565b8061164581613fa1565b915050611532565b50505050505050565b6000805160206143f883398151915261166e81611dd9565b610d406000601455565b836001600160a01b03811633146116925761169233611efc565b61169e85858585612613565b5050505050565b601880546110b990613ee2565b60606116bd82611ee0565b6117095760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610b0c565b6019546001600160a01b03161561178b5760195460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa158015611763573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109a791908101906140bf565b61179482612645565b60186040516020016117a792919061412c565b6040516020818303038152906040529050919050565b6000828152602081905260409020600101546117d881611dd9565b610a0a838361208e565b6000805160206143f88339815191526117fa81611dd9565b6018610a0a8382614000565b600061181183610dd0565b806118235750611821838361270a565b155b15611830575060006109a7565b61183a838361272a565b9392505050565b606060008061184f60065490565b905061185b8282610e85565b9250505090565b61186a6123ad565b6001600160a01b0381166118cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0c565b610d4081612407565b60005b8281101561198a576119048484838181106118f8576118f8613f8b565b90506020020135611098565b6001600160a01b0316336001600160a01b0316148061193657506119366000805160206143f88339815191523361142c565b6119785760405162461bcd60e51b81526020600482015260136024820152723737ba1037bbb732b91037b91030b236b4b71760691b6044820152606401610b0c565b8061198281613fa1565b9150506118db565b50610a0a838383612751565b6000816119a281611ee0565b611a045760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610b0c565b60095460ff16611a175760009150611a8d565b60026000848152600a602052604090205460ff166002811115611a3c57611a3c613a9d565b1480611a7a57506000838152600a602052604081205460ff166002811115611a6657611a66613a9d565b148015611a7a5750611a7a61068484611098565b15611a885760019150611a8d565b600091505b50919050565b6000805160206143f8833981519152611aab81611dd9565b6109e482612835565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6001600160a01b03163b151590565b610bcd84848484611b48565b6001600160a01b03841615610bcd576000828152600a60205260409020805460ff19169055610bcd565b6001600160a01b03841615610bcd57600082815260106020526040812055610bcd565b6001600160a01b03841615801590611b6857506001600160a01b03831615155b15610bcd57611b7682611996565b15610bcd5760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b6064820152608401610b0c565b600881901c60008181526020849052604081205490919060ff808516919082181c8015611c1557611c0381611ccb565b60ff168203600884901b179350611cc2565b60008311611c825760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610b0c565b506000199091016000818152602086905260409020549091908015611cbd57611caa81611ccb565b60ff0360ff16600884901b179350611cc2565b611c15565b50505092915050565b60006040518061012001604052806101008152602001614418610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611d148561287a565b02901c81518110611d2757611d27613f8b565b016020015160f81c92915050565b606061096a600d612892565b60006001600160e01b03198216637965db0b60e01b14806109a757506301ffc9a760e01b6001600160e01b03198316146109a7565b6000611d818261289f565b80611d905750611d90826128df565b80611d9f5750611d9f82612904565b806109a75750506001600160e01b0319161590565b60006001600160e01b0319821663152a902d60e11b14806109a757506109a782611d76565b610d408133612929565b6127106001600160601b0382161115611e515760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610b0c565b6001600160a01b038216611ea75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b0c565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601455565b6000611eeb60065490565b821080156109a75750600192915050565b6daaeb6d7670e522a718067333cd4e3b15610d4057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8d91906141b9565b610d4057604051633b79c77360e21b81526001600160a01b0382166004820152602401610b0c565b611fbf8282612982565b6109e48282612996565b60008060065461096a9190613f78565b611fe33382612aa8565b611fff5760405162461bcd60e51b8152600401610b0c906141d6565b610a0a838383612b6d565b612014828261142c565b6109e4576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561204a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612098828261142c565b156109e4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6120fb612d74565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061215060065490565b9050600082116121b05760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610b0c565b6001600160a01b0383166122125760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b0c565b61221f6000848385612dbd565b81600660008282546122319190613f65565b9091555050600081815260056020526040902080546001600160a01b0319166001600160a01b038516179055612268600282611ab4565b6122756000848385612dd1565b805b6122818383613f65565b811015610bcd5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806122ca81613fa1565b915050612277565b610a0a83838360405180602001604052806000815250611678565b6009805482919061ff00191661010083600281111561230e5761230e613a9d565b021790555050565b60008061232283611ee0565b6123835760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b0c565b61238c83612de9565b6000818152600560205260409020546001600160a01b031694909350915050565b6013546001600160a01b0316331461121a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0c565b601380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612464600d82612df6565b506040516001600160a01b0382169033907f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db85729290600090a350565b6124a6612e0b565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612128565b6001600160a01b0382166000908152600b60205260409020805482919060ff1916600183600281111561250e5761250e613a9d565b0217905550336001600160a01b0316826001600160a01b03167f9fdb14457e6a7bd3753c649831b026de987c06e52d16459a928540738c2ea34b836040516125569190613ab3565b60405180910390a35050565b61256b33610dd0565b1580612575575080155b6125c15760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606401610b0c565b6125ca82612e51565b806125d3575080155b6125ef5760405162461bcd60e51b8152600401610b0c9061422a565b6109e48282612e5d565b6109e4828260405180602001604052806000815250612e95565b61261d3383612aa8565b6126395760405162461bcd60e51b8152600401610b0c906141d6565b610bcd84848484612ed6565b606061265082611ee0565b6126af5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610b0c565b60006126b9612eef565b905060008151116126d9576040518060200160405280600081525061183a565b806126e384612efe565b6040516020016126f4929190614277565b6040516020818303038152906040529392505050565b60008061271684612f90565b90506127228382612fd2565b949350505050565b6000612736838361270a565b1515600003612747575060006109a7565b61183a838361306b565b60005b82811015610bcd5781600a600086868581811061277357612773613f8b565b60209081029290920135835250810191909152604001600020805460ff191660018360028111156127a6576127a6613a9d565b02179055508383828181106127bd576127bd613f8b565b90506020020135336001600160a01b03166127e38686858181106118f8576118f8613f8b565b6001600160a01b03167f80a668baf7ac68b329075f26c37b4428d4aa272c3bd4c9611b25f5fb1c473f7c8560405161281b9190613ab3565b60405180910390a48061282d81613fa1565b915050612754565b612840600d826130b1565b506040516001600160a01b0382169033907fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c90600090a350565b600080821161288857600080fd5b5060008190031690565b6060600061183a836130c6565b60006001600160e01b031982166380ac58cd60e01b14806128d057506001600160e01b03198216635b5e139f60e01b145b806109a757506109a782611d41565b60006001600160e01b03198216632742b5b960e01b14806109a757506109a78261289f565b60006001600160e01b03198216630101c11560e71b14806109a757506109a7826128df565b612933828261142c565b6109e45761294081613122565b61294b836020613134565b60405160200161295c9291906142a6565b60408051601f198184030181529082905262461bcd60e51b8252610b0c91600401613a47565b61298c82826132cf565b6109e48282613334565b60006129a182611098565b9050806001600160a01b0316836001600160a01b031603612a105760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610b0c565b336001600160a01b0382161480612a2c5750612a2c8133611806565b612a9e5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610b0c565b610a0a83836133af565b6000612ab382611ee0565b612b175760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b0c565b6000612b2283611098565b9050806001600160a01b0316846001600160a01b03161480612b5d5750836001600160a01b0316612b5284610aa1565b6001600160a01b0316145b8061272257506127228185611806565b600080612b7983612316565b91509150846001600160a01b0316826001600160a01b031614612bf35760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610b0c565b6001600160a01b038416612c595760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610b0c565b612c668585856001612dbd565b612c716000846133af565b6000612c7e846001613f65565b600881901c600090815260026020526040902054909150600160ff1b60ff83161c16158015612cae575060065481105b15612ce557600081815260056020526040902080546001600160a01b0319166001600160a01b038816179055612ce5600282611ab4565b600084815260056020526040902080546001600160a01b0319166001600160a01b038716179055818414612d1e57612d1e600285611ab4565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d6c8686866001612dd1565b505050505050565b60015460ff1661121a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b0c565b612dc5612e0b565b610bcd84848484611aef565b612ddd84848484611afb565b610bcd84848484611b25565b60006109a7600283611bd3565b600061183a836001600160a01b03841661341d565b60015460ff161561121a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b0c565b60006109a7338361270a565b612e6682612e51565b80612e6f575080155b612e8b5760405162461bcd60e51b8152600401610b0c9061422a565b6109e48282613510565b6000612ea060065490565b9050612eac8484612145565b612eba600085838686613579565b610bcd5760405162461bcd60e51b8152600401610b0c9061431b565b612ee1848484612b6d565b612eba848484600185613579565b606060178054610a1e90613ee2565b60606000612f0b836136b0565b60010190506000816001600160401b03811115612f2a57612f2a613bc7565b6040519080825280601f01601f191660200182016040528015612f54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612f5e57509392505050565b6001600160a01b03811660009081526011602052604081205415612fca57506001600160a01b031660009081526011602052604090205490565b505060125490565b600f5460009060ff16612fe7575060016109a7565b612ff083613788565b8061183a5750600c54604051630f8350ed60e41b81526001600160a01b038581166004830152602482018590529091169063f8350ed090604401602060405180830381865afa158015613047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183a91906141b9565b600061307683610dd0565b15613083575060006109a7565b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff1661183a565b600061183a836001600160a01b0384166137b2565b60608160000180548060200260200160405190810160405280929190818152602001828054801561311657602002820191906000526020600020905b815481526020019060010190808311613102575b50505050509050919050565b60606109a76001600160a01b03831660145b60606000613143836002613f2c565b61314e906002613f65565b6001600160401b0381111561316557613165613bc7565b6040519080825280601f01601f19166020018201604052801561318f576020820181803683370190505b509050600360fc1b816000815181106131aa576131aa613f8b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106131d9576131d9613f8b565b60200101906001600160f81b031916908160001a90535060006131fd846002613f2c565b613208906001613f65565b90505b6001811115613280576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061323c5761323c613f8b565b1a60f81b82828151811061325257613252613f8b565b60200101906001600160f81b031916908160001a90535060049490941c9361327981614370565b905061320b565b50831561183a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b0c565b6132d881611996565b156109e45760405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b6064820152608401610b0c565b6001600160a01b038216156109e45761334d8183613801565b6109e45760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b6064820152608401610b0c565b600081815260076020526040902080546001600160a01b0319166001600160a01b03841690811790915581906133e482611098565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526001830160205260408120548015613506576000613441600183613f78565b855490915060009061345590600190613f78565b90508181146134ba57600086600001828154811061347557613475613f8b565b906000526020600020015490508087600001848154811061349857613498613f8b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806134cb576134cb614387565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109a7565b60009150506109a7565b61351933610dd0565b1580613523575080155b61356f5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606401610b0c565b6109e4828261380e565b60006001600160a01b0385163b156136a357506001835b61359a8486613f65565b81101561369d57604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906135d39033908b908690899060040161439d565b6020604051808303816000875af192505050801561360e575060408051601f3d908101601f1916820190925261360b918101906143da565b60015b61366b573d80801561363c576040519150601f19603f3d011682016040523d82523d6000602084013e613641565b606091505b5080516000036136635760405162461bcd60e51b8152600401610b0c9061431b565b805181602001fd5b82801561368857506001600160e01b03198116630a85bd0160e11b145b9250508061369581613fa1565b915050613590565b506136a7565b5060015b95945050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106136ef5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061371b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061373957662386f26fc10000830492506010015b6305f5e1008310613751576305f5e100830492506008015b612710831061376557612710830492506004015b60648310613777576064830492506002015b600a83106109a75760010192915050565b60006109a7600d836001600160a01b0381166000908152600183016020526040812054151561183a565b60008181526001830160205260408120546137f9575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109a7565b5060006109a7565b60008061271633856138cb565b336001600160a01b038316036138665760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610b0c565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612556565b600081815260106020526040812054156138f457506000818152601060205260409020546109a7565b61183a83612f90565b6020808252825182820181905260009190848201906040850190845b8181101561393e5783516001600160a01b031683529284019291840191600101613919565b50909695505050505050565b6001600160e01b031981168114610d4057600080fd5b60006020828403121561397257600080fd5b813561183a8161394a565b80356001600160a01b038116811461399457600080fd5b919050565b6000602082840312156139ab57600080fd5b61183a8261397d565b600080604083850312156139c757600080fd5b6139d08361397d565b915060208301356001600160601b03811681146139ec57600080fd5b809150509250929050565b60005b83811015613a125781810151838201526020016139fa565b50506000910152565b60008151808452613a338160208601602086016139f7565b601f01601f19169290920160200192915050565b60208152600061183a6020830184613a1b565b600060208284031215613a6c57600080fd5b5035919050565b60008060408385031215613a8657600080fd5b613a8f8361397d565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613ad557634e487b7160e01b600052602160045260246000fd5b91905290565b600080600060608486031215613af057600080fd5b613af98461397d565b9250613b076020850161397d565b9150604084013590509250925092565b60008060408385031215613b2a57600080fd5b50508035926020909101359150565b60008060408385031215613b4c57600080fd5b82359150613b5c6020840161397d565b90509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561393e57835183529284019291840191600101613b81565b80356003811061399457600080fd5b600060208284031215613bbe57600080fd5b61183a82613b9d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613c0557613c05613bc7565b604052919050565b60006001600160401b03821115613c2657613c26613bc7565b50601f01601f191660200190565b6000613c47613c4284613c0d565b613bdd565b9050828152838383011115613c5b57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613c8457600080fd5b81356001600160401b03811115613c9a57600080fd5b8201601f81018413613cab57600080fd5b61272284823560208401613c34565b60008060408385031215613ccd57600080fd5b613cd68361397d565b9150613b5c60208401613b9d565b8015158114610d4057600080fd5b600060208284031215613d0457600080fd5b813561183a81613ce4565b60008060408385031215613d2257600080fd5b613d2b8361397d565b915060208301356139ec81613ce4565b60008083601f840112613d4d57600080fd5b5081356001600160401b03811115613d6457600080fd5b6020830191508360208260051b8501011115610c7a57600080fd5b60008060008060408587031215613d9557600080fd5b84356001600160401b0380821115613dac57600080fd5b613db888838901613d3b565b90965094506020870135915080821115613dd157600080fd5b50613dde87828801613d3b565b95989497509550505050565b60008060008060808587031215613e0057600080fd5b613e098561397d565b9350613e176020860161397d565b92506040850135915060608501356001600160401b03811115613e3957600080fd5b8501601f81018713613e4a57600080fd5b613e5987823560208401613c34565b91505092959194509250565b60008060408385031215613e7857600080fd5b613e818361397d565b9150613b5c6020840161397d565b600080600060408486031215613ea457600080fd5b83356001600160401b03811115613eba57600080fd5b613ec686828701613d3b565b9094509250613ed9905060208501613b9d565b90509250925092565b600181811c90821680613ef657607f821691505b602082108103611a8d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109a7576109a7613f16565b600082613f6057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156109a7576109a7613f16565b818103818111156109a7576109a7613f16565b634e487b7160e01b600052603260045260246000fd5b600060018201613fb357613fb3613f16565b5060010190565b601f821115610a0a57600081815260208120601f850160051c81016020861015613fe15750805b601f850160051c820191505b81811015612d6c57828155600101613fed565b81516001600160401b0381111561401957614019613bc7565b61402d816140278454613ee2565b84613fba565b602080601f831160018114614062576000841561404a5750858301515b600019600386901b1c1916600185901b178555612d6c565b600085815260208120601f198616915b8281101561409157888601518255948401946001909101908401614072565b50858210156140af5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156140d157600080fd5b81516001600160401b038111156140e757600080fd5b8201601f810184136140f857600080fd5b8051614106613c4282613c0d565b81815285602083850101111561411b57600080fd5b6136a78260208301602086016139f7565b60008351602061413f82858389016139f7565b81840191506000855461415181613ee2565b60018281168015614169576001811461417e576141aa565b60ff19841687528215158302870194506141aa565b896000528560002060005b848110156141a257815489820152908301908701614189565b505082870194505b50929998505050505050505050565b6000602082840312156141cb57600080fd5b815161183a81613ce4565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602d908201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560408201526c103637b1b5b2b2103a37b5b2b760991b606082015260800190565b600083516142898184602088016139f7565b83519083019061429d8183602088016139f7565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516142de8160178501602088016139f7565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161430f8160288401602088016139f7565b01602801949350505050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b60008161437f5761437f613f16565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906143d090830184613a1b565b9695505050505050565b6000602082840312156143ec57600080fd5b815161183a8161394a56fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec420001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220e444fff6ca1dc9ddb81f6008a3def3ae707dc4dc4cac9c501a062973e14a5c8764736f6c6343000811003368747470733a2f2f626c7565636869702d67656e657369732e73332e61702d6e6f727468656173742d312e616d617a6f6e6177732e636f6d2f6d657461646174612fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec424552433732315073693a207472616e7366657220746f206e6f6e2045524337320001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103fb5760003560e01c80636a98de4c11610215578063a35c23ad11610125578063d547741f116100b8578063f2fde38b11610087578063f2fde38b146108ed578063f3b3059e14610900578063f6aacfb114610913578063fe6d812414610926578063ff7682121461094d57600080fd5b8063d547741f146108ac578063da3ef23f146108bf578063e985e9c5146108d2578063eb056297146108e557600080fd5b8063b31391cb116100f4578063b31391cb1461085e578063b88d4fde1461087e578063c668286214610891578063c87b56dd1461089957600080fd5b8063a35c23ad14610810578063a41216ac14610830578063a49340cc14610843578063aa1b103f1461085657600080fd5b80638462151c116101a857806395d89b411161017757806395d89b41146107c75780639fbc8713146107cf578063a059b164146107e2578063a217fddf146107f5578063a22cb465146107fd57600080fd5b80638462151c1461077d578063874a8b02146107905780638da5cb5b146107a357806391d14854146107b457600080fd5b806372b44d71116101e457806372b44d711461072c578063798842691461073f5780637c3dc173146107625780638456cb591461077557600080fd5b80636a98de4c146106f65780636c0360eb1461070957806370a0823114610711578063715018a61461072457600080fd5b80632a0acc6a1161031057806341f43434116102a35780634f3db346116102725780634f3db346146106a95780634fdaf052146106b257806355f804b3146106c55780635c975abb146106d85780636352211e146106e357600080fd5b806341f434341461064e57806342842e0e146106635780634a4fbeec146106765780634b81d8bd1461068957600080fd5b8063374032a1116102df578063374032a114610613578063396e8f53146106205780633f4ba83a1461063357806340c10f191461063b57600080fd5b80632a0acc6a146105a65780632a55205a146105bb5780632f2ff15d146105ed57806336568abe1461060057600080fd5b8063095ea7b31161039357806313c528261161036257806313c528261461052557806318160ddd146105485780632398f8431461055057806323b872dd14610570578063248a9ca31461058357600080fd5b8063095ea7b3146104cd5780630ac10203146104e05780630f4345e2146104f357806310c395bf1461050657600080fd5b806306fdde03116103cf57806306fdde0314610469578063072653891461047e578063081812fc1461048b57806308b096a0146104b657600080fd5b80623f332f1461040057806301ffc9a71461041e578063025e332e1461044157806304634d8d14610456575b600080fd5b610408610960565b60405161041591906138fd565b60405180910390f35b61043161042c366004613960565b61096f565b6040519015158152602001610415565b61045461044f366004613999565b6109ad565b005b6104546104643660046139b4565b6109e8565b610471610a0f565b6040516104159190613a47565b600f546104319060ff1681565b61049e610499366004613a5a565b610aa1565b6040516001600160a01b039091168152602001610415565b6104bf60165481565b604051908152602001610415565b6104546104db366004613a73565b610b31565b6104546104ee366004613999565b610b45565b610454610501366004613a5a565b610b80565b60095461051890610100900460ff1681565b6040516104159190613ab3565b610518610533366004613999565b600b6020526000908152604090205460ff1681565b6104bf610b9e565b6104bf61055e366004613999565b60116020526000908152604090205481565b61045461057e366004613adb565b610ba8565b6104bf610591366004613a5a565b60009081526020819052604090206001015490565b6104bf6000805160206143f883398151915281565b6105ce6105c9366004613b17565b610bd3565b604080516001600160a01b039093168352602083019190915201610415565b6104546105fb366004613b39565b610c81565b61045461060e366004613b39565b610ca6565b6009546104319060ff1681565b600c5461049e906001600160a01b031681565b610454610d20565b610454610649366004613a73565b610d43565b61049e6daaeb6d7670e522a718067333cd4e81565b610454610671366004613adb565b610dab565b610431610684366004613999565b610dd0565b61069c610697366004613b17565b610e85565b6040516104159190613b65565b6104bf60125481565b6104546106c0366004613bac565b611053565b6104546106d3366004613c72565b611074565b60015460ff16610431565b61049e6106f1366004613a5a565b611098565b60195461049e906001600160a01b031681565b6104716110ac565b6104bf61071f366004613999565b61113a565b610454611208565b61045461073a366004613999565b61121c565b61051861074d366004613a5a565b600a6020526000908152604090205460ff1681565b610454610770366004613b17565b61123d565b6104546112cd565b61069c61078b366004613999565b6112ed565b61045461079e366004613cba565b6113b3565b6013546001600160a01b031661049e565b6104316107c2366004613b39565b61142c565b610471611455565b601a5461049e906001600160a01b031681565b6104546107f0366004613cf2565b611464565b6104bf600081565b61045461080b366004613d0f565b611490565b61045461081e366004613a5a565b33600090815260116020526040902055565b61045461083e366004613cf2565b6114a4565b610454610851366004613d7f565b6114d0565b610454611656565b6104bf61086c366004613a5a565b60106020526000908152604090205481565b61045461088c366004613dea565b611678565b6104716116a5565b6104716108a7366004613a5a565b6116b2565b6104546108ba366004613b39565b6117bd565b6104546108cd366004613c72565b6117e2565b6104316108e0366004613e65565b611806565b61069c611841565b6104546108fb366004613999565b611862565b61045461090e366004613e8f565b6118d8565b610431610921366004613a5a565b611996565b6104bf7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b61045461095b366004613999565b611a93565b606061096a611d35565b905090565b600061097a82611d41565b80610989575061098982611d76565b80610998575061099882611db4565b806109a757506109a782611db4565b92915050565b6000805160206143f88339815191526109c581611dd9565b600c80546001600160a01b0319166001600160a01b0384161790555050565b5050565b6000805160206143f8833981519152610a0081611dd9565b610a0a8383611de3565b505050565b606060038054610a1e90613ee2565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4a90613ee2565b8015610a975780601f10610a6c57610100808354040283529160200191610a97565b820191906000526020600020905b815481529060010190602001808311610a7a57829003601f168201915b5050505050905090565b6000610aac82611ee0565b610b155760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600760205260409020546001600160a01b031690565b81610b3b81611efc565b610a0a8383611fb5565b6000805160206143f8833981519152610b5d81611dd9565b50601980546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206143f8833981519152610b9881611dd9565b50601255565b600061096a611fc9565b826001600160a01b0381163314610bc257610bc233611efc565b610bcd848484611fd9565b50505050565b60008281526015602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c485750604080518082019091526014546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610c67906001600160601b031687613f2c565b610c719190613f43565b91519350909150505b9250929050565b600082815260208190526040902060010154610c9c81611dd9565b610a0a838361200a565b6001600160a01b0381163314610d165760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b0c565b6109e4828261208e565b6000805160206143f8833981519152610d3881611dd9565b610d406120f3565b50565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9610d6d81611dd9565b616590610d78610b9e565b610d829084613f65565b1115610da157604051638353b89160e01b815260040160405180910390fd5b610a0a8383612145565b826001600160a01b0381163314610dc557610dc533611efc565b610bcd8484846122d2565b60095460009060ff16610de557506000919050565b60026001600160a01b0383166000908152600b602052604090205460ff166002811115610e1457610e14613a9d565b1480610e7057506001600160a01b0382166000908152600b602052604081205460ff166002811115610e4857610e48613a9d565b148015610e7057506002600954610100900460ff166002811115610e6e57610e6e613a9d565b145b15610e7d57506001919050565b506000919050565b60606000610e938484613f78565b610e9e906001613f65565b6001600160401b03811115610eb557610eb5613bc7565b604051908082528060200260200182016040528015610ede578160200160208202803683370190505b509050600080855b858111610f8657610ef681611ee0565b8015610f065750610f0681611996565b15610f41576001848481518110610f1f57610f1f613f8b565b9115156020928302919091019091015281610f3981613fa1565b925050610f66565b6000848481518110610f5557610f55613f8b565b911515602092830291909101909101525b82610f7081613fa1565b9350508080610f7e90613fa1565b915050610ee6565b506000816001600160401b03811115610fa157610fa1613bc7565b604051908082528060200260200182016040528015610fca578160200160208202803683370190505b5060009350905082875b87811161104657858581518110610fed57610fed613f8b565b602002602001015115611026578083838151811061100d5761100d613f8b565b60209081029190910101528161102281613fa1565b9250505b8461103081613fa1565b955050808061103e90613fa1565b915050610fd4565b5090979650505050505050565b6000805160206143f883398151915261106b81611dd9565b6109e4826122ed565b6000805160206143f883398151915261108c81611dd9565b6017610a0a8382614000565b6000806110a483612316565b509392505050565b601780546110b990613ee2565b80601f01602080910402602001604051908101604052809291908181526020018280546110e590613ee2565b80156111325780601f1061110757610100808354040283529160200191611132565b820191906000526020600020905b81548152906001019060200180831161111557829003601f168201915b505050505081565b60006001600160a01b0382166111a85760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610b0c565b6000805b600654811015611201576111bf81611ee0565b156111f1576111cd81611098565b6001600160a01b0316846001600160a01b0316036111f1576111ee82613fa1565b91505b6111fa81613fa1565b90506111ac565b5092915050565b6112106123ad565b61121a6000612407565b565b6000805160206143f883398151915261123481611dd9565b6109e482612459565b8161124781611098565b6001600160a01b0316336001600160a01b0316146112ba5760405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b6064820152608401610b0c565b5060009182526010602052604090912055565b6000805160206143f88339815191526112e581611dd9565b610d4061249e565b60606000806112fb8461113a565b90506000816001600160401b0381111561131757611317613bc7565b604051908082528060200260200182016040528015611340578160200160208202803683370190505b50905060005b8284146113aa5761135681611ee0565b156113a257856001600160a01b031661136e82611098565b6001600160a01b0316036113a2578082858060010196508151811061139557611395613f8b565b6020026020010181815250505b600101611346565b50949350505050565b6001600160a01b0382163314806113dd57506113dd6000805160206143f88339815191523361142c565b6114225760405162461bcd60e51b81526020600482015260166024820152753737ba103cb7bab939b2b6331037b91030b236b4b71760511b6044820152606401610b0c565b6109e482826124d9565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b606060048054610a1e90613ee2565b6000805160206143f883398151915261147c81611dd9565b50600f805460ff1916911515919091179055565b8161149a81611efc565b610a0a8383612562565b6000805160206143f88339815191526114bc81611dd9565b506009805460ff1916911515919091179055565b6000805160206143f88339815191526114e881611dd9565b83821461152e5760405162461bcd60e51b81526020600482015260146024820152730c2e4e4c2f240d8cadccee8d040eadcdac2e8c6d60631b6044820152606401610b0c565b6000805b8381101561164d57600085858381811061154e5761154e613f8b565b90506020020135116115a25760405162461bcd60e51b815260206004820152601860248201527f616d6f756e7420302061646472657373206578697374732100000000000000006044820152606401610b0c565b8484828181106115b4576115b4613f8b565b90506020020135820191506165906115ca610b9e565b6115d49084613f65565b11156115f357604051638353b89160e01b815260040160405180910390fd5b61163b87878381811061160857611608613f8b565b905060200201602081019061161d9190613999565b86868481811061162f5761162f613f8b565b905060200201356125f9565b8061164581613fa1565b915050611532565b50505050505050565b6000805160206143f883398151915261166e81611dd9565b610d406000601455565b836001600160a01b03811633146116925761169233611efc565b61169e85858585612613565b5050505050565b601880546110b990613ee2565b60606116bd82611ee0565b6117095760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610b0c565b6019546001600160a01b03161561178b5760195460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd90602401600060405180830381865afa158015611763573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109a791908101906140bf565b61179482612645565b60186040516020016117a792919061412c565b6040516020818303038152906040529050919050565b6000828152602081905260409020600101546117d881611dd9565b610a0a838361208e565b6000805160206143f88339815191526117fa81611dd9565b6018610a0a8382614000565b600061181183610dd0565b806118235750611821838361270a565b155b15611830575060006109a7565b61183a838361272a565b9392505050565b606060008061184f60065490565b905061185b8282610e85565b9250505090565b61186a6123ad565b6001600160a01b0381166118cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0c565b610d4081612407565b60005b8281101561198a576119048484838181106118f8576118f8613f8b565b90506020020135611098565b6001600160a01b0316336001600160a01b0316148061193657506119366000805160206143f88339815191523361142c565b6119785760405162461bcd60e51b81526020600482015260136024820152723737ba1037bbb732b91037b91030b236b4b71760691b6044820152606401610b0c565b8061198281613fa1565b9150506118db565b50610a0a838383612751565b6000816119a281611ee0565b611a045760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610b0c565b60095460ff16611a175760009150611a8d565b60026000848152600a602052604090205460ff166002811115611a3c57611a3c613a9d565b1480611a7a57506000838152600a602052604081205460ff166002811115611a6657611a66613a9d565b148015611a7a5750611a7a61068484611098565b15611a885760019150611a8d565b600091505b50919050565b6000805160206143f8833981519152611aab81611dd9565b6109e482612835565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6001600160a01b03163b151590565b610bcd84848484611b48565b6001600160a01b03841615610bcd576000828152600a60205260409020805460ff19169055610bcd565b6001600160a01b03841615610bcd57600082815260106020526040812055610bcd565b6001600160a01b03841615801590611b6857506001600160a01b03831615155b15610bcd57611b7682611996565b15610bcd5760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b6064820152608401610b0c565b600881901c60008181526020849052604081205490919060ff808516919082181c8015611c1557611c0381611ccb565b60ff168203600884901b179350611cc2565b60008311611c825760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610b0c565b506000199091016000818152602086905260409020549091908015611cbd57611caa81611ccb565b60ff0360ff16600884901b179350611cc2565b611c15565b50505092915050565b60006040518061012001604052806101008152602001614418610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611d148561287a565b02901c81518110611d2757611d27613f8b565b016020015160f81c92915050565b606061096a600d612892565b60006001600160e01b03198216637965db0b60e01b14806109a757506301ffc9a760e01b6001600160e01b03198316146109a7565b6000611d818261289f565b80611d905750611d90826128df565b80611d9f5750611d9f82612904565b806109a75750506001600160e01b0319161590565b60006001600160e01b0319821663152a902d60e11b14806109a757506109a782611d76565b610d408133612929565b6127106001600160601b0382161115611e515760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610b0c565b6001600160a01b038216611ea75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b0c565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601455565b6000611eeb60065490565b821080156109a75750600192915050565b6daaeb6d7670e522a718067333cd4e3b15610d4057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8d91906141b9565b610d4057604051633b79c77360e21b81526001600160a01b0382166004820152602401610b0c565b611fbf8282612982565b6109e48282612996565b60008060065461096a9190613f78565b611fe33382612aa8565b611fff5760405162461bcd60e51b8152600401610b0c906141d6565b610a0a838383612b6d565b612014828261142c565b6109e4576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561204a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612098828261142c565b156109e4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6120fb612d74565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061215060065490565b9050600082116121b05760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610b0c565b6001600160a01b0383166122125760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b0c565b61221f6000848385612dbd565b81600660008282546122319190613f65565b9091555050600081815260056020526040902080546001600160a01b0319166001600160a01b038516179055612268600282611ab4565b6122756000848385612dd1565b805b6122818383613f65565b811015610bcd5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806122ca81613fa1565b915050612277565b610a0a83838360405180602001604052806000815250611678565b6009805482919061ff00191661010083600281111561230e5761230e613a9d565b021790555050565b60008061232283611ee0565b6123835760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b0c565b61238c83612de9565b6000818152600560205260409020546001600160a01b031694909350915050565b6013546001600160a01b0316331461121a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0c565b601380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612464600d82612df6565b506040516001600160a01b0382169033907f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db85729290600090a350565b6124a6612e0b565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612128565b6001600160a01b0382166000908152600b60205260409020805482919060ff1916600183600281111561250e5761250e613a9d565b0217905550336001600160a01b0316826001600160a01b03167f9fdb14457e6a7bd3753c649831b026de987c06e52d16459a928540738c2ea34b836040516125569190613ab3565b60405180910390a35050565b61256b33610dd0565b1580612575575080155b6125c15760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606401610b0c565b6125ca82612e51565b806125d3575080155b6125ef5760405162461bcd60e51b8152600401610b0c9061422a565b6109e48282612e5d565b6109e4828260405180602001604052806000815250612e95565b61261d3383612aa8565b6126395760405162461bcd60e51b8152600401610b0c906141d6565b610bcd84848484612ed6565b606061265082611ee0565b6126af5760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610b0c565b60006126b9612eef565b905060008151116126d9576040518060200160405280600081525061183a565b806126e384612efe565b6040516020016126f4929190614277565b6040516020818303038152906040529392505050565b60008061271684612f90565b90506127228382612fd2565b949350505050565b6000612736838361270a565b1515600003612747575060006109a7565b61183a838361306b565b60005b82811015610bcd5781600a600086868581811061277357612773613f8b565b60209081029290920135835250810191909152604001600020805460ff191660018360028111156127a6576127a6613a9d565b02179055508383828181106127bd576127bd613f8b565b90506020020135336001600160a01b03166127e38686858181106118f8576118f8613f8b565b6001600160a01b03167f80a668baf7ac68b329075f26c37b4428d4aa272c3bd4c9611b25f5fb1c473f7c8560405161281b9190613ab3565b60405180910390a48061282d81613fa1565b915050612754565b612840600d826130b1565b506040516001600160a01b0382169033907fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c90600090a350565b600080821161288857600080fd5b5060008190031690565b6060600061183a836130c6565b60006001600160e01b031982166380ac58cd60e01b14806128d057506001600160e01b03198216635b5e139f60e01b145b806109a757506109a782611d41565b60006001600160e01b03198216632742b5b960e01b14806109a757506109a78261289f565b60006001600160e01b03198216630101c11560e71b14806109a757506109a7826128df565b612933828261142c565b6109e45761294081613122565b61294b836020613134565b60405160200161295c9291906142a6565b60408051601f198184030181529082905262461bcd60e51b8252610b0c91600401613a47565b61298c82826132cf565b6109e48282613334565b60006129a182611098565b9050806001600160a01b0316836001600160a01b031603612a105760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610b0c565b336001600160a01b0382161480612a2c5750612a2c8133611806565b612a9e5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610b0c565b610a0a83836133af565b6000612ab382611ee0565b612b175760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b0c565b6000612b2283611098565b9050806001600160a01b0316846001600160a01b03161480612b5d5750836001600160a01b0316612b5284610aa1565b6001600160a01b0316145b8061272257506127228185611806565b600080612b7983612316565b91509150846001600160a01b0316826001600160a01b031614612bf35760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610b0c565b6001600160a01b038416612c595760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610b0c565b612c668585856001612dbd565b612c716000846133af565b6000612c7e846001613f65565b600881901c600090815260026020526040902054909150600160ff1b60ff83161c16158015612cae575060065481105b15612ce557600081815260056020526040902080546001600160a01b0319166001600160a01b038816179055612ce5600282611ab4565b600084815260056020526040902080546001600160a01b0319166001600160a01b038716179055818414612d1e57612d1e600285611ab4565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d6c8686866001612dd1565b505050505050565b60015460ff1661121a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b0c565b612dc5612e0b565b610bcd84848484611aef565b612ddd84848484611afb565b610bcd84848484611b25565b60006109a7600283611bd3565b600061183a836001600160a01b03841661341d565b60015460ff161561121a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b0c565b60006109a7338361270a565b612e6682612e51565b80612e6f575080155b612e8b5760405162461bcd60e51b8152600401610b0c9061422a565b6109e48282613510565b6000612ea060065490565b9050612eac8484612145565b612eba600085838686613579565b610bcd5760405162461bcd60e51b8152600401610b0c9061431b565b612ee1848484612b6d565b612eba848484600185613579565b606060178054610a1e90613ee2565b60606000612f0b836136b0565b60010190506000816001600160401b03811115612f2a57612f2a613bc7565b6040519080825280601f01601f191660200182016040528015612f54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612f5e57509392505050565b6001600160a01b03811660009081526011602052604081205415612fca57506001600160a01b031660009081526011602052604090205490565b505060125490565b600f5460009060ff16612fe7575060016109a7565b612ff083613788565b8061183a5750600c54604051630f8350ed60e41b81526001600160a01b038581166004830152602482018590529091169063f8350ed090604401602060405180830381865afa158015613047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183a91906141b9565b600061307683610dd0565b15613083575060006109a7565b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff1661183a565b600061183a836001600160a01b0384166137b2565b60608160000180548060200260200160405190810160405280929190818152602001828054801561311657602002820191906000526020600020905b815481526020019060010190808311613102575b50505050509050919050565b60606109a76001600160a01b03831660145b60606000613143836002613f2c565b61314e906002613f65565b6001600160401b0381111561316557613165613bc7565b6040519080825280601f01601f19166020018201604052801561318f576020820181803683370190505b509050600360fc1b816000815181106131aa576131aa613f8b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106131d9576131d9613f8b565b60200101906001600160f81b031916908160001a90535060006131fd846002613f2c565b613208906001613f65565b90505b6001811115613280576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061323c5761323c613f8b565b1a60f81b82828151811061325257613252613f8b565b60200101906001600160f81b031916908160001a90535060049490941c9361327981614370565b905061320b565b50831561183a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b0c565b6132d881611996565b156109e45760405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b6064820152608401610b0c565b6001600160a01b038216156109e45761334d8183613801565b6109e45760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b6064820152608401610b0c565b600081815260076020526040902080546001600160a01b0319166001600160a01b03841690811790915581906133e482611098565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526001830160205260408120548015613506576000613441600183613f78565b855490915060009061345590600190613f78565b90508181146134ba57600086600001828154811061347557613475613f8b565b906000526020600020015490508087600001848154811061349857613498613f8b565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806134cb576134cb614387565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109a7565b60009150506109a7565b61351933610dd0565b1580613523575080155b61356f5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606401610b0c565b6109e4828261380e565b60006001600160a01b0385163b156136a357506001835b61359a8486613f65565b81101561369d57604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906135d39033908b908690899060040161439d565b6020604051808303816000875af192505050801561360e575060408051601f3d908101601f1916820190925261360b918101906143da565b60015b61366b573d80801561363c576040519150601f19603f3d011682016040523d82523d6000602084013e613641565b606091505b5080516000036136635760405162461bcd60e51b8152600401610b0c9061431b565b805181602001fd5b82801561368857506001600160e01b03198116630a85bd0160e11b145b9250508061369581613fa1565b915050613590565b506136a7565b5060015b95945050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106136ef5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061371b576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061373957662386f26fc10000830492506010015b6305f5e1008310613751576305f5e100830492506008015b612710831061376557612710830492506004015b60648310613777576064830492506002015b600a83106109a75760010192915050565b60006109a7600d836001600160a01b0381166000908152600183016020526040812054151561183a565b60008181526001830160205260408120546137f9575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109a7565b5060006109a7565b60008061271633856138cb565b336001600160a01b038316036138665760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610b0c565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612556565b600081815260106020526040812054156138f457506000818152601060205260409020546109a7565b61183a83612f90565b6020808252825182820181905260009190848201906040850190845b8181101561393e5783516001600160a01b031683529284019291840191600101613919565b50909695505050505050565b6001600160e01b031981168114610d4057600080fd5b60006020828403121561397257600080fd5b813561183a8161394a565b80356001600160a01b038116811461399457600080fd5b919050565b6000602082840312156139ab57600080fd5b61183a8261397d565b600080604083850312156139c757600080fd5b6139d08361397d565b915060208301356001600160601b03811681146139ec57600080fd5b809150509250929050565b60005b83811015613a125781810151838201526020016139fa565b50506000910152565b60008151808452613a338160208601602086016139f7565b601f01601f19169290920160200192915050565b60208152600061183a6020830184613a1b565b600060208284031215613a6c57600080fd5b5035919050565b60008060408385031215613a8657600080fd5b613a8f8361397d565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613ad557634e487b7160e01b600052602160045260246000fd5b91905290565b600080600060608486031215613af057600080fd5b613af98461397d565b9250613b076020850161397d565b9150604084013590509250925092565b60008060408385031215613b2a57600080fd5b50508035926020909101359150565b60008060408385031215613b4c57600080fd5b82359150613b5c6020840161397d565b90509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561393e57835183529284019291840191600101613b81565b80356003811061399457600080fd5b600060208284031215613bbe57600080fd5b61183a82613b9d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613c0557613c05613bc7565b604052919050565b60006001600160401b03821115613c2657613c26613bc7565b50601f01601f191660200190565b6000613c47613c4284613c0d565b613bdd565b9050828152838383011115613c5b57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613c8457600080fd5b81356001600160401b03811115613c9a57600080fd5b8201601f81018413613cab57600080fd5b61272284823560208401613c34565b60008060408385031215613ccd57600080fd5b613cd68361397d565b9150613b5c60208401613b9d565b8015158114610d4057600080fd5b600060208284031215613d0457600080fd5b813561183a81613ce4565b60008060408385031215613d2257600080fd5b613d2b8361397d565b915060208301356139ec81613ce4565b60008083601f840112613d4d57600080fd5b5081356001600160401b03811115613d6457600080fd5b6020830191508360208260051b8501011115610c7a57600080fd5b60008060008060408587031215613d9557600080fd5b84356001600160401b0380821115613dac57600080fd5b613db888838901613d3b565b90965094506020870135915080821115613dd157600080fd5b50613dde87828801613d3b565b95989497509550505050565b60008060008060808587031215613e0057600080fd5b613e098561397d565b9350613e176020860161397d565b92506040850135915060608501356001600160401b03811115613e3957600080fd5b8501601f81018713613e4a57600080fd5b613e5987823560208401613c34565b91505092959194509250565b60008060408385031215613e7857600080fd5b613e818361397d565b9150613b5c6020840161397d565b600080600060408486031215613ea457600080fd5b83356001600160401b03811115613eba57600080fd5b613ec686828701613d3b565b9094509250613ed9905060208501613b9d565b90509250925092565b600181811c90821680613ef657607f821691505b602082108103611a8d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109a7576109a7613f16565b600082613f6057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156109a7576109a7613f16565b818103818111156109a7576109a7613f16565b634e487b7160e01b600052603260045260246000fd5b600060018201613fb357613fb3613f16565b5060010190565b601f821115610a0a57600081815260208120601f850160051c81016020861015613fe15750805b601f850160051c820191505b81811015612d6c57828155600101613fed565b81516001600160401b0381111561401957614019613bc7565b61402d816140278454613ee2565b84613fba565b602080601f831160018114614062576000841561404a5750858301515b600019600386901b1c1916600185901b178555612d6c565b600085815260208120601f198616915b8281101561409157888601518255948401946001909101908401614072565b50858210156140af5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156140d157600080fd5b81516001600160401b038111156140e757600080fd5b8201601f810184136140f857600080fd5b8051614106613c4282613c0d565b81815285602083850101111561411b57600080fd5b6136a78260208301602086016139f7565b60008351602061413f82858389016139f7565b81840191506000855461415181613ee2565b60018281168015614169576001811461417e576141aa565b60ff19841687528215158302870194506141aa565b896000528560002060005b848110156141a257815489820152908301908701614189565b505082870194505b50929998505050505050505050565b6000602082840312156141cb57600080fd5b815161183a81613ce4565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602d908201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560408201526c103637b1b5b2b2103a37b5b2b760991b606082015260800190565b600083516142898184602088016139f7565b83519083019061429d8183602088016139f7565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516142de8160178501602088016139f7565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161430f8160288401602088016139f7565b01602801949350505050565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b60008161437f5761437f613f16565b506000190190565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906143d090830184613a1b565b9695505050505050565b6000602082840312156143ec57600080fd5b815161183a8161394a56fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec420001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a2646970667358221220e444fff6ca1dc9ddb81f6008a3def3ae707dc4dc4cac9c501a062973e14a5c8764736f6c63430008110033

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

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