ETH Price: $3,395.92 (-1.08%)

Token

FEWO Digital Fashion (FDF)
 

Overview

Max Total Supply

889 FDF

Holders

130

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
operationivy.eth
0x97dc6bf9873020953127f94794171f54e6310192
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:
BurnAndMint

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : FEWO_Digital_Fashion.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
                                   FEWO DiGITAL FASHiON
                           FEWO DiGITAL FASHiON
                  FEWO DiGITAL FASHiON
            \\\\\\\\\\\\\\\\\\\\\     \\\\\\\\\\\\\\\\\      .
               \\\\\\\\\\                     \\\\\\\\\\\
                  \\        \\\wWWWWWWWww.          \\\\\\\    `
                      \\ \\\WWW"""::::::""WWw         \\\\\    ,
                 \  \\ \\wWWW" .,wWWWWWWw..  WWw.        \\\
              ` ` \\\\\wWW"   W888888888888W  "WXX.       `\\
               . `.\\wWW"   M88888i#####888"8M  "WWX.      `\`
              \ \` wWWW"   M88888##d###"w8oo88M   WWMX.     `\
               ` \wWWW"   :W88888####*  #88888M;   WWIZ.     ``
           - -- ffFEWO"     W88888####42##88888W     FASHiON .
               / "WIZ       !!FEWO######98888W       WWXx.
              ' '/"Wm,       fashionfashionfas        >WWR" :
               '   "WMm.      "WW88888888WW"        mmMM" '
                     "Wmm.       "WWWWWW"        ,whAT?"
                      ""MMMmm..            _,mMMMM"""
                           FEWO DiGITAL FASHiON'''''
                           FEWO DiGITAL FASHiON'''
                           FEWO DiGITAL FASHiON
                           FEWO___________
                           FEWO ----------                           
   ____ ___ _   __  _ 
  / __// _////7/ /,' \
 / _/ / _/| V V // o |
/_/  /___/|_n_,' |_,' 
________________________      __________   
\_   _____/\_   _____/  \    /  \_____  \  
 |    __)   |    __)_\   \/\/   //   |   \ 
 |     \    |        \\        //    |    \
 \___  /   /_______  / \__/\  / \_______  /
     \/            \/       \/          \/ 
                                              .-'''-.    
                                             '   _    \  
               __.....__                   /   /` '.   \ 
     _.._  .-''         '.         _     _.   |     \  ' 
   .' .._|/     .-''"'-.  `. /\    \\   //|   '      |  '
   | '   /     /________\   \`\\  //\\ // \    \     / / 
 __| |__ |                  |  \`//  \'/   `.   ` ..' /  
|__   __|\    .-------------'   \|   |/       '-...-'`   
   | |    \    '-.____...---.    '                       
   | |     `.             .'                             
   | |       `''-...... -'                               
   | |                                                   
   |_|                                                   
 ___________  ____                               ______   
|            |            `.               .'  .~      ~. 
|______      |______        `.           .'   |          |
|            |                `.   .   .'     |          |
|            |___________       `.' `.'        `.______.' 
DIGITAL FASHION
DIGITAL FASHION
DIGITAL FASHION
DIGITAL FASHION
DIGITAL FASHION

**/
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

interface IExternalContract {
    function burn(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;

    function balanceOf(
        address account,
        uint256 id
    ) external view returns (uint256);
}

contract BurnAndMint is ERC1155, Ownable, ReentrancyGuard {
    IExternalContract public flowers;

    // Mapping from token ID in this contract to associated token IDs in the new contract
    mapping(uint256 => uint256[]) public associatedTokenIDs;

    // Address of the external ERC1155 contract to interact with
    address public externalContractAddress = 0xb995e2A32C2a002F52a9D624B8dCbc8fB68B3E9f;

    // Boolean flag to control whether minting is active
    bool public isMintingActive = true;
    string private baseURI = "https://storage.googleapis.com/fewo_metadata/JSON/";
    string public name = "FEWO Digital Fashion";
    string public symbol = "FDF";

    constructor() ERC1155("") Ownable(msg.sender) {
        flowers = IExternalContract(externalContractAddress);
        // instantiate the associated token IDs for each token ID in this contract
        associatedTokenIDs[2] = [1, 2, 3, 4, 5, 6, 7];
        associatedTokenIDs[3] = [8, 9, 10, 11, 12, 13, 14];
        associatedTokenIDs[4] = [15, 16, 17, 18, 19, 20, 21];
        associatedTokenIDs[5] = [22, 23, 24, 25, 26, 27, 28];
        associatedTokenIDs[6] = [29, 30, 31, 32, 33, 34, 35];
    }

    // Function to set the address of the external ERC1155 contract
    function setExternalContractAddress(
        address _externalContractAddress
    ) external onlyOwner {
        externalContractAddress = _externalContractAddress;
    }

    // Function to burn tokens in the external contract and mint new ones simultaneously
    function burnAndMint(
        uint256[] memory _burnTokenIds,
        uint256[] memory _mintTokenIds,
        uint256[] memory _amounts
    ) external nonReentrant {
        require(isMintingActive, "Minting is not active");
        require(
            _burnTokenIds.length == _mintTokenIds.length &&
                _burnTokenIds.length == _amounts.length,
            "Arrays must be of the same length"
        );
        require(
            externalContractAddress != address(0),
            "External contract address not set"
        );

        for (uint256 i = 0; i < _burnTokenIds.length; i++) {
            if (_burnTokenIds[i] == 0 || _mintTokenIds[i] == 0) {
                continue;
            }

            require(
                flowers.balanceOf(msg.sender, _burnTokenIds[i]) >= _amounts[i],
                "Insufficient balance to burn in external contract"
            );
            require(
                isAssociatedToken(_burnTokenIds[i], _mintTokenIds[i]),
                "Token ID not associated"
            );

            // Create temporary arrays for the single id and amount
            uint256[] memory singleIdArray = new uint256[](1);
            singleIdArray[0] = _burnTokenIds[i];
            uint256[] memory singleAmountArray = new uint256[](1);
            singleAmountArray[0] = _amounts[i];

            // Burn tokens in the external contract using the temporary arrays
            flowers.burn(msg.sender, singleIdArray, singleAmountArray);

            // Mint new tokens in this contract
            _mint(msg.sender, _mintTokenIds[i], _amounts[i], "");
        }
    }

    // Function to add associated token IDs for a specific token ID in this contract
    function addAssociatedTokenID(
        uint256 _tokenId,
        uint256[] memory _newAssociatedTokenIds
    ) external onlyOwner {
        require(_tokenId != 0, "Token ID 0 is not valid for association");
        for (uint256 i = 0; i < _newAssociatedTokenIds.length; i++) {
            require(
                _newAssociatedTokenIds[i] != 0,
                "Cannot associate to Token ID 0"
            );
            associatedTokenIDs[_tokenId].push(_newAssociatedTokenIds[i]);
        }
    }

    // Function to check if a token ID is associated with another token ID
    function isAssociatedToken(
        uint256 _tokenId,
        uint256 _associatedTokenId
    ) public view returns (bool) {
        for (uint256 i = 0; i < associatedTokenIDs[_tokenId].length; i++) {
            if (associatedTokenIDs[_tokenId][i] == _associatedTokenId) {
                return true;
            }
        }
        return false;
    }

    // Function to set the minting active flag
    function setMintingActive(bool _isActive) external onlyOwner {
        isMintingActive = _isActive;
    }

    // Sets the base URI for all token types
    function updateBaseUri(string memory _baseURI) external onlyOwner {
        baseURI = _baseURI;
    }

    function uri(uint256 typeId) public view override returns (string memory) {
        return
            bytes(baseURI).length > 0
                ? string(abi.encodePacked(baseURI, Strings.toString(typeId)))
                : baseURI;
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

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

File 3 of 16 : 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 4 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

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

File 12 of 16 : 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 16 : 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 16 : 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 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 16 of 16 : 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":[{"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":"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":"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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256[]","name":"_newAssociatedTokenIds","type":"uint256[]"}],"name":"addAssociatedTokenID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"associatedTokenIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_burnTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_mintTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnAndMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"externalContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flowers","outputs":[{"internalType":"contract IExternalContract","name":"","type":"address"}],"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":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_associatedTokenId","type":"uint256"}],"name":"isAssociatedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"address","name":"_externalContractAddress","type":"address"}],"name":"setExternalContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setMintingActive","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"updateBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

600780546001600160a81b0319167401b995e2a32c2a002f52a9d624b8dcbc8fb68b3e9f17905560e060405260326080818152906200259660a03960089062000049908262000508565b5060408051808201909152601481527f4645574f204469676974616c2046617368696f6e00000000000000000000000060208201526009906200008d908262000508565b5060408051808201909152600381526223222360e91b6020820152600a90620000b7908262000508565b50348015620000c4575f80fd5b5060408051602081019091525f81523390620000e0816200039e565b506001600160a01b0381166200010f57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6200011a81620003b0565b506001600481815560078054600580546001600160a01b0319166001600160a01b039092169190911781556040805160e0810182529485526002602080870182905260039287019290925260608601949094526080850191909152600660a0850181905260c085018390525f9390935291909152620001bb917f8819ef417987f8ae7a81f42cdfb18815282fe989326fbff903d13cf0e03ace299162000401565b506040805160e081018252600881526009602080830191909152600a92820192909252600b6060820152600c6080820152600d60a0820152600e60c082015260035f52600690915262000232907f75f96ab15d697e93042dc45b5c896c4b27e89bb6eaf39475c5c371cb2513f7d290600762000401565b506040805160e081018252600f815260106020808301919091526011928201929092526012606082015260136080820152601460a0820152601560c082015260045f526006909152620002a9907fc5069e24aaadb2addc3e52e868fcf3f4f8acf5a87e24300992fd4540c2a87eed90600762000401565b506040805160e08101825260168152601760208083019190915260189282019290925260196060820152601a6080820152601b60a0820152601c60c082015260055f52600690915262000320907fbfd358e93f18da3ed276c3afdbdba00b8f0b6008a03476a6a86bd6320ee6938b90600762000401565b506040805160e081018252601d8152601e602080830191909152601f928201929092526060810182905260216080820152602260a0820152602360c082015260065f81905290915262000397907f697b2bd7bb2984c4e0dc14c79c987d37818484a62958b9c45a0e8b962f20650f90600762000401565b50620005d4565b6002620003ac828262000508565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b828054828255905f5260205f2090810192821562000442579160200282015b8281111562000442578251829060ff1690559160200191906001019062000420565b506200045092915062000454565b5090565b5b8082111562000450575f815560010162000455565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200049357607f821691505b602082108103620004b257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200050357805f5260205f20601f840160051c81016020851015620004df5750805b601f840160051c820191505b8181101562000500575f8155600101620004eb565b50505b505050565b81516001600160401b038111156200052457620005246200046a565b6200053c816200053584546200047e565b84620004b8565b602080601f83116001811462000572575f84156200055a5750858301515b5f19600386901b1c1916600185901b178555620005cc565b5f85815260208120601f198616915b82811015620005a25788860151825594840194600190910190840162000581565b5085821015620005c057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b611fb480620005e25f395ff3fe608060405234801561000f575f80fd5b5060043610610147575f3560e01c80636ac437b0116100bf578063a22cb46511610079578063a22cb465146102c3578063c27df471146102d6578063d04ef285146102e9578063e985e9c5146102fc578063f242432a1461030f578063f2fde38b14610322575f80fd5b80636ac437b014610268578063706e3da21461027c578063715018a61461028f5780638da5cb5b1461029757806395d89b41146102a857806396b1a6cd146102b0575f80fd5b80632176d50a116101105780632176d50a146101d157806328e0e12c146101fc5780632eb2c2d61461020f57806339f7e37f146102225780633f589e3c146102355780634e1273f414610248575f80fd5b8062fdd58e1461014b57806301ffc9a71461017157806306fdde03146101945780630e89341c146101a957806320e17da9146101bc575b5f80fd5b61015e610159366004611669565b610335565b6040519081526020015b60405180910390f35b61018461017f3660046116a6565b61035c565b6040519015158152602001610168565b61019c6103ab565b6040516101689190611715565b61019c6101b7366004611727565b610437565b6101cf6101ca366004611812565b61050d565b005b6007546101e4906001600160a01b031681565b6040516001600160a01b039091168152602001610168565b61015e61020a366004611894565b6109b4565b6101cf61021d366004611927565b6109df565b6101cf6102303660046119ca565b610a46565b610184610243366004611894565b610a5e565b61025b610256366004611a17565b610ac1565b6040516101689190611b0b565b60075461018490600160a01b900460ff1681565b6005546101e4906001600160a01b031681565b6101cf610b8c565b6003546001600160a01b03166101e4565b61019c610b9f565b6101cf6102be366004611b1d565b610bac565b6101cf6102d1366004611b66565b610cd1565b6101cf6102e4366004611b97565b610cdc565b6101cf6102f7366004611bb0565b610d06565b61018461030a366004611bc9565b610d2c565b6101cf61031d366004611bf1565b610d59565b6101cf610330366004611b97565b610db8565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216636cdb3d1360e11b148061038c57506001600160e01b031982166303a24d0760e21b145b8061035657506301ffc9a760e01b6001600160e01b0319831614610356565b600980546103b890611c51565b80601f01602080910402602001604051908101604052809291908181526020018280546103e490611c51565b801561042f5780601f106104065761010080835404028352916020019161042f565b820191905f5260205f20905b81548152906001019060200180831161041257829003601f168201915b505050505081565b60605f6008805461044790611c51565b9050116104dc576008805461045b90611c51565b80601f016020809104026020016040519081016040528092919081815260200182805461048790611c51565b80156104d25780601f106104a9576101008083540402835291602001916104d2565b820191905f5260205f20905b8154815290600101906020018083116104b557829003601f168201915b5050505050610356565b60086104e783610df5565b6040516020016104f8929190611c89565b60405160208183030381529060405292915050565b610515610e85565b600754600160a01b900460ff1661056b5760405162461bcd60e51b81526020600482015260156024820152744d696e74696e67206973206e6f742061637469766560581b60448201526064015b60405180910390fd5b8151835114801561057d575080518351145b6105d35760405162461bcd60e51b815260206004820152602160248201527f417272617973206d757374206265206f66207468652073616d65206c656e67746044820152600d60fb1b6064820152608401610562565b6007546001600160a01b03166106355760405162461bcd60e51b815260206004820152602160248201527f45787465726e616c20636f6e74726163742061646472657373206e6f742073656044820152601d60fa1b6064820152608401610562565b5f5b83518110156109a45783818151811061065257610652611d0c565b60200260200101515f148061067f575082818151811061067457610674611d0c565b60200260200101515f145b61099c5781818151811061069557610695611d0c565b602002602001015160055f9054906101000a90046001600160a01b03166001600160a01b031662fdd58e338785815181106106d2576106d2611d0c565b60200260200101516040518363ffffffff1660e01b815260040161070b9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa158015610726573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061074a9190611d20565b10156107b25760405162461bcd60e51b815260206004820152603160248201527f496e73756666696369656e742062616c616e636520746f206275726e20696e20604482015270195e1d195c9b985b0818dbdb9d1c9858dd607a1b6064820152608401610562565b6107ee8482815181106107c7576107c7611d0c565b60200260200101518483815181106107e1576107e1611d0c565b6020026020010151610a5e565b61083a5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e204944206e6f74206173736f6369617465640000000000000000006044820152606401610562565b6040805160018082528183019092525f916020808301908036833701905050905084828151811061086d5761086d611d0c565b6020026020010151815f8151811061088757610887611d0c565b60209081029190910101526040805160018082528183019092525f918160200160208202803683370190505090508383815181106108c7576108c7611d0c565b6020026020010151815f815181106108e1576108e1611d0c565b6020908102919091010152600554604051633db0f8ab60e01b81526001600160a01b0390911690633db0f8ab9061092090339086908690600401611d37565b5f604051808303815f87803b158015610937575f80fd5b505af1158015610949573d5f803e3d5ffd5b505050506109993386858151811061096357610963611d0c565b602002602001015186868151811061097d5761097d611d0c565b602002602001015160405180602001604052805f815250610eaf565b50505b600101610637565b506109af6001600455565b505050565b6006602052815f5260405f2081815481106109cd575f80fd5b905f5260205f20015f91509150505481565b336001600160a01b0386168114801590610a0057506109fe8682610d2c565b155b15610a315760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610562565b610a3e8686868686610f0a565b505050505050565b610a4e610f6f565b6008610a5a8282611dba565b5050565b5f805b5f84815260066020526040902054811015610ab8575f848152600660205260409020805484919083908110610a9857610a98611d0c565b905f5260205f20015403610ab0576001915050610356565b600101610a61565b505f9392505050565b60608151835114610af25781518351604051635b05999160e01b815260048101929092526024820152604401610562565b5f835167ffffffffffffffff811115610b0d57610b0d61173e565b604051908082528060200260200182016040528015610b36578160200160208202803683370190505b5090505f5b8451811015610b8457602080820286010151610b5f90602080840287010151610335565b828281518110610b7157610b71611d0c565b6020908102919091010152600101610b3b565b509392505050565b610b94610f6f565b610b9d5f610f9c565b565b600a80546103b890611c51565b610bb4610f6f565b815f03610c135760405162461bcd60e51b815260206004820152602760248201527f546f6b656e2049442030206973206e6f742076616c696420666f72206173736f60448201526631b4b0ba34b7b760c91b6064820152608401610562565b5f5b81518110156109af57818181518110610c3057610c30611d0c565b60200260200101515f03610c865760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f74206173736f636961746520746f20546f6b656e204944203000006044820152606401610562565b5f8381526006602052604090208251839083908110610ca757610ca7611d0c565b6020908102919091018101518254600181810185555f948552929093209092019190915501610c15565b610a5a338383610fed565b610ce4610f6f565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610d0e610f6f565b60078054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b336001600160a01b0386168114801590610d7a5750610d788682610d2c565b155b15610dab5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610562565b610a3e8686868686611081565b610dc0610f6f565b6001600160a01b038116610de957604051631e4fbdf760e01b81525f6004820152602401610562565b610df281610f9c565b50565b60605f610e018361110d565b60010190505f8167ffffffffffffffff811115610e2057610e2061173e565b6040519080825280601f01601f191660200182016040528015610e4a576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610e5457509392505050565b600260045403610ea857604051633ee5aeb560e01b815260040160405180910390fd5b6002600455565b6001600160a01b038416610ed857604051632bfa23e760e11b81525f6004820152602401610562565b60408051600180825260208201869052818301908152606082018590526080820190925290610a3e5f878484876111e4565b6001600160a01b038416610f3357604051632bfa23e760e11b81525f6004820152602401610562565b6001600160a01b038516610f5b57604051626a0d4560e21b81525f6004820152602401610562565b610f6885858585856111e4565b5050505050565b6003546001600160a01b03163314610b9d5760405163118cdaa760e01b8152336004820152602401610562565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382166110155760405162ced3e160e81b81525f6004820152602401610562565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110aa57604051632bfa23e760e11b81525f6004820152602401610562565b6001600160a01b0385166110d257604051626a0d4560e21b81525f6004820152602401610562565b6040805160018082526020820186905281830190815260608201859052608082019092529061110487878484876111e4565b50505050505050565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061114b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611177576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061119557662386f26fc10000830492506010015b6305f5e10083106111ad576305f5e100830492506008015b61271083106111c157612710830492506004015b606483106111d3576064830492506002015b600a83106103565760010192915050565b6111f085858585611237565b6001600160a01b03841615610f6857825133906001036112295760208481015190840151611222838989858589611446565b5050610a3e565b610a3e818787878787611567565b80518251146112665781518151604051635b05999160e01b815260048101929092526024820152604401610562565b335f5b8351811015611368576020818102858101820151908501909101516001600160a01b0388161561131a575f828152602081815260408083206001600160a01b038c168452909152902054818110156112f4576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610562565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b0387161561135e575f828152602081815260408083206001600160a01b038b16845290915281208054839290611358908490611e76565b90915550505b5050600101611269565b5082516001036113e85760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516113d9929190918252602082015260400190565b60405180910390a45050610f68565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611437929190611e95565b60405180910390a45050505050565b6001600160a01b0384163b15610a3e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061148a9089908990889088908890600401611ec2565b6020604051808303815f875af19250505080156114c4575060408051601f3d908101601f191682019092526114c191810190611f06565b60015b61152b573d8080156114f1576040519150601f19603f3d011682016040523d82523d5f602084013e6114f6565b606091505b5080515f0361152357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461110457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b6001600160a01b0384163b15610a3e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115ab9089908990889088908890600401611f21565b6020604051808303815f875af19250505080156115e5575060408051601f3d908101601f191682019092526115e291810190611f06565b60015b611612573d8080156114f1576040519150601f19603f3d011682016040523d82523d5f602084013e6114f6565b6001600160e01b0319811663bc197c8160e01b1461110457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b80356001600160a01b0381168114611664575f80fd5b919050565b5f806040838503121561167a575f80fd5b6116838361164e565b946020939093013593505050565b6001600160e01b031981168114610df2575f80fd5b5f602082840312156116b6575f80fd5b81356116c181611691565b9392505050565b5f5b838110156116e25781810151838201526020016116ca565b50505f910152565b5f81518084526117018160208601602086016116c8565b601f01601f19169290920160200192915050565b602081525f6116c160208301846116ea565b5f60208284031215611737575f80fd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561177b5761177b61173e565b604052919050565b5f67ffffffffffffffff82111561179c5761179c61173e565b5060051b60200190565b5f82601f8301126117b5575f80fd5b813560206117ca6117c583611783565b611752565b8083825260208201915060208460051b8701019350868411156117eb575f80fd5b602086015b8481101561180757803583529183019183016117f0565b509695505050505050565b5f805f60608486031215611824575f80fd5b833567ffffffffffffffff8082111561183b575f80fd5b611847878388016117a6565b9450602086013591508082111561185c575f80fd5b611868878388016117a6565b9350604086013591508082111561187d575f80fd5b5061188a868287016117a6565b9150509250925092565b5f80604083850312156118a5575f80fd5b50508035926020909101359150565b5f67ffffffffffffffff8311156118cd576118cd61173e565b6118e0601f8401601f1916602001611752565b90508281528383830111156118f3575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112611918575f80fd5b6116c1838335602085016118b4565b5f805f805f60a0868803121561193b575f80fd5b6119448661164e565b94506119526020870161164e565b9350604086013567ffffffffffffffff8082111561196e575f80fd5b61197a89838a016117a6565b9450606088013591508082111561198f575f80fd5b61199b89838a016117a6565b935060808801359150808211156119b0575f80fd5b506119bd88828901611909565b9150509295509295909350565b5f602082840312156119da575f80fd5b813567ffffffffffffffff8111156119f0575f80fd5b8201601f81018413611a00575f80fd5b611a0f848235602084016118b4565b949350505050565b5f8060408385031215611a28575f80fd5b823567ffffffffffffffff80821115611a3f575f80fd5b818501915085601f830112611a52575f80fd5b81356020611a626117c583611783565b82815260059290921b84018101918181019089841115611a80575f80fd5b948201945b83861015611aa557611a968661164e565b82529482019490820190611a85565b96505086013592505080821115611aba575f80fd5b50611ac7858286016117a6565b9150509250929050565b5f815180845260208085019450602084015f5b83811015611b0057815187529582019590820190600101611ae4565b509495945050505050565b602081525f6116c16020830184611ad1565b5f8060408385031215611b2e575f80fd5b82359150602083013567ffffffffffffffff811115611b4b575f80fd5b611ac7858286016117a6565b80358015158114611664575f80fd5b5f8060408385031215611b77575f80fd5b611b808361164e565b9150611b8e60208401611b57565b90509250929050565b5f60208284031215611ba7575f80fd5b6116c18261164e565b5f60208284031215611bc0575f80fd5b6116c182611b57565b5f8060408385031215611bda575f80fd5b611be38361164e565b9150611b8e6020840161164e565b5f805f805f60a08688031215611c05575f80fd5b611c0e8661164e565b9450611c1c6020870161164e565b93506040860135925060608601359150608086013567ffffffffffffffff811115611c45575f80fd5b6119bd88828901611909565b600181811c90821680611c6557607f821691505b602082108103611c8357634e487b7160e01b5f52602260045260245ffd5b50919050565b5f808454611c9681611c51565b60018281168015611cae5760018114611cc357611cef565b60ff1984168752821515830287019450611cef565b885f526020805f205f5b85811015611ce65781548a820152908401908201611ccd565b50505082870194505b505050508351611d038183602088016116c8565b01949350505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611d30575f80fd5b5051919050565b6001600160a01b03841681526060602082018190525f90611d5a90830185611ad1565b8281036040840152611d6c8185611ad1565b9695505050505050565b601f8211156109af57805f5260205f20601f840160051c81016020851015611d9b5750805b601f840160051c820191505b81811015610f68575f8155600101611da7565b815167ffffffffffffffff811115611dd457611dd461173e565b611de881611de28454611c51565b84611d76565b602080601f831160018114611e1b575f8415611e045750858301515b5f19600386901b1c1916600185901b178555610a3e565b5f85815260208120601f198616915b82811015611e4957888601518255948401946001909101908401611e2a565b5085821015611e6657878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561035657634e487b7160e01b5f52601160045260245ffd5b604081525f611ea76040830185611ad1565b8281036020840152611eb98185611ad1565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90611efb908301846116ea565b979650505050505050565b5f60208284031215611f16575f80fd5b81516116c181611691565b6001600160a01b0386811682528516602082015260a0604082018190525f90611f4c90830186611ad1565b8281036060840152611f5e8186611ad1565b90508281036080840152611f7281856116ea565b9897505050505050505056fea26469706673582212207d0ad74b4ae71faa3045c3ad0dacffb7b71a108bd3c7af81b17c882a9146bd5664736f6c6343000816003368747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f6665776f5f6d657461646174612f4a534f4e2f

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610147575f3560e01c80636ac437b0116100bf578063a22cb46511610079578063a22cb465146102c3578063c27df471146102d6578063d04ef285146102e9578063e985e9c5146102fc578063f242432a1461030f578063f2fde38b14610322575f80fd5b80636ac437b014610268578063706e3da21461027c578063715018a61461028f5780638da5cb5b1461029757806395d89b41146102a857806396b1a6cd146102b0575f80fd5b80632176d50a116101105780632176d50a146101d157806328e0e12c146101fc5780632eb2c2d61461020f57806339f7e37f146102225780633f589e3c146102355780634e1273f414610248575f80fd5b8062fdd58e1461014b57806301ffc9a71461017157806306fdde03146101945780630e89341c146101a957806320e17da9146101bc575b5f80fd5b61015e610159366004611669565b610335565b6040519081526020015b60405180910390f35b61018461017f3660046116a6565b61035c565b6040519015158152602001610168565b61019c6103ab565b6040516101689190611715565b61019c6101b7366004611727565b610437565b6101cf6101ca366004611812565b61050d565b005b6007546101e4906001600160a01b031681565b6040516001600160a01b039091168152602001610168565b61015e61020a366004611894565b6109b4565b6101cf61021d366004611927565b6109df565b6101cf6102303660046119ca565b610a46565b610184610243366004611894565b610a5e565b61025b610256366004611a17565b610ac1565b6040516101689190611b0b565b60075461018490600160a01b900460ff1681565b6005546101e4906001600160a01b031681565b6101cf610b8c565b6003546001600160a01b03166101e4565b61019c610b9f565b6101cf6102be366004611b1d565b610bac565b6101cf6102d1366004611b66565b610cd1565b6101cf6102e4366004611b97565b610cdc565b6101cf6102f7366004611bb0565b610d06565b61018461030a366004611bc9565b610d2c565b6101cf61031d366004611bf1565b610d59565b6101cf610330366004611b97565b610db8565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216636cdb3d1360e11b148061038c57506001600160e01b031982166303a24d0760e21b145b8061035657506301ffc9a760e01b6001600160e01b0319831614610356565b600980546103b890611c51565b80601f01602080910402602001604051908101604052809291908181526020018280546103e490611c51565b801561042f5780601f106104065761010080835404028352916020019161042f565b820191905f5260205f20905b81548152906001019060200180831161041257829003601f168201915b505050505081565b60605f6008805461044790611c51565b9050116104dc576008805461045b90611c51565b80601f016020809104026020016040519081016040528092919081815260200182805461048790611c51565b80156104d25780601f106104a9576101008083540402835291602001916104d2565b820191905f5260205f20905b8154815290600101906020018083116104b557829003601f168201915b5050505050610356565b60086104e783610df5565b6040516020016104f8929190611c89565b60405160208183030381529060405292915050565b610515610e85565b600754600160a01b900460ff1661056b5760405162461bcd60e51b81526020600482015260156024820152744d696e74696e67206973206e6f742061637469766560581b60448201526064015b60405180910390fd5b8151835114801561057d575080518351145b6105d35760405162461bcd60e51b815260206004820152602160248201527f417272617973206d757374206265206f66207468652073616d65206c656e67746044820152600d60fb1b6064820152608401610562565b6007546001600160a01b03166106355760405162461bcd60e51b815260206004820152602160248201527f45787465726e616c20636f6e74726163742061646472657373206e6f742073656044820152601d60fa1b6064820152608401610562565b5f5b83518110156109a45783818151811061065257610652611d0c565b60200260200101515f148061067f575082818151811061067457610674611d0c565b60200260200101515f145b61099c5781818151811061069557610695611d0c565b602002602001015160055f9054906101000a90046001600160a01b03166001600160a01b031662fdd58e338785815181106106d2576106d2611d0c565b60200260200101516040518363ffffffff1660e01b815260040161070b9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa158015610726573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061074a9190611d20565b10156107b25760405162461bcd60e51b815260206004820152603160248201527f496e73756666696369656e742062616c616e636520746f206275726e20696e20604482015270195e1d195c9b985b0818dbdb9d1c9858dd607a1b6064820152608401610562565b6107ee8482815181106107c7576107c7611d0c565b60200260200101518483815181106107e1576107e1611d0c565b6020026020010151610a5e565b61083a5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e204944206e6f74206173736f6369617465640000000000000000006044820152606401610562565b6040805160018082528183019092525f916020808301908036833701905050905084828151811061086d5761086d611d0c565b6020026020010151815f8151811061088757610887611d0c565b60209081029190910101526040805160018082528183019092525f918160200160208202803683370190505090508383815181106108c7576108c7611d0c565b6020026020010151815f815181106108e1576108e1611d0c565b6020908102919091010152600554604051633db0f8ab60e01b81526001600160a01b0390911690633db0f8ab9061092090339086908690600401611d37565b5f604051808303815f87803b158015610937575f80fd5b505af1158015610949573d5f803e3d5ffd5b505050506109993386858151811061096357610963611d0c565b602002602001015186868151811061097d5761097d611d0c565b602002602001015160405180602001604052805f815250610eaf565b50505b600101610637565b506109af6001600455565b505050565b6006602052815f5260405f2081815481106109cd575f80fd5b905f5260205f20015f91509150505481565b336001600160a01b0386168114801590610a0057506109fe8682610d2c565b155b15610a315760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610562565b610a3e8686868686610f0a565b505050505050565b610a4e610f6f565b6008610a5a8282611dba565b5050565b5f805b5f84815260066020526040902054811015610ab8575f848152600660205260409020805484919083908110610a9857610a98611d0c565b905f5260205f20015403610ab0576001915050610356565b600101610a61565b505f9392505050565b60608151835114610af25781518351604051635b05999160e01b815260048101929092526024820152604401610562565b5f835167ffffffffffffffff811115610b0d57610b0d61173e565b604051908082528060200260200182016040528015610b36578160200160208202803683370190505b5090505f5b8451811015610b8457602080820286010151610b5f90602080840287010151610335565b828281518110610b7157610b71611d0c565b6020908102919091010152600101610b3b565b509392505050565b610b94610f6f565b610b9d5f610f9c565b565b600a80546103b890611c51565b610bb4610f6f565b815f03610c135760405162461bcd60e51b815260206004820152602760248201527f546f6b656e2049442030206973206e6f742076616c696420666f72206173736f60448201526631b4b0ba34b7b760c91b6064820152608401610562565b5f5b81518110156109af57818181518110610c3057610c30611d0c565b60200260200101515f03610c865760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f74206173736f636961746520746f20546f6b656e204944203000006044820152606401610562565b5f8381526006602052604090208251839083908110610ca757610ca7611d0c565b6020908102919091018101518254600181810185555f948552929093209092019190915501610c15565b610a5a338383610fed565b610ce4610f6f565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610d0e610f6f565b60078054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b336001600160a01b0386168114801590610d7a5750610d788682610d2c565b155b15610dab5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610562565b610a3e8686868686611081565b610dc0610f6f565b6001600160a01b038116610de957604051631e4fbdf760e01b81525f6004820152602401610562565b610df281610f9c565b50565b60605f610e018361110d565b60010190505f8167ffffffffffffffff811115610e2057610e2061173e565b6040519080825280601f01601f191660200182016040528015610e4a576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610e5457509392505050565b600260045403610ea857604051633ee5aeb560e01b815260040160405180910390fd5b6002600455565b6001600160a01b038416610ed857604051632bfa23e760e11b81525f6004820152602401610562565b60408051600180825260208201869052818301908152606082018590526080820190925290610a3e5f878484876111e4565b6001600160a01b038416610f3357604051632bfa23e760e11b81525f6004820152602401610562565b6001600160a01b038516610f5b57604051626a0d4560e21b81525f6004820152602401610562565b610f6885858585856111e4565b5050505050565b6003546001600160a01b03163314610b9d5760405163118cdaa760e01b8152336004820152602401610562565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382166110155760405162ced3e160e81b81525f6004820152602401610562565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166110aa57604051632bfa23e760e11b81525f6004820152602401610562565b6001600160a01b0385166110d257604051626a0d4560e21b81525f6004820152602401610562565b6040805160018082526020820186905281830190815260608201859052608082019092529061110487878484876111e4565b50505050505050565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061114b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611177576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061119557662386f26fc10000830492506010015b6305f5e10083106111ad576305f5e100830492506008015b61271083106111c157612710830492506004015b606483106111d3576064830492506002015b600a83106103565760010192915050565b6111f085858585611237565b6001600160a01b03841615610f6857825133906001036112295760208481015190840151611222838989858589611446565b5050610a3e565b610a3e818787878787611567565b80518251146112665781518151604051635b05999160e01b815260048101929092526024820152604401610562565b335f5b8351811015611368576020818102858101820151908501909101516001600160a01b0388161561131a575f828152602081815260408083206001600160a01b038c168452909152902054818110156112f4576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610562565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b0387161561135e575f828152602081815260408083206001600160a01b038b16845290915281208054839290611358908490611e76565b90915550505b5050600101611269565b5082516001036113e85760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516113d9929190918252602082015260400190565b60405180910390a45050610f68565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611437929190611e95565b60405180910390a45050505050565b6001600160a01b0384163b15610a3e5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061148a9089908990889088908890600401611ec2565b6020604051808303815f875af19250505080156114c4575060408051601f3d908101601f191682019092526114c191810190611f06565b60015b61152b573d8080156114f1576040519150601f19603f3d011682016040523d82523d5f602084013e6114f6565b606091505b5080515f0361152357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461110457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b6001600160a01b0384163b15610a3e5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115ab9089908990889088908890600401611f21565b6020604051808303815f875af19250505080156115e5575060408051601f3d908101601f191682019092526115e291810190611f06565b60015b611612573d8080156114f1576040519150601f19603f3d011682016040523d82523d5f602084013e6114f6565b6001600160e01b0319811663bc197c8160e01b1461110457604051632bfa23e760e11b81526001600160a01b0386166004820152602401610562565b80356001600160a01b0381168114611664575f80fd5b919050565b5f806040838503121561167a575f80fd5b6116838361164e565b946020939093013593505050565b6001600160e01b031981168114610df2575f80fd5b5f602082840312156116b6575f80fd5b81356116c181611691565b9392505050565b5f5b838110156116e25781810151838201526020016116ca565b50505f910152565b5f81518084526117018160208601602086016116c8565b601f01601f19169290920160200192915050565b602081525f6116c160208301846116ea565b5f60208284031215611737575f80fd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561177b5761177b61173e565b604052919050565b5f67ffffffffffffffff82111561179c5761179c61173e565b5060051b60200190565b5f82601f8301126117b5575f80fd5b813560206117ca6117c583611783565b611752565b8083825260208201915060208460051b8701019350868411156117eb575f80fd5b602086015b8481101561180757803583529183019183016117f0565b509695505050505050565b5f805f60608486031215611824575f80fd5b833567ffffffffffffffff8082111561183b575f80fd5b611847878388016117a6565b9450602086013591508082111561185c575f80fd5b611868878388016117a6565b9350604086013591508082111561187d575f80fd5b5061188a868287016117a6565b9150509250925092565b5f80604083850312156118a5575f80fd5b50508035926020909101359150565b5f67ffffffffffffffff8311156118cd576118cd61173e565b6118e0601f8401601f1916602001611752565b90508281528383830111156118f3575f80fd5b828260208301375f602084830101529392505050565b5f82601f830112611918575f80fd5b6116c1838335602085016118b4565b5f805f805f60a0868803121561193b575f80fd5b6119448661164e565b94506119526020870161164e565b9350604086013567ffffffffffffffff8082111561196e575f80fd5b61197a89838a016117a6565b9450606088013591508082111561198f575f80fd5b61199b89838a016117a6565b935060808801359150808211156119b0575f80fd5b506119bd88828901611909565b9150509295509295909350565b5f602082840312156119da575f80fd5b813567ffffffffffffffff8111156119f0575f80fd5b8201601f81018413611a00575f80fd5b611a0f848235602084016118b4565b949350505050565b5f8060408385031215611a28575f80fd5b823567ffffffffffffffff80821115611a3f575f80fd5b818501915085601f830112611a52575f80fd5b81356020611a626117c583611783565b82815260059290921b84018101918181019089841115611a80575f80fd5b948201945b83861015611aa557611a968661164e565b82529482019490820190611a85565b96505086013592505080821115611aba575f80fd5b50611ac7858286016117a6565b9150509250929050565b5f815180845260208085019450602084015f5b83811015611b0057815187529582019590820190600101611ae4565b509495945050505050565b602081525f6116c16020830184611ad1565b5f8060408385031215611b2e575f80fd5b82359150602083013567ffffffffffffffff811115611b4b575f80fd5b611ac7858286016117a6565b80358015158114611664575f80fd5b5f8060408385031215611b77575f80fd5b611b808361164e565b9150611b8e60208401611b57565b90509250929050565b5f60208284031215611ba7575f80fd5b6116c18261164e565b5f60208284031215611bc0575f80fd5b6116c182611b57565b5f8060408385031215611bda575f80fd5b611be38361164e565b9150611b8e6020840161164e565b5f805f805f60a08688031215611c05575f80fd5b611c0e8661164e565b9450611c1c6020870161164e565b93506040860135925060608601359150608086013567ffffffffffffffff811115611c45575f80fd5b6119bd88828901611909565b600181811c90821680611c6557607f821691505b602082108103611c8357634e487b7160e01b5f52602260045260245ffd5b50919050565b5f808454611c9681611c51565b60018281168015611cae5760018114611cc357611cef565b60ff1984168752821515830287019450611cef565b885f526020805f205f5b85811015611ce65781548a820152908401908201611ccd565b50505082870194505b505050508351611d038183602088016116c8565b01949350505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611d30575f80fd5b5051919050565b6001600160a01b03841681526060602082018190525f90611d5a90830185611ad1565b8281036040840152611d6c8185611ad1565b9695505050505050565b601f8211156109af57805f5260205f20601f840160051c81016020851015611d9b5750805b601f840160051c820191505b81811015610f68575f8155600101611da7565b815167ffffffffffffffff811115611dd457611dd461173e565b611de881611de28454611c51565b84611d76565b602080601f831160018114611e1b575f8415611e045750858301515b5f19600386901b1c1916600185901b178555610a3e565b5f85815260208120601f198616915b82811015611e4957888601518255948401946001909101908401611e2a565b5085821015611e6657878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561035657634e487b7160e01b5f52601160045260245ffd5b604081525f611ea76040830185611ad1565b8281036020840152611eb98185611ad1565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90611efb908301846116ea565b979650505050505050565b5f60208284031215611f16575f80fd5b81516116c181611691565b6001600160a01b0386811682528516602082015260a0604082018190525f90611f4c90830186611ad1565b8281036060840152611f5e8186611ad1565b90508281036080840152611f7281856116ea565b9897505050505050505056fea26469706673582212207d0ad74b4ae71faa3045c3ad0dacffb7b71a108bd3c7af81b17c882a9146bd5664736f6c63430008160033

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.