ETH Price: $2,092.50 (-10.84%)

FlipNFT (FLIP)
 

Overview

TokenID

65

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Flip

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 16 : Flip.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./Trait.sol";

contract Flip is ERC721, ERC721Holder, Ownable, Trait {
    using Math for uint256;
    using Strings for uint256;

    event TokenMinted(address indexed to, uint256 indexed tokenId, uint256 price, uint256 creatorFee);
    event TokenBought(address indexed buyer, uint256 indexed tokenId, uint256 price, uint256 creatorFee);
    event TokenSold(address indexed seller, uint256 indexed tokenId, uint256 price, uint256 creatorFee);
    event QuickBuyExecuted(address indexed buyer, uint256 indexed tokenId, uint256 price);

    uint256 public constant MAX_SUPPLY = 10000;
    uint256 public constant INITIAL_PRICE = 0.001 ether; 
    uint256 public constant CREATOR_FEE_PERCENT = 0.05 ether; // 5%
    address public creator;

    uint256 public totalSupply;
    uint256 public currentSupply;
    uint256[] public availableTokens;
    mapping(uint256 => uint256) public tokenIndex;

    constructor() ERC721("FlipNFT", "FLIP") Ownable(msg.sender) {
        creator = msg.sender;
        totalSupply = 0;
    }

    modifier onlyTokenOwner(uint256 tokenId) {
        require(ownerOf(tokenId) == _msgSender(), "Caller is not owner");
        _;
    }

    modifier onlyTokenOnSale(uint256 tokenId) {
        require(ownerOf(tokenId) == address(this), "Token is not available for sale");
        _;
    }

    function mint() public payable {
        require(totalSupply < MAX_SUPPLY, "Max supply reached");
        
        uint256 price = getBuyPrice();
        uint256 creatorFee = price * CREATOR_FEE_PERCENT / 1 ether;
        require(msg.value >= price + creatorFee, "Insufficient payment");

        uint256 tokenId = ++totalSupply;
        
        _safeMint(msg.sender, tokenId);
        ++currentSupply;

        emit TokenMinted(msg.sender, tokenId, price, creatorFee);
        tokenSeed[tokenId] = block.timestamp;

        (bool success, ) = creator.call{value: creatorFee}("");
        require(success, "Transfer failed");

        _refundExcess(price + creatorFee);
    }

    function quickBuy() public payable {
        require(availableTokens.length > 0, "No tokens available for quick buy");
        uint256 tokenId = availableTokens[availableTokens.length - 1];
        
        buy(tokenId);
        
        emit QuickBuyExecuted(msg.sender, tokenId, getBuyPrice());
    }

    function buy(uint256 tokenId) public payable onlyTokenOnSale(tokenId) {
        uint256 price = getBuyPrice(); 
        uint256 creatorFee = price * CREATOR_FEE_PERCENT / 1 ether;
        require(msg.value >= price + creatorFee, "Insufficient payment");

        _transfer(address(this), msg.sender, tokenId);

        removeAvailableToken(tokenId);
        ++currentSupply;

        emit TokenBought(msg.sender, tokenId, price, creatorFee);

        (bool success, ) = creator.call{value: creatorFee}("");
        require(success, "Transfer failed");

        _refundExcess(price + creatorFee);
    }

    function sell(uint256 tokenId) public onlyTokenOwner(tokenId) {
        uint256 price = getSellPrice();
        uint256 creatorFee = price * CREATOR_FEE_PERCENT / 1 ether;

        _transfer(_msgSender(), address(this), tokenId);
        addAvailableToken(tokenId);
        --currentSupply;

        emit TokenSold(_msgSender(), tokenId, price, creatorFee);

        (bool sentToSeller, ) = _msgSender().call{value: price - creatorFee}("");
        require(sentToSeller, "Transfer to seller failed");

        (bool sentToCreator, ) = creator.call{value: creatorFee}("");
        require(sentToCreator, "Transfer to creator failed");
    }

    function setCreator(address newCreator) public onlyOwner {
        creator = newCreator;
    }

    function getAvailableTokens() public view returns (uint256[] memory) {
        return availableTokens;
    }

   function getAvailableTokensPaginated(uint256 start, uint256 limit) public view returns (uint256[] memory) {
       require(start < availableTokens.length, "Start index out of bounds");
       uint256 end = Math.min(start + limit, availableTokens.length);
       uint256[] memory result = new uint256[](end - start);
       for (uint256 i = start; i < end; i++) {
           result[i - start] = availableTokens[i];
       }
       return result;
   }

    function getAvailableTokensCount() public view returns (uint256) {
        return availableTokens.length;
    }

    function isOnSale(uint256 tokenId) public view returns (bool) {
        return ownerOf(tokenId) == address(this);
    }

    function getBuyPriceAfterFee() public view returns (uint256) {
        uint256 price = getBuyPrice();
        uint256 fee = price * CREATOR_FEE_PERCENT / 1 ether;
        return price + fee;
    }

    function getSellPriceAfterFee() public view returns (uint256) {
        uint256 price = getSellPrice();
        uint256 fee = price * CREATOR_FEE_PERCENT / 1 ether;
        return price - fee;
    }

    function getBuyPrice() public view returns (uint256) {
        return calculatePrice(currentSupply);
    }

    function getSellPrice() public view returns (uint256) {
        return calculatePrice(currentSupply > 0 ? currentSupply - 1 : 0);
    }

    function calculatePrice(uint256 supply) public pure returns (uint256) {
        if (supply == 0) return INITIAL_PRICE;

        uint256 price = INITIAL_PRICE + INITIAL_PRICE * 2 * Math.sqrt(100 * supply / MAX_SUPPLY) * Math.sqrt(10000 * supply * supply / MAX_SUPPLY / MAX_SUPPLY);
        return price;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        uint256 combinedSeed = uint256(keccak256(abi.encodePacked(tokenSeed[tokenId], tokenId)));
        string memory svg = generateRandomSVG(combinedSeed);
        
        string memory json = Base64.encode(
            bytes(string(abi.encodePacked(
                '{"description": "FlipNFT is the first Bonding Curve NFT.", "image": "data:image/svg+xml;base64,',
                Base64.encode(bytes(svg)),
                '"}'
            )))
        );

        return string(abi.encodePacked("data:application/json;base64,", json));
    }

    function removeAvailableToken(uint256 tokenId) internal {
        uint256 index = tokenIndex[tokenId];
        uint256 lastIndex = availableTokens.length - 1;
        uint256 lastToken = availableTokens[lastIndex];

        availableTokens[index] = lastToken;
        tokenIndex[lastToken] = index;

        availableTokens.pop();
        delete tokenIndex[tokenId];
    }

    function addAvailableToken(uint256 tokenId) internal {
        availableTokens.push(tokenId);
        tokenIndex[tokenId] = availableTokens.length - 1;
    }

    function _refundExcess(uint256 price) internal {
        uint256 refundAmount = msg.value - price;
        if (refundAmount > 0) {
            (bool success, ) = _msgSender().call{value: refundAmount}("");
            require(success, "Refund failed");
        }
    }

    receive() external payable {}
}

File 2 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    mapping(uint256 tokenId => address) private _owners;

    mapping(address owner => uint256) private _balances;

    mapping(uint256 tokenId => address) private _tokenApprovals;

    mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual returns (uint256) {
        if (owner == address(0)) {
            revert ERC721InvalidOwner(address(0));
        }
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual returns (address) {
        return _requireOwned(tokenId);
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
        _requireOwned(tokenId);

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

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual {
        _approve(to, tokenId, _msgSender());
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual returns (address) {
        _requireOwned(tokenId);

        return _getApproved(tokenId);
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
        address previousOwner = _update(to, tokenId, _msgSender());
        if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
        transferFrom(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     *
     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
     */
    function _getApproved(uint256 tokenId) internal view virtual returns (address) {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
     * particular (ignoring whether it is owned by `owner`).
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
        return
            spender != address(0) &&
            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
    }

    /**
     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
     * the `spender` for the specific `tokenId`.
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
        if (!_isAuthorized(owner, spender, tokenId)) {
            if (owner == address(0)) {
                revert ERC721NonexistentToken(tokenId);
            } else {
                revert ERC721InsufficientApproval(spender, tokenId);
            }
        }
    }

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
     *
     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the
     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
     * remain consistent with one another.
     */
    function _increaseBalance(address account, uint128 value) internal virtual {
        unchecked {
            _balances[account] += value;
        }
    }

    /**
     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that
     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).
     *
     * Emits a {Transfer} event.
     *
     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
        address from = _ownerOf(tokenId);

        // Perform (optional) operator check
        if (auth != address(0)) {
            _checkAuthorized(from, auth, tokenId);
        }

        // Execute the update
        if (from != address(0)) {
            // Clear approval. No need to re-authorize or emit the Approval event
            _approve(address(0), tokenId, address(0), false);

            unchecked {
                _balances[from] -= 1;
            }
        }

        if (to != address(0)) {
            unchecked {
                _balances[to] += 1;
            }
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        return from;
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner != address(0)) {
            revert ERC721InvalidSender(address(0));
        }
    }

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address previousOwner = _update(address(0), tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        } else if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

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

    /**
     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
     * either the owner of the token, or approved to operate on all tokens held by this owner.
     *
     * Emits an {Approval} event.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address to, uint256 tokenId, address auth) internal {
        _approve(to, tokenId, auth, true);
    }

    /**
     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
     * emitted in the context of transfers.
     */
    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
        // Avoid reading the owner unless necessary
        if (emitEvent || auth != address(0)) {
            address owner = _requireOwned(tokenId);

            // We do not use _isAuthorized because single-token approvals should not be able to call approve
            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
                revert ERC721InvalidApprover(auth);
            }

            if (emitEvent) {
                emit Approval(owner, to, tokenId);
            }
        }

        _tokenApprovals[tokenId] = to;
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Requirements:
     * - operator can't be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        if (operator == address(0)) {
            revert ERC721InvalidOperator(operator);
        }
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
     * Returns the owner.
     *
     * Overrides to ownership logic should be done to {_ownerOf}.
     */
    function _requireOwned(uint256 tokenId) internal view returns (address) {
        address owner = _ownerOf(tokenId);
        if (owner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
        return owner;
    }

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
     * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
        if (to.code.length > 0) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                if (retval != IERC721Receiver.onERC721Received.selector) {
                    revert ERC721InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert ERC721InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }
}

File 3 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 4 of 16 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.20;

import {IERC721Receiver} from "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or
 * {IERC721-setApprovalForAll}.
 */
abstract contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 5 of 16 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    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.
     */
    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.
     */
    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.
     */
    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.
     */
    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 largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 6 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

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

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        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_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 7 of 16 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.2) (utils/Base64.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 0x20)
            let dataPtr := data
            let endPtr := add(data, mload(data))

            // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and
            // set it to zero to make sure no dirty bytes are read in that section.
            let afterPtr := add(endPtr, 0x20)
            let afterCache := mload(afterPtr)
            mstore(afterPtr, 0x00)

            // Run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

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

                // To write each character, shift the 3 byte (24 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F to bitmask the least significant 6 bits.
                // Use this as an index into the lookup table, mload an entire word
                // so the desired character is in the least significant byte, and
                // mstore8 this least significant byte into the result and continue.

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

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

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

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

            // Reset the value that was cached
            mstore(afterPtr, afterCache)

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

        return result;
    }
}

File 8 of 16 : Trait.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";

contract Trait {
    using Math for uint256;
    using Strings for uint256;

    mapping(uint256 => uint256) public tokenSeed;

    // Define 16 fixed colors
    string[16] private colors = [
        "#000000", // Black
        "#FFFFFF", // White
        "#FF0000", // Red
        "#00FF00", // Green
        "#0000FF", // Blue
        "#FFFF00", // Yellow
        "#FF00FF", // Magenta
        "#00FFFF", // Cyan
        "#FFA500", // Orange
        "#800080", // Purple
        "#008000", // Dark Green
        "#800000", // Chestnut
        "#808000", // Olive
        "#008080", // Teal
        "#C0C0C0", // Silver
        "#808080"  // Gray
    ];

    struct Shape {
        uint8 x;
        uint8 y;
        uint8 width;
        uint8 height;
    }

    function generateRandomSVG(uint256 tokenId) internal view returns (string memory) {
        uint256 seed = uint256(keccak256(abi.encodePacked(tokenId, block.timestamp)));
        
        string memory bgColor = randomColor(seed);
        
        uint256 shapeCount = (seed % 3) + 2; // 2 to 4 shapes
        
        Shape[] memory shapes = new Shape[](shapeCount);
        string memory svgShapes;

        for (uint256 i = 0; i < shapeCount; i++) {
            Shape memory newShape;
            bool overlap;
            uint256 attempts = 0;

            do {
                overlap = false;
                newShape = generateShape(seed + i);

                for (uint256 j = 0; j < i; j++) {
                    if (shapesOverlap(newShape, shapes[j])) {
                        overlap = true;
                        break;
                    }
                }

                attempts++;
                seed = uint256(keccak256(abi.encodePacked(seed, attempts))); // Update seed to get new random position
                if (attempts > 10) break; // Prevent infinite loop
            } while (overlap);

            if (!overlap) {
                shapes[i] = newShape;
                svgShapes = string(abi.encodePacked(svgShapes, generateRandomShape(seed + i, newShape)));
            }
        }
        
        return string(abi.encodePacked(
            '<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 124 124" fill="none">',
            '<rect width="124" height="124" rx="24" fill="', bgColor, '"/>',
            svgShapes,
            '</svg>'
        ));
    }

    function generateShape(uint256 seed) internal pure returns (Shape memory) {
        uint8 padding = 24; // Equal to the radius of the rounded corners
        uint8 minSize = 25; // Approximately 1/5 of 124
        uint8 maxSize = 62; // Approximately 1/2 of 124
        uint8 size = uint8((seed % (maxSize - minSize + 1)) + minSize);
    
        return Shape({
            x: uint8((seed % (124 - size - 2*padding)) + padding),
            y: uint8(((seed >> 8) % (124 - size - 2*padding)) + padding),
            width: size,
            height: size
        });
    }

    function shapesOverlap(Shape memory a, Shape memory b) internal pure returns (bool) {
        return (a.x < b.x + b.width &&
                a.x + a.width > b.x &&
                a.y < b.y + b.height &&
                a.y + a.height > b.y);
    }

    function generateRandomShape(uint256 seed, Shape memory shape) internal view returns (string memory) {
        uint256 shapeType = seed % 5;
        string memory color = randomColor(seed + 1);
        
        if (shapeType == 0) {
            return circleShape(shape, color);
        } else if (shapeType == 1) {
            return squareShape(shape, color);
        } else if (shapeType == 2) {
            return rectangleShape(shape, color);
        } else if (shapeType == 3) {
            return diamondShape(shape, color);
        } else {
            return trapezoidShape(shape, color);
        }
    }

    function circleShape(Shape memory shape, string memory color) internal pure returns (string memory) {
        uint8 radius = shape.width / 2;
        return string(abi.encodePacked(
            '<circle cx="', Strings.toString(shape.x + radius), '" cy="', Strings.toString(shape.y + radius), 
            '" r="', Strings.toString(radius), '" fill="', color, '"/>'
        ));
    }

    function squareShape(Shape memory shape, string memory color) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '<rect x="', Strings.toString(shape.x), '" y="', Strings.toString(shape.y), 
            '" width="', Strings.toString(shape.width), '" height="', Strings.toString(shape.height), '" fill="', color, '"/>'
        ));
    }

    function rectangleShape(Shape memory shape, string memory color) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '<rect x="', Strings.toString(shape.x), '" y="', Strings.toString(shape.y), 
            '" width="', Strings.toString(shape.width), '" height="', Strings.toString(shape.height), '" fill="', color, '"/>'
        ));
    }

    function diamondShape(Shape memory shape, string memory color) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '<polygon points="',
            Strings.toString(shape.x + shape.width / 2), ',', Strings.toString(shape.y), ' ',
            Strings.toString(shape.x), ',', Strings.toString(shape.y + shape.height / 2), ' ',
            Strings.toString(shape.x + shape.width / 2), ',', Strings.toString(shape.y + shape.height), ' ',
            Strings.toString(shape.x + shape.width), ',', Strings.toString(shape.y + shape.height / 2),
            '" fill="', color, '"/>'
        ));
    }

    function trapezoidShape(Shape memory shape, string memory color) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '<polygon points="',
            Strings.toString(shape.x), ',', Strings.toString(shape.y + shape.height), ' ',
            Strings.toString(shape.x + shape.width / 2), ',', Strings.toString(shape.y), ' ',
            Strings.toString(shape.x + shape.width), ',', Strings.toString(shape.y + shape.height),
            '" fill="', color, '"/>'
        ));
    }

    function randomColor(uint256 seed) internal view returns (string memory) {
        uint256 index = seed % colors.length;
        return colors[index];
    }


}

File 9 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

File 10 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

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

File 11 of 16 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

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

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

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

File 12 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 13 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

File 14 of 16 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 15 of 16 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 16 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"QuickBuyExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"}],"name":"TokenBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"}],"name":"TokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"}],"name":"TokenSold","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":"CREATOR_FEE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"name":"calculatePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"creator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentSupply","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":[],"name":"getAvailableTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getAvailableTokensPaginated","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuyPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuyPriceAfterFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSellPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSellPriceAfterFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isOnSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"quickBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"sell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCreator","type":"address"}],"name":"setCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6040608081523462000664576200001562000669565b600780825260209166119b1a5c13919560ca1b838201526200003662000669565b6004808252630464c49560e41b85830152825194919290916001600160401b038087116200064f576000966200006d88546200069f565b93601f948581116200061f575b508390858311600114620005b757620000ac92918a918362000418575b50508160011b916000199060031b1c19161790565b87555b8451818111620005a457600195620000c887546200069f565b85811162000569575b50839085831160011462000505576200010292918a9183620004185750508160011b916000199060031b1c19161790565b85555b3315620004ee57600680546001600160a01b0319808216339081179093559791906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08a80a3885190610200820182811084821117620004db578a959395526200017662000669565b818152660233030303030360cc1b8582015282526200019462000669565b8181526611a3232323232360c91b8582015284830152620001b462000669565b818152660234646303030360cc1b858201528a830152620001d462000669565b818152660233030464630360cc1b858201526060830152620001f562000669565b818152661198181818232360c91b8582015260808301526200021662000669565b818152660234646464630360cc1b8582015260a08301526200023762000669565b8181526611a3231818232360c91b8582015260c08301526200025862000669565b818152661198182323232360c91b8582015260e08301526200027962000669565b818152660234646413530360cc1b858201526101008301526200029b62000669565b818152660233830303038360cc1b85820152610120830152620002bd62000669565b818152660233030383030360cc1b85820152610140830152620002df62000669565b818152660233830303030360cc1b858201526101608301526200030162000669565b818152660233830383030360cc1b858201526101808301526200032362000669565b818152660233030383038360cc1b858201526101a08301526200034562000669565b818152660234330433043360cc1b858201526101c08301526200036762000669565b908152660233830383038360cc1b848201526101e08201529260089188945b60108610620003ad578a8a8a3390601854161760185560195551612ff49081620006f68239f35b8051805190848211620004c85789918c8892620003cb89546200069f565b8781116200048d575b5083918784116001146200042457926200040892819287989592620004185750508160011b916000199060031b1c19161790565b87555b0194019501949262000386565b01519050388062000097565b90959291601f1983168a8352858320925b8181106200047557509086978488959493106200045b575b505050811b0187556200040b565b015160001960f88460031b161c191690553880806200044d565b8289015184558f978d97940193928301920162000435565b620004b7908a845285842060058a808801821c830193898910620004be575b01901c0190620006dc565b38620003d4565b93508293620004ac565b634e487b7160e01b8c526041895260248cfd5b634e487b7160e01b8a526041875260248afd5b8751631e4fbdf760e01b8152808501889052602490fd5b878a52848a208893929091601f1984168c5b8882821062000552575050841162000538575b505050811b01855562000105565b015160001960f88460031b161c191690553880806200052a565b8385015186558c9790950194938401930162000517565b6200059390888b52858b208780860160051c8201928887106200059a575b0160051c0190620006dc565b38620000d1565b9250819262000587565b634e487b7160e01b885260418552602488fd5b898052848a209190601f1984168b5b8782821062000608575050908460019594939210620005ee575b505050811b018755620000af565b015160001960f88460031b161c19169055388080620005e0565b6001859682939686015181550195019301620005c6565b62000648908a8052858b208780860160051c8201928887106200059a570160051c0190620006dc565b386200007a565b604184634e487b7160e01b6000525260246000fd5b600080fd5b60408051919082016001600160401b038111838210176200068957604052565b634e487b7160e01b600052604160045260246000fd5b90600182811c92168015620006d1575b6020831014620006bb57565b634e487b7160e01b600052602260045260246000fd5b91607f1691620006af565b818110620006e8575050565b60008155600101620006dc56fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c8063018a25e814611b0c57806301ffc9a714611a9e57806302d05d3f14611a755780630583e9f814611a4957806306fdde0314611988578063081812fc1461194a578063095ea7b3146118635780631249c58b146115f8578063150b7a02146115d557806318160ddd146115b757806321a1c1841461156f57806323b872dd1461155857806323f4a4e1146113255780632dcd52f21461130757806332cb6b0c146112ea5780633f516018146112a757806342842e0e1461127957806343d32e9c1461125e5780634a8fe650146112135780635eba096b146111155780635f516836146110e95780636352211e146110b957806370a0823114611060578063715018a614611003578063771282f614610fe55780637c5e279514610fc35780638da5cb5b14610f9a57806395d89b4114610e89578063a22cb46514610de4578063ad64d06814610dad578063ae10426514610d87578063b88d4fde14610d62578063c87b56dd146107a7578063d96a094a146105dd578063da23eb63146105bb578063e35568cb14610530578063e4849b32146102f7578063e985e9c51461029d578063f0f2805f1461026b5763f2fde38b0361000e5734610266576020366003190112610266576101f1611b72565b6101f9612246565b6001600160a01b0390811690811561024d57600654826bffffffffffffffffffffffff60a01b821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b346102665760203660031901126102665760206102896004356120ef565b6040516001600160a01b0390911630148152f35b34610266576040366003190112610266576102b6611b72565b6001600160a01b03602435818116929083900361026657166000526005602052604060002090600052602052602060ff604060002054166040519015158152f35b346102665760208060031936011261026657600435610315816120ef565b6001600160a01b039033908216036104f55761032f612014565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a764000090049261035e813033612693565b601b54680100000000000000008110156104df578161038682600161039f9401601b55611d1c565b90919082549060031b91821b91600019901b1916179055565b601b5460001992908381019081116104c95782600052601c8752604060002055601a549182156104c95761041286600095938695938695869501601a55604051828152838c8201527f8323bebb324b6e1a1d4886a1f210640461bb275263dae69967f001d053ab0b2b60403392a3611e77565b335af161041d611e09565b50156104845760008080938193601854165af1610438611e09565b501561044057005b6064906040519062461bcd60e51b82526004820152601a60248201527f5472616e7366657220746f2063726561746f72206661696c65640000000000006044820152fd5b60405162461bcd60e51b815260048101849052601960248201527f5472616e7366657220746f2073656c6c6572206661696c6564000000000000006044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260048101849052601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606490fd5b346102665760003660031901126102665760405180601b5491828152602080910192601b6000527f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1916000905b8282106105a4576105a08561059481890382611bdc565b60405191829182611ce0565b0390f35b83548652948501946001938401939091019061057d565b3461026657600036600319011261026657602060405166b1a2bc2ec500008152f35b602080600319360112610266576004356105f6816120ef565b6001600160a01b039190309083160361076257610614601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a764000090049161064d6106458484611daa565b341015611db7565b610658813330612693565b80600052601c855260406000205493601b5494600019958681019081116104c95761068290611d1c565b90549060031b1c6106968161038684611d1c565b600052601c8752604060002055601b5491821561074c5760008086819482946100199b6107479b61074299016106df6106ce82611d1c565b8154906000199060031b1b19169055565b601b55818552601c81528460408120556106fa601a54611dfa565b601a5583604051918b83528201527f884543c08d36fb5c9b3b688dd0453c9f287199124bdbddb3b7f9ca885a4d34a060403392a3601854165af161073c611e09565b50611e39565b611daa565b61212a565b634e487b7160e01b600052603160045260246000fd5b60405162461bcd60e51b815260048101849052601f60248201527f546f6b656e206973206e6f7420617661696c61626c6520666f722073616c65006044820152606490fd5b34610266576020366003190112610266576004358060005260076020526040600020549060405190602082019283526040820152604081526107e881611bc0565b519020604051602081019182524260408201526040815261080881611bc0565b5190206108148161270e565b9060038106906002820182116104c95761083060028301612040565b9161083e6040519384611bdc565b60028101808452601f199061085290612040565b0160005b818110610d4b5750506060926000915b600281018310610aab576105a0610a446109998761099460b98b6040519384917f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060208401527f30302f737667222077696474683d2234303022206865696768743d223430302260408401527f2076696577426f783d223020302031323420313234222066696c6c3d226e6f6e60608401526232911f60e91b60808401527f3c726563742077696474683d2231323422206865696768743d2231323422207260838401526c3c1e91191a11103334b6361e9160991b60a384015261095481518092602060b087019101611b2a565b82016211179f60e91b60b082015261097682518093602060b385019101611b2a565b01651e17b9bb339f60d11b60b3820152036099810184520182611bdc565b612536565b610994608160405180937f7b226465736372697074696f6e223a2022466c69704e4654206973207468652060208301527f666972737420426f6e64696e67204375727665204e46542e222c2022696d616760408301527f65223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c006060830152610a29815180926020607f86019101611b2a565b810161227d60f01b607f820152036061810184520182611bdc565b610a97603d60405180937f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020830152610a878151809260208686019101611b2a565b810103601d810184520182611bdc565b604051918291602083526020830190611b4d565b90919392610ab76124df565b600096908760015b15610d36575b50506000966000610ad68885611daa565b91610adf6124df565b506026830692601984018094116104c957602f19938460ff610b028184166127ed565b160160ff81116104c957610b22610b1d60ff809316856124d5565b611d9c565b169460ff610b318184166127ed565b160160ff81116104c957610b51610b1d60ff94858094169060081c6124d5565b1660405195610b5f87611b88565b86526020860152166040840181905260608401528260005b8a8110610c4e575b5050610b8a90611dfa565b936040516020810191825285604082015260408152610ba881611bc0565b51902098600a8511610bbc57989398610abf565b50909197959692509392935b15610bd8575b5060010191610866565b8195610c466020610c0d84600195610bf26002988a612058565b52610bfd8b89612058565b50610c088b8b611daa565b612812565b926040519381610c268693518092868087019101611b2a565b8201610c3a82518093868085019101611b2a565b01038084520182611bdc565b959150610bce565b610c5f818a9d96989d979597612058565b5160ff83511660ff610c7b8184511682604086015116906127fe565b16119081610d0f575b81610ce4575b81610cba575b50610ca4576001019a95939a949294610b77565b5050909250610b8a60019994929991908b610b7f565b905060ff806020610cd782828801511683606089015116906127fe565b930151169116118d610c90565b905060ff60208401511660ff610d078160208501511682606086015116906127fe565b161190610c8a565b9050610d2760ff84511660ff604086015116906127fe565b60ff8083511691161190610c84565b80610ac5579091975095919495939293610bc8565b602090610d566124df565b82828801015201610856565b3461026657610019610d7336611c1a565b92610d82828483959495611e84565b6123b5565b34610266576020366003190112610266576020610da560043561206c565b604051908152f35b3461026657602036600319011261026657600435601b5481101561026657610dd6602091611d1c565b90546040519160031b1c8152f35b3461026657604036600319011261026657610dfd611b72565b60243590811515809203610266576001600160a01b0316908115610e7057336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b604051630b61174360e31b815260048101839052602490fd5b34610266576000366003190112610266576040516000600190600154918260011c9160018416918215610f90575b6020948585108414610f7a578587948686529182600014610f5a575050600114610efd575b50610ee992500383611bdc565b6105a0604051928284938452830190611b4d565b84915060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6906000915b858310610f42575050610ee9935082010185610edc565b80548389018501528794508693909201918101610f2b565b60ff191685820152610ee995151560051b8501019250879150610edc9050565b634e487b7160e01b600052602260045260246000fd5b92607f1692610eb7565b34610266576000366003190112610266576006546040516001600160a01b039091168152602090f35b3461026657600036600319011261026657602060405166038d7ea4c680008152f35b34610266576000366003190112610266576020601a54604051908152f35b346102665760003660031901126102665761101c612246565b600680546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610266576020366003190112610266576001600160a01b03611081611b72565b1680156110a05760005260036020526020604060002054604051908152f35b6040516322718ad960e21b815260006004820152602490fd5b346102665760203660031901126102665760206110d76004356120ef565b6040516001600160a01b039091168152f35b346102665760203660031901126102665760043560005260076020526020604060002054604051908152f35b3461026657604036600319011261026657600435601b54808210156111ce5761114060243583611daa565b90808210156111c757505b6111558282611e77565b9161115f83612040565b9261116d6040519485611bdc565b80845261117c601f1991612040565b01366020850137805b82811061119a57604051806105a08682611ce0565b806111a6600192611d1c565b90549060031b1c6111c06111ba8584611e77565b87612058565b5201611185565b905061114b565b60405162461bcd60e51b815260206004820152601960248201527f537461727420696e646578206f7574206f6620626f756e6473000000000000006044820152606490fd5b346102665760003660031901126102665761122f601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957602091670de0b6b3a7640000610da5920490611daa565b34610266576000366003190112610266576020610da5612014565b346102665761001961128a36611cab565b906040519261129884611ba4565b60008452610d82838383611e84565b34610266576020366003190112610266576112c0611b72565b6112c8612246565b601880546001600160a01b0319166001600160a01b0392909216919091179055005b346102665760003660031901126102665760206040516127108152f35b34610266576000366003190112610266576020601b54604051908152f35b600036600319011261026657601b54801561150957600019908082019081116104c95761135190611d1c565b90549060031b1c90611362826120ef565b6001600160a01b039030908216036114c45761137f601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a76400009004906113b06106458383611daa565b6113bb853330612693565b84600052601c602052604060002054601b548581019081116104c9576113e090611d1c565b90549060031b1c6113f48161038684611d1c565b600052601c602052604060002055601b5492831561074c576000808080866107429561148b9a6107479a0161142b6106ce82611d1c565b601b558b8352601c602052826040812055611447601a54611dfa565b601a558b6040518981528360208201527f884543c08d36fb5c9b3b688dd0453c9f287199124bdbddb3b7f9ca885a4d34a060403392a3601854165af161073c611e09565b611496601a5461206c565b6040519081527fe6c0f990eeec49fb22637d492d2e1ea38a893b0e786aa61b8871dd338dfa7ed860203392a3005b60405162461bcd60e51b815260206004820152601f60248201527f546f6b656e206973206e6f7420617661696c61626c6520666f722073616c65006044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f4e6f20746f6b656e7320617661696c61626c6520666f7220717569636b2062756044820152607960f81b6064820152608490fd5b346102665761001961156936611cab565b91611e84565b3461026657600036600319011261026657611588612014565b66b1a2bc2ec500008082029082820414821517156104c957602091670de0b6b3a7640000610da5920490611e77565b34610266576000366003190112610266576020601954604051908152f35b34610266576115e336611c1a565b505050506020604051630a85bd0160e11b8152f35b6000366003190112610266576019546127108110156118295761161c601a5461206c565b9066b1a2bc2ec500008083029083820414831517156104c957670de0b6b3a76400006116569104916116516106458486611daa565b611dfa565b91826019556040519261166884611ba4565b600084523315611810576001600160a01b039384611686833361218a565b166117f757333b611701575b61001961074785856107426000808080868e8c6116b0601a54611dfa565b601a55806040518a81528460208201527f10546b1a6f5245ff0ffa18c256b9e46859c585cbb473b453fcd4c2dc39ae08db60403392a383526007602052426040842055601854165af161073c611e09565b604093929193516020818061173f630a85bd0160e11b9586835233600484015260006024840152896044840152608060648401526084830190611b4d565b03816000335af1600091816117b2575b506117815761175c611e09565b8051908161177c57604051633250574960e11b8152336004820152602490fd5b602001fd5b6001600160e01b0319160361179a579091610742611692565b604051633250574960e11b8152336004820152602490fd5b9091506020813d6020116117ef575b816117ce60209383611bdc565b8101031261026657516001600160e01b03198116810361026657908761174f565b3d91506117c1565b6040516339e3563760e11b815260006004820152602490fd5b604051633250574960e11b815260006004820152602490fd5b60405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606490fd5b346102665760403660031901126102665761187c611b72565b602435611888816120ef565b33151580611937575b8061190a575b6118f2576001600160a01b039283169282918491167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4600090815260046020526040902080546001600160a01b0319169091179055005b60405163a9fbf51f60e01b8152336004820152602490fd5b5060018060a01b038116600052600560205260406000203360005260205260ff6040600020541615611897565b506001600160a01b038116331415611891565b3461026657602036600319011261026657600435611967816120ef565b506000526004602052602060018060a01b0360406000205416604051908152f35b3461026657600036600319011261026657604051600080549060018260011c9160018416918215611a3f575b6020948585108414610f7a578587948686529182600014610f5a5750506001146119e55750610ee992500383611bdc565b6000808052859250907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310611a27575050610ee9935082010185610edc565b80548389018501528794508693909201918101611a10565b92607f16926119b4565b3461026657602036600319011261026657600435600052601c6020526020604060002054604051908152f35b34610266576000366003190112610266576018546040516001600160a01b039091168152602090f35b346102665760203660031901126102665760043563ffffffff60e01b8116809103610266576020906380ac58cd60e01b8114908115611afb575b8115611aea575b506040519015158152f35b6301ffc9a760e01b14905082611adf565b635b5e139f60e01b81149150611ad8565b34610266576000366003190112610266576020610da5601a5461206c565b60005b838110611b3d5750506000910152565b8181015183820152602001611b2d565b90602091611b6681518092818552858086019101611b2a565b601f01601f1916010190565b600435906001600160a01b038216820361026657565b6080810190811067ffffffffffffffff8211176104df57604052565b6020810190811067ffffffffffffffff8211176104df57604052565b6060810190811067ffffffffffffffff8211176104df57604052565b90601f8019910116810190811067ffffffffffffffff8211176104df57604052565b67ffffffffffffffff81116104df57601f01601f191660200190565b906080600319830112610266576001600160a01b039160043583811681036102665792602435908116810361026657916044359160643567ffffffffffffffff8111610266578160238201121561026657806004013590611c7a82611bfe565b92611c886040519485611bdc565b828452602483830101116102665781600092602460209301838601378301015290565b6060906003190112610266576001600160a01b0390600435828116810361026657916024359081168103610266579060443590565b602090602060408183019282815285518094520193019160005b828110611d08575050505090565b835185529381019392810192600101611cfa565b601b54811015611d5357601b6000527f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc10190600090565b634e487b7160e01b600052603260045260246000fd5b818102929181159184041417156104c957565b8115611d86570490565b634e487b7160e01b600052601260045260246000fd5b90601882018092116104c957565b919082018092116104c957565b15611dbe57565b60405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60001981146104c95760010190565b3d15611e34573d90611e1a82611bfe565b91611e286040519384611bdc565b82523d6000602084013e565b606090565b15611e4057565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b919082039182116104c957565b906001600160a01b03908116801561181057600091848352846020926002845260409383858720541695869133151580611f7e575b509060027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9284611f4b575b85835260038152888320805460010190558683525286812080546001600160a01b0319168517905580a483168203611f1d5750505050565b516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600087815260046020526040902080546001600160a01b0319169055848352600381528883208054600019019055611ee5565b91939450915080611fd3575b15611f9a57879291869138611eb9565b848887611fb7576024915190637e27328960e01b82526004820152fd5b604491519063177e802f60e01b82523360048301526024820152fd5b503386148015611ff8575b80611f8a5750878252600481523384868420541614611f8a565b5085825260058152848220338352815260ff8583205416611fde565b601a5480156120355760001981019081116104c9576120329061206c565b90565b50612032600061206c565b67ffffffffffffffff81116104df5760051b60200190565b8051821015611d535760209160051b010190565b80156120e357806064026064810482036104c95761208e612710809204612272565b9066071afd498d000091808302928304036104c9578281029080820484036104c957806120c16120ce956120c894611d69565b0404612272565b90611d69565b66038d7ea4c680009081018091116104c95790565b5066038d7ea4c6800090565b6000818152600260205260409020546001600160a01b0316908115612112575090565b60249060405190637e27328960e01b82526004820152fd5b6121349034611e77565b8061213c5750565b600080808093335af161214d611e09565b501561215557565b60405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606490fd5b6000828152600260205260408120546001600160a01b03908116939284917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9183612211575b1692836121f9575b84815260026020526040812080546001600160a01b0319168517905580a490565b838152600360205260408120600181540190556121d8565b600086815260046020526040902080546001600160a01b031916905583855260036020526040852080546000190190556121d0565b6006546001600160a01b0316330361225a57565b60405163118cdaa760e01b8152336004820152602490fd5b80156123af5761233d816000908360801c806123a3575b508060401c80612396575b508060201c80612389575b508060101c8061237c575b508060081c8061236f575b508060041c80612362575b508060021c80612355575b50600191828092811c61234e575b1c1b6122e58185611d7c565b01811c6122f28185611d7c565b01811c6122ff8185611d7c565b01811c61230c8185611d7c565b01811c6123198185611d7c565b01811c6123268185611d7c565b01811c6123338185611d7c565b01901c8092611d7c565b80821015612349575090565b905090565b01816122d9565b60029150910190386122cb565b60049150910190386122c0565b60089150910190386122b5565b60109150910190386122aa565b602091509101903861229f565b6040915091019038612294565b91505060809038612289565b50600090565b9190803b6123c4575b50505050565b61240660018060a01b0380921694604051938493630a85bd0160e11b968786523360048701521660248501526044840152608060648401526084830190611b4d565b03906020816000938185885af190829082612485575b5050612454578261242b611e09565b805191908261244d57604051633250574960e11b815260048101839052602490fd5b9050602001fd5b6001600160e01b0319160361246d5750388080806123be565b60249060405190633250574960e11b82526004820152fd5b909192506020813d6020116124cd575b816124a260209383611bdc565b810103126124c95751906001600160e01b0319821682036124c6575090388061241c565b80fd5b5080fd5b3d9150612495565b8115611d86570690565b604051906124ec82611b88565b60006060838281528260208201528260408201520152565b9061250e82611bfe565b61251b6040519182611bdc565b828152809261252c601f1991611bfe565b0190602036910137565b9081511561267e576040519161254b83611bc0565b604083527f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208401527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040840152805192600291600285018095116104c9576003948590046001600160fe1b03811681036104c9576125d19060029694961b612504565b926020840192829183518401976020890192835194600085525b8a81106126315750505050600393949596505251068060011461261e57600214612613575090565b603d90600019015390565b50603d9081600019820153600119015390565b836004919b989b019a8b51600190603f9082828260121c16870101518453828282600c1c16870101518385015382828260061c1687010151878501531684010151858201530196996125eb565b905060405161268c81611ba4565b6000815290565b906001600160a01b03908181161561181057836126af9161218a565b9080821690816126d257604051637e27328960e01b815260048101869052602490fd5b8316036126de57505050565b6040516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600f166010811015611d535760080190604051600083549060018260011c90600184169687156127e3575b60209485841089146127cf57869798848897985290816000146127ad575060011461276e575b50505061203292500382611bdc565b600090815285812095935091905b818310612795575050612032935082010138808061275f565b8554878401850152948501948694509183019161277c565b9250505061203294925060ff191682840152151560051b82010138808061275f565b634e487b7160e01b85526022600452602485fd5b91607f1691612739565b60ff16607c039060ff82116104c957565b9060ff8091169116019060ff82116104c957565b60058106906001908181018091116104c95761282d9061270e565b9180612933575082607f604292604061203295960151901c169361285f60ff61285987828651166127fe565b16612e7a565b9161291861288261287c60ff6128598a82602080980151166127fe565b97612e7a565b6040519788956b1e31b4b931b6329031bc1e9160a11b858801526128af8151809287602c8b019101611b2a565b860165111031bc9e9160d11b602c8201526128d38251809387603285019101611b2a565b01641110391e9160d91b60328201526128f58251809386603785019101611b2a565b01916711103334b6361e9160c11b60378401528351938491603f85019101611b2a565b016211179f60e91b603f820152036022810184520182611bdc565b80820361294557505061203291612d58565b6002810361295857505061203291612d58565b909190600303612b9c5760ff9081845116928260408601948551831c607f16612980916127fe565b1661298a90612e7a565b93602095869485820191818351166129a190612e7a565b93828251166129af90612e7a565b928085511681606085019182518a1c607f166129ca916127fe565b166129d490612e7a565b97828080808851168751851c607f166129ec916127fe565b166129f690612e7a565b95818080808d511681895116612a0b916127fe565b16612a1590612e7a565b995116915116612a24916127fe565b16612a2e90612e7a565b9751169151901c607f16612a41916127fe565b16612a4b90612e7a565b604051701e3837b63cb3b7b7103837b4b73a399e9160791b8c8201528a51909b8c9b929892612a8191839160318f019101611b2a565b8a0195600b60fa1b96876031820152815191828c60328401920191612aa592611b2a565b0193600160fd1b94856032820152815191828c60338401920191612ac892611b2a565b01866033820152815191828b60348401920191612ae492611b2a565b01836034820152815191828a60358401920191612b0092611b2a565b01846035820152815191828960368401920191612b1c92611b2a565b01906036820152815191828760378401920191612b3892611b2a565b01906037820152815191828560388401920191612b5492611b2a565b01906711103334b6361e9160c11b60388301528051809360408401920191612b7b92611b2a565b016211179f60e91b6040820152036023810182526043016120329082611bdc565b60ff9081845116612bac90612e7a565b92602092838601818151169180606089019381855116612bcb916127fe565b16612bd590612e7a565b92818080808c8181511690604001998a51901c607f16612bf4916127fe565b16612bfe90612e7a565b97818080895116612c0e90612e7a565b9e5116915116612c1d916127fe565b16612c2790612e7a565b945116915116612c36916127fe565b16612c4090612e7a565b92604051978897701e3837b63cb3b7b7103837b4b73a399e9160791b888a0152805190818960318c01920191612c7592611b2a565b880193600b60fa1b94856031820152815191828a60328401920191612c9992611b2a565b0191600160fd1b92836032820152815191828a60338401920191612cbc92611b2a565b01846033820152815191828960348401920191612cd892611b2a565b01906034820152815191828760358401920191612cf492611b2a565b01906035820152815191828560368401920191612d1092611b2a565b01906711103334b6361e9160c11b603683015280518093603e8401920191612d3792611b2a565b016211179f60e91b603e820152036021810182526041016120329082611bdc565b90604c61203291612d6c60ff855116612e7a565b906020612e5f612d8160ff8389015116612e7a565b96612da160ff6060612d9882604086015116612e7a565b93015116612e7a565b90604051988996681e3932b1ba103c1e9160b91b86890152612dcc815180928860298c019101611b2a565b87016411103c9e9160d91b6029820152612def8251809388602e85019101611b2a565b016811103bb4b23a341e9160b91b602e820152612e158251809387603785019101611b2a565b016911103432b4b3b43a1e9160b11b6037820152612e3c8251809386604185019101611b2a565b01916711103334b6361e9160c11b60418401528351938491604985019101611b2a565b016211179f60e91b604982015203602c810184520182611bdc565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015612fb0575b506d04ee2d6d415b85acef810000000080831015612fa1575b50662386f26fc1000080831015612f92575b506305f5e10080831015612f83575b5061271080831015612f74575b506064821015612f64575b600a80921015612f5a575b600190816021612f1260018701612504565b95860101905b612f24575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215612f5557919082612f18565b612f1d565b9160010191612f00565b9190606460029104910191612ef5565b60049193920491019138612eea565b60089193920491019138612edd565b60109193920491019138612ece565b60209193920491019138612ebc565b604093508104915038612ea356fea2646970667358221220724c1741bcc40b4724d19a9beba691276b7cbd55e9032261cf2146285be065bf64736f6c63430008170033

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c8063018a25e814611b0c57806301ffc9a714611a9e57806302d05d3f14611a755780630583e9f814611a4957806306fdde0314611988578063081812fc1461194a578063095ea7b3146118635780631249c58b146115f8578063150b7a02146115d557806318160ddd146115b757806321a1c1841461156f57806323b872dd1461155857806323f4a4e1146113255780632dcd52f21461130757806332cb6b0c146112ea5780633f516018146112a757806342842e0e1461127957806343d32e9c1461125e5780634a8fe650146112135780635eba096b146111155780635f516836146110e95780636352211e146110b957806370a0823114611060578063715018a614611003578063771282f614610fe55780637c5e279514610fc35780638da5cb5b14610f9a57806395d89b4114610e89578063a22cb46514610de4578063ad64d06814610dad578063ae10426514610d87578063b88d4fde14610d62578063c87b56dd146107a7578063d96a094a146105dd578063da23eb63146105bb578063e35568cb14610530578063e4849b32146102f7578063e985e9c51461029d578063f0f2805f1461026b5763f2fde38b0361000e5734610266576020366003190112610266576101f1611b72565b6101f9612246565b6001600160a01b0390811690811561024d57600654826bffffffffffffffffffffffff60a01b821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b346102665760203660031901126102665760206102896004356120ef565b6040516001600160a01b0390911630148152f35b34610266576040366003190112610266576102b6611b72565b6001600160a01b03602435818116929083900361026657166000526005602052604060002090600052602052602060ff604060002054166040519015158152f35b346102665760208060031936011261026657600435610315816120ef565b6001600160a01b039033908216036104f55761032f612014565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a764000090049261035e813033612693565b601b54680100000000000000008110156104df578161038682600161039f9401601b55611d1c565b90919082549060031b91821b91600019901b1916179055565b601b5460001992908381019081116104c95782600052601c8752604060002055601a549182156104c95761041286600095938695938695869501601a55604051828152838c8201527f8323bebb324b6e1a1d4886a1f210640461bb275263dae69967f001d053ab0b2b60403392a3611e77565b335af161041d611e09565b50156104845760008080938193601854165af1610438611e09565b501561044057005b6064906040519062461bcd60e51b82526004820152601a60248201527f5472616e7366657220746f2063726561746f72206661696c65640000000000006044820152fd5b60405162461bcd60e51b815260048101849052601960248201527f5472616e7366657220746f2073656c6c6572206661696c6564000000000000006044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260048101849052601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606490fd5b346102665760003660031901126102665760405180601b5491828152602080910192601b6000527f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1916000905b8282106105a4576105a08561059481890382611bdc565b60405191829182611ce0565b0390f35b83548652948501946001938401939091019061057d565b3461026657600036600319011261026657602060405166b1a2bc2ec500008152f35b602080600319360112610266576004356105f6816120ef565b6001600160a01b039190309083160361076257610614601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a764000090049161064d6106458484611daa565b341015611db7565b610658813330612693565b80600052601c855260406000205493601b5494600019958681019081116104c95761068290611d1c565b90549060031b1c6106968161038684611d1c565b600052601c8752604060002055601b5491821561074c5760008086819482946100199b6107479b61074299016106df6106ce82611d1c565b8154906000199060031b1b19169055565b601b55818552601c81528460408120556106fa601a54611dfa565b601a5583604051918b83528201527f884543c08d36fb5c9b3b688dd0453c9f287199124bdbddb3b7f9ca885a4d34a060403392a3601854165af161073c611e09565b50611e39565b611daa565b61212a565b634e487b7160e01b600052603160045260246000fd5b60405162461bcd60e51b815260048101849052601f60248201527f546f6b656e206973206e6f7420617661696c61626c6520666f722073616c65006044820152606490fd5b34610266576020366003190112610266576004358060005260076020526040600020549060405190602082019283526040820152604081526107e881611bc0565b519020604051602081019182524260408201526040815261080881611bc0565b5190206108148161270e565b9060038106906002820182116104c95761083060028301612040565b9161083e6040519384611bdc565b60028101808452601f199061085290612040565b0160005b818110610d4b5750506060926000915b600281018310610aab576105a0610a446109998761099460b98b6040519384917f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060208401527f30302f737667222077696474683d2234303022206865696768743d223430302260408401527f2076696577426f783d223020302031323420313234222066696c6c3d226e6f6e60608401526232911f60e91b60808401527f3c726563742077696474683d2231323422206865696768743d2231323422207260838401526c3c1e91191a11103334b6361e9160991b60a384015261095481518092602060b087019101611b2a565b82016211179f60e91b60b082015261097682518093602060b385019101611b2a565b01651e17b9bb339f60d11b60b3820152036099810184520182611bdc565b612536565b610994608160405180937f7b226465736372697074696f6e223a2022466c69704e4654206973207468652060208301527f666972737420426f6e64696e67204375727665204e46542e222c2022696d616760408301527f65223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c006060830152610a29815180926020607f86019101611b2a565b810161227d60f01b607f820152036061810184520182611bdc565b610a97603d60405180937f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020830152610a878151809260208686019101611b2a565b810103601d810184520182611bdc565b604051918291602083526020830190611b4d565b90919392610ab76124df565b600096908760015b15610d36575b50506000966000610ad68885611daa565b91610adf6124df565b506026830692601984018094116104c957602f19938460ff610b028184166127ed565b160160ff81116104c957610b22610b1d60ff809316856124d5565b611d9c565b169460ff610b318184166127ed565b160160ff81116104c957610b51610b1d60ff94858094169060081c6124d5565b1660405195610b5f87611b88565b86526020860152166040840181905260608401528260005b8a8110610c4e575b5050610b8a90611dfa565b936040516020810191825285604082015260408152610ba881611bc0565b51902098600a8511610bbc57989398610abf565b50909197959692509392935b15610bd8575b5060010191610866565b8195610c466020610c0d84600195610bf26002988a612058565b52610bfd8b89612058565b50610c088b8b611daa565b612812565b926040519381610c268693518092868087019101611b2a565b8201610c3a82518093868085019101611b2a565b01038084520182611bdc565b959150610bce565b610c5f818a9d96989d979597612058565b5160ff83511660ff610c7b8184511682604086015116906127fe565b16119081610d0f575b81610ce4575b81610cba575b50610ca4576001019a95939a949294610b77565b5050909250610b8a60019994929991908b610b7f565b905060ff806020610cd782828801511683606089015116906127fe565b930151169116118d610c90565b905060ff60208401511660ff610d078160208501511682606086015116906127fe565b161190610c8a565b9050610d2760ff84511660ff604086015116906127fe565b60ff8083511691161190610c84565b80610ac5579091975095919495939293610bc8565b602090610d566124df565b82828801015201610856565b3461026657610019610d7336611c1a565b92610d82828483959495611e84565b6123b5565b34610266576020366003190112610266576020610da560043561206c565b604051908152f35b3461026657602036600319011261026657600435601b5481101561026657610dd6602091611d1c565b90546040519160031b1c8152f35b3461026657604036600319011261026657610dfd611b72565b60243590811515809203610266576001600160a01b0316908115610e7057336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b604051630b61174360e31b815260048101839052602490fd5b34610266576000366003190112610266576040516000600190600154918260011c9160018416918215610f90575b6020948585108414610f7a578587948686529182600014610f5a575050600114610efd575b50610ee992500383611bdc565b6105a0604051928284938452830190611b4d565b84915060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6906000915b858310610f42575050610ee9935082010185610edc565b80548389018501528794508693909201918101610f2b565b60ff191685820152610ee995151560051b8501019250879150610edc9050565b634e487b7160e01b600052602260045260246000fd5b92607f1692610eb7565b34610266576000366003190112610266576006546040516001600160a01b039091168152602090f35b3461026657600036600319011261026657602060405166038d7ea4c680008152f35b34610266576000366003190112610266576020601a54604051908152f35b346102665760003660031901126102665761101c612246565b600680546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610266576020366003190112610266576001600160a01b03611081611b72565b1680156110a05760005260036020526020604060002054604051908152f35b6040516322718ad960e21b815260006004820152602490fd5b346102665760203660031901126102665760206110d76004356120ef565b6040516001600160a01b039091168152f35b346102665760203660031901126102665760043560005260076020526020604060002054604051908152f35b3461026657604036600319011261026657600435601b54808210156111ce5761114060243583611daa565b90808210156111c757505b6111558282611e77565b9161115f83612040565b9261116d6040519485611bdc565b80845261117c601f1991612040565b01366020850137805b82811061119a57604051806105a08682611ce0565b806111a6600192611d1c565b90549060031b1c6111c06111ba8584611e77565b87612058565b5201611185565b905061114b565b60405162461bcd60e51b815260206004820152601960248201527f537461727420696e646578206f7574206f6620626f756e6473000000000000006044820152606490fd5b346102665760003660031901126102665761122f601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957602091670de0b6b3a7640000610da5920490611daa565b34610266576000366003190112610266576020610da5612014565b346102665761001961128a36611cab565b906040519261129884611ba4565b60008452610d82838383611e84565b34610266576020366003190112610266576112c0611b72565b6112c8612246565b601880546001600160a01b0319166001600160a01b0392909216919091179055005b346102665760003660031901126102665760206040516127108152f35b34610266576000366003190112610266576020601b54604051908152f35b600036600319011261026657601b54801561150957600019908082019081116104c95761135190611d1c565b90549060031b1c90611362826120ef565b6001600160a01b039030908216036114c45761137f601a5461206c565b66b1a2bc2ec500008082029082820414821517156104c957670de0b6b3a76400009004906113b06106458383611daa565b6113bb853330612693565b84600052601c602052604060002054601b548581019081116104c9576113e090611d1c565b90549060031b1c6113f48161038684611d1c565b600052601c602052604060002055601b5492831561074c576000808080866107429561148b9a6107479a0161142b6106ce82611d1c565b601b558b8352601c602052826040812055611447601a54611dfa565b601a558b6040518981528360208201527f884543c08d36fb5c9b3b688dd0453c9f287199124bdbddb3b7f9ca885a4d34a060403392a3601854165af161073c611e09565b611496601a5461206c565b6040519081527fe6c0f990eeec49fb22637d492d2e1ea38a893b0e786aa61b8871dd338dfa7ed860203392a3005b60405162461bcd60e51b815260206004820152601f60248201527f546f6b656e206973206e6f7420617661696c61626c6520666f722073616c65006044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f4e6f20746f6b656e7320617661696c61626c6520666f7220717569636b2062756044820152607960f81b6064820152608490fd5b346102665761001961156936611cab565b91611e84565b3461026657600036600319011261026657611588612014565b66b1a2bc2ec500008082029082820414821517156104c957602091670de0b6b3a7640000610da5920490611e77565b34610266576000366003190112610266576020601954604051908152f35b34610266576115e336611c1a565b505050506020604051630a85bd0160e11b8152f35b6000366003190112610266576019546127108110156118295761161c601a5461206c565b9066b1a2bc2ec500008083029083820414831517156104c957670de0b6b3a76400006116569104916116516106458486611daa565b611dfa565b91826019556040519261166884611ba4565b600084523315611810576001600160a01b039384611686833361218a565b166117f757333b611701575b61001961074785856107426000808080868e8c6116b0601a54611dfa565b601a55806040518a81528460208201527f10546b1a6f5245ff0ffa18c256b9e46859c585cbb473b453fcd4c2dc39ae08db60403392a383526007602052426040842055601854165af161073c611e09565b604093929193516020818061173f630a85bd0160e11b9586835233600484015260006024840152896044840152608060648401526084830190611b4d565b03816000335af1600091816117b2575b506117815761175c611e09565b8051908161177c57604051633250574960e11b8152336004820152602490fd5b602001fd5b6001600160e01b0319160361179a579091610742611692565b604051633250574960e11b8152336004820152602490fd5b9091506020813d6020116117ef575b816117ce60209383611bdc565b8101031261026657516001600160e01b03198116810361026657908761174f565b3d91506117c1565b6040516339e3563760e11b815260006004820152602490fd5b604051633250574960e11b815260006004820152602490fd5b60405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606490fd5b346102665760403660031901126102665761187c611b72565b602435611888816120ef565b33151580611937575b8061190a575b6118f2576001600160a01b039283169282918491167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4600090815260046020526040902080546001600160a01b0319169091179055005b60405163a9fbf51f60e01b8152336004820152602490fd5b5060018060a01b038116600052600560205260406000203360005260205260ff6040600020541615611897565b506001600160a01b038116331415611891565b3461026657602036600319011261026657600435611967816120ef565b506000526004602052602060018060a01b0360406000205416604051908152f35b3461026657600036600319011261026657604051600080549060018260011c9160018416918215611a3f575b6020948585108414610f7a578587948686529182600014610f5a5750506001146119e55750610ee992500383611bdc565b6000808052859250907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310611a27575050610ee9935082010185610edc565b80548389018501528794508693909201918101611a10565b92607f16926119b4565b3461026657602036600319011261026657600435600052601c6020526020604060002054604051908152f35b34610266576000366003190112610266576018546040516001600160a01b039091168152602090f35b346102665760203660031901126102665760043563ffffffff60e01b8116809103610266576020906380ac58cd60e01b8114908115611afb575b8115611aea575b506040519015158152f35b6301ffc9a760e01b14905082611adf565b635b5e139f60e01b81149150611ad8565b34610266576000366003190112610266576020610da5601a5461206c565b60005b838110611b3d5750506000910152565b8181015183820152602001611b2d565b90602091611b6681518092818552858086019101611b2a565b601f01601f1916010190565b600435906001600160a01b038216820361026657565b6080810190811067ffffffffffffffff8211176104df57604052565b6020810190811067ffffffffffffffff8211176104df57604052565b6060810190811067ffffffffffffffff8211176104df57604052565b90601f8019910116810190811067ffffffffffffffff8211176104df57604052565b67ffffffffffffffff81116104df57601f01601f191660200190565b906080600319830112610266576001600160a01b039160043583811681036102665792602435908116810361026657916044359160643567ffffffffffffffff8111610266578160238201121561026657806004013590611c7a82611bfe565b92611c886040519485611bdc565b828452602483830101116102665781600092602460209301838601378301015290565b6060906003190112610266576001600160a01b0390600435828116810361026657916024359081168103610266579060443590565b602090602060408183019282815285518094520193019160005b828110611d08575050505090565b835185529381019392810192600101611cfa565b601b54811015611d5357601b6000527f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc10190600090565b634e487b7160e01b600052603260045260246000fd5b818102929181159184041417156104c957565b8115611d86570490565b634e487b7160e01b600052601260045260246000fd5b90601882018092116104c957565b919082018092116104c957565b15611dbe57565b60405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60001981146104c95760010190565b3d15611e34573d90611e1a82611bfe565b91611e286040519384611bdc565b82523d6000602084013e565b606090565b15611e4057565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b919082039182116104c957565b906001600160a01b03908116801561181057600091848352846020926002845260409383858720541695869133151580611f7e575b509060027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9284611f4b575b85835260038152888320805460010190558683525286812080546001600160a01b0319168517905580a483168203611f1d5750505050565b516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600087815260046020526040902080546001600160a01b0319169055848352600381528883208054600019019055611ee5565b91939450915080611fd3575b15611f9a57879291869138611eb9565b848887611fb7576024915190637e27328960e01b82526004820152fd5b604491519063177e802f60e01b82523360048301526024820152fd5b503386148015611ff8575b80611f8a5750878252600481523384868420541614611f8a565b5085825260058152848220338352815260ff8583205416611fde565b601a5480156120355760001981019081116104c9576120329061206c565b90565b50612032600061206c565b67ffffffffffffffff81116104df5760051b60200190565b8051821015611d535760209160051b010190565b80156120e357806064026064810482036104c95761208e612710809204612272565b9066071afd498d000091808302928304036104c9578281029080820484036104c957806120c16120ce956120c894611d69565b0404612272565b90611d69565b66038d7ea4c680009081018091116104c95790565b5066038d7ea4c6800090565b6000818152600260205260409020546001600160a01b0316908115612112575090565b60249060405190637e27328960e01b82526004820152fd5b6121349034611e77565b8061213c5750565b600080808093335af161214d611e09565b501561215557565b60405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606490fd5b6000828152600260205260408120546001600160a01b03908116939284917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9183612211575b1692836121f9575b84815260026020526040812080546001600160a01b0319168517905580a490565b838152600360205260408120600181540190556121d8565b600086815260046020526040902080546001600160a01b031916905583855260036020526040852080546000190190556121d0565b6006546001600160a01b0316330361225a57565b60405163118cdaa760e01b8152336004820152602490fd5b80156123af5761233d816000908360801c806123a3575b508060401c80612396575b508060201c80612389575b508060101c8061237c575b508060081c8061236f575b508060041c80612362575b508060021c80612355575b50600191828092811c61234e575b1c1b6122e58185611d7c565b01811c6122f28185611d7c565b01811c6122ff8185611d7c565b01811c61230c8185611d7c565b01811c6123198185611d7c565b01811c6123268185611d7c565b01811c6123338185611d7c565b01901c8092611d7c565b80821015612349575090565b905090565b01816122d9565b60029150910190386122cb565b60049150910190386122c0565b60089150910190386122b5565b60109150910190386122aa565b602091509101903861229f565b6040915091019038612294565b91505060809038612289565b50600090565b9190803b6123c4575b50505050565b61240660018060a01b0380921694604051938493630a85bd0160e11b968786523360048701521660248501526044840152608060648401526084830190611b4d565b03906020816000938185885af190829082612485575b5050612454578261242b611e09565b805191908261244d57604051633250574960e11b815260048101839052602490fd5b9050602001fd5b6001600160e01b0319160361246d5750388080806123be565b60249060405190633250574960e11b82526004820152fd5b909192506020813d6020116124cd575b816124a260209383611bdc565b810103126124c95751906001600160e01b0319821682036124c6575090388061241c565b80fd5b5080fd5b3d9150612495565b8115611d86570690565b604051906124ec82611b88565b60006060838281528260208201528260408201520152565b9061250e82611bfe565b61251b6040519182611bdc565b828152809261252c601f1991611bfe565b0190602036910137565b9081511561267e576040519161254b83611bc0565b604083527f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208401527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040840152805192600291600285018095116104c9576003948590046001600160fe1b03811681036104c9576125d19060029694961b612504565b926020840192829183518401976020890192835194600085525b8a81106126315750505050600393949596505251068060011461261e57600214612613575090565b603d90600019015390565b50603d9081600019820153600119015390565b836004919b989b019a8b51600190603f9082828260121c16870101518453828282600c1c16870101518385015382828260061c1687010151878501531684010151858201530196996125eb565b905060405161268c81611ba4565b6000815290565b906001600160a01b03908181161561181057836126af9161218a565b9080821690816126d257604051637e27328960e01b815260048101869052602490fd5b8316036126de57505050565b6040516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600f166010811015611d535760080190604051600083549060018260011c90600184169687156127e3575b60209485841089146127cf57869798848897985290816000146127ad575060011461276e575b50505061203292500382611bdc565b600090815285812095935091905b818310612795575050612032935082010138808061275f565b8554878401850152948501948694509183019161277c565b9250505061203294925060ff191682840152151560051b82010138808061275f565b634e487b7160e01b85526022600452602485fd5b91607f1691612739565b60ff16607c039060ff82116104c957565b9060ff8091169116019060ff82116104c957565b60058106906001908181018091116104c95761282d9061270e565b9180612933575082607f604292604061203295960151901c169361285f60ff61285987828651166127fe565b16612e7a565b9161291861288261287c60ff6128598a82602080980151166127fe565b97612e7a565b6040519788956b1e31b4b931b6329031bc1e9160a11b858801526128af8151809287602c8b019101611b2a565b860165111031bc9e9160d11b602c8201526128d38251809387603285019101611b2a565b01641110391e9160d91b60328201526128f58251809386603785019101611b2a565b01916711103334b6361e9160c11b60378401528351938491603f85019101611b2a565b016211179f60e91b603f820152036022810184520182611bdc565b80820361294557505061203291612d58565b6002810361295857505061203291612d58565b909190600303612b9c5760ff9081845116928260408601948551831c607f16612980916127fe565b1661298a90612e7a565b93602095869485820191818351166129a190612e7a565b93828251166129af90612e7a565b928085511681606085019182518a1c607f166129ca916127fe565b166129d490612e7a565b97828080808851168751851c607f166129ec916127fe565b166129f690612e7a565b95818080808d511681895116612a0b916127fe565b16612a1590612e7a565b995116915116612a24916127fe565b16612a2e90612e7a565b9751169151901c607f16612a41916127fe565b16612a4b90612e7a565b604051701e3837b63cb3b7b7103837b4b73a399e9160791b8c8201528a51909b8c9b929892612a8191839160318f019101611b2a565b8a0195600b60fa1b96876031820152815191828c60328401920191612aa592611b2a565b0193600160fd1b94856032820152815191828c60338401920191612ac892611b2a565b01866033820152815191828b60348401920191612ae492611b2a565b01836034820152815191828a60358401920191612b0092611b2a565b01846035820152815191828960368401920191612b1c92611b2a565b01906036820152815191828760378401920191612b3892611b2a565b01906037820152815191828560388401920191612b5492611b2a565b01906711103334b6361e9160c11b60388301528051809360408401920191612b7b92611b2a565b016211179f60e91b6040820152036023810182526043016120329082611bdc565b60ff9081845116612bac90612e7a565b92602092838601818151169180606089019381855116612bcb916127fe565b16612bd590612e7a565b92818080808c8181511690604001998a51901c607f16612bf4916127fe565b16612bfe90612e7a565b97818080895116612c0e90612e7a565b9e5116915116612c1d916127fe565b16612c2790612e7a565b945116915116612c36916127fe565b16612c4090612e7a565b92604051978897701e3837b63cb3b7b7103837b4b73a399e9160791b888a0152805190818960318c01920191612c7592611b2a565b880193600b60fa1b94856031820152815191828a60328401920191612c9992611b2a565b0191600160fd1b92836032820152815191828a60338401920191612cbc92611b2a565b01846033820152815191828960348401920191612cd892611b2a565b01906034820152815191828760358401920191612cf492611b2a565b01906035820152815191828560368401920191612d1092611b2a565b01906711103334b6361e9160c11b603683015280518093603e8401920191612d3792611b2a565b016211179f60e91b603e820152036021810182526041016120329082611bdc565b90604c61203291612d6c60ff855116612e7a565b906020612e5f612d8160ff8389015116612e7a565b96612da160ff6060612d9882604086015116612e7a565b93015116612e7a565b90604051988996681e3932b1ba103c1e9160b91b86890152612dcc815180928860298c019101611b2a565b87016411103c9e9160d91b6029820152612def8251809388602e85019101611b2a565b016811103bb4b23a341e9160b91b602e820152612e158251809387603785019101611b2a565b016911103432b4b3b43a1e9160b11b6037820152612e3c8251809386604185019101611b2a565b01916711103334b6361e9160c11b60418401528351938491604985019101611b2a565b016211179f60e91b604982015203602c810184520182611bdc565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015612fb0575b506d04ee2d6d415b85acef810000000080831015612fa1575b50662386f26fc1000080831015612f92575b506305f5e10080831015612f83575b5061271080831015612f74575b506064821015612f64575b600a80921015612f5a575b600190816021612f1260018701612504565b95860101905b612f24575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215612f5557919082612f18565b612f1d565b9160010191612f00565b9190606460029104910191612ef5565b60049193920491019138612eea565b60089193920491019138612edd565b60109193920491019138612ece565b60209193920491019138612ebc565b604093508104915038612ea356fea2646970667358221220724c1741bcc40b4724d19a9beba691276b7cbd55e9032261cf2146285be065bf64736f6c63430008170033

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

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