ETH Price: $2,094.47 (+1.10%)

Contract

0x99f77232DC079b8141CCCCB9555731C19C3a83D2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...246384732026-03-12 2:43:113 days ago1773283391IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000077882.07313602
Set Approval For...246347202026-03-11 14:07:354 days ago1773238055IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000140142.35621444
Set Approval For...245045792026-02-21 10:15:5922 days ago1771668959IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.0000030.08002179
Set Approval For...244094082026-02-08 3:29:2335 days ago1770521363IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000003670.0979023
Set Approval For...242567982026-01-17 20:16:4756 days ago1768681007IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000120982.03402399
Set Approval For...241129892025-12-28 18:41:2376 days ago1766947283IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000002550.043
Set Approval For...240862382025-12-25 1:04:1180 days ago1766624651IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000001570.04179049
Set Approval For...240811742025-12-24 8:06:2381 days ago1766563583IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000004850.12920273
Set Approval For...240325442025-12-17 13:09:5988 days ago1765976999IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000121362.04040494
Set Approval For...240324882025-12-17 12:58:4788 days ago1765976327IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.00000240.04044602
Set Approval For...240098732025-12-14 9:13:4791 days ago1765703627IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000009350.24908065
Set Approval For...240022732025-12-13 7:43:4792 days ago1765611827IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000008890.23672384
Set Approval For...238999932025-11-28 21:56:47106 days ago1764367007IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000121762.04717917
Set Approval For...237179902025-11-03 9:45:35132 days ago1762163135IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000084282.24345984
Set Approval For...236915222025-10-30 16:54:35135 days ago1761843275IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000059061.57224702
Set Approval For...235886582025-10-16 7:11:23150 days ago1760598683IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000006880.11577431
Set Approval For...235658942025-10-13 2:43:35153 days ago1760323415IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000095861.61173128
Set Approval For...235074752025-10-04 22:44:23161 days ago1759617863IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000006280.10572711
Set Approval For...234810412025-10-01 6:02:23165 days ago1759298543IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000067841.14068604
Set Approval For...234737082025-09-30 5:25:35166 days ago1759209935IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000045691.21638424
Set Approval For...234617252025-09-28 13:14:35168 days ago1759065275IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000044771.19173861
Set Approval For...234574722025-09-27 22:58:11168 days ago1759013891IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000042091.1204
Set Approval For...234042882025-09-20 12:30:23176 days ago1758371423IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000012890.34335968
Set Approval For...233673682025-09-15 8:44:59181 days ago1757925899IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.00001220.32499718
Set Approval For...233656122025-09-15 2:51:11181 days ago1757904671IN
gggggSkinNFT: GGGGGSKIN Token
0 ETH0.000043591.15973148
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Is Operator Allo...246532582026-03-14 4:13:4734 hrs ago1773461627
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Set Approval For...246532582026-03-14 4:13:4734 hrs ago1773461627
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...246384732026-03-12 2:43:113 days ago1773283391
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...246347202026-03-11 14:07:354 days ago1773238055
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...245566162026-02-28 16:27:1114 days ago1772296031
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Transfer From245566162026-02-28 16:27:1114 days ago1772296031
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...245045792026-02-21 10:15:5922 days ago1771668959
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...244094082026-02-08 3:29:2335 days ago1770521363
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...242567982026-01-17 20:16:4756 days ago1768681007
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...241528262026-01-03 8:08:3571 days ago1767427715
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Transfer From241528262026-01-03 8:08:3571 days ago1767427715
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...241166212025-12-29 6:50:4776 days ago1766991047
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Transfer From241166212025-12-29 6:50:4776 days ago1766991047
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...241151952025-12-29 2:04:1176 days ago1766973851
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Set Approval For...241151952025-12-29 2:04:1176 days ago1766973851
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...241129892025-12-28 18:41:2376 days ago1766947283
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...241101682025-12-28 9:15:2377 days ago1766913323
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Set Approval For...241101682025-12-28 9:15:2377 days ago1766913323
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...240862382025-12-25 1:04:1180 days ago1766624651
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...240811742025-12-24 8:06:2381 days ago1766563583
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...240325442025-12-17 13:09:5988 days ago1765976999
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...240324982025-12-17 13:00:4788 days ago1765976447
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Transfer From240324982025-12-17 13:00:4788 days ago1765976447
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Is Operator Allo...240324932025-12-17 12:59:4788 days ago1765976387
gggggSkinNFT: GGGGGSKIN Token
0 ETH
Transfer From240324932025-12-17 12:59:4788 days ago1765976387
gggggSkinNFT: GGGGGSKIN Token
0 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GGGGGSkinNFT

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

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

import { ERC721CoreOpenSea } from "../core/ERC721CoreOpenSea.sol";

/*

                 . 1ttffttt .        . 1ttfftt1 .        . 1ttffttt .        . 1ttfftt1 .        . 1ttfftt1 .
              .tfft1i;;;;;i1tL.   .tff11i;;;;;i1tL.   .tfft1i;;;:;i1tL.   .tff11i;;;;;i1tL.   .tff11i;;;;;ittL.
            .Lt1;:,.      .,i:f..Lti;:,.      .,i:L..Lf1;:,.      .,i:f..Lti;:,.      .,i:f. Lti;:,.      .,i:L ,
          .Ct;;:.   .,.    :1,L01;;:.   .,.    :1.C8t;;:.   .,.    ,1,L01;;:.   .,.    :1.C01;;:.   .,.    :i.L@0
         .L:;:   .;;:::;,.i;:0f,;:   .;;:::;,.i;;8L,;:   .;;:::;,.i;:0f,;:   .;;:::;,.i;;0f:;:   .;;:::;,.i:;8 @L
         i:i.   :1;:,,,:1fi,;::i.   :i;:,,,:1fi,;;:i.   :1;:,,,:1fi,;::i.   :i;:,,,:1fi,;::;.   :i;:,,,:1t;,;L@L
      t@;:i    :1 1,,,.....;;:;    :i 1,,,.....i:,i    ,1 1,,,.....;;:i    :1 1,,,.....i;:;    :i 1,,,.....i:;@G
     ;@t.1     1 .t        iii     t .t        i;i     1..t        iii     1 .t        iii     t ,1        1.G@0
      @.1.     i: i:;:     11.     1, i:i,    .11.     i: i:;:     1t.     1, i:i:    .11      1,.i:i,    .1.@ f
    ;@@.t      .i;,,t:    :i1      .i:,,t,    ;;1.     .i;,,1:    :i1      .i:,,t,    :i1      .i:,,t,    ;:i @:
    i@ i,i.      .,::     1,:i       .,:,     1.,i.      .,::     1,,i       .,:,     1.:;       ,,:,     1.C@0
    .8@@1:;,..           .t.i:;,..           .1.1:;:..           .t.i:;,..           .1.i:;,..           .1.@@f
     ;8@@0ti;::,,,::,,,,::,; Gti;::,,,::,,,,::,i Gti;::,,,::,,,,::,; Gti;::,,,::,,,,::,i Gti;::,,,::,,,,:;.1 @:
      ,L8@@@8GCLffffffffLLC@@@@@8GCLffffffffLLC@@@@@8GCLffffffffLLC@@@@@8GCLffffffffLLC@@@@@8GCLffffffffLLC@@0
        ,1C  @@@@@@@@@@@@@@@0tC  @@@@@@@@@@@@@@@GtC  @@@@@@@@@@@@@@@0tC  @@@@@@@@@@@@@@@0tC  @@@@@@@@@@@@@@@G:
            ,:i1tffffftt11;:   .,:i1tffffftt11;:    ,:i1tffffftt11;:   .,:i1tffffftt11;:   .,:i1tffffftt11;:
*/
contract GGGGGSkinNFT is ERC721CoreOpenSea {
    /* solhint-disable no-empty-blocks */
    constructor()
        ERC721CoreOpenSea(
            "gggggSkinNFT",
            "GGGGGSKIN",
            address(0),
            0,
            3456,
            "",
            ""
        )
    {}
    /* solhint-enable no-empty-blocks */
}

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

// 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 4 of 27 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

    /**
     * @dev 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) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// 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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// 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;
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { AdminRole } from "./roles/AdminRole.sol";
import { OperatorRole } from "./roles/OperatorRole.sol";

contract CoreRoles is Ownable, AdminRole, OperatorRole {
    function transferOwnership(address newOwner)
        public
        virtual
        override
        onlyAdmin
    {
        require(newOwner != address(0), "invalid address");
        _transferOwnership(newOwner);
    }

    function transferOperator(address newOperator) external virtual onlyAdmin {
        _transferOperator(newOperator);
    }

    function transferAdmin(address newAdmin) external virtual onlyAdmin {
        _transferAdmin(newAdmin);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { IERC721Receiver } from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { Counters } from "@openzeppelin/contracts/utils/Counters.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import { CoreRoles } from "./CoreRoles.sol";
import { ERC721MetadataOnly } from "./ERC721MetadataOnly.sol";
import { RoyaltyInfo } from "./RoyaltyInfo.sol";
import { IERC721CoreMint } from "./interfaces/IERC721CoreMint.sol";

contract ERC721Core is
    ERC165,
    ERC721MetadataOnly,
    ReentrancyGuard,
    IERC721CoreMint,
    RoyaltyInfo,
    CoreRoles
{
    using Address for address;
    using SafeMath for uint256;
    using Strings for uint256;
    using Counters for Counters.Counter;

    uint256 private constant TOKEN_IDS_BY_OWNER_ONCE_COUNT = 20;

    Counters.Counter private _totalSupply;
    uint256 private _maxSupply;
    mapping(uint256 => address) private _tokenOwners;
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
    mapping(uint256 => uint256) private _ownedTokensIndex;
    mapping(address => uint256) private _balances;
    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;
    address private _saleAddress;

    /*------------------------------------------------
     * ERC721Core
     *----------------------------------------------*/

    modifier onlyOperatorOrSale() {
        address caller = msg.sender;
        require(
            operator() == caller || _saleAddress == caller,
            "invalid caller"
        );
        _;
    }

    event SaleAddress(
        address indexed previousAddress,
        address indexed newAddress
    );

    constructor(
        string memory name,
        string memory symbol,
        address royaltyReceiver,
        uint96 royaltyFraction,
        uint256 newMaxSupply,
        string memory newTokenURIPrefix,
        string memory newTokenURISuffix
    )
        ERC721MetadataOnly(name, symbol, newTokenURIPrefix, newTokenURISuffix)
        RoyaltyInfo(royaltyReceiver, royaltyFraction)
    {
        _maxSupply = newMaxSupply;
    }

    function tokenIdsByOwnerOnceCount() external pure returns (uint256) {
        return TOKEN_IDS_BY_OWNER_ONCE_COUNT;
    }

    function tokenIdsByOwner(address owner, uint256 offset)
        external
        view
        returns (
            uint256[TOKEN_IDS_BY_OWNER_ONCE_COUNT] memory,
            uint256,
            bool
        )
    {
        uint256[TOKEN_IDS_BY_OWNER_ONCE_COUNT] memory tokenIds;
        uint256 tokenIdCount = 0;
        bool isNext = true;
        uint256 len = _balances[owner];
        for (uint256 i = 0; i < TOKEN_IDS_BY_OWNER_ONCE_COUNT; i++) {
            uint256 index = i + offset;
            if (index < len) {
                tokenIds[i] = _ownedTokens[owner][index];
                tokenIdCount++;
            } else {
                tokenIds[i] = 0;
                isNext = false;
            }
        }

        return (tokenIds, tokenIdCount, isNext);
    }

    function maxSupply() external view returns (uint256) {
        return _maxSupply;
    }

    function remainSupply() external view override returns (uint256) {
        if (_maxSupply <= _totalSupply.current()) {
            return 0;
        }
        return _maxSupply - _totalSupply.current();
    }

    function supplies()
        external
        view
        override
        returns (
            uint256,
            uint256,
            uint256
        )
    {
        uint256 total = _totalSupply.current();
        uint256 remain = 0;
        if (total < _maxSupply) {
            remain = _maxSupply - total;
        }
        return (total, _maxSupply, remain);
    }

    function setTokenURI(
        string memory newTokenURIPrefix,
        string memory newTokenURISuffix
    ) external onlyOperator {
        _setTokenURI(newTokenURIPrefix, newTokenURISuffix);
    }

    function saleAddress() external view returns (address) {
        return _saleAddress;
    }

    function setSaleAddress(address newSaleAddress) external onlyAdmin {
        address previousSaleAddress = _saleAddress;
        _saleAddress = newSaleAddress;
        emit SaleAddress(previousSaleAddress, _saleAddress);
    }

    /*------------------------------------------------
     * IERC721CoreMint
     *----------------------------------------------*/

    function mint(address to, uint256 amount)
        external
        override
        onlyOperatorOrSale
        nonReentrant
    {
        require(
            (_totalSupply.current() + amount) <= _maxSupply,
            "over max supply"
        );
        while (0 < amount) {
            _totalSupply.increment();
            _safeMint(to, _totalSupply.current());
            amount--;
        }
    }

    /*------------------------------------------------
     * ERC165
     *----------------------------------------------*/

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(RoyaltyInfo, ERC721MetadataOnly, ERC165)
        returns (bool)
    {
        return
            interfaceId == type(IERC721).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /*------------------------------------------------
     * Enumerable
     *----------------------------------------------*/

    function totalSupply() external view returns (uint256) {
        return _totalSupply.current();
    }

    /*------------------------------------------------
     * Metadata
     *----------------------------------------------*/

    function tokenURI(uint256 tokenId)
        external
        view
        virtual
        override
        returns (string memory)
    {
        require(_exists(tokenId), "not exist token");
        return _tokenURI(tokenId);
    }

    /*------------------------------------------------
     * IERC2981
     *----------------------------------------------*/

    function setRoyaltyInfo(address newReceiver, uint96 newFraction)
        external
        onlyOperator
    {
        _setRoyaltyInfo(newReceiver, newFraction);
    }

    /*------------------------------------------------
     * IERC721
     *----------------------------------------------*/

    function balanceOf(address tokenOwner)
        external
        view
        virtual
        override
        returns (uint256)
    {
        require(tokenOwner != address(0), "invalid token owner");
        return _balances[tokenOwner];
    }

    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        address tokenOwner = _tokenOwners[tokenId];
        require(tokenOwner != address(0), "invalid token ID");
        return tokenOwner;
    }

    function approve(address to, uint256 tokenId) public virtual override {
        address tokenOwner = ownerOf(tokenId);
        require(to != tokenOwner, "can't approval to current owner");
        if (msg.sender != tokenOwner) {
            require(
                isApprovedForAll(tokenOwner, msg.sender),
                "owner is not sender or operator"
            );
        }

        _approve(to, tokenId);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        _setApprovalForAll(msg.sender, operator, approved);
    }

    function getApproved(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        require(_exists(tokenId), "invalid token ID");

        return _tokenApprovals[tokenId];
    }

    function isApprovedForAll(address owner, address operator)
        public
        view
        override
        returns (bool)
    {
        return _operatorApprovals[owner][operator];
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        require(
            _isApprovedOrOwner(msg.sender, tokenId),
            "must be approved for token"
        );

        _transfer(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, data),
            "non ERC721Receiver implementer"
        );
    }

    /*------------------------------------------------
     * IERC721 internal
     *----------------------------------------------*/

    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _tokenOwners[tokenId] != address(0);
    }

    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ownerOf(tokenId), to, tokenId);
    }

    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try
                IERC721Receiver(to).onERC721Received(
                    msg.sender,
                    from,
                    tokenId,
                    data
                )
            returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "non ERC721Receiver implementer"
        );
    }

    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "mint to the zero address");
        require(!_exists(tokenId), "token already minted");

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

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

    function _isApprovedOrOwner(address spender, uint256 tokenId)
        internal
        view
        virtual
        returns (bool)
    {
        address owner = ownerOf(tokenId);
        return (spender == owner ||
            isApprovedForAll(owner, spender) ||
            getApproved(tokenId) == spender);
    }

    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ownerOf(tokenId) == from, "transfer from incorrect owner");
        require(to != address(0), "transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        _approve(address(0), tokenId);

        emit Transfer(from, to, tokenId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        if (from != address(0)) {
            if (from != to) {
                uint256 lastTokenIndex = _balances[from] - 1;
                uint256 tokenIndex = _ownedTokensIndex[tokenId];

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

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

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

            _balances[from] -= 1;
        }
        if (to != address(0)) {
            if (from != to) {
                uint256 length = _balances[to];
                _ownedTokens[to][length] = tokenId;
                _ownedTokensIndex[tokenId] = length;
            }

            _balances[to] += 1;
        }
        _tokenOwners[tokenId] = to;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import { DefaultOperatorFilterer } from "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import { ERC721Core } from "./ERC721Core.sol";

contract ERC721CoreOpenSea is ERC721Core, DefaultOperatorFilterer {
    /* solhint-disable no-empty-blocks */
    constructor(
        string memory name,
        string memory symbol,
        address royaltyReceiver,
        uint96 royaltyFraction,
        uint256 newMaxSupply,
        string memory newTokenURIPrefix,
        string memory newTokenURISuffix
    )
        ERC721Core(
            name,
            symbol,
            royaltyReceiver,
            royaltyFraction,
            newMaxSupply,
            newTokenURIPrefix,
            newTokenURISuffix
        )
    {}

    /* solhint-enable no-empty-blocks */

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

abstract contract ERC721MetadataOnly is IERC721Metadata, ERC165 {
    using Strings for uint256;

    string private _name;
    string private _symbol;
    string private _tokenURIPrefix;
    string private _tokenURISuffix;

    event TokenURI(string prefix, string suffix);

    constructor(
        string memory newName,
        string memory newSymbol,
        string memory newTokenURIPrefix,
        string memory newTokenURISuffix
    ) {
        _name = newName;
        _symbol = newSymbol;
        _setTokenURI(newTokenURIPrefix, newTokenURISuffix);
    }

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

    function name() external view override returns (string memory) {
        return _name;
    }

    function symbol() external view override returns (string memory) {
        return _symbol;
    }

    function tokenURI(uint256 tokenId)
        external
        view
        virtual
        override
        returns (string memory)
    {
        return _tokenURI(tokenId);
    }

    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        return
            string(
                abi.encodePacked(
                    _tokenURIPrefix,
                    tokenId.toString(),
                    _tokenURISuffix
                )
            );
    }

    function _setTokenURI(
        string memory newTokenURIPrefix,
        string memory newTokenURISuffix
    ) internal {
        _tokenURIPrefix = newTokenURIPrefix;
        _tokenURISuffix = newTokenURISuffix;
        emit TokenURI(_tokenURIPrefix, _tokenURISuffix);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

interface IERC721CoreMint {
    function mint(address to, uint256 amount) external;

    function remainSupply() external view returns (uint256);

    function supplies()
        external
        view
        returns (
            uint256,
            uint256,
            uint256
        );
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

contract AdminRole {
    address private _admin;

    event AdminTransferred(
        address indexed previousAdmin,
        address indexed newAdmin
    );

    constructor() {
        _transferAdmin(msg.sender);
    }

    modifier onlyAdmin() {
        require(admin() == msg.sender, "caller is not the admin");
        _;
    }

    function admin() public view virtual returns (address) {
        return _admin;
    }

    function _transferAdmin(address newAdmin) internal virtual {
        require(newAdmin != address(0), "invalid address");
        require(newAdmin != _admin, "not change admin");
        address oldAdmin = _admin;
        _admin = newAdmin;
        emit AdminTransferred(oldAdmin, _admin);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

contract OperatorRole {
    address private _operator;

    event OperatorTransferred(
        address indexed previousOperator,
        address indexed newOperator
    );

    constructor() {
        _transferOperator(msg.sender);
    }

    modifier onlyOperator() {
        require(operator() == msg.sender, "caller is not the operator");
        _;
    }

    function operator() public view virtual returns (address) {
        return _operator;
    }

    function _transferOperator(address newOperator) internal virtual {
        require(newOperator != address(0), "invalid address");
        require(newOperator != _operator, "not change operator");
        address oldOperator = _operator;
        _operator = newOperator;
        emit OperatorTransferred(oldOperator, _operator);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import { IERC2981 } from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import { ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";

contract RoyaltyInfo is IERC2981, ERC165 {
    uint96 private constant FEE_DENOMINATOR = 10000;

    address private _receiver;
    uint96 private _fraction;

    event SetRoyaltyInfo(
        address indexed previousReceiver,
        address indexed newReceiver,
        uint96 previousFraction,
        uint96 newFraction
    );

    constructor(address newReceiver, uint96 newFraction) {
        _setRoyaltyInfo(newReceiver, newFraction);
    }

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

    function royaltyInfo(uint256, uint256 salePrice)
        external
        view
        override
        returns (address, uint256)
    {
        if (_receiver == address(0x0)) {
            return (address(this), 0);
        } else if (_fraction == 0 || salePrice == 0) {
            return (_receiver, 0);
        }
        return (_receiver, (salePrice * _fraction) / FEE_DENOMINATOR);
    }

    function _setRoyaltyInfo(address newReceiver, uint96 newFraction) internal {
        require(
            newFraction <= FEE_DENOMINATOR,
            "fraction will exceed salePrice"
        );
        address previousReceiver = _receiver;
        uint96 previousFraction = _fraction;
        _receiver = newReceiver;
        _fraction = newFraction;
        emit SetRoyaltyInfo(
            previousReceiver,
            _receiver,
            previousFraction,
            _fraction
        );
    }
}

File 24 of 27 : 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) {}
}

// 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 26 of 27 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

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

File 27 of 27 : 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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"},{"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":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"SaleAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"newReceiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"previousFraction","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"newFraction","type":"uint96"}],"name":"SetRoyaltyInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prefix","type":"string"},{"indexed":false,"internalType":"string","name":"suffix","type":"string"}],"name":"TokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"remainSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newReceiver","type":"address"},{"internalType":"uint96","name":"newFraction","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSaleAddress","type":"address"}],"name":"setSaleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newTokenURIPrefix","type":"string"},{"internalType":"string","name":"newTokenURISuffix","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"tokenIdsByOwner","outputs":[{"internalType":"uint256[20]","name":"","type":"uint256[20]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdsByOwnerOnceCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","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":"newOperator","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280600c81526020016b19d9d9d9d9d4dada5b93919560a21b8152506040518060400160405280600981526020016823a3a3a3a3a9a5a4a760b91b815250600080610d806040518060200160405280600081525060405180602001604052806000815250733cc6cdda760b79bafa08df41ecfa224f810dceb66001888888888888888484888885858360009081620000b4919062000688565b506001620000c3848262000688565b50620000d0828262000268565b5050600160045550620000e690508282620002c7565b50620000f4905033620003a6565b620000ff33620003f8565b6200010a33620004e7565b5050600a555050506daaeb6d7670e522a718067333cd4e3b15905062000259578015620001a757604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200018857600080fd5b505af11580156200019d573d6000803e3d6000fd5b5050505062000259565b6001600160a01b03821615620001f85760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200016d565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200023f57600080fd5b505af115801562000254573d6000803e3d6000fd5b505050505b5050505050505050506200080b565b600262000276838262000688565b50600362000285828262000688565b507f34096664059c7d0b551b98d4585f6566d0a87a93bb8f5a23b1e5fdace3e3267360026003604051620002bb929190620007d9565b60405180910390a15050565b6127106001600160601b0382161115620003285760405162461bcd60e51b815260206004820152601e60248201527f6672616374696f6e2077696c6c206578636565642073616c655072696365000060448201526064015b60405180910390fd5b600580546001600160601b03838116600160a01b9081026001600160a01b03878116828117968790556040805185880487168082529590980490951660208801529481169592949116179184917f377771b065820b92da881172b82977e2307a6fec324ffc92fe26bbbae0ad42f8910160405180910390a350505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038116620004425760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206164647265737360881b60448201526064016200031f565b6007546001600160a01b0390811690821603620004955760405162461bcd60e51b815260206004820152601060248201526f3737ba1031b430b733b29030b236b4b760811b60448201526064016200031f565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b6001600160a01b038116620005315760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206164647265737360881b60448201526064016200031f565b6008546001600160a01b0390811690821603620005915760405162461bcd60e51b815260206004820152601360248201527f6e6f74206368616e6765206f70657261746f720000000000000000000000000060448201526064016200031f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200060e57607f821691505b6020821081036200062f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200068357600081815260208120601f850160051c810160208610156200065e5750805b601f850160051c820191505b818110156200067f578281556001016200066a565b5050505b505050565b81516001600160401b03811115620006a457620006a4620005e3565b620006bc81620006b58454620005f9565b8462000635565b602080601f831160018114620006f45760008415620006db5750858301515b600019600386901b1c1916600185901b1785556200067f565b600085815260208120601f198616915b82811015620007255788860151825594840194600190910190840162000704565b5085821015620007445787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600081546200076381620005f9565b8085526020600183811680156200078357600181146200079e57620007ce565b60ff1985168884015283151560051b880183019550620007ce565b866000528260002060005b85811015620007c65781548a8201860152908301908401620007a9565b890184019650505b505050505092915050565b604081526000620007ee604083018562000754565b828103602084015262000802818562000754565b95945050505050565b612480806200081b6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063b88d4fde116100ad578063e985e9c51161007c578063e985e9c51461044c578063f2fde38b1461045f578063f851a44014610472578063f8fb491f14610483578063fffe088d1461049657600080fd5b8063b88d4fde1461040b578063c87b56dd1461041e578063d48ede9914610431578063d5abeb011461044457600080fd5b80638da5cb5b116100e95780638da5cb5b146103bc5780638efa8874146103cd57806395d89b41146103f0578063a22cb465146103f857600080fd5b806370a0823114610387578063715018a61461039a57806375829def146103a25780637b504b45146103b557600080fd5b806329605e771161019257806341f434341161016157806341f434341461033b57806342842e0e14610350578063570ca735146103635780636352211e1461037457600080fd5b806329605e77146102db5780632a55205a146102ee5780633f5a31521461032057806340c10f191461032857600080fd5b8063081812fc116101ce578063081812fc14610274578063095ea7b31461029f57806318160ddd146102b257806323b872dd146102c857600080fd5b806301ffc9a71461020057806302fa7c471461022857806303fac3c31461023d57806306fdde031461025f575b600080fd5b61021361020e366004611bed565b6104a7565b60405190151581526020015b60405180910390f35b61023b610236366004611c2d565b6104d2565b005b61025061024b366004611c70565b61054e565b60405161021f93929190611c9a565b61026761062b565b60405161021f9190611d2e565b610287610282366004611d41565b6106bd565b6040516001600160a01b03909116815260200161021f565b61023b6102ad366004611c70565b610730565b6102ba610749565b60405190815260200161021f565b61023b6102d6366004611d5a565b610759565b61023b6102e9366004611d96565b610784565b6103016102fc366004611db1565b6107c9565b604080516001600160a01b03909316835260208301919091520161021f565b6102ba610862565b61023b610336366004611c70565b61088b565b6102876daaeb6d7670e522a718067333cd4e81565b61023b61035e366004611d5a565b6109ee565b6008546001600160a01b0316610287565b610287610382366004611d41565b610a13565b6102ba610395366004611d96565b610a6b565b61023b610ad5565b61023b6103b0366004611d96565b610ae9565b60146102ba565b6006546001600160a01b0316610287565b6103d5610b2b565b6040805193845260208401929092529082015260600161021f565b610267610b67565b61023b610406366004611de1565b610b76565b61023b610419366004611e99565b610b8a565b61026761042c366004611d41565b610bb7565b61023b61043f366004611f35565b610c19565b600a546102ba565b61021361045a366004611f99565b610c8c565b61023b61046d366004611d96565b610cba565b6007546001600160a01b0316610287565b61023b610491366004611d96565b610d22565b6011546001600160a01b0316610287565b60006001600160e01b031982166380ac58cd60e01b14806104cc57506104cc82610dad565b92915050565b336104e56008546001600160a01b031690565b6001600160a01b0316146105405760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f7200000000000060448201526064015b60405180910390fd5b61054a8282610dd2565b5050565b610556611bb8565b600080610561611bb8565b6001600160a01b0386166000908152600e6020526040812054600190825b601481101561061c5760006105948a83611fe2565b9050828110156105eb576001600160a01b038b166000908152600c602090815260408083208484529091529020548683601481106105d4576105d4611ff5565b6020020152846105e38161200b565b955050610609565b60008683601481106105ff576105ff611ff5565b6020020152600093505b50806106148161200b565b91505061057f565b50929891975095509350505050565b60606000805461063a90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461066690612024565b80156106b35780601f10610688576101008083540402835291602001916106b3565b820191906000526020600020905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b6000818152600b60205260408120546001600160a01b03166107145760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b88125160821b6044820152606401610537565b506000908152600f60205260409020546001600160a01b031690565b8161073a81610eab565b6107448383610f64565b505050565b600061075460095490565b905090565b826001600160a01b03811633146107735761077333610eab565b61077e848484611042565b50505050565b336107976007546001600160a01b031690565b6001600160a01b0316146107bd5760405162461bcd60e51b81526004016105379061205e565b6107c6816110a3565b50565b60055460009081906001600160a01b03166107e95750309050600061085b565b600554600160a01b90046001600160601b03161580610806575082155b156108205750506005546001600160a01b0316600061085b565b6005546001600160a01b038116906127109061084c90600160a01b90046001600160601b031686612095565b61085691906120c2565b915091505b9250929050565b600061086d60095490565b600a541161087b5750600090565b600954600a5461075491906120d6565b338061089f6008546001600160a01b031690565b6001600160a01b031614806108c157506011546001600160a01b038281169116145b6108fe5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b0b63632b960911b6044820152606401610537565b6002600454036109505760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610537565b6002600455600a548261096260095490565b61096c9190611fe2565b11156109ac5760405162461bcd60e51b815260206004820152600f60248201526e6f766572206d617820737570706c7960881b6044820152606401610537565b81156109e4576109c0600980546001019055565b6109d2836109cd60095490565b61116f565b816109dc816120e9565b9250506109ac565b5050600160045550565b826001600160a01b0381163314610a0857610a0833610eab565b61077e848484611189565b6000818152600b60205260408120546001600160a01b0316806104cc5760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b88125160821b6044820152606401610537565b60006001600160a01b038216610ab95760405162461bcd60e51b815260206004820152601360248201527234b73b30b634b2103a37b5b2b71037bbb732b960691b6044820152606401610537565b506001600160a01b03166000908152600e602052604090205490565b610add6111a4565b610ae760006111fe565b565b33610afc6007546001600160a01b031690565b6001600160a01b031614610b225760405162461bcd60e51b81526004016105379061205e565b6107c681611250565b600080600080610b3a60095490565b90506000600a54821015610b595781600a54610b5691906120d6565b90505b600a54919591945092509050565b60606001805461063a90612024565b81610b8081610eab565b6107448383611319565b836001600160a01b0381163314610ba457610ba433610eab565b610bb085858585611324565b5050505050565b6000818152600b60205260409020546060906001600160a01b0316610c105760405162461bcd60e51b815260206004820152600f60248201526e3737ba1032bc34b9ba103a37b5b2b760891b6044820152606401610537565b6104cc82611357565b33610c2c6008546001600160a01b031690565b6001600160a01b031614610c825760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610537565b61054a828261138e565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205460ff1690565b33610ccd6007546001600160a01b031690565b6001600160a01b031614610cf35760405162461bcd60e51b81526004016105379061205e565b6001600160a01b038116610d195760405162461bcd60e51b815260040161053790612100565b6107c6816111fe565b33610d356007546001600160a01b031690565b6001600160a01b031614610d5b5760405162461bcd60e51b81526004016105379061205e565b601180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f390d2170996051a898885b38ca13748db8b80b90f248541f45d50c2193a6a8ce90600090a35050565b60006001600160e01b0319821663152a902d60e11b14806104cc57506104cc826113e7565b6127106001600160601b0382161115610e2d5760405162461bcd60e51b815260206004820152601e60248201527f6672616374696f6e2077696c6c206578636565642073616c65507269636500006044820152606401610537565b600580546001600160601b03838116600160a01b9081026001600160a01b03878116828117968790556040805185880487168082529590980490951660208801529481169592949116179184917f377771b065820b92da881172b82977e2307a6fec324ffc92fe26bbbae0ad42f8910160405180910390a350505050565b6daaeb6d7670e522a718067333cd4e3b156107c657604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c9190612129565b6107c657604051633b79c77360e21b81526001600160a01b0382166004820152602401610537565b6000610f6f82610a13565b9050806001600160a01b0316836001600160a01b031603610fd25760405162461bcd60e51b815260206004820152601f60248201527f63616e277420617070726f76616c20746f2063757272656e74206f776e6572006044820152606401610537565b336001600160a01b0382161461103857610fec8133610c8c565b6110385760405162461bcd60e51b815260206004820152601f60248201527f6f776e6572206973206e6f742073656e646572206f72206f70657261746f72006044820152606401610537565b610744838361141c565b61104c338261148a565b6110985760405162461bcd60e51b815260206004820152601a60248201527f6d75737420626520617070726f76656420666f7220746f6b656e0000000000006044820152606401610537565b6107448383836114e9565b6001600160a01b0381166110c95760405162461bcd60e51b815260040161053790612100565b6008546001600160a01b039081169082160361111d5760405162461bcd60e51b81526020600482015260136024820152723737ba1031b430b733b29037b832b930ba37b960691b6044820152606401610537565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a35050565b61054a828260405180602001604052806000815250611604565b61074483838360405180602001604052806000815250610b8a565b6006546001600160a01b03163314610ae75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610537565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166112765760405162461bcd60e51b815260040161053790612100565b6007546001600160a01b03908116908216036112c75760405162461bcd60e51b815260206004820152601060248201526f3737ba1031b430b733b29030b236b4b760811b6044820152606401610537565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b61054a338383611637565b61132f848484610759565b61133b848484846116f9565b61077e5760405162461bcd60e51b815260040161053790612146565b60606002611364836117fa565b6003604051602001611378939291906121f0565b6040516020818303038152906040529050919050565b600261139a8382612271565b5060036113a78282612271565b507f34096664059c7d0b551b98d4585f6566d0a87a93bb8f5a23b1e5fdace3e32673600260036040516113db9291906123ae565b60405180910390a15050565b60006001600160e01b03198216635b5e139f60e01b14806104cc57506301ffc9a760e01b6001600160e01b03198316146104cc565b6000818152600f6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145182610a13565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061149683610a13565b9050806001600160a01b0316846001600160a01b031614806114bd57506114bd8185610c8c565b806114e15750836001600160a01b03166114d6846106bd565b6001600160a01b0316145b949350505050565b826001600160a01b03166114fc82610a13565b6001600160a01b0316146115525760405162461bcd60e51b815260206004820152601d60248201527f7472616e736665722066726f6d20696e636f7272656374206f776e65720000006044820152606401610537565b6001600160a01b0382166115a85760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610537565b6115b38383836118fb565b6115be60008261141c565b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b61160e8383611abe565b61161b60008484846116f9565b6107445760405162461bcd60e51b815260040161053790612146565b816001600160a01b0316836001600160a01b03160361168c5760405162461bcd60e51b815260206004820152601160248201527030b8383937bb32903a379031b0b63632b960791b6044820152606401610537565b6001600160a01b03838116600081815260106020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b156117ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061173d9033908990889088906004016123dc565b6020604051808303816000875af1925050508015611778575060408051601f3d908101601f1916820190925261177591810190612419565b60015b6117d5573d8080156117a6576040519150601f19603f3d011682016040523d82523d6000602084013e6117ab565b606091505b5080516000036117cd5760405162461bcd60e51b815260040161053790612146565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506114e1565b506001949350505050565b6060816000036118215750506040805180820190915260018152600360fc1b602082015290565b8160005b811561184b57806118358161200b565b91506118449050600a836120c2565b9150611825565b60008167ffffffffffffffff81111561186657611866611e0d565b6040519080825280601f01601f191660200182016040528015611890576020820181803683370190505b5090505b84156114e1576118a56001836120d6565b91506118b2600a86612436565b6118bd906030611fe2565b60f81b8183815181106118d2576118d2611ff5565b60200101906001600160f81b031916908160001a9053506118f4600a866120c2565b9450611894565b6001600160a01b038316156119fd57816001600160a01b0316836001600160a01b0316146119ce576001600160a01b0383166000908152600e6020526040812054611948906001906120d6565b6000838152600d602052604090205490915080821461199b576001600160a01b0385166000908152600c602090815260408083208584528252808320548484528184208190558352600d90915290208190555b506000828152600d602090815260408083208390556001600160a01b0387168352600c8252808320938352929052908120555b6001600160a01b0383166000908152600e602052604081208054600192906119f79084906120d6565b90915550505b6001600160a01b03821615611a8f57816001600160a01b0316836001600160a01b031614611a60576001600160a01b0382166000908152600e6020908152604080832054600c83528184208185528352818420859055848452600d909252909120555b6001600160a01b0382166000908152600e60205260408120805460019290611a89908490611fe2565b90915550505b6000908152600b6020526040902080546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b038216611b145760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f206164647265737300000000000000006044820152606401610537565b6000818152600b60205260409020546001600160a01b031615611b705760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b5a5b9d195960621b6044820152606401610537565b611b7c600083836118fb565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040518061028001604052806014906020820280368337509192915050565b6001600160e01b0319811681146107c657600080fd5b600060208284031215611bff57600080fd5b8135611c0a81611bd7565b9392505050565b80356001600160a01b0381168114611c2857600080fd5b919050565b60008060408385031215611c4057600080fd5b611c4983611c11565b915060208301356001600160601b0381168114611c6557600080fd5b809150509250929050565b60008060408385031215611c8357600080fd5b611c8c83611c11565b946020939093013593505050565b6102c08101818560005b6014811015611cc3578151835260209283019290910190600101611ca4565b505050836102808301528215156102a0830152949350505050565b60005b83811015611cf9578181015183820152602001611ce1565b50506000910152565b60008151808452611d1a816020860160208601611cde565b601f01601f19169290920160200192915050565b602081526000611c0a6020830184611d02565b600060208284031215611d5357600080fd5b5035919050565b600080600060608486031215611d6f57600080fd5b611d7884611c11565b9250611d8660208501611c11565b9150604084013590509250925092565b600060208284031215611da857600080fd5b611c0a82611c11565b60008060408385031215611dc457600080fd5b50508035926020909101359150565b80151581146107c657600080fd5b60008060408385031215611df457600080fd5b611dfd83611c11565b91506020830135611c6581611dd3565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611e3e57611e3e611e0d565b604051601f8501601f19908116603f01168101908282118183101715611e6657611e66611e0d565b81604052809350858152868686011115611e7f57600080fd5b858560208301376000602087830101525050509392505050565b60008060008060808587031215611eaf57600080fd5b611eb885611c11565b9350611ec660208601611c11565b925060408501359150606085013567ffffffffffffffff811115611ee957600080fd5b8501601f81018713611efa57600080fd5b611f0987823560208401611e23565b91505092959194509250565b600082601f830112611f2657600080fd5b611c0a83833560208501611e23565b60008060408385031215611f4857600080fd5b823567ffffffffffffffff80821115611f6057600080fd5b611f6c86838701611f15565b93506020850135915080821115611f8257600080fd5b50611f8f85828601611f15565b9150509250929050565b60008060408385031215611fac57600080fd5b611fb583611c11565b9150611fc360208401611c11565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104cc576104cc611fcc565b634e487b7160e01b600052603260045260246000fd5b60006001820161201d5761201d611fcc565b5060010190565b600181811c9082168061203857607f821691505b60208210810361205857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526017908201527f63616c6c6572206973206e6f74207468652061646d696e000000000000000000604082015260600190565b80820281158282048414176104cc576104cc611fcc565b634e487b7160e01b600052601260045260246000fd5b6000826120d1576120d16120ac565b500490565b818103818111156104cc576104cc611fcc565b6000816120f8576120f8611fcc565b506000190190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b60006020828403121561213b57600080fd5b8151611c0a81611dd3565b6020808252601e908201527f6e6f6e20455243373231526563656976657220696d706c656d656e7465720000604082015260600190565b6000815461218a81612024565b600182811680156121a257600181146121b7576121e6565b60ff19841687528215158302870194506121e6565b8560005260208060002060005b858110156121dd5781548a8201529084019082016121c4565b50505082870194505b5050505092915050565b60006121fc828661217d565b845161220c818360208901611cde565b6122188183018661217d565b979650505050505050565b601f82111561074457600081815260208120601f850160051c8101602086101561224a5750805b601f850160051c820191505b8181101561226957828155600101612256565b505050505050565b815167ffffffffffffffff81111561228b5761228b611e0d565b61229f816122998454612024565b84612223565b602080601f8311600181146122d457600084156122bc5750858301515b600019600386901b1c1916600185901b178555612269565b600085815260208120601f198616915b82811015612303578886015182559484019460019091019084016122e4565b50858210156123215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000815461233e81612024565b80855260206001838116801561235b5760018114612375576123a3565b60ff1985168884015283151560051b8801830195506123a3565b866000528260002060005b8581101561239b5781548a8201860152908301908401612380565b890184019650505b505050505092915050565b6040815260006123c16040830185612331565b82810360208401526123d38185612331565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061240f90830184611d02565b9695505050505050565b60006020828403121561242b57600080fd5b8151611c0a81611bd7565b600082612445576124456120ac565b50069056fea2646970667358221220a29ee808a16e86defa36d952fe7f0bcad4d7761ed5df8b55a546ec54a7bb0c6f64736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063b88d4fde116100ad578063e985e9c51161007c578063e985e9c51461044c578063f2fde38b1461045f578063f851a44014610472578063f8fb491f14610483578063fffe088d1461049657600080fd5b8063b88d4fde1461040b578063c87b56dd1461041e578063d48ede9914610431578063d5abeb011461044457600080fd5b80638da5cb5b116100e95780638da5cb5b146103bc5780638efa8874146103cd57806395d89b41146103f0578063a22cb465146103f857600080fd5b806370a0823114610387578063715018a61461039a57806375829def146103a25780637b504b45146103b557600080fd5b806329605e771161019257806341f434341161016157806341f434341461033b57806342842e0e14610350578063570ca735146103635780636352211e1461037457600080fd5b806329605e77146102db5780632a55205a146102ee5780633f5a31521461032057806340c10f191461032857600080fd5b8063081812fc116101ce578063081812fc14610274578063095ea7b31461029f57806318160ddd146102b257806323b872dd146102c857600080fd5b806301ffc9a71461020057806302fa7c471461022857806303fac3c31461023d57806306fdde031461025f575b600080fd5b61021361020e366004611bed565b6104a7565b60405190151581526020015b60405180910390f35b61023b610236366004611c2d565b6104d2565b005b61025061024b366004611c70565b61054e565b60405161021f93929190611c9a565b61026761062b565b60405161021f9190611d2e565b610287610282366004611d41565b6106bd565b6040516001600160a01b03909116815260200161021f565b61023b6102ad366004611c70565b610730565b6102ba610749565b60405190815260200161021f565b61023b6102d6366004611d5a565b610759565b61023b6102e9366004611d96565b610784565b6103016102fc366004611db1565b6107c9565b604080516001600160a01b03909316835260208301919091520161021f565b6102ba610862565b61023b610336366004611c70565b61088b565b6102876daaeb6d7670e522a718067333cd4e81565b61023b61035e366004611d5a565b6109ee565b6008546001600160a01b0316610287565b610287610382366004611d41565b610a13565b6102ba610395366004611d96565b610a6b565b61023b610ad5565b61023b6103b0366004611d96565b610ae9565b60146102ba565b6006546001600160a01b0316610287565b6103d5610b2b565b6040805193845260208401929092529082015260600161021f565b610267610b67565b61023b610406366004611de1565b610b76565b61023b610419366004611e99565b610b8a565b61026761042c366004611d41565b610bb7565b61023b61043f366004611f35565b610c19565b600a546102ba565b61021361045a366004611f99565b610c8c565b61023b61046d366004611d96565b610cba565b6007546001600160a01b0316610287565b61023b610491366004611d96565b610d22565b6011546001600160a01b0316610287565b60006001600160e01b031982166380ac58cd60e01b14806104cc57506104cc82610dad565b92915050565b336104e56008546001600160a01b031690565b6001600160a01b0316146105405760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f7200000000000060448201526064015b60405180910390fd5b61054a8282610dd2565b5050565b610556611bb8565b600080610561611bb8565b6001600160a01b0386166000908152600e6020526040812054600190825b601481101561061c5760006105948a83611fe2565b9050828110156105eb576001600160a01b038b166000908152600c602090815260408083208484529091529020548683601481106105d4576105d4611ff5565b6020020152846105e38161200b565b955050610609565b60008683601481106105ff576105ff611ff5565b6020020152600093505b50806106148161200b565b91505061057f565b50929891975095509350505050565b60606000805461063a90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461066690612024565b80156106b35780601f10610688576101008083540402835291602001916106b3565b820191906000526020600020905b81548152906001019060200180831161069657829003601f168201915b5050505050905090565b6000818152600b60205260408120546001600160a01b03166107145760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b88125160821b6044820152606401610537565b506000908152600f60205260409020546001600160a01b031690565b8161073a81610eab565b6107448383610f64565b505050565b600061075460095490565b905090565b826001600160a01b03811633146107735761077333610eab565b61077e848484611042565b50505050565b336107976007546001600160a01b031690565b6001600160a01b0316146107bd5760405162461bcd60e51b81526004016105379061205e565b6107c6816110a3565b50565b60055460009081906001600160a01b03166107e95750309050600061085b565b600554600160a01b90046001600160601b03161580610806575082155b156108205750506005546001600160a01b0316600061085b565b6005546001600160a01b038116906127109061084c90600160a01b90046001600160601b031686612095565b61085691906120c2565b915091505b9250929050565b600061086d60095490565b600a541161087b5750600090565b600954600a5461075491906120d6565b338061089f6008546001600160a01b031690565b6001600160a01b031614806108c157506011546001600160a01b038281169116145b6108fe5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b0b63632b960911b6044820152606401610537565b6002600454036109505760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610537565b6002600455600a548261096260095490565b61096c9190611fe2565b11156109ac5760405162461bcd60e51b815260206004820152600f60248201526e6f766572206d617820737570706c7960881b6044820152606401610537565b81156109e4576109c0600980546001019055565b6109d2836109cd60095490565b61116f565b816109dc816120e9565b9250506109ac565b5050600160045550565b826001600160a01b0381163314610a0857610a0833610eab565b61077e848484611189565b6000818152600b60205260408120546001600160a01b0316806104cc5760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b88125160821b6044820152606401610537565b60006001600160a01b038216610ab95760405162461bcd60e51b815260206004820152601360248201527234b73b30b634b2103a37b5b2b71037bbb732b960691b6044820152606401610537565b506001600160a01b03166000908152600e602052604090205490565b610add6111a4565b610ae760006111fe565b565b33610afc6007546001600160a01b031690565b6001600160a01b031614610b225760405162461bcd60e51b81526004016105379061205e565b6107c681611250565b600080600080610b3a60095490565b90506000600a54821015610b595781600a54610b5691906120d6565b90505b600a54919591945092509050565b60606001805461063a90612024565b81610b8081610eab565b6107448383611319565b836001600160a01b0381163314610ba457610ba433610eab565b610bb085858585611324565b5050505050565b6000818152600b60205260409020546060906001600160a01b0316610c105760405162461bcd60e51b815260206004820152600f60248201526e3737ba1032bc34b9ba103a37b5b2b760891b6044820152606401610537565b6104cc82611357565b33610c2c6008546001600160a01b031690565b6001600160a01b031614610c825760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610537565b61054a828261138e565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205460ff1690565b33610ccd6007546001600160a01b031690565b6001600160a01b031614610cf35760405162461bcd60e51b81526004016105379061205e565b6001600160a01b038116610d195760405162461bcd60e51b815260040161053790612100565b6107c6816111fe565b33610d356007546001600160a01b031690565b6001600160a01b031614610d5b5760405162461bcd60e51b81526004016105379061205e565b601180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f390d2170996051a898885b38ca13748db8b80b90f248541f45d50c2193a6a8ce90600090a35050565b60006001600160e01b0319821663152a902d60e11b14806104cc57506104cc826113e7565b6127106001600160601b0382161115610e2d5760405162461bcd60e51b815260206004820152601e60248201527f6672616374696f6e2077696c6c206578636565642073616c65507269636500006044820152606401610537565b600580546001600160601b03838116600160a01b9081026001600160a01b03878116828117968790556040805185880487168082529590980490951660208801529481169592949116179184917f377771b065820b92da881172b82977e2307a6fec324ffc92fe26bbbae0ad42f8910160405180910390a350505050565b6daaeb6d7670e522a718067333cd4e3b156107c657604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c9190612129565b6107c657604051633b79c77360e21b81526001600160a01b0382166004820152602401610537565b6000610f6f82610a13565b9050806001600160a01b0316836001600160a01b031603610fd25760405162461bcd60e51b815260206004820152601f60248201527f63616e277420617070726f76616c20746f2063757272656e74206f776e6572006044820152606401610537565b336001600160a01b0382161461103857610fec8133610c8c565b6110385760405162461bcd60e51b815260206004820152601f60248201527f6f776e6572206973206e6f742073656e646572206f72206f70657261746f72006044820152606401610537565b610744838361141c565b61104c338261148a565b6110985760405162461bcd60e51b815260206004820152601a60248201527f6d75737420626520617070726f76656420666f7220746f6b656e0000000000006044820152606401610537565b6107448383836114e9565b6001600160a01b0381166110c95760405162461bcd60e51b815260040161053790612100565b6008546001600160a01b039081169082160361111d5760405162461bcd60e51b81526020600482015260136024820152723737ba1031b430b733b29037b832b930ba37b960691b6044820152606401610537565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a35050565b61054a828260405180602001604052806000815250611604565b61074483838360405180602001604052806000815250610b8a565b6006546001600160a01b03163314610ae75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610537565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0381166112765760405162461bcd60e51b815260040161053790612100565b6007546001600160a01b03908116908216036112c75760405162461bcd60e51b815260206004820152601060248201526f3737ba1031b430b733b29030b236b4b760811b6044820152606401610537565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b61054a338383611637565b61132f848484610759565b61133b848484846116f9565b61077e5760405162461bcd60e51b815260040161053790612146565b60606002611364836117fa565b6003604051602001611378939291906121f0565b6040516020818303038152906040529050919050565b600261139a8382612271565b5060036113a78282612271565b507f34096664059c7d0b551b98d4585f6566d0a87a93bb8f5a23b1e5fdace3e32673600260036040516113db9291906123ae565b60405180910390a15050565b60006001600160e01b03198216635b5e139f60e01b14806104cc57506301ffc9a760e01b6001600160e01b03198316146104cc565b6000818152600f6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145182610a13565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061149683610a13565b9050806001600160a01b0316846001600160a01b031614806114bd57506114bd8185610c8c565b806114e15750836001600160a01b03166114d6846106bd565b6001600160a01b0316145b949350505050565b826001600160a01b03166114fc82610a13565b6001600160a01b0316146115525760405162461bcd60e51b815260206004820152601d60248201527f7472616e736665722066726f6d20696e636f7272656374206f776e65720000006044820152606401610537565b6001600160a01b0382166115a85760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f2061646472657373000000006044820152606401610537565b6115b38383836118fb565b6115be60008261141c565b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b61160e8383611abe565b61161b60008484846116f9565b6107445760405162461bcd60e51b815260040161053790612146565b816001600160a01b0316836001600160a01b03160361168c5760405162461bcd60e51b815260206004820152601160248201527030b8383937bb32903a379031b0b63632b960791b6044820152606401610537565b6001600160a01b03838116600081815260106020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b156117ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061173d9033908990889088906004016123dc565b6020604051808303816000875af1925050508015611778575060408051601f3d908101601f1916820190925261177591810190612419565b60015b6117d5573d8080156117a6576040519150601f19603f3d011682016040523d82523d6000602084013e6117ab565b606091505b5080516000036117cd5760405162461bcd60e51b815260040161053790612146565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506114e1565b506001949350505050565b6060816000036118215750506040805180820190915260018152600360fc1b602082015290565b8160005b811561184b57806118358161200b565b91506118449050600a836120c2565b9150611825565b60008167ffffffffffffffff81111561186657611866611e0d565b6040519080825280601f01601f191660200182016040528015611890576020820181803683370190505b5090505b84156114e1576118a56001836120d6565b91506118b2600a86612436565b6118bd906030611fe2565b60f81b8183815181106118d2576118d2611ff5565b60200101906001600160f81b031916908160001a9053506118f4600a866120c2565b9450611894565b6001600160a01b038316156119fd57816001600160a01b0316836001600160a01b0316146119ce576001600160a01b0383166000908152600e6020526040812054611948906001906120d6565b6000838152600d602052604090205490915080821461199b576001600160a01b0385166000908152600c602090815260408083208584528252808320548484528184208190558352600d90915290208190555b506000828152600d602090815260408083208390556001600160a01b0387168352600c8252808320938352929052908120555b6001600160a01b0383166000908152600e602052604081208054600192906119f79084906120d6565b90915550505b6001600160a01b03821615611a8f57816001600160a01b0316836001600160a01b031614611a60576001600160a01b0382166000908152600e6020908152604080832054600c83528184208185528352818420859055848452600d909252909120555b6001600160a01b0382166000908152600e60205260408120805460019290611a89908490611fe2565b90915550505b6000908152600b6020526040902080546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b038216611b145760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f206164647265737300000000000000006044820152606401610537565b6000818152600b60205260409020546001600160a01b031615611b705760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b5a5b9d195960621b6044820152606401610537565b611b7c600083836118fb565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040518061028001604052806014906020820280368337509192915050565b6001600160e01b0319811681146107c657600080fd5b600060208284031215611bff57600080fd5b8135611c0a81611bd7565b9392505050565b80356001600160a01b0381168114611c2857600080fd5b919050565b60008060408385031215611c4057600080fd5b611c4983611c11565b915060208301356001600160601b0381168114611c6557600080fd5b809150509250929050565b60008060408385031215611c8357600080fd5b611c8c83611c11565b946020939093013593505050565b6102c08101818560005b6014811015611cc3578151835260209283019290910190600101611ca4565b505050836102808301528215156102a0830152949350505050565b60005b83811015611cf9578181015183820152602001611ce1565b50506000910152565b60008151808452611d1a816020860160208601611cde565b601f01601f19169290920160200192915050565b602081526000611c0a6020830184611d02565b600060208284031215611d5357600080fd5b5035919050565b600080600060608486031215611d6f57600080fd5b611d7884611c11565b9250611d8660208501611c11565b9150604084013590509250925092565b600060208284031215611da857600080fd5b611c0a82611c11565b60008060408385031215611dc457600080fd5b50508035926020909101359150565b80151581146107c657600080fd5b60008060408385031215611df457600080fd5b611dfd83611c11565b91506020830135611c6581611dd3565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611e3e57611e3e611e0d565b604051601f8501601f19908116603f01168101908282118183101715611e6657611e66611e0d565b81604052809350858152868686011115611e7f57600080fd5b858560208301376000602087830101525050509392505050565b60008060008060808587031215611eaf57600080fd5b611eb885611c11565b9350611ec660208601611c11565b925060408501359150606085013567ffffffffffffffff811115611ee957600080fd5b8501601f81018713611efa57600080fd5b611f0987823560208401611e23565b91505092959194509250565b600082601f830112611f2657600080fd5b611c0a83833560208501611e23565b60008060408385031215611f4857600080fd5b823567ffffffffffffffff80821115611f6057600080fd5b611f6c86838701611f15565b93506020850135915080821115611f8257600080fd5b50611f8f85828601611f15565b9150509250929050565b60008060408385031215611fac57600080fd5b611fb583611c11565b9150611fc360208401611c11565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104cc576104cc611fcc565b634e487b7160e01b600052603260045260246000fd5b60006001820161201d5761201d611fcc565b5060010190565b600181811c9082168061203857607f821691505b60208210810361205857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526017908201527f63616c6c6572206973206e6f74207468652061646d696e000000000000000000604082015260600190565b80820281158282048414176104cc576104cc611fcc565b634e487b7160e01b600052601260045260246000fd5b6000826120d1576120d16120ac565b500490565b818103818111156104cc576104cc611fcc565b6000816120f8576120f8611fcc565b506000190190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b60006020828403121561213b57600080fd5b8151611c0a81611dd3565b6020808252601e908201527f6e6f6e20455243373231526563656976657220696d706c656d656e7465720000604082015260600190565b6000815461218a81612024565b600182811680156121a257600181146121b7576121e6565b60ff19841687528215158302870194506121e6565b8560005260208060002060005b858110156121dd5781548a8201529084019082016121c4565b50505082870194505b5050505092915050565b60006121fc828661217d565b845161220c818360208901611cde565b6122188183018661217d565b979650505050505050565b601f82111561074457600081815260208120601f850160051c8101602086101561224a5750805b601f850160051c820191505b8181101561226957828155600101612256565b505050505050565b815167ffffffffffffffff81111561228b5761228b611e0d565b61229f816122998454612024565b84612223565b602080601f8311600181146122d457600084156122bc5750858301515b600019600386901b1c1916600185901b178555612269565b600085815260208120601f198616915b82811015612303578886015182559484019460019091019084016122e4565b50858210156123215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000815461233e81612024565b80855260206001838116801561235b5760018114612375576123a3565b60ff1985168884015283151560051b8801830195506123a3565b866000528260002060005b8581101561239b5781548a8201860152908301908401612380565b890184019650505b505050505092915050565b6040815260006123c16040830185612331565b82810360208401526123d38185612331565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061240f90830184611d02565b9695505050505050565b60006020828403121561242b57600080fd5b8151611c0a81611bd7565b600082612445576124456120ac565b50069056fea2646970667358221220a29ee808a16e86defa36d952fe7f0bcad4d7761ed5df8b55a546ec54a7bb0c6f64736f6c63430008110033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

GGGGG is a free-to-play smartphone game that allows players to play 100-Player Battle Royale, Battle Royale with 8 players, and Dungeon Run with up to 4 players in cooperative play. The game is designed to be fun just as the game itself, but acquiring NFT skins can lead to all...

Loading...
Loading
[ Download: CSV Export  ]

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