Token Farmland Items

 

Overview ERC-1155

Total Supply:
0 ITEMS

Holders:
136 addresses

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Items

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : Items.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./ItemCollection.sol";

/// @dev Farmland - Items Smart Contract
contract Items is ItemCollection {

// CONSTRUCTOR

    constructor(
        string memory name_,
        string memory symbol_
    ) ERC1155("on-chain-metadata") {
        name = name_;
        symbol = symbol_;
    }

// USER FUNCTIONS

    /// @dev Mint item tokens
    /// @param itemID identifies the type of asset
    /// @param amount how many tokens to be minted
    /// @param recipient who will receive the minted tokens
    function mintItem(uint256 itemID, uint256 amount, address recipient)
        external
        override
        nonReentrant
        onlyAllowed
        onlyIfItemExists(itemID)
        onlyWhenMintingActive(itemID)
    {
        // If a max supply is defined ensure it isn't exceeded
        if (items[itemID].maxSupply != 0) {
            require(totalSupply(itemID) + amount <= items[itemID].maxSupply, "Max supply exceeded");
        }
        // Mint item
        _mint(recipient, itemID, amount, "");
    }

    /// @dev Mint a set of item tokens
    /// @param itemIDs identifies the tokens to be minted (array)
    /// @param amounts how many tokens to be minted (array)
    /// @param recipient who will receive the minted tokens
    function mintItems(uint256[] calldata itemIDs, uint256[] calldata amounts, address recipient)
        external
        override
        nonReentrant
        onlyAllowed
    {
        // Store the total items IDs passed
        uint256 total = itemIDs.length;
        require (total == amounts.length,"Items arrays length's don't match");
        uint256 itemID;
        // Loop through the contracts
        for(uint256 i = 0; i < total;){
            // Store the itemID in local variable
            itemID = itemIDs[i];
            require(items[itemID].mintingActive, "Minting not started");
            require(itemID < totalItems, "Item does not exist");
            // If a max supply is defined ensure it isn't exceeded
            if (items[itemID].maxSupply != 0) {
                require(totalSupply(itemID) + amounts[i] <= items[itemID].maxSupply, "Max supply exceeded");
            }
            unchecked { ++i; }
        }
        // Mint items
        _mintBatch(recipient, itemIDs, amounts, "");
    }

}

File 2 of 23 : Permissioned.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";

contract Permissioned is AccessControl {

    constructor () {
            _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        }

// STATE VARIABLES

    /// @dev Defines the accessible roles
    bytes32 public constant ACCESS_ROLE = keccak256("ACCESS_ROLE");

// MODIFIERS

    /// @dev Only allows admin accounts
    modifier onlyOwner() {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller is not the owner");
        _; // Call the actual code
    }

    /// @dev Only allows accounts with permission
    modifier onlyAllowed() {
        require(hasRole(ACCESS_ROLE, _msgSender()), "Caller does not have permission");
        _; // Call the actual code
    }

// FUNCTIONS

  /// @dev Add an account to the access role. Restricted to admins.
  function addAllowed(address account)
    external virtual onlyOwner
  {
    grantRole(ACCESS_ROLE, account);
  }

  /// @dev Add an account to the admin role. Restricted to admins.
  function addOwner(address account)
    public virtual onlyOwner
  {
    grantRole(DEFAULT_ADMIN_ROLE, account);
  }

  /// @dev Remove an account from the access role. Restricted to admins.
  function removeAllowed(address account)
    external virtual onlyOwner
  {
    revokeRole(ACCESS_ROLE, account);
  }

  ///@dev Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
  function transferOwnership(address newOwner) 
      external virtual onlyOwner
  {
      require(newOwner != address(0), "Permissioned: new owner is the zero address");
      addOwner(newOwner);
      renounceOwner();
  }

  /// @dev Remove oneself from the owner role.
  function renounceOwner()
    public virtual
  {
    renounceRole(DEFAULT_ADMIN_ROLE, _msgSender());
  }

// VIEWS

  /// @dev Return `true` if the account belongs to the admin role.
  function isOwner(address account)
    external virtual view returns (bool)
  {
    return hasRole(DEFAULT_ADMIN_ROLE, account);
  }

  /// @dev Return `true` if the account belongs to the access role.
  function isAllowed(address account)
    external virtual view returns (bool)
  {
    return hasRole(ACCESS_ROLE, account);
  }

}

File 3 of 23 : IItems.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/interfaces/IERC1155.sol";
import "./IERC1155Burnable.sol";
import "./IERC1155Supply.sol";

/// @dev Defines the ItemType struct
struct ItemType {
    uint256 itemID;
    uint256 maxSupply;
    string name;
    string description;
    string imageUrl;
    string animationUrl;
    bool mintingActive;
    bool soulbound;
    uint256 rarity;
    uint256 itemType;
    uint256 wearableType;
    uint256 value1;
}

abstract contract IItems is IERC1155, IERC1155Burnable, IERC1155Supply {
    /// @dev A mapping to track items in use by account
    /// @dev getItemsInUse[account].[itemID] = amountOfItemsInUse
    mapping (address => mapping(uint256 => uint256)) public getItemsInUse;

    /// @dev A mapping to track items in use by tokenID
    /// @dev getItemsInUseByToken[tokenID].[itemID] = amountOfItemsInUse
    mapping (uint256 => mapping(uint256 => uint256)) public getItemsInUseByToken;

    function mintItem(uint256 itemID, uint256 amount, address recipient) external virtual;
    function mintItems(uint256[] memory itemIDs, uint256[] memory amounts, address recipient) external virtual;
    function setItemInUse(address account, uint256 tokenID, uint256 itemID, uint256 amount, bool inUse) external virtual;
    function setItemsInUse(address[] calldata accounts, uint256[] calldata tokenIDs, uint256[] calldata itemIDs, uint256[] calldata amounts, bool[] calldata inUse) external virtual;
    function getItem(uint256 itemID) external view virtual returns (ItemType memory item);
    function getItems() external view virtual returns (ItemType[] memory allItems);
    function getActiveItemsByTokenID(uint256 tokenID) external view virtual returns (uint256[] memory itemsByToken);
}

File 4 of 23 : IERC1155Supply.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC1155Supply {
    function totalSupply(uint256 id) external view returns (uint256);
    function exists(uint256 id) external view returns (bool);
}

File 5 of 23 : IERC1155Burnable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC1155Burnable {
    function burn(address account,uint256 id,uint256 value) external;
    function burnBatch(address account,uint256[] memory ids,uint256[] memory values) external;
}

File 6 of 23 : ItemTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "./interfaces/IItems.sol";
import "../utils/Permissioned.sol";

abstract contract ItemTypes is ERC1155Supply, ERC1155Burnable, IItems, ReentrancyGuard, Permissioned {

// CONSTRUCTOR

    constructor () Permissioned() { }

// STATE VARIABLES

    /// @dev Mapping for the items
    mapping(uint256 => ItemType) public items;
    
    /// @dev Keeps track of total number of items
    uint256 public totalItems;

// MODIFIERS       

    /// @dev Checks whether a minting has started
    /// @param itemID identifies the type of asset
    modifier onlyWhenMintingActive(uint256 itemID) {
        require(items[itemID].mintingActive, "Minting not started");
        _;
    }

    /// @dev Checks whether an item exists
    /// @param itemID identifies the type of asset
    modifier onlyIfItemExists(uint256 itemID) {
        require(itemID <= totalItems,"Item does not exist");
        _;
    }

// EVENTS

    event ItemSetInUse(address indexed account, uint256 indexed tokenID, uint256 indexed itemID, uint256 amount, bool inUse);
    event SetItemID(address indexed account, uint256 oldItemID, uint256 newItemID);

    /// @dev The owner can add a new item to the contract
    /// @param item item type struct
    function addItem(ItemType calldata item)
        external
        onlyOwner
    {
        // Increment the total items
        unchecked { ++totalItems; }
        // Set the item details
        items[totalItems] = item;
    }

    /// @dev The owner can update an item
    /// @param itemID ID of the item
    /// @param item item type struct
    function updateItem(uint256 itemID, ItemType calldata item)
        external 
        onlyOwner
        onlyIfItemExists(itemID)
    {
        // Set the item details
        items[itemID] = item;
    }

    /// @dev The owner can delete an item
    /// @param itemID ID of the item
    function deleteItem(uint256 itemID)
        external 
        onlyOwner
        onlyIfItemExists(itemID)
    {
        // delete the item mapping
        delete items[itemID];
    }

    /// @dev The owner can set the next item ID
    /// @dev To be used in conjunction with deleteItem
    /// @param nextItemID ID of the item
    function setNextItemID(uint256 nextItemID)
        external 
        onlyOwner
    {
        emit SetItemID(_msgSender(), totalItems, nextItemID);
        totalItems = nextItemID;
    }

    /// @dev Allows the owner to start & stop all minting
    function startOrStopMinting(bool value) 
        external
        onlyOwner
    {
        // Store totalItems into a local variable to save gas
        uint256 total = totalItems;
        // Loop through all items
        for (uint256 i = 1; i <= total;) {
            // Set the mint active flag
            items[i].mintingActive = value;
            unchecked { ++i; }
        }
    }

    /// @dev Set an amount of an item as in use
    /// @param account account to use
    /// @param tokenID Id of NFT
    /// @param itemID Id of item 
    /// @param amount to set as in use
    /// @param inUse true or false
    function setItemInUse(address account, uint256 tokenID, uint256 itemID, uint256 amount, bool inUse)
        public
        override
        onlyAllowed
    {
        if (inUse) {
            require(amount <= balanceOf(account,itemID),"Not enough items");
            // Store the amount in use by Account
            getItemsInUse[account][itemID] += amount;
            // Store the amount in use by TokenID
            getItemsInUseByToken[tokenID][itemID] += amount;
        } else {
            // Remove the amount in use by Account
            delete getItemsInUse[account][itemID];
            // Remove the amount in use by TokenID
            delete getItemsInUseByToken[tokenID][itemID];
        }
        // Write an event
        emit ItemSetInUse(account, tokenID, itemID, amount, inUse);
    }

    /// @dev Set a series of items as in use
    /// @param accounts accounts to use
    /// @param tokenIDs Ids of NFT
    /// @param itemIDs Ids of items
    /// @param amounts to set as in use
    /// @param inUse true or false
    function setItemsInUse(address[] calldata accounts, uint256[] calldata tokenIDs, uint256[] calldata itemIDs, uint256[] calldata amounts, bool[] calldata inUse)
        external
        override
        onlyAllowed
    {
        require(accounts.length == tokenIDs.length && 
                tokenIDs.length == itemIDs.length && 
                itemIDs.length == amounts.length && 
                amounts.length == inUse.length, "Array lengths don't match");
        uint256 total = accounts.length;
        for(uint256 i = 0; i < total;){
            // Call function to set item in use
            setItemInUse(accounts[i], tokenIDs[i], itemIDs[i], amounts[i], inUse[i]);
            unchecked { ++i; }
        }
    }

// GETTERS

    /// @dev Returns an item
    /// @param itemID ID of the item
    function getItem(uint256 itemID)
        external
        override
        view
        returns (ItemType memory item)
    {
        return items[itemID];
    }

    /// @dev Returns a list of all items
    function getItems()
        external
        override
        view
        returns (ItemType[] memory allItems) 
    {
        // Store total number of items into a local variable
        uint256 total = totalItems;
        if ( total == 0 ) {
            // if no items added, return an empty array
            return new ItemType[](0);
        } else {
            allItems = new ItemType[](total+1);
            // Push a blank item into the array as there isn't an item with Id zero
            allItems[0] = ItemType (0,0,'','','','',false,false,0,0,0,0);
            // Loop through the items
            for(uint256 i = 1; i < total+1;){
                // Add item to array
                allItems[i] = items[i];
                unchecked { ++i; }
            }
        }
    }

    /// @dev Returns a list of all active items by tokenID
    /// @param tokenID Id of NFT
    function getActiveItemsByTokenID(uint256 tokenID)
        external
        override
        view
        returns (uint256[] memory itemsByToken)
    {
        // Store total number of items into a local variable
        uint256 total = totalItems;
        uint256 totalByToken = 0;
        if ( total == 0 ) {
            // if no items added, return an empty array
            return new uint256[](0);
        } else {
            // Loop through the items to determine the count
            for(uint256 i = 1; i < total+1;) {               
                // Check if item is in use                
                if (getItemsInUseByToken[tokenID][i] > 0) {
                    // Increment total
                    unchecked { ++totalByToken; }
                }
                unchecked { ++i; } 
            }
            itemsByToken = new uint256[](totalByToken);
            uint256 index = 0;
            // Loop through the items
            for(uint256 i = 1; i < total+1;) {
                // Check if item is in use
                if (getItemsInUseByToken[tokenID][i] > 0) {
                    // Add itemID to array
                    itemsByToken[index] = i;
                    unchecked { ++index; }
                }
                unchecked { ++i; }
            }
        }
    }

    ///@dev Override balanceOf to exclude itemsInUse, balanceOfBatch uses balanceOf
    function balanceOf(address account, uint256 id) public view virtual override (IERC1155, ERC1155) returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        uint256 amountOfItemsInUse = getItemsInUse[account][id];
        if (amountOfItemsInUse > 0) {
            return super.balanceOf(account,id) - amountOfItemsInUse;
        } else {
            return super.balanceOf(account,id);
        }
    }

    function burn(address account,uint256 id,uint256 value) public override (IERC1155Burnable, ERC1155Burnable) {
        ERC1155Burnable.burn(account, id, value);
    }

    function burnBatch(address account,uint256[] memory ids,uint256[] memory values) public override (IERC1155Burnable, ERC1155Burnable) {
        ERC1155Burnable.burnBatch(account, ids, values);
    }

    function totalSupply(uint256 id) public view override (IERC1155Supply, ERC1155Supply) returns (uint256) {
        return ERC1155Supply.totalSupply(id);
    }

    function exists(uint256 id) public view override (IERC1155Supply, ERC1155Supply) returns (bool) {
        return ERC1155Supply.exists(id);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override (ERC1155, IERC165, AccessControl) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /// @dev The following functions are overrides required by Solidity.
    function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
        internal
        override(ERC1155, ERC1155Supply)
    {
        // Adjusts standard ERC1155 transfer functionality to revert if any of the items are non transferrable
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data); // transfers enabled as normal

        uint256 total = ids.length;
        for(uint256 i = 0; i < total;){
            // Check balance - items in use is greater than the amount to be transferred 
            uint256 amountOfItemsInUse = getItemsInUse[from][ids[i]];
            if (amountOfItemsInUse > 0) {
                require(balanceOf(from,ids[i]) >= amounts[i],"Items in use, balance too low");
            }
            // Check if soulbound & ensure not minting or burning
            if (items[ids[i]].soulbound){
                require(from == address(0) || to == address(0), "Token is nontransferable");
            }
            unchecked { ++i; }
        }
    }

}

File 7 of 23 : ItemCollection.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./ItemTypes.sol";

abstract contract ItemCollection is ItemTypes {

// STATE VARIABLES

    /// @dev Contract name
    string public name;

    /// @dev Contract symbol
    string public symbol;

// EVENTS

    event ContractAddressChanged(address indexed account, string addressType, address newAddress);

// ADMIN FUNCTIONS

    /// @dev Update the description, name & symbol
    /// @param name_ Name of the contract
    /// @param symbol_ Contract symbol
    function updateCollectionDetails(
        string memory name_,
        string memory symbol_
        )
        external 
        onlyOwner 
    {
        name = name_;
        symbol = symbol_;
    }

// VIEWS

    /// @dev Return the token onchain metadata
    /// @param itemID Identifies the type of asset
    function uri(uint256 itemID) 
        public
        view
        override(ERC1155)
        returns (string memory output) 
    {
        require(itemID < totalItems+1, "Item not found");
        // Shortcut accessor
        ItemType memory item = items[itemID];
        // Store the rarity description rather than the id
        string memory rarity = "";
        if (item.rarity == 0) {
            rarity = "Common";
        } else if (item.rarity == 1) {
            rarity = "Uncommon";
        } else if (item.rarity == 2) {
            rarity = "Rare";
        } else if (item.rarity == 3) {
            rarity = "Epic";
        } else if (item.rarity == 4) {
            rarity = "Legendary";
        }
        // Encode the metadata
        string memory json = Base64.encode(abi.encodePacked(
            '{',
            '"name": "',            item.name, '",',
            '"description": "',     item.description, '",',
            '"animation_url": "',   item.animationUrl, '",',
            '"image": "',           item.imageUrl, '",',
            '"attributes": [',
                '{ "id": 0, "trait_type": "Rarity", "value": "' ,rarity, '" }',
                ']',
            '}'
        ));
        // Return the result
        return string(abi.encodePacked('data:application/json;base64,', json));
    }
}

File 8 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 9 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

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

File 11 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 23 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

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

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

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

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

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

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

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

        return result;
    }
}

File 13 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

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

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

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

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

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

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

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

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

File 14 of 23 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
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 15 of 23 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

File 16 of 23 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 17 of 23 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
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 18 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token 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 amount 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 `amount` tokens of token type `id` from `from` to `to`.
     *
     * 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 `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 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` 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 amounts,
        bytes calldata data
    ) external;
}

File 19 of 23 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.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
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => 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) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        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
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

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

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

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` 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 `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 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, 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.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, 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 amounts 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 `amount` tokens of token 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 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - 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 amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 20 of 23 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 21 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155.sol";

File 22 of 23 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

File 23 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

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

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

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

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"account","type":"address"},{"indexed":false,"internalType":"string","name":"addressType","type":"string"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"ContractAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"itemID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"inUse","type":"bool"}],"name":"ItemSetInUse","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldItemID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newItemID","type":"uint256"}],"name":"SetItemID","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"ACCESS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"string","name":"animationUrl","type":"string"},{"internalType":"bool","name":"mintingActive","type":"bool"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"rarity","type":"uint256"},{"internalType":"uint256","name":"itemType","type":"uint256"},{"internalType":"uint256","name":"wearableType","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"}],"internalType":"struct ItemType","name":"item","type":"tuple"}],"name":"addItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemID","type":"uint256"}],"name":"deleteItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"getActiveItemsByTokenID","outputs":[{"internalType":"uint256[]","name":"itemsByToken","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemID","type":"uint256"}],"name":"getItem","outputs":[{"components":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"string","name":"animationUrl","type":"string"},{"internalType":"bool","name":"mintingActive","type":"bool"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"rarity","type":"uint256"},{"internalType":"uint256","name":"itemType","type":"uint256"},{"internalType":"uint256","name":"wearableType","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"}],"internalType":"struct ItemType","name":"item","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getItems","outputs":[{"components":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"string","name":"animationUrl","type":"string"},{"internalType":"bool","name":"mintingActive","type":"bool"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"rarity","type":"uint256"},{"internalType":"uint256","name":"itemType","type":"uint256"},{"internalType":"uint256","name":"wearableType","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"}],"internalType":"struct ItemType[]","name":"allItems","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getItemsInUse","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getItemsInUseByToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"items","outputs":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"string","name":"animationUrl","type":"string"},{"internalType":"bool","name":"mintingActive","type":"bool"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"rarity","type":"uint256"},{"internalType":"uint256","name":"itemType","type":"uint256"},{"internalType":"uint256","name":"wearableType","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mintItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"itemIDs","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mintItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","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":"amount","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":"account","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"inUse","type":"bool"}],"name":"setItemInUse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"},{"internalType":"uint256[]","name":"itemIDs","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bool[]","name":"inUse","type":"bool[]"}],"name":"setItemsInUse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nextItemID","type":"uint256"}],"name":"setNextItemID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"startOrStopMinting","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":[],"name":"totalItems","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"name":"updateCollectionDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"components":[{"internalType":"uint256","name":"itemID","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"string","name":"animationUrl","type":"string"},{"internalType":"bool","name":"mintingActive","type":"bool"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"rarity","type":"uint256"},{"internalType":"uint256","name":"itemType","type":"uint256"},{"internalType":"uint256","name":"wearableType","type":"uint256"},{"internalType":"uint256","name":"value1","type":"uint256"}],"internalType":"struct ItemType","name":"item","type":"tuple"}],"name":"updateItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemID","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"output","type":"string"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200546e3803806200546e8339810160408190526200003491620002e7565b6040805180820190915260118152706f6e2d636861696e2d6d6574616461746160781b60208201526200006781620000ae565b5060016006556200007a600033620000c7565b81516200008f90600a90602085019062000174565b508051620000a590600b90602084019062000174565b5050506200038e565b8051620000c390600290602084019062000174565b5050565b60008281526007602090815260408083206001600160a01b0385168452909152902054620000c3908390839060ff16620000c35760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001303390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620001829062000351565b90600052602060002090601f016020900481019282620001a65760008555620001f1565b82601f10620001c157805160ff1916838001178555620001f1565b82800160010185558215620001f1579182015b82811115620001f1578251825591602001919060010190620001d4565b50620001ff92915062000203565b5090565b5b80821115620001ff576000815560010162000204565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024257600080fd5b81516001600160401b03808211156200025f576200025f6200021a565b604051601f8301601f19908116603f011681019082821181831017156200028a576200028a6200021a565b81604052838152602092508683858801011115620002a757600080fd5b600091505b83821015620002cb5785820183015181830184015290820190620002ac565b83821115620002dd5760008385830101525b9695505050505050565b60008060408385031215620002fb57600080fd5b82516001600160401b03808211156200031357600080fd5b620003218683870162000230565b935060208501519150808211156200033857600080fd5b50620003478582860162000230565b9150509250929050565b600181811c908216806200036657607f821691505b602082108114156200038857634e487b7160e01b600052602260045260246000fd5b50919050565b6150d0806200039e6000396000f3fe608060405234801561001057600080fd5b506004361061027d5760003560e01c806356b855aa1161015c578063a1d13687116100ce578063cb8523c611610087578063cb8523c6146105d9578063d547741f146105ec578063e985e9c5146105ff578063f242432a1461063b578063f2fde38b1461064e578063f5298aca1461066157600080fd5b8063a1d136871461055a578063a217fddf1461056d578063a22cb46514610575578063babcc53914610588578063bd85b0391461059b578063bfb231d2146105ae57600080fd5b80637065cb48116101205780637065cb48146104f357806374217a1b1461050657806381b57feb1461051957806391d148541461052c57806395d89b411461053f5780639b6507f01461054757600080fd5b806356b855aa146104925780635a8cdc6d146104a75780636470db2f146104ba578063654fc833146104cd5780636b20c454146104e057600080fd5b80632b1cd8a1116101f55780633129e773116101b95780633129e7731461040457806336568abe14610424578063410d59cc146104375780634e1273f41461044c5780634f558e791461046c57806353a99c331461047f57600080fd5b80632b1cd8a1146103755780632e0bebeb146103a05780632eb2c2d6146103cb5780632f2ff15d146103de5780632f54bf6e146103f157600080fd5b80630e89341c116102475780630e89341c146103085780630ed949401461031b578063248a9ca31461032e57806325807250146103515780632799276d1461036457806328c23a451461036d57600080fd5b8062a5fed914610282578062fdd58e1461029757806301ffc9a7146102bd57806306fdde03146102e05780630ddcd898146102f5575b600080fd5b610295610290366004613b10565b610674565b005b6102aa6102a5366004613b72565b6106e8565b6040519081526020015b60405180910390f35b6102d06102cb366004613bb2565b6107ab565b60405190151581526020016102b4565b6102e86107b6565b6040516102b49190613c27565b610295610303366004613c85565b610844565b6102e8610316366004613d75565b6109a6565b610295610329366004613d9c565b610e33565b6102aa61033c366004613d75565b60009081526007602052604090206001015490565b61029561035f366004613e6e565b610e91565b6102aa60095481565b610295610edf565b6102aa610383366004613b72565b600460209081526000928352604080842090915290825290205481565b6102aa6103ae366004613ec7565b600560209081526000928352604080842090915290825290205481565b6102956103d9366004613f7d565b610eec565b6102956103ec366004614026565b610f31565b6102d06103ff366004614052565b610f56565b610417610412366004613d75565b610f62565b6040516102b49190614144565b610295610432366004614026565b611233565b61043f6112b1565b6040516102b49190614157565b61045f61045a3660046141b9565b61170f565b6040516102b491906142b4565b6102d061047a366004613d75565b611838565b61029561048d3660046142c7565b61184e565b6102aa60008051602061503b83398151915281565b6102956104b5366004613d75565b6119ca565b6102956104c8366004614052565b611a34565b6102956104db366004613d75565b611a76565b6102956104ee36600461431b565b611b3f565b610295610501366004614052565b611b4a565b61029561051436600461438e565b611b7c565b61029561052736600461440e565b611e33565b6102d061053a366004614026565b611e7f565b6102e8611eaa565b61029561055536600461444a565b611eb7565b61045f610568366004613d75565b612067565b6102aa600081565b61029561058336600461447f565b612180565b6102d0610596366004614052565b61218b565b6102aa6105a9366004613d75565b6121a5565b6105c16105bc366004613d75565b6121b9565b6040516102b49c9b9a999897969594939291906144b6565b6102956105e7366004614052565b612439565b6102956105fa366004614026565b612478565b6102d061060d36600461454d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610295610649366004614577565b61249d565b61029561065c366004614052565b6124e2565b61029561066f3660046145db565b612584565b61067f600033611e7f565b6106a45760405162461bcd60e51b815260040161069b9061460e565b60405180910390fd5b816009548111156106c75760405162461bcd60e51b815260040161069b90614645565b600083815260086020526040902082906106e182826147ff565b5050505050565b60006001600160a01b0383166107545760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b606482015260840161069b565b6001600160a01b0383166000908152600460209081526040808320858452909152902054801561079b5780610789858561258f565b6107939190614918565b9150506107a5565b610793848461258f565b92915050565b60006107a582612620565b600a80546107c3906146b8565b80601f01602080910402602001604051908101604052809291908181526020018280546107ef906146b8565b801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b505050505081565b61085c60008051602061503b83398151915233611e7f565b6108785760405162461bcd60e51b815260040161069b9061492f565b888714801561088657508685145b801561089157508483145b801561089c57508281145b6108e85760405162461bcd60e51b815260206004820152601960248201527f4172726179206c656e6774687320646f6e2774206d6174636800000000000000604482015260640161069b565b8860005b81811015610998576109908c8c8381811061090957610909614966565b905060200201602081019061091e9190614052565b8b8b8481811061093057610930614966565b905060200201358a8a8581811061094957610949614966565b9050602002013589898681811061096257610962614966565b9050602002013588888781811061097b5761097b614966565b905060200201602081019061048d9190613d9c565b6001016108ec565b505050505050505050505050565b606060095460016109b7919061497c565b82106109f65760405162461bcd60e51b815260206004820152600e60248201526d125d195b481b9bdd08199bdd5b9960921b604482015260640161069b565b600060086000848152602001908152602001600020604051806101800160405290816000820154815260200160018201548152602001600282018054610a3b906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610a67906146b8565b8015610ab45780601f10610a8957610100808354040283529160200191610ab4565b820191906000526020600020905b815481529060010190602001808311610a9757829003601f168201915b50505050508152602001600382018054610acd906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610af9906146b8565b8015610b465780601f10610b1b57610100808354040283529160200191610b46565b820191906000526020600020905b815481529060010190602001808311610b2957829003601f168201915b50505050508152602001600482018054610b5f906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8b906146b8565b8015610bd85780601f10610bad57610100808354040283529160200191610bd8565b820191906000526020600020905b815481529060010190602001808311610bbb57829003601f168201915b50505050508152602001600582018054610bf1906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1d906146b8565b8015610c6a5780601f10610c3f57610100808354040283529160200191610c6a565b820191906000526020600020905b815481529060010190602001808311610c4d57829003601f168201915b5050509183525050600682015460ff80821615156020808501919091526101009283900490911615156040808501919091526007850154606085015260088501546080850152600985015460a0850152600a9094015460c0909301929092528251918201909252600081529082015191925090610d04575060408051808201909152600681526521b7b6b6b7b760d11b6020820152610dc5565b81610100015160011415610d3757506040805180820190915260088152672ab731b7b6b6b7b760c11b6020820152610dc5565b81610100015160021415610d6657506040805180820190915260048152635261726560e01b6020820152610dc5565b81610100015160031415610d9557506040805180820190915260048152634570696360e01b6020820152610dc5565b81610100015160041415610dc557506040805180820190915260098152684c6567656e6461727960b81b60208201525b6000610e07836040015184606001518560a00151866080015186604051602001610df39594939291906149b0565b604051602081830303815290604052612645565b905080604051602001610e1a9190614b44565b6040516020818303038152906040529350505050919050565b610e3e600033611e7f565b610e5a5760405162461bcd60e51b815260040161069b9061460e565b60095460015b818111610e8c576000818152600860205260409020600601805460ff1916841515179055600101610e60565b505050565b610e9c600033611e7f565b610eb85760405162461bcd60e51b815260040161069b9061460e565b8151610ecb90600a9060208501906139c7565b508051610e8c90600b9060208401906139c7565b610eea600033611233565b565b6001600160a01b038516331480610f085750610f08853361060d565b610f245760405162461bcd60e51b815260040161069b90614b89565b6106e18585858585612798565b600082815260076020526040902060010154610f4c81612942565b610e8c838361294c565b60006107a58183611e7f565b610f6a613a47565b60086000838152602001908152602001600020604051806101800160405290816000820154815260200160018201548152602001600282018054610fad906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd9906146b8565b80156110265780601f10610ffb57610100808354040283529160200191611026565b820191906000526020600020905b81548152906001019060200180831161100957829003601f168201915b5050505050815260200160038201805461103f906146b8565b80601f016020809104026020016040519081016040528092919081815260200182805461106b906146b8565b80156110b85780601f1061108d576101008083540402835291602001916110b8565b820191906000526020600020905b81548152906001019060200180831161109b57829003601f168201915b505050505081526020016004820180546110d1906146b8565b80601f01602080910402602001604051908101604052809291908181526020018280546110fd906146b8565b801561114a5780601f1061111f5761010080835404028352916020019161114a565b820191906000526020600020905b81548152906001019060200180831161112d57829003601f168201915b50505050508152602001600582018054611163906146b8565b80601f016020809104026020016040519081016040528092919081815260200182805461118f906146b8565b80156111dc5780601f106111b1576101008083540402835291602001916111dc565b820191906000526020600020905b8154815290600101906020018083116111bf57829003601f168201915b5050509183525050600682015460ff8082161515602084015261010090910416151560408201526007820154606082015260088201546080820152600982015460a0820152600a9091015460c09091015292915050565b6001600160a01b03811633146112a35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161069b565b6112ad82826129d2565b5050565b600954606090806112f45760408051600080825260208201909252906112ed565b6112da613a47565b8152602001906001900390816112d25790505b5091505090565b6112ff81600161497c565b6001600160401b0381111561131657611316613db9565b60405190808252806020026020018201604052801561134f57816020015b61133c613a47565b8152602001906001900390816113345790505b50915060405180610180016040528060008152602001600081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016000151581526020016000151581526020016000815260200160008152602001600081526020016000815250826000815181106113ff576113ff614966565b602090810291909101015260015b61141882600161497c565b8110156117095760086000828152602001908152602001600020604051806101800160405290816000820154815260200160018201548152602001600282018054611462906146b8565b80601f016020809104026020016040519081016040528092919081815260200182805461148e906146b8565b80156114db5780601f106114b0576101008083540402835291602001916114db565b820191906000526020600020905b8154815290600101906020018083116114be57829003601f168201915b505050505081526020016003820180546114f4906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054611520906146b8565b801561156d5780601f106115425761010080835404028352916020019161156d565b820191906000526020600020905b81548152906001019060200180831161155057829003601f168201915b50505050508152602001600482018054611586906146b8565b80601f01602080910402602001604051908101604052809291908181526020018280546115b2906146b8565b80156115ff5780601f106115d4576101008083540402835291602001916115ff565b820191906000526020600020905b8154815290600101906020018083116115e257829003601f168201915b50505050508152602001600582018054611618906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054611644906146b8565b80156116915780601f1061166657610100808354040283529160200191611691565b820191906000526020600020905b81548152906001019060200180831161167457829003601f168201915b5050509183525050600682015460ff8082161515602084015261010090910416151560408201526007820154606082015260088201546080820152600982015460a0820152600a9091015460c09091015283518490839081106116f6576116f6614966565b602090810291909101015260010161140d565b505b5090565b606081518351146117745760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161069b565b600083516001600160401b0381111561178f5761178f613db9565b6040519080825280602002602001820160405280156117b8578160200160208202803683370190505b50905060005b8451811015611830576118038582815181106117dc576117dc614966565b60200260200101518583815181106117f6576117f6614966565b60200260200101516106e8565b82828151811061181557611815614966565b602090810291909101015261182981614bd8565b90506117be565b509392505050565b60008181526003602052604081205415156107a5565b61186660008051602061503b83398151915233611e7f565b6118825760405162461bcd60e51b815260040161069b9061492f565b80156119405761189285846106e8565b8211156118d45760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f756768206974656d7360801b604482015260640161069b565b6001600160a01b03851660009081526004602090815260408083208684529091528120805484929061190790849061497c565b909155505060008481526005602090815260408083208684529091528120805484929061193590849061497c565b9091555061197a9050565b6001600160a01b03851660009081526004602090815260408083208684528252808320839055868352600582528083208684529091528120555b604080518381528215156020820152849186916001600160a01b038916917f7c6124d5232b02294955726a86cc495b3f9b6fb7998c96eb47d9d2804ac5f23c910160405180910390a45050505050565b6119d5600033611e7f565b6119f15760405162461bcd60e51b815260040161069b9061460e565b600954604080519182526020820183905233917f11e9400c2aef7503255c2a67efa69661cc51cc229283a49675f04cb01583bacb910160405180910390a2600955565b611a3f600033611e7f565b611a5b5760405162461bcd60e51b815260040161069b9061460e565b611a7360008051602061503b83398151915282612478565b50565b611a81600033611e7f565b611a9d5760405162461bcd60e51b815260040161069b9061460e565b80600954811115611ac05760405162461bcd60e51b815260040161069b90614645565b60008281526008602052604081208181556001810182905590611ae66002830182613aac565b611af4600383016000613aac565b611b02600483016000613aac565b611b10600583016000613aac565b5060068101805461ffff191690556000600782018190556008820181905560098201819055600a909101555050565b610e8c838383612a39565b611b55600033611e7f565b611b715760405162461bcd60e51b815260040161069b9061460e565b611a73600082610f31565b60026006541415611bcf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161069b565b6002600655611bec60008051602061503b83398151915233611e7f565b611c085760405162461bcd60e51b815260040161069b9061492f565b83828114611c625760405162461bcd60e51b815260206004820152602160248201527f4974656d7320617272617973206c656e677468277320646f6e2774206d6174636044820152600d60fb1b606482015260840161069b565b6000805b82811015611da857878782818110611c8057611c80614966565b60209081029290920135600081815260089093526040909220600601549193505060ff16611ce65760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd081cdd185c9d1959606a1b604482015260640161069b565b6009548210611d075760405162461bcd60e51b815260040161069b90614645565b60008281526008602052604090206001015415611da057600082815260086020526040902060010154868683818110611d4257611d42614966565b90506020020135611d52846121a5565b611d5c919061497c565b1115611da05760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b604482015260640161069b565b600101611c66565b50611e258388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a918291850190849080828437600092018290525060408051602081019091529081529250612a7c915050565b505060016006555050505050565b611e3e600033611e7f565b611e5a5760405162461bcd60e51b815260040161069b9061460e565b600980546001019081905560009081526008602052604090208190610e8c82826147ff565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600b80546107c3906146b8565b60026006541415611f0a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161069b565b6002600655611f2760008051602061503b83398151915233611e7f565b611f435760405162461bcd60e51b815260040161069b9061492f565b82600954811115611f665760405162461bcd60e51b815260040161069b90614645565b600084815260086020526040902060060154849060ff16611fbf5760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd081cdd185c9d1959606a1b604482015260640161069b565b600085815260086020526040902060010154156120405760008581526008602052604090206001015484611ff2876121a5565b611ffc919061497c565b11156120405760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b604482015260640161069b565b61205b83868660405180602001604052806000815250612bd6565b50506001600655505050565b60095460609060008161208b57505060408051600081526020810190915292915050565b60015b61209983600161497c565b8110156120ce576000858152600560209081526040808320848452909152902054156120c6578160010191505b60010161208e565b50806001600160401b038111156120e7576120e7613db9565b604051908082528060200260200182016040528015612110578160200160208202803683370190505b509250600060015b61212384600161497c565b8110156121775760008681526005602090815260408083208484529091529020541561216f578085838151811061215c5761215c614966565b6020026020010181815250508160010191505b600101612118565b50505050919050565b6112ad338383612cbf565b60006107a560008051602061503b83398151915283611e7f565b6000818152600360205260408120546107a5565b600860205260009081526040902080546001820154600283018054929391926121e1906146b8565b80601f016020809104026020016040519081016040528092919081815260200182805461220d906146b8565b801561225a5780601f1061222f5761010080835404028352916020019161225a565b820191906000526020600020905b81548152906001019060200180831161223d57829003601f168201915b50505050509080600301805461226f906146b8565b80601f016020809104026020016040519081016040528092919081815260200182805461229b906146b8565b80156122e85780601f106122bd576101008083540402835291602001916122e8565b820191906000526020600020905b8154815290600101906020018083116122cb57829003601f168201915b5050505050908060040180546122fd906146b8565b80601f0160208091040260200160405190810160405280929190818152602001828054612329906146b8565b80156123765780601f1061234b57610100808354040283529160200191612376565b820191906000526020600020905b81548152906001019060200180831161235957829003601f168201915b50505050509080600501805461238b906146b8565b80601f01602080910402602001604051908101604052809291908181526020018280546123b7906146b8565b80156124045780601f106123d957610100808354040283529160200191612404565b820191906000526020600020905b8154815290600101906020018083116123e757829003601f168201915b5050506006840154600785015460088601546009870154600a90970154959660ff80851697610100909504169550919350918c565b612444600033611e7f565b6124605760405162461bcd60e51b815260040161069b9061460e565b611a7360008051602061503b83398151915282610f31565b60008281526007602052604090206001015461249381612942565b610e8c83836129d2565b6001600160a01b0385163314806124b957506124b9853361060d565b6124d55760405162461bcd60e51b815260040161069b90614b89565b6106e18585858585612da0565b6124ed600033611e7f565b6125095760405162461bcd60e51b815260040161069b9061460e565b6001600160a01b0381166125735760405162461bcd60e51b815260206004820152602b60248201527f5065726d697373696f6e65643a206e6577206f776e657220697320746865207a60448201526a65726f206164647265737360a81b606482015260840161069b565b61257c81611b4a565b611a73610edf565b610e8c838383612ed8565b60006001600160a01b0383166125fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b606482015260840161069b565b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216637965db0b60e01b14806107a557506107a582612f1b565b606081516000141561266557505060408051602081019091526000815290565b600060405180606001604052806040815260200161505b6040913990506000600384516002612694919061497c565b61269e9190614bf3565b6126a9906004614c15565b6001600160401b038111156126c0576126c0613db9565b6040519080825280601f01601f1916602001820160405280156126ea576020820181803683370190505b509050600182016020820185865187015b80821015612756576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f81168501518453506001830192506126fb565b505060038651066001811461277257600281146127855761278d565b603d6001830353603d600283035361278d565b603d60018303535b509195945050505050565b81518351146127b95760405162461bcd60e51b815260040161069b90614c34565b6001600160a01b0384166127df5760405162461bcd60e51b815260040161069b90614c7c565b336127ee818787878787612f6b565b60005b84518110156128d457600085828151811061280e5761280e614966565b60200260200101519050600085838151811061282c5761282c614966565b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561287c5760405162461bcd60e51b815260040161069b90614cc1565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128b990849061497c565b92505081905550505050806128cd90614bd8565b90506127f1565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612924929190614d0b565b60405180910390a461293a818787878787613112565b505050505050565b611a73813361327d565b6129568282611e7f565b6112ad5760008281526007602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561298e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6129dc8282611e7f565b156112ad5760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038316331480612a555750612a55833361060d565b612a715760405162461bcd60e51b815260040161069b90614b89565b610e8c8383836132e1565b6001600160a01b038416612aa25760405162461bcd60e51b815260040161069b90614d39565b8151835114612ac35760405162461bcd60e51b815260040161069b90614c34565b33612ad381600087878787612f6b565b60005b8451811015612b6e57838181518110612af157612af1614966565b6020026020010151600080878481518110612b0e57612b0e614966565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612b56919061497c565b90915550819050612b6681614bd8565b915050612ad6565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612bbf929190614d0b565b60405180910390a46106e181600087878787613112565b6001600160a01b038416612bfc5760405162461bcd60e51b815260040161069b90614d39565b336000612c088561347f565b90506000612c158561347f565b9050612c2683600089858589612f6b565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290612c5690849061497c565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612cb6836000898989896134ca565b50505050505050565b816001600160a01b0316836001600160a01b03161415612d335760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161069b565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416612dc65760405162461bcd60e51b815260040161069b90614c7c565b336000612dd28561347f565b90506000612ddf8561347f565b9050612def838989858589612f6b565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015612e305760405162461bcd60e51b815260040161069b90614cc1565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612e6d90849061497c565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612ecd848a8a8a8a8a6134ca565b505050505050505050565b6001600160a01b038316331480612ef45750612ef4833361060d565b612f105760405162461bcd60e51b815260040161069b90614b89565b610e8c838383613594565b60006001600160e01b03198216636cdb3d1360e11b1480612f4c57506001600160e01b031982166303a24d0760e21b145b806107a557506301ffc9a760e01b6001600160e01b03198316146107a5565b612f798686868686866136ac565b825160005b81811015613108576001600160a01b038716600090815260046020526040812086518290889085908110612fb457612fb4614966565b60200260200101518152602001908152602001600020549050600081111561305457848281518110612fe857612fe8614966565b6020026020010151613006898885815181106117f6576117f6614966565b10156130545760405162461bcd60e51b815260206004820152601d60248201527f4974656d7320696e207573652c2062616c616e636520746f6f206c6f77000000604482015260640161069b565b6008600087848151811061306a5761306a614966565b6020026020010151815260200190815260200160002060060160019054906101000a900460ff16156130ff576001600160a01b03881615806130b357506001600160a01b038716155b6130ff5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206973206e6f6e7472616e7366657261626c650000000000000000604482015260640161069b565b50600101612f7e565b5050505050505050565b6001600160a01b0384163b1561293a5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906131569089908990889088908890600401614d7a565b602060405180830381600087803b15801561317057600080fd5b505af19250505080156131a0575060408051601f3d908101601f1916820190925261319d91810190614dd8565b60015b61324d576131ac614df5565b806308c379a014156131e657506131c1614e11565b806131cc57506131e8565b8060405162461bcd60e51b815260040161069b9190613c27565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161069b565b6001600160e01b0319811663bc197c8160e01b14612cb65760405162461bcd60e51b815260040161069b90614e9a565b6132878282611e7f565b6112ad5761329f816001600160a01b03166014613825565b6132aa836020613825565b6040516020016132bb929190614ee2565b60408051601f198184030181529082905262461bcd60e51b825261069b91600401613c27565b6001600160a01b0383166133075760405162461bcd60e51b815260040161069b90614f57565b80518251146133285760405162461bcd60e51b815260040161069b90614c34565b600033905061334b81856000868660405180602001604052806000815250612f6b565b60005b835181101561341057600084828151811061336b5761336b614966565b60200260200101519050600084838151811061338957613389614966565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156133d95760405162461bcd60e51b815260040161069b90614f9a565b6000928352602083815260408085206001600160a01b038b168652909152909220910390558061340881614bd8565b91505061334e565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613461929190614d0b565b60405180910390a46040805160208101909152600090525b50505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106134b9576134b9614966565b602090810291909101015292915050565b6001600160a01b0384163b1561293a5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061350e9089908990889088908890600401614fde565b602060405180830381600087803b15801561352857600080fd5b505af1925050508015613558575060408051601f3d908101601f1916820190925261355591810190614dd8565b60015b613564576131ac614df5565b6001600160e01b0319811663f23a6e6160e01b14612cb65760405162461bcd60e51b815260040161069b90614e9a565b6001600160a01b0383166135ba5760405162461bcd60e51b815260040161069b90614f57565b3360006135c68461347f565b905060006135d38461347f565b90506135f383876000858560405180602001604052806000815250612f6b565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156136345760405162461bcd60e51b815260040161069b90614f9a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052612cb6565b6001600160a01b0385166137335760005b8351811015613731578281815181106136d8576136d8614966565b6020026020010151600360008684815181106136f6576136f6614966565b60200260200101518152602001908152602001600020600082825461371b919061497c565b9091555061372a905081614bd8565b90506136bd565b505b6001600160a01b03841661293a5760005b8351811015612cb657600084828151811061376157613761614966565b60200260200101519050600084838151811061377f5761377f614966565b60200260200101519050600060036000848152602001908152602001600020549050818110156138025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b606482015260840161069b565b6000928352600360205260409092209103905561381e81614bd8565b9050613744565b60606000613834836002614c15565b61383f90600261497c565b6001600160401b0381111561385657613856613db9565b6040519080825280601f01601f191660200182016040528015613880576020820181803683370190505b509050600360fc1b8160008151811061389b5761389b614966565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106138ca576138ca614966565b60200101906001600160f81b031916908160001a90535060006138ee846002614c15565b6138f990600161497c565b90505b6001811115613971576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061392d5761392d614966565b1a60f81b82828151811061394357613943614966565b60200101906001600160f81b031916908160001a90535060049490941c9361396a81615023565b90506138fc565b5083156139c05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161069b565b9392505050565b8280546139d3906146b8565b90600052602060002090601f0160209004810192826139f55760008555613a3b565b82601f10613a0e57805160ff1916838001178555613a3b565b82800160010185558215613a3b579182015b82811115613a3b578251825591602001919060010190613a20565b5061170b929150613ae2565b604051806101800160405280600081526020016000815260200160608152602001606081526020016060815260200160608152602001600015158152602001600015158152602001600081526020016000815260200160008152602001600081525090565b508054613ab8906146b8565b6000825580601f10613ac8575050565b601f016020900490600052602060002090810190611a7391905b5b8082111561170b5760008155600101613ae3565b60006101808284031215613b0a57600080fd5b50919050565b60008060408385031215613b2357600080fd5b8235915060208301356001600160401b03811115613b4057600080fd5b613b4c85828601613af7565b9150509250929050565b80356001600160a01b0381168114613b6d57600080fd5b919050565b60008060408385031215613b8557600080fd5b613b8e83613b56565b946020939093013593505050565b6001600160e01b031981168114611a7357600080fd5b600060208284031215613bc457600080fd5b81356139c081613b9c565b60005b83811015613bea578181015183820152602001613bd2565b838111156134795750506000910152565b60008151808452613c13816020860160208601613bcf565b601f01601f19169290920160200192915050565b6020815260006139c06020830184613bfb565b60008083601f840112613c4c57600080fd5b5081356001600160401b03811115613c6357600080fd5b6020830191508360208260051b8501011115613c7e57600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613ca457600080fd5b8a356001600160401b0380821115613cbb57600080fd5b613cc78e838f01613c3a565b909c509a5060208d0135915080821115613ce057600080fd5b613cec8e838f01613c3a565b909a50985060408d0135915080821115613d0557600080fd5b613d118e838f01613c3a565b909850965060608d0135915080821115613d2a57600080fd5b613d368e838f01613c3a565b909650945060808d0135915080821115613d4f57600080fd5b50613d5c8d828e01613c3a565b915080935050809150509295989b9194979a5092959850565b600060208284031215613d8757600080fd5b5035919050565b8015158114611a7357600080fd5b600060208284031215613dae57600080fd5b81356139c081613d8e565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613df457613df4613db9565b6040525050565b600082601f830112613e0c57600080fd5b81356001600160401b03811115613e2557613e25613db9565b604051613e3c601f8301601f191660200182613dcf565b818152846020838601011115613e5157600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613e8157600080fd5b82356001600160401b0380821115613e9857600080fd5b613ea486838701613dfb565b93506020850135915080821115613eba57600080fd5b50613b4c85828601613dfb565b60008060408385031215613eda57600080fd5b50508035926020909101359150565b60006001600160401b03821115613f0257613f02613db9565b5060051b60200190565b600082601f830112613f1d57600080fd5b81356020613f2a82613ee9565b604051613f378282613dcf565b83815260059390931b8501820192828101915086841115613f5757600080fd5b8286015b84811015613f725780358352918301918301613f5b565b509695505050505050565b600080600080600060a08688031215613f9557600080fd5b613f9e86613b56565b9450613fac60208701613b56565b935060408601356001600160401b0380821115613fc857600080fd5b613fd489838a01613f0c565b94506060880135915080821115613fea57600080fd5b613ff689838a01613f0c565b9350608088013591508082111561400c57600080fd5b5061401988828901613dfb565b9150509295509295909350565b6000806040838503121561403957600080fd5b8235915061404960208401613b56565b90509250929050565b60006020828403121561406457600080fd5b6139c082613b56565b60006101808251845260208301516020850152604083015181604086015261409782860182613bfb565b915050606083015184820360608601526140b18282613bfb565b915050608083015184820360808601526140cb8282613bfb565b91505060a083015184820360a08601526140e58282613bfb565b91505060c08301516140fb60c086018215159052565b5060e083015161410f60e086018215159052565b506101008381015190850152610120808401519085015261014080840151908501526101609283015192909301919091525090565b6020815260006139c0602083018461406d565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156141ac57603f1988860301845261419a85835161406d565b9450928501929085019060010161417e565b5092979650505050505050565b600080604083850312156141cc57600080fd5b82356001600160401b03808211156141e357600080fd5b818501915085601f8301126141f757600080fd5b8135602061420482613ee9565b6040516142118282613dcf565b83815260059390931b850182019282810191508984111561423157600080fd5b948201945b838610156142565761424786613b56565b82529482019490820190614236565b9650508601359250508082111561426c57600080fd5b50613b4c85828601613f0c565b600081518084526020808501945080840160005b838110156142a95781518752958201959082019060010161428d565b509495945050505050565b6020815260006139c06020830184614279565b600080600080600060a086880312156142df57600080fd5b6142e886613b56565b9450602086013593506040860135925060608601359150608086013561430d81613d8e565b809150509295509295909350565b60008060006060848603121561433057600080fd5b61433984613b56565b925060208401356001600160401b038082111561435557600080fd5b61436187838801613f0c565b9350604086013591508082111561437757600080fd5b5061438486828701613f0c565b9150509250925092565b6000806000806000606086880312156143a657600080fd5b85356001600160401b03808211156143bd57600080fd5b6143c989838a01613c3a565b909750955060208801359150808211156143e257600080fd5b506143ef88828901613c3a565b9094509250614402905060408701613b56565b90509295509295909350565b60006020828403121561442057600080fd5b81356001600160401b0381111561443657600080fd5b61444284828501613af7565b949350505050565b60008060006060848603121561445f57600080fd5b833592506020840135915061447660408501613b56565b90509250925092565b6000806040838503121561449257600080fd5b61449b83613b56565b915060208301356144ab81613d8e565b809150509250929050565b60006101808e83528d60208401528060408401526144d68184018e613bfb565b905082810360608401526144ea818d613bfb565b905082810360808401526144fe818c613bfb565b905082810360a0840152614512818b613bfb565b98151560c0840152505094151560e0860152610100850193909352610120840191909152610140830152610160909101529695505050505050565b6000806040838503121561456057600080fd5b61456983613b56565b915061404960208401613b56565b600080600080600060a0868803121561458f57600080fd5b61459886613b56565b94506145a660208701613b56565b9350604086013592506060860135915060808601356001600160401b038111156145cf57600080fd5b61401988828901613dfb565b6000806000606084860312156145f057600080fd5b6145f984613b56565b95602085013595506040909401359392505050565b60208082526017908201527f43616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b602080825260139082015272125d195b48191bd95cc81b9bdd08195e1a5cdd606a1b604082015260600190565b6000808335601e1984360301811261468957600080fd5b8301803591506001600160401b038211156146a357600080fd5b602001915036819003821315613c7e57600080fd5b600181811c908216806146cc57607f821691505b60208210811415613b0a57634e487b7160e01b600052602260045260246000fd5b601f821115610e8c57600081815260208120601f850160051c810160208610156147145750805b601f850160051c820191505b8181101561293a57828155600101614720565b6001600160401b0383111561474a5761474a613db9565b61475e8361475883546146b8565b836146ed565b6000601f841160018114614792576000851561477a5750838201355b600019600387901b1c1916600186901b1783556106e1565b600083815260209020601f19861690835b828110156147c357868501358255602094850194600190920191016147a3565b50868210156147e05760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600081356107a581613d8e565b813581556020820135600182015561481a6040830183614672565b614828818360028601614733565b50506148376060830183614672565b614845818360038601614733565b50506148546080830183614672565b614862818360048601614733565b505061487160a0830183614672565b61487f818360058601614733565b5050600681016148a861489460c085016147f2565b825490151560ff1660ff1991909116178255565b6148d16148b760e085016147f2565b82805461ff00191691151560081b61ff0016919091179055565b50610100820135600782015561012082013560088201556101408201356009820155610160820135600a8201555050565b634e487b7160e01b600052601160045260246000fd5b60008282101561492a5761492a614902565b500390565b6020808252601f908201527f43616c6c657220646f6573206e6f742068617665207065726d697373696f6e00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000821982111561498f5761498f614902565b500190565b600081516149a6818560208601613bcf565b9290920192915050565b607b60f81b815268113730b6b2911d101160b91b600182015285516000906149df81600a850160208b01613bcf565b61088b60f21b600a9184019182018190526f113232b9b1b934b83a34b7b7111d101160811b600c8301528751614a1c81601c850160208c01613bcf565b601c920191820152711130b734b6b0ba34b7b72fbab936111d101160711b601e8201528551614a52816030840160208a01613bcf565b614b37614b2a614b1d614b0e614b08614ac9614aae614aa0614a9a614a8460308b8d010161088b60f21b815260020190565b691134b6b0b3b2911d101160b11b8152600a0190565b8e614994565b61088b60f21b815260020190565b6e2261747472696275746573223a205b60881b8152600f0190565b7f7b20226964223a20302c202274726169745f74797065223a202252617269747981526c111610113b30b63ab2911d101160991b6020820152602d0190565b89614994565b6222207d60e81b815260030190565b605d60f81b815260010190565b607d60f81b815260010190565b9998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251614b7c81601d850160208701613bcf565b91909101601d0192915050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6000600019821415614bec57614bec614902565b5060010190565b600082614c1057634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615614c2f57614c2f614902565b500290565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000614d1e6040830185614279565b8281036020840152614d308185614279565b95945050505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b0386811682528516602082015260a060408201819052600090614da690830186614279565b8281036060840152614db88186614279565b90508281036080840152614dcc8185613bfb565b98975050505050505050565b600060208284031215614dea57600080fd5b81516139c081613b9c565b600060033d1115614e0e5760046000803e5060005160e01c5b90565b600060443d1015614e1f5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715614e4e57505050505090565b8285019150815181811115614e665750505050505090565b843d8701016020828501011115614e805750505050505090565b614e8f60208286010187613dcf565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f1a816017850160208801613bcf565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614f4b816028840160208801613bcf565b01602801949350505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061501890830184613bfb565b979650505050505050565b60008161503257615032614902565b50600019019056fe7def632d64a7259044c921303d544f945a340c8d4334adc0e0bd830a54deb5284142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220575e312fc7aee1e98f67a6462a513b4a1f922f13e2ef1dbf7cad3a26e6ff401864736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e4661726d6c616e64204974656d7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054954454d53000000000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e4661726d6c616e64204974656d7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054954454d53000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Farmland Items
Arg [1] : symbol_ (string): ITEMS

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [3] : 4661726d6c616e64204974656d73000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 4954454d53000000000000000000000000000000000000000000000000000000


Loading