ETH Price: $3,372.39 (-3.18%)
Gas: 3 Gwei

Token

Kurage Nonfungible Memories (KNM)
 

Overview

Max Total Supply

21 KNM

Holders

21

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
onono.eth
0x07246c91dbf58dd091821070dd8d06cc4e0289bc
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:
KurageNonfungibleMemories

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : KurageNonfungibleMemories.sol
// SPDX-License-Identifier: MIT
// ndgtlft etm.
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";

contract KurageNonfungibleMemories is ERC1155, ERC2981, Ownable, ReentrancyGuard, AccessControl {

    function supportsInterface(bytes4 interfaceId) public view override(ERC1155, AccessControl,  ERC2981) returns(bool){
        return AccessControl.supportsInterface(interfaceId)|| ERC1155.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId);
    }

    // param
    bytes32 public constant BOY = keccak256("BOY");
    string public name = "Kurage Nonfungible Memories";
    string public symbol = "KNM";
    address public withdrawAddress;

    constructor() ERC1155("")  Ownable(msg.sender) {
        _setDefaultRoyalty(owner(), 1000);
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setRoleAdmin(BOY, DEFAULT_ADMIN_ROLE);
    }

    // token
    mapping(uint256 => itemStruct) public itemData;
    struct itemStruct {
        uint256 totalSupply;
        uint256 cost;
        string jsonUri;
        bool onSale;
    }

    // mint
    function mint(uint256 _id, uint256 _mintAmount) external payable nonReentrant {
        require(itemData[_id].onSale, "this item is not on Sale now");
        require(_mintAmount > 0, "need to mint over 1 amount");
        require(itemData[_id].cost * _mintAmount == msg.value, "cost is insufficient");
        require(tx.origin == msg.sender, "not externally owned account");
        _mint(msg.sender, _id, _mintAmount, "");
        itemData[_id].totalSupply += _mintAmount;
    }

    // onlyRole
    function airdropMint(address _address, uint256 _id, uint256 _airdropAmount) external onlyRole(BOY) {
        _mint(_address, _id, _airdropAmount, "");
        itemData[_id].totalSupply += _airdropAmount;
    }

    function airdropMintMany(address[] calldata _airdropAddresses , uint256 _id, uint256[] memory _airdropAmount) external onlyRole(BOY) {
        uint256 _mintAmount = 0;
        for (uint256 i = 0; i < _airdropAmount.length; i++) {
            _mintAmount += _airdropAmount[i];
            _mint(_airdropAddresses[i], _id, _airdropAmount[i], "");
        }
        itemData[_id].totalSupply += _mintAmount;
    }

    function setItemData(uint256 _id, uint256 _cost, string memory _jsonUri, bool _onSaleState) external onlyRole(BOY) {
        itemData[_id].cost = _cost;
        itemData[_id].jsonUri = _jsonUri;
        itemData[_id].onSale = _onSaleState;
    }

    function setOnSaleState(uint256 _id, bool _state) external onlyRole(BOY) {
        itemData[_id].onSale = _state;
    }

    function setJsonUri(uint256 _id, string memory _jsonUri) external onlyRole(BOY) {
        itemData[_id].jsonUri = _jsonUri;
    }

    // onlyOwner
    function withdraw() external onlyOwner {
        (bool os, ) = payable(withdrawAddress).call{value: address(this).balance}('');
        require(os);
    }

    function setWithdrawAddress(address _withdrawAddress) external onlyOwner {
        withdrawAddress = _withdrawAddress;
    }

    // view
    function totalSupply(uint256 _id) external view returns(uint256) {
        return itemData[_id].totalSupply;
    }

    function cost(uint256 _id) external view returns(uint256) {
        return itemData[_id].cost;
    }

    function onSale(uint256 _id) external view returns(bool){
        return itemData[_id].onSale;
    }

    //override
    function uri(uint256 _id) public view override returns (string memory) {
        return itemData[_id].jsonUri;
    }
}

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

pragma solidity ^0.8.20;

import {IERC2981} from "../../interfaces/IERC2981.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";

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

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

    /**
     * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);

    /**
     * @dev The default royalty receiver is invalid.
     */
    error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);

    /**
     * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);

    /**
     * @dev The royalty receiver for `tokenId` is invalid.
     */
    error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
        }

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
        }

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

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

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

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

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

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

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

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

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

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

        _revokeRole(role, callerConfirmation);
    }

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

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 4 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 5 of 18 : 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 6 of 18 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.20;

import {IERC1155} from "./IERC1155.sol";
import {IERC1155Receiver} from "./IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol";
import {Context} from "../../utils/Context.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {Arrays} from "../../utils/Arrays.sol";
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 */
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
    using Arrays for uint256[];
    using Arrays for address[];

    mapping(uint256 id => mapping(address account => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256 /* id */) public view virtual returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     */
    function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    ) public view virtual returns (uint256[] memory) {
        if (accounts.length != ids.length) {
            revert ERC1155InvalidArrayLength(ids.length, accounts.length);
        }

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i));
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeTransferFrom(from, to, id, value, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeBatchTransferFrom(from, to, ids, values, data);
    }

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
     * (or `to`) is the zero address.
     *
     * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
     *   or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
     * - `ids` and `values` must have the same length.
     *
     * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
     */
    function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
        if (ids.length != values.length) {
            revert ERC1155InvalidArrayLength(ids.length, values.length);
        }

        address operator = _msgSender();

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids.unsafeMemoryAccess(i);
            uint256 value = values.unsafeMemoryAccess(i);

            if (from != address(0)) {
                uint256 fromBalance = _balances[id][from];
                if (fromBalance < value) {
                    revert ERC1155InsufficientBalance(from, fromBalance, value, id);
                }
                unchecked {
                    // Overflow not possible: value <= fromBalance
                    _balances[id][from] = fromBalance - value;
                }
            }

            if (to != address(0)) {
                _balances[id][to] += value;
            }
        }

        if (ids.length == 1) {
            uint256 id = ids.unsafeMemoryAccess(0);
            uint256 value = values.unsafeMemoryAccess(0);
            emit TransferSingle(operator, from, to, id, value);
        } else {
            emit TransferBatch(operator, from, to, ids, values);
        }
    }

    /**
     * @dev Version of {_update} that performs the token acceptance check by calling
     * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
     * contains code (eg. is a smart contract at the moment of execution).
     *
     * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
     * update to the contract state after this function would break the check-effect-interaction pattern. Consider
     * overriding {_update} instead.
     */
    function _updateWithAcceptanceCheck(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal virtual {
        _update(from, to, ids, values);
        if (to != address(0)) {
            address operator = _msgSender();
            if (ids.length == 1) {
                uint256 id = ids.unsafeMemoryAccess(0);
                uint256 value = values.unsafeMemoryAccess(0);
                _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
            } else {
                _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
            }
        }
    }

    /**
     * @dev Transfers a `value` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, to, ids, values, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     * - `ids` and `values` must have the same length.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, to, ids, values, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the values in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(address to, uint256 id, uint256 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev Destroys a `value` amount of tokens of type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     */
    function _burn(address from, uint256 id, uint256 value) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     * - `ids` and `values` must have the same length.
     */
    function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

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

    /**
     * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Creates an array in memory with only one value for each of the elements provided.
     */
    function _asSingletonArrays(
        uint256 element1,
        uint256 element2
    ) private pure returns (uint256[] memory array1, uint256[] memory array2) {
        /// @solidity memory-safe-assembly
        assembly {
            // Load the free memory pointer
            array1 := mload(0x40)
            // Set array length to 1
            mstore(array1, 1)
            // Store the single element at the next word after the length (where content starts)
            mstore(add(array1, 0x20), element1)

            // Repeat for next array locating it right after the first array
            array2 := add(array1, 0x40)
            mstore(array2, 1)
            mstore(add(array2, 0x20), element2)

            // Update the free memory pointer by pointing after the second array
            mstore(0x40, add(array2, 0x40))
        }
    }
}

File 7 of 18 : 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 8 of 18 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.20;

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

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

File 9 of 18 : 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 10 of 18 : Arrays.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Collection of functions related to array types.
 */
library Arrays {
    using StorageSlot for bytes32;

    /**
     * @dev Searches a sorted `array` and returns the first index that contains
     * a value greater or equal to `element`. If no such index exists (i.e. all
     * values in the array are strictly less than `element`), the array length is
     * returned. Time complexity O(log n).
     *
     * `array` is expected to be sorted in ascending order, and to contain no
     * repeated elements.
     */
    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
        uint256 low = 0;
        uint256 high = array.length;

        if (high == 0) {
            return 0;
        }

        while (low < high) {
            uint256 mid = Math.average(low, high);

            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)
            // because Math.average rounds towards zero (it does integer division with truncation).
            if (unsafeAccess(array, mid).value > element) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
        if (low > 0 && unsafeAccess(array, low - 1).value == element) {
            return low - 1;
        } else {
            return low;
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getAddressSlot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getBytes32Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getUint256Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }
}

File 11 of 18 : 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 12 of 18 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 13 of 18 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 18 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the value of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155Received} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;
}

File 15 of 18 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

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

File 17 of 18 : 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 18 of 18 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

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

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

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

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

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

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

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

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"BOY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_airdropAmount","type":"uint256"}],"name":"airdropMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256[]","name":"_airdropAmount","type":"uint256[]"}],"name":"airdropMintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemData","outputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"string","name":"jsonUri","type":"string"},{"internalType":"bool","name":"onSale","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"onSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_cost","type":"uint256"},{"internalType":"string","name":"_jsonUri","type":"string"},{"internalType":"bool","name":"_onSaleState","type":"bool"}],"name":"setItemData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_jsonUri","type":"string"}],"name":"setJsonUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOnSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawAddress","type":"address"}],"name":"setWithdrawAddress","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":"_id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c0604052601b60809081527f4b7572616765204e6f6e66756e6769626c65204d656d6f72696573000000000060a0526008906200003e9082620003d4565b506040805180820190915260038152624b4e4d60e81b6020820152600990620000689082620003d4565b5034801562000075575f80fd5b5060408051602081019091525f81523390620000918162000131565b506001600160a01b038116620000c157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000cc8162000143565b506001600655620000f2620000e96005546001600160a01b031690565b6103e862000194565b620000fe5f336200023a565b506200012b7f14ae3c7fe7cf62e752f356e04ae239a52152d61b77b09d1ddb810ad3b9a18dd35f620002ea565b6200049c565b60026200013f8282620003d4565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6127106001600160601b038216811015620001d557604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401620000b8565b6001600160a01b0383166200020057604051635b6cc80560e11b81525f6004820152602401620000b8565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b5f8281526007602090815260408083206001600160a01b038516845290915281205460ff16620002e1575f8381526007602090815260408083206001600160a01b03861684529091529020805460ff19166001179055620002983390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620002e4565b505f5b92915050565b5f82815260076020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200035d57607f821691505b6020821081036200037c57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620003cf575f81815260208120601f850160051c81016020861015620003aa5750805b601f850160051c820191505b81811015620003cb57828155600101620003b6565b5050505b505050565b81516001600160401b03811115620003f057620003f062000334565b620004088162000401845462000348565b8462000382565b602080601f8311600181146200043e575f8415620004265750858301515b5f19600386901b1c1916600185901b178555620003cb565b5f85815260208120601f198616915b828110156200046e578886015182559484019460019091019084016200044d565b50858210156200048c57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6122fc80620004aa5f395ff3fe6080604052600436106101f0575f3560e01c8063715018a611610108578063b43a76f11161009d578063d547741f1161006d578063d547741f146105f3578063e985e9c514610612578063edc9e66d14610631578063f242432a14610651578063f2fde38b14610670575f80fd5b8063b43a76f114610559578063b8ec76f21461058a578063bd85b039146105a9578063c41b220e146105d4575f80fd5b806395d89b41116100d857806395d89b41146104f45780639743a61914610508578063a217fddf14610527578063a22cb4651461053a575f80fd5b8063715018a6146104765780638da5cb5b1461048a5780639097548d146104a757806391d14854146104d5575f80fd5b80632eb2c2d6116101895780633a24a8ab116101595780633a24a8ab146103c95780633ab1a494146103e85780633ccfd60b146104075780634e1273f41461041b578063552348f214610447575f80fd5b80632eb2c2d61461034d5780632ed8ec711461036c5780632f2ff15d1461038b57806336568abe146103aa575f80fd5b80631581b600116101c45780631581b600146102955780631b2ef1ca146102cc578063248a9ca3146102e15780632a55205a1461030f575f80fd5b8062fdd58e146101f457806301ffc9a71461022657806306fdde03146102555780630e89341c14610276575b5f80fd5b3480156101ff575f80fd5b5061021361020e366004611978565b61068f565b6040519081526020015b60405180910390f35b348015610231575f80fd5b506102456102403660046119b5565b6106b6565b604051901515815260200161021d565b348015610260575f80fd5b506102696106de565b60405161021d9190611a1a565b348015610281575f80fd5b50610269610290366004611a2c565b61076a565b3480156102a0575f80fd5b50600a546102b4906001600160a01b031681565b6040516001600160a01b03909116815260200161021d565b6102df6102da366004611a43565b61080c565b005b3480156102ec575f80fd5b506102136102fb366004611a2c565b5f9081526007602052604090206001015490565b34801561031a575f80fd5b5061032e610329366004611a43565b6109c2565b604080516001600160a01b03909316835260208301919091520161021d565b348015610358575f80fd5b506102df610367366004611b9f565b610a6c565b348015610377575f80fd5b506102df610386366004611c51565b610ad3565b348015610396575f80fd5b506102df6103a5366004611c7b565b610b0d565b3480156103b5575f80fd5b506102df6103c4366004611c7b565b610b37565b3480156103d4575f80fd5b506102df6103e3366004611c9c565b610b6f565b3480156103f3575f80fd5b506102df610402366004611d35565b610c4f565b348015610412575f80fd5b506102df610c79565b348015610426575f80fd5b5061043a610435366004611d4e565b610ce0565b60405161021d9190611e41565b348015610452575f80fd5b50610466610461366004611a2c565b610db3565b60405161021d9493929190611e53565b348015610481575f80fd5b506102df610e64565b348015610495575f80fd5b506005546001600160a01b03166102b4565b3480156104b2575f80fd5b506102136104c1366004611a2c565b5f908152600b602052604090206001015490565b3480156104e0575f80fd5b506102456104ef366004611c7b565b610e77565b3480156104ff575f80fd5b50610269610ea1565b348015610513575f80fd5b506102df610522366004611e84565b610eae565b348015610532575f80fd5b506102135f81565b348015610545575f80fd5b506102df610554366004611ee1565b610f0d565b348015610564575f80fd5b50610245610573366004611a2c565b5f908152600b602052604090206003015460ff1690565b348015610595575f80fd5b506102df6105a4366004611f09565b610f18565b3480156105b4575f80fd5b506102136105c3366004611a2c565b5f908152600b602052604090205490565b3480156105df575f80fd5b506102df6105ee366004611f39565b610f71565b3480156105fe575f80fd5b506102df61060d366004611c7b565b610fa2565b34801561061d575f80fd5b5061024561062c366004611f73565b610fc6565b34801561063c575f80fd5b506102135f805160206122a783398151915281565b34801561065c575f80fd5b506102df61066b366004611f9b565b610ff3565b34801561067b575f80fd5b506102df61068a366004611d35565b611052565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6106c08261108c565b806106cf57506106cf826110b0565b806106b057506106b0826110ff565b600880546106eb90611ffb565b80601f016020809104026020016040519081016040528092919081815260200182805461071790611ffb565b80156107625780601f1061073957610100808354040283529160200191610762565b820191905f5260205f20905b81548152906001019060200180831161074557829003601f168201915b505050505081565b5f818152600b6020526040902060020180546060919061078990611ffb565b80601f01602080910402602001604051908101604052809291908181526020018280546107b590611ffb565b80156108005780601f106107d757610100808354040283529160200191610800565b820191905f5260205f20905b8154815290600101906020018083116107e357829003601f168201915b50505050509050919050565b610814611123565b5f828152600b602052604090206003015460ff166108795760405162461bcd60e51b815260206004820152601c60248201527f74686973206974656d206973206e6f74206f6e2053616c65206e6f770000000060448201526064015b60405180910390fd5b5f81116108c85760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f206d696e74206f766572203120616d6f756e740000000000006044820152606401610870565b5f828152600b602052604090206001015434906108e6908390612047565b1461092a5760405162461bcd60e51b815260206004820152601460248201527318dbdcdd081a5cc81a5b9cdd59999a58da595b9d60621b6044820152606401610870565b3233146109795760405162461bcd60e51b815260206004820152601c60248201527f6e6f742065787465726e616c6c79206f776e6564206163636f756e74000000006044820152606401610870565b61099333838360405180602001604052805f81525061114d565b5f828152600b6020526040812080548392906109b090849061205e565b909155505060016006555050565b5050565b5f8281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a365750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610a54906001600160601b031687612047565b610a5e9190612071565b915196919550909350505050565b336001600160a01b0386168114801590610a8d5750610a8b8682610fc6565b155b15610abe5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610870565b610acb86868686866111a8565b505050505050565b5f805160206122a7833981519152610aea8161120d565b505f918252600b6020526040909120600301805460ff1916911515919091179055565b5f82815260076020526040902060010154610b278161120d565b610b318383611217565b50505050565b6001600160a01b0381163314610b605760405163334bd91960e11b815260040160405180910390fd5b610b6a82826112a8565b505050565b5f805160206122a7833981519152610b868161120d565b5f805b8351811015610c2457838181518110610ba457610ba4612090565b602002602001015182610bb7919061205e565b9150610c12878783818110610bce57610bce612090565b9050602002016020810190610be39190611d35565b86868481518110610bf657610bf6612090565b602002602001015160405180602001604052805f81525061114d565b80610c1c816120a4565b915050610b89565b505f848152600b602052604081208054839290610c4290849061205e565b9091555050505050505050565b610c57611313565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610c81611313565b600a546040515f916001600160a01b03169047908381818185875af1925050503d805f8114610ccb576040519150601f19603f3d011682016040523d82523d5f602084013e610cd0565b606091505b5050905080610cdd575f80fd5b50565b60608151835114610d115781518351604051635b05999160e01b815260048101929092526024820152604401610870565b5f835167ffffffffffffffff811115610d2c57610d2c611a63565b604051908082528060200260200182016040528015610d55578160200160208202803683370190505b5090505f5b8451811015610dab57602080820286010151610d7e9060208084028701015161068f565b828281518110610d9057610d90612090565b6020908102919091010152610da4816120a4565b9050610d5a565b509392505050565b600b6020525f908152604090208054600182015460028301805492939192610dda90611ffb565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0690611ffb565b8015610e515780601f10610e2857610100808354040283529160200191610e51565b820191905f5260205f20905b815481529060010190602001808311610e3457829003601f168201915b5050506003909301549192505060ff1684565b610e6c611313565b610e755f611340565b565b5f9182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600980546106eb90611ffb565b5f805160206122a7833981519152610ec58161120d565b5f858152600b6020526040902060018101859055600201610ee68482612101565b50505f938452600b6020526040909320600301805460ff1916931515939093179092555050565b6109be338383611391565b5f805160206122a7833981519152610f2f8161120d565b610f4984848460405180602001604052805f81525061114d565b5f838152600b602052604081208054849290610f6690849061205e565b909155505050505050565b5f805160206122a7833981519152610f888161120d565b5f838152600b60205260409020600201610b318382612101565b5f82815260076020526040902060010154610fbc8161120d565b610b3183836112a8565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b336001600160a01b038616811480159061101457506110128682610fc6565b155b156110455760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610870565b610acb8686868686611425565b61105a611313565b6001600160a01b03811661108357604051631e4fbdf760e01b81525f6004820152602401610870565b610cdd81611340565b5f6001600160e01b03198216637965db0b60e01b14806106b057506106b0826110ff565b5f6001600160e01b03198216636cdb3d1360e11b14806110e057506001600160e01b031982166303a24d0760e21b145b806106b057506301ffc9a760e01b6001600160e01b03198316146106b0565b5f6001600160e01b0319821663152a902d60e11b14806106b057506106b0826110b0565b60026006540361114657604051633ee5aeb560e01b815260040160405180910390fd5b6002600655565b6001600160a01b03841661117657604051632bfa23e760e11b81525f6004820152602401610870565b60408051600180825260208201869052818301908152606082018590526080820190925290610acb5f878484876114b1565b6001600160a01b0384166111d157604051632bfa23e760e11b81525f6004820152602401610870565b6001600160a01b0385166111f957604051626a0d4560e21b81525f6004820152602401610870565b61120685858585856114b1565b5050505050565b610cdd8133611504565b5f6112228383610e77565b6112a1575f8381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556112593390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106b0565b505f6106b0565b5f6112b38383610e77565b156112a1575f8381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106b0565b6005546001600160a01b03163314610e755760405163118cdaa760e01b8152336004820152602401610870565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382166113b95760405162ced3e160e81b81525f6004820152602401610870565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661144e57604051632bfa23e760e11b81525f6004820152602401610870565b6001600160a01b03851661147657604051626a0d4560e21b81525f6004820152602401610870565b604080516001808252602082018690528183019081526060820185905260808201909252906114a887878484876114b1565b50505050505050565b6114bd8585858561153d565b6001600160a01b0384161561120657825133906001036114f657602084810151908401516114ef838989858589611755565b5050610acb565b610acb818787878787611876565b61150e8282610e77565b6109be5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610870565b805182511461156c5781518151604051635b05999160e01b815260048101929092526024820152604401610870565b335f5b8351811015611677576020818102858101820151908501909101516001600160a01b03881615611620575f828152602081815260408083206001600160a01b038c168452909152902054818110156115fa576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610870565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b03871615611664575f828152602081815260408083206001600160a01b038b1684529091528120805483929061165e90849061205e565b90915550505b505080611670906120a4565b905061156f565b5082516001036116f75760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516116e8929190918252602082015260400190565b60405180910390a45050611206565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117469291906121bd565b60405180910390a45050505050565b6001600160a01b0384163b15610acb5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061179990899089908890889088906004016121ea565b6020604051808303815f875af19250505080156117d3575060408051601f3d908101601f191682019092526117d09181019061222e565b60015b61183a573d808015611800576040519150601f19603f3d011682016040523d82523d5f602084013e611805565b606091505b5080515f0361183257604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b146114a857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b6001600160a01b0384163b15610acb5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906118ba9089908990889088908890600401612249565b6020604051808303815f875af19250505080156118f4575060408051601f3d908101601f191682019092526118f19181019061222e565b60015b611921573d808015611800576040519150601f19603f3d011682016040523d82523d5f602084013e611805565b6001600160e01b0319811663bc197c8160e01b146114a857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b80356001600160a01b0381168114611973575f80fd5b919050565b5f8060408385031215611989575f80fd5b6119928361195d565b946020939093013593505050565b6001600160e01b031981168114610cdd575f80fd5b5f602082840312156119c5575f80fd5b81356119d0816119a0565b9392505050565b5f81518084525f5b818110156119fb576020818501810151868301820152016119df565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f6119d060208301846119d7565b5f60208284031215611a3c575f80fd5b5035919050565b5f8060408385031215611a54575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa057611aa0611a63565b604052919050565b5f67ffffffffffffffff821115611ac157611ac1611a63565b5060051b60200190565b5f82601f830112611ada575f80fd5b81356020611aef611aea83611aa8565b611a77565b82815260059290921b84018101918181019086841115611b0d575f80fd5b8286015b84811015611b285780358352918301918301611b11565b509695505050505050565b5f82601f830112611b42575f80fd5b813567ffffffffffffffff811115611b5c57611b5c611a63565b611b6f601f8201601f1916602001611a77565b818152846020838601011115611b83575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a08688031215611bb3575f80fd5b611bbc8661195d565b9450611bca6020870161195d565b9350604086013567ffffffffffffffff80821115611be6575f80fd5b611bf289838a01611acb565b94506060880135915080821115611c07575f80fd5b611c1389838a01611acb565b93506080880135915080821115611c28575f80fd5b50611c3588828901611b33565b9150509295509295909350565b80358015158114611973575f80fd5b5f8060408385031215611c62575f80fd5b82359150611c7260208401611c42565b90509250929050565b5f8060408385031215611c8c575f80fd5b82359150611c726020840161195d565b5f805f8060608587031215611caf575f80fd5b843567ffffffffffffffff80821115611cc6575f80fd5b818701915087601f830112611cd9575f80fd5b813581811115611ce7575f80fd5b8860208260051b8501011115611cfb575f80fd5b60209283019650945090860135925060408601359080821115611d1c575f80fd5b50611d2987828801611acb565b91505092959194509250565b5f60208284031215611d45575f80fd5b6119d08261195d565b5f8060408385031215611d5f575f80fd5b823567ffffffffffffffff80821115611d76575f80fd5b818501915085601f830112611d89575f80fd5b81356020611d99611aea83611aa8565b82815260059290921b84018101918181019089841115611db7575f80fd5b948201945b83861015611ddc57611dcd8661195d565b82529482019490820190611dbc565b96505086013592505080821115611df1575f80fd5b50611dfe85828601611acb565b9150509250929050565b5f8151808452602080850194508084015f5b83811015611e3657815187529582019590820190600101611e1a565b509495945050505050565b602081525f6119d06020830184611e08565b848152836020820152608060408201525f611e7160808301856119d7565b9050821515606083015295945050505050565b5f805f8060808587031215611e97575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611ebb575f80fd5b611ec787828801611b33565b925050611ed660608601611c42565b905092959194509250565b5f8060408385031215611ef2575f80fd5b611efb8361195d565b9150611c7260208401611c42565b5f805f60608486031215611f1b575f80fd5b611f248461195d565b95602085013595506040909401359392505050565b5f8060408385031215611f4a575f80fd5b82359150602083013567ffffffffffffffff811115611f67575f80fd5b611dfe85828601611b33565b5f8060408385031215611f84575f80fd5b611f8d8361195d565b9150611c726020840161195d565b5f805f805f60a08688031215611faf575f80fd5b611fb88661195d565b9450611fc66020870161195d565b93506040860135925060608601359150608086013567ffffffffffffffff811115611fef575f80fd5b611c3588828901611b33565b600181811c9082168061200f57607f821691505b60208210810361202d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176106b0576106b0612033565b808201808211156106b0576106b0612033565b5f8261208b57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f600182016120b5576120b5612033565b5060010190565b601f821115610b6a575f81815260208120601f850160051c810160208610156120e25750805b601f850160051c820191505b81811015610acb578281556001016120ee565b815167ffffffffffffffff81111561211b5761211b611a63565b61212f816121298454611ffb565b846120bc565b602080601f831160018114612162575f841561214b5750858301515b5f19600386901b1c1916600185901b178555610acb565b5f85815260208120601f198616915b8281101561219057888601518255948401946001909101908401612171565b50858210156121ad57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b604081525f6121cf6040830185611e08565b82810360208401526121e18185611e08565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90612223908301846119d7565b979650505050505050565b5f6020828403121561223e575f80fd5b81516119d0816119a0565b6001600160a01b0386811682528516602082015260a0604082018190525f9061227490830186611e08565b82810360608401526122868186611e08565b9050828103608084015261229a81856119d7565b9897505050505050505056fe14ae3c7fe7cf62e752f356e04ae239a52152d61b77b09d1ddb810ad3b9a18dd3a2646970667358221220dc27d96c948bd231f53b562d638f33b10cfaec25604d89c3c86d03d85294147964736f6c63430008140033

Deployed Bytecode

0x6080604052600436106101f0575f3560e01c8063715018a611610108578063b43a76f11161009d578063d547741f1161006d578063d547741f146105f3578063e985e9c514610612578063edc9e66d14610631578063f242432a14610651578063f2fde38b14610670575f80fd5b8063b43a76f114610559578063b8ec76f21461058a578063bd85b039146105a9578063c41b220e146105d4575f80fd5b806395d89b41116100d857806395d89b41146104f45780639743a61914610508578063a217fddf14610527578063a22cb4651461053a575f80fd5b8063715018a6146104765780638da5cb5b1461048a5780639097548d146104a757806391d14854146104d5575f80fd5b80632eb2c2d6116101895780633a24a8ab116101595780633a24a8ab146103c95780633ab1a494146103e85780633ccfd60b146104075780634e1273f41461041b578063552348f214610447575f80fd5b80632eb2c2d61461034d5780632ed8ec711461036c5780632f2ff15d1461038b57806336568abe146103aa575f80fd5b80631581b600116101c45780631581b600146102955780631b2ef1ca146102cc578063248a9ca3146102e15780632a55205a1461030f575f80fd5b8062fdd58e146101f457806301ffc9a71461022657806306fdde03146102555780630e89341c14610276575b5f80fd5b3480156101ff575f80fd5b5061021361020e366004611978565b61068f565b6040519081526020015b60405180910390f35b348015610231575f80fd5b506102456102403660046119b5565b6106b6565b604051901515815260200161021d565b348015610260575f80fd5b506102696106de565b60405161021d9190611a1a565b348015610281575f80fd5b50610269610290366004611a2c565b61076a565b3480156102a0575f80fd5b50600a546102b4906001600160a01b031681565b6040516001600160a01b03909116815260200161021d565b6102df6102da366004611a43565b61080c565b005b3480156102ec575f80fd5b506102136102fb366004611a2c565b5f9081526007602052604090206001015490565b34801561031a575f80fd5b5061032e610329366004611a43565b6109c2565b604080516001600160a01b03909316835260208301919091520161021d565b348015610358575f80fd5b506102df610367366004611b9f565b610a6c565b348015610377575f80fd5b506102df610386366004611c51565b610ad3565b348015610396575f80fd5b506102df6103a5366004611c7b565b610b0d565b3480156103b5575f80fd5b506102df6103c4366004611c7b565b610b37565b3480156103d4575f80fd5b506102df6103e3366004611c9c565b610b6f565b3480156103f3575f80fd5b506102df610402366004611d35565b610c4f565b348015610412575f80fd5b506102df610c79565b348015610426575f80fd5b5061043a610435366004611d4e565b610ce0565b60405161021d9190611e41565b348015610452575f80fd5b50610466610461366004611a2c565b610db3565b60405161021d9493929190611e53565b348015610481575f80fd5b506102df610e64565b348015610495575f80fd5b506005546001600160a01b03166102b4565b3480156104b2575f80fd5b506102136104c1366004611a2c565b5f908152600b602052604090206001015490565b3480156104e0575f80fd5b506102456104ef366004611c7b565b610e77565b3480156104ff575f80fd5b50610269610ea1565b348015610513575f80fd5b506102df610522366004611e84565b610eae565b348015610532575f80fd5b506102135f81565b348015610545575f80fd5b506102df610554366004611ee1565b610f0d565b348015610564575f80fd5b50610245610573366004611a2c565b5f908152600b602052604090206003015460ff1690565b348015610595575f80fd5b506102df6105a4366004611f09565b610f18565b3480156105b4575f80fd5b506102136105c3366004611a2c565b5f908152600b602052604090205490565b3480156105df575f80fd5b506102df6105ee366004611f39565b610f71565b3480156105fe575f80fd5b506102df61060d366004611c7b565b610fa2565b34801561061d575f80fd5b5061024561062c366004611f73565b610fc6565b34801561063c575f80fd5b506102135f805160206122a783398151915281565b34801561065c575f80fd5b506102df61066b366004611f9b565b610ff3565b34801561067b575f80fd5b506102df61068a366004611d35565b611052565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6106c08261108c565b806106cf57506106cf826110b0565b806106b057506106b0826110ff565b600880546106eb90611ffb565b80601f016020809104026020016040519081016040528092919081815260200182805461071790611ffb565b80156107625780601f1061073957610100808354040283529160200191610762565b820191905f5260205f20905b81548152906001019060200180831161074557829003601f168201915b505050505081565b5f818152600b6020526040902060020180546060919061078990611ffb565b80601f01602080910402602001604051908101604052809291908181526020018280546107b590611ffb565b80156108005780601f106107d757610100808354040283529160200191610800565b820191905f5260205f20905b8154815290600101906020018083116107e357829003601f168201915b50505050509050919050565b610814611123565b5f828152600b602052604090206003015460ff166108795760405162461bcd60e51b815260206004820152601c60248201527f74686973206974656d206973206e6f74206f6e2053616c65206e6f770000000060448201526064015b60405180910390fd5b5f81116108c85760405162461bcd60e51b815260206004820152601a60248201527f6e65656420746f206d696e74206f766572203120616d6f756e740000000000006044820152606401610870565b5f828152600b602052604090206001015434906108e6908390612047565b1461092a5760405162461bcd60e51b815260206004820152601460248201527318dbdcdd081a5cc81a5b9cdd59999a58da595b9d60621b6044820152606401610870565b3233146109795760405162461bcd60e51b815260206004820152601c60248201527f6e6f742065787465726e616c6c79206f776e6564206163636f756e74000000006044820152606401610870565b61099333838360405180602001604052805f81525061114d565b5f828152600b6020526040812080548392906109b090849061205e565b909155505060016006555050565b5050565b5f8281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a365750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610a54906001600160601b031687612047565b610a5e9190612071565b915196919550909350505050565b336001600160a01b0386168114801590610a8d5750610a8b8682610fc6565b155b15610abe5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610870565b610acb86868686866111a8565b505050505050565b5f805160206122a7833981519152610aea8161120d565b505f918252600b6020526040909120600301805460ff1916911515919091179055565b5f82815260076020526040902060010154610b278161120d565b610b318383611217565b50505050565b6001600160a01b0381163314610b605760405163334bd91960e11b815260040160405180910390fd5b610b6a82826112a8565b505050565b5f805160206122a7833981519152610b868161120d565b5f805b8351811015610c2457838181518110610ba457610ba4612090565b602002602001015182610bb7919061205e565b9150610c12878783818110610bce57610bce612090565b9050602002016020810190610be39190611d35565b86868481518110610bf657610bf6612090565b602002602001015160405180602001604052805f81525061114d565b80610c1c816120a4565b915050610b89565b505f848152600b602052604081208054839290610c4290849061205e565b9091555050505050505050565b610c57611313565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610c81611313565b600a546040515f916001600160a01b03169047908381818185875af1925050503d805f8114610ccb576040519150601f19603f3d011682016040523d82523d5f602084013e610cd0565b606091505b5050905080610cdd575f80fd5b50565b60608151835114610d115781518351604051635b05999160e01b815260048101929092526024820152604401610870565b5f835167ffffffffffffffff811115610d2c57610d2c611a63565b604051908082528060200260200182016040528015610d55578160200160208202803683370190505b5090505f5b8451811015610dab57602080820286010151610d7e9060208084028701015161068f565b828281518110610d9057610d90612090565b6020908102919091010152610da4816120a4565b9050610d5a565b509392505050565b600b6020525f908152604090208054600182015460028301805492939192610dda90611ffb565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0690611ffb565b8015610e515780601f10610e2857610100808354040283529160200191610e51565b820191905f5260205f20905b815481529060010190602001808311610e3457829003601f168201915b5050506003909301549192505060ff1684565b610e6c611313565b610e755f611340565b565b5f9182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600980546106eb90611ffb565b5f805160206122a7833981519152610ec58161120d565b5f858152600b6020526040902060018101859055600201610ee68482612101565b50505f938452600b6020526040909320600301805460ff1916931515939093179092555050565b6109be338383611391565b5f805160206122a7833981519152610f2f8161120d565b610f4984848460405180602001604052805f81525061114d565b5f838152600b602052604081208054849290610f6690849061205e565b909155505050505050565b5f805160206122a7833981519152610f888161120d565b5f838152600b60205260409020600201610b318382612101565b5f82815260076020526040902060010154610fbc8161120d565b610b3183836112a8565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b336001600160a01b038616811480159061101457506110128682610fc6565b155b156110455760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610870565b610acb8686868686611425565b61105a611313565b6001600160a01b03811661108357604051631e4fbdf760e01b81525f6004820152602401610870565b610cdd81611340565b5f6001600160e01b03198216637965db0b60e01b14806106b057506106b0826110ff565b5f6001600160e01b03198216636cdb3d1360e11b14806110e057506001600160e01b031982166303a24d0760e21b145b806106b057506301ffc9a760e01b6001600160e01b03198316146106b0565b5f6001600160e01b0319821663152a902d60e11b14806106b057506106b0826110b0565b60026006540361114657604051633ee5aeb560e01b815260040160405180910390fd5b6002600655565b6001600160a01b03841661117657604051632bfa23e760e11b81525f6004820152602401610870565b60408051600180825260208201869052818301908152606082018590526080820190925290610acb5f878484876114b1565b6001600160a01b0384166111d157604051632bfa23e760e11b81525f6004820152602401610870565b6001600160a01b0385166111f957604051626a0d4560e21b81525f6004820152602401610870565b61120685858585856114b1565b5050505050565b610cdd8133611504565b5f6112228383610e77565b6112a1575f8381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556112593390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106b0565b505f6106b0565b5f6112b38383610e77565b156112a1575f8381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106b0565b6005546001600160a01b03163314610e755760405163118cdaa760e01b8152336004820152602401610870565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382166113b95760405162ced3e160e81b81525f6004820152602401610870565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661144e57604051632bfa23e760e11b81525f6004820152602401610870565b6001600160a01b03851661147657604051626a0d4560e21b81525f6004820152602401610870565b604080516001808252602082018690528183019081526060820185905260808201909252906114a887878484876114b1565b50505050505050565b6114bd8585858561153d565b6001600160a01b0384161561120657825133906001036114f657602084810151908401516114ef838989858589611755565b5050610acb565b610acb818787878787611876565b61150e8282610e77565b6109be5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610870565b805182511461156c5781518151604051635b05999160e01b815260048101929092526024820152604401610870565b335f5b8351811015611677576020818102858101820151908501909101516001600160a01b03881615611620575f828152602081815260408083206001600160a01b038c168452909152902054818110156115fa576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610870565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b03871615611664575f828152602081815260408083206001600160a01b038b1684529091528120805483929061165e90849061205e565b90915550505b505080611670906120a4565b905061156f565b5082516001036116f75760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516116e8929190918252602082015260400190565b60405180910390a45050611206565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117469291906121bd565b60405180910390a45050505050565b6001600160a01b0384163b15610acb5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061179990899089908890889088906004016121ea565b6020604051808303815f875af19250505080156117d3575060408051601f3d908101601f191682019092526117d09181019061222e565b60015b61183a573d808015611800576040519150601f19603f3d011682016040523d82523d5f602084013e611805565b606091505b5080515f0361183257604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b146114a857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b6001600160a01b0384163b15610acb5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906118ba9089908990889088908890600401612249565b6020604051808303815f875af19250505080156118f4575060408051601f3d908101601f191682019092526118f19181019061222e565b60015b611921573d808015611800576040519150601f19603f3d011682016040523d82523d5f602084013e611805565b6001600160e01b0319811663bc197c8160e01b146114a857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610870565b80356001600160a01b0381168114611973575f80fd5b919050565b5f8060408385031215611989575f80fd5b6119928361195d565b946020939093013593505050565b6001600160e01b031981168114610cdd575f80fd5b5f602082840312156119c5575f80fd5b81356119d0816119a0565b9392505050565b5f81518084525f5b818110156119fb576020818501810151868301820152016119df565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f6119d060208301846119d7565b5f60208284031215611a3c575f80fd5b5035919050565b5f8060408385031215611a54575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa057611aa0611a63565b604052919050565b5f67ffffffffffffffff821115611ac157611ac1611a63565b5060051b60200190565b5f82601f830112611ada575f80fd5b81356020611aef611aea83611aa8565b611a77565b82815260059290921b84018101918181019086841115611b0d575f80fd5b8286015b84811015611b285780358352918301918301611b11565b509695505050505050565b5f82601f830112611b42575f80fd5b813567ffffffffffffffff811115611b5c57611b5c611a63565b611b6f601f8201601f1916602001611a77565b818152846020838601011115611b83575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a08688031215611bb3575f80fd5b611bbc8661195d565b9450611bca6020870161195d565b9350604086013567ffffffffffffffff80821115611be6575f80fd5b611bf289838a01611acb565b94506060880135915080821115611c07575f80fd5b611c1389838a01611acb565b93506080880135915080821115611c28575f80fd5b50611c3588828901611b33565b9150509295509295909350565b80358015158114611973575f80fd5b5f8060408385031215611c62575f80fd5b82359150611c7260208401611c42565b90509250929050565b5f8060408385031215611c8c575f80fd5b82359150611c726020840161195d565b5f805f8060608587031215611caf575f80fd5b843567ffffffffffffffff80821115611cc6575f80fd5b818701915087601f830112611cd9575f80fd5b813581811115611ce7575f80fd5b8860208260051b8501011115611cfb575f80fd5b60209283019650945090860135925060408601359080821115611d1c575f80fd5b50611d2987828801611acb565b91505092959194509250565b5f60208284031215611d45575f80fd5b6119d08261195d565b5f8060408385031215611d5f575f80fd5b823567ffffffffffffffff80821115611d76575f80fd5b818501915085601f830112611d89575f80fd5b81356020611d99611aea83611aa8565b82815260059290921b84018101918181019089841115611db7575f80fd5b948201945b83861015611ddc57611dcd8661195d565b82529482019490820190611dbc565b96505086013592505080821115611df1575f80fd5b50611dfe85828601611acb565b9150509250929050565b5f8151808452602080850194508084015f5b83811015611e3657815187529582019590820190600101611e1a565b509495945050505050565b602081525f6119d06020830184611e08565b848152836020820152608060408201525f611e7160808301856119d7565b9050821515606083015295945050505050565b5f805f8060808587031215611e97575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611ebb575f80fd5b611ec787828801611b33565b925050611ed660608601611c42565b905092959194509250565b5f8060408385031215611ef2575f80fd5b611efb8361195d565b9150611c7260208401611c42565b5f805f60608486031215611f1b575f80fd5b611f248461195d565b95602085013595506040909401359392505050565b5f8060408385031215611f4a575f80fd5b82359150602083013567ffffffffffffffff811115611f67575f80fd5b611dfe85828601611b33565b5f8060408385031215611f84575f80fd5b611f8d8361195d565b9150611c726020840161195d565b5f805f805f60a08688031215611faf575f80fd5b611fb88661195d565b9450611fc66020870161195d565b93506040860135925060608601359150608086013567ffffffffffffffff811115611fef575f80fd5b611c3588828901611b33565b600181811c9082168061200f57607f821691505b60208210810361202d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176106b0576106b0612033565b808201808211156106b0576106b0612033565b5f8261208b57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f600182016120b5576120b5612033565b5060010190565b601f821115610b6a575f81815260208120601f850160051c810160208610156120e25750805b601f850160051c820191505b81811015610acb578281556001016120ee565b815167ffffffffffffffff81111561211b5761211b611a63565b61212f816121298454611ffb565b846120bc565b602080601f831160018114612162575f841561214b5750858301515b5f19600386901b1c1916600185901b178555610acb565b5f85815260208120601f198616915b8281101561219057888601518255948401946001909101908401612171565b50858210156121ad57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b604081525f6121cf6040830185611e08565b82810360208401526121e18185611e08565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90612223908301846119d7565b979650505050505050565b5f6020828403121561223e575f80fd5b81516119d0816119a0565b6001600160a01b0386811682528516602082015260a0604082018190525f9061227490830186611e08565b82810360608401526122868186611e08565b9050828103608084015261229a81856119d7565b9897505050505050505056fe14ae3c7fe7cf62e752f356e04ae239a52152d61b77b09d1ddb810ad3b9a18dd3a2646970667358221220dc27d96c948bd231f53b562d638f33b10cfaec25604d89c3c86d03d85294147964736f6c63430008140033

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

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