ETH Price: $3,112.97 (-2.20%)

Token

Rave Pigs ()
 

Overview

Max Total Supply

6,666

Holders

2,756

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0x716470e6a49244bbfc986e1d2af993c5c46e1983
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Super1155

Compiler Version
v0.8.8+commit.dddeac2f

Optimization Enabled:
Yes with 0 runs

Other Settings:
default evmVersion
File 1 of 14 : Super1155.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/Address.sol";

import "../../access/PermitControl.sol";
import "../../proxy/StubProxyRegistry.sol";
import "../../libraries/DFStorage.sol";
import "./interfaces/ISuper1155.sol";

/**
  @title An ERC-1155 item creation contract.
  @author Tim Clancy
  @author Qazawat Zirak
  @author Rostislav Khlebnikov
  @author Nikita Elunin

  This contract represents the NFTs within a single collection. It allows for a
  designated collection owner address to manage the creation of NFTs within this
  collection. The collection owner grants approval to or removes approval from
  other addresses governing their ability to mint NFTs from this collection.

  This contract is forked from the inherited OpenZeppelin dependency, and uses
  ideas from the original ERC-1155 reference implementation.

  July 19th, 2021.
*/
contract Super1155 is PermitControl, ERC165Storage, IERC1155, IERC1155MetadataURI {
  using Address for address;

  uint256 MAX_INT = type(uint256).max;

  /// The public identifier for the right to set this contract's metadata URI.
  bytes32 public constant SET_URI = keccak256("SET_URI");

  /// The public identifier for the right to set this contract's proxy registry.
  bytes32 public constant SET_PROXY_REGISTRY = keccak256("SET_PROXY_REGISTRY");

  /// The public identifier for the right to configure item groups.
  bytes32 public constant CONFIGURE_GROUP = keccak256("CONFIGURE_GROUP");

  /// The public identifier for the right to mint items.
  bytes32 public constant MINT  = keccak256("MINT");

  /// The public identifier for the right to burn items.
  bytes32 public constant BURN = keccak256("BURN");

  /// The public identifier for the right to set item metadata.
  bytes32 public constant SET_METADATA = keccak256("SET_METADATA");

  /// The public identifier for the right to lock the metadata URI.
  bytes32 public constant LOCK_URI = keccak256("LOCK_URI");

  /// The public identifier for the right to lock an item's metadata.
  bytes32 public constant LOCK_ITEM_URI = keccak256("LOCK_ITEM_URI");

  /// The public identifier for the right to disable item creation.
  bytes32 public constant LOCK_CREATION = keccak256("LOCK_CREATION");

  /// @dev Supply the magic number for the required ERC-1155 interface.
  bytes4 private constant INTERFACE_ERC1155 = 0xd9b67a26;

  /// @dev Supply the magic number for the required ERC-1155 metadata extension.
  bytes4 private constant INTERFACE_ERC1155_METADATA_URI = 0x0e89341c;

  /// @dev A mask for isolating an item's group ID.
  uint256 private constant GROUP_MASK = uint256(type(uint128).max) << 128;

  /// The public name of this contract.
  string public name;

  /**
    The ERC-1155 URI for tracking item metadata, supporting {id} substitution.
    For example: https://token-cdn-domain/{id}.json. See the ERC-1155 spec for
    more details: https://eips.ethereum.org/EIPS/eip-1155#metadata.
  */
  string public metadataUri;

  /// The URI for the storefront-level metadata of contract
  string public contractURI;

  /// A proxy registry address for supporting automatic delegated approval.
  address public proxyRegistryAddress;

  /// @dev A mapping from each token ID to per-address balances.
  mapping (uint256 => mapping(address => uint256)) private balances;

  /// A mapping from each group ID to per-address balances.
  mapping (uint256 => mapping(address => uint256)) public groupBalances;

  /// A mapping from each address to a collection-wide balance.
  mapping(address => uint256) public totalBalances;

  /**
    @dev This is a mapping from each address to per-address operator approvals.
    Operators are those addresses that have been approved to transfer tokens on
    behalf of the approver. Transferring tokens includes the right to burn
    tokens.
  */
  mapping (address => mapping(address => bool)) private operatorApprovals;

  /**
    This struct defines the settings for a particular item group and is tracked
    in storage.

    @param initialized Whether or not this `ItemGroup` has been initialized.
    @param name A name for the item group.
    @param supplyType The supply type for this group of items.
    @param supplyData An optional integer used by some `supplyType` values.
    @param itemType The type of item represented by this item group.
    @param itemData An optional integer used by some `itemType` values.
    @param burnType The type of burning permitted by this item group.
    @param burnData An optional integer used by some `burnType` values.
    @param circulatingSupply The number of individual items within this group in
      circulation.
    @param mintCount The number of times items in this group have been minted.
    @param burnCount The number of times items in this group have been burnt.
  */
  struct ItemGroup {
    uint256 burnData;
    uint256 circulatingSupply;
    uint256 mintCount;
    uint256 burnCount;
    uint256 supplyData;
    uint256 itemData;
    bool initialized;
    DFStorage.SupplyType supplyType;
    DFStorage.ItemType itemType;
    DFStorage.BurnType burnType;
    string name;
  }

  /// A mapping of data for each item group.
  mapping (uint256 => ItemGroup) public itemGroups;

  /// A mapping of circulating supplies for each individual token.
  mapping (uint256 => uint256) public circulatingSupply;

  /// A mapping of the number of times each individual token has been minted.
  mapping (uint256 => uint256) public mintCount;

  /// A mapping of the number of times each individual token has been burnt.
  mapping (uint256 => uint256) public burnCount;

  /**
    A mapping of token ID to a boolean representing whether the item's metadata
    has been explicitly frozen via a call to `lockURI(string calldata _uri,
    uint256 _id)`. Do note that it is possible for an item's mapping here to be
    false while still having frozen metadata if the item collection as a whole
    has had its `uriLocked` value set to true.
  */
  mapping (uint256 => bool) public metadataFrozen;

  /**
    A public mapping of optional on-chain metadata for each token ID. A token's
    on-chain metadata is unable to be changed if the item's metadata URI has
    been permanently fixed or if the collection's metadata URI as a whole has
    been frozen.
  */
  mapping (uint256 => string) public metadata;

  /// Whether or not the metadata URI has been locked to future changes.
  bool public uriLocked;

  /// Whether or not the contract URI has been locked to future changes.
  bool public contractUriLocked;

  /// Whether or not the item collection has been locked to all further minting.
  bool public locked;

  /**
    An event that gets emitted when the metadata collection URI is changed.

    @param oldURI The old metadata URI.
    @param newURI The new metadata URI.
  */
  event ChangeURI(string indexed oldURI, string indexed newURI);

  /**
    An event that gets emitted when the proxy registry address is changed.

    @param oldRegistry The old proxy registry address.
    @param newRegistry The new proxy registry address.
  */
  event ChangeProxyRegistry(address indexed oldRegistry,
    address indexed newRegistry);

  /**
    An event that gets emitted when an item group is configured.

    @param manager The caller who configured the item group `_groupId`.
    @param groupId The groupId being configured.
    @param newGroup The new group configuration.
  */
  event ItemGroupConfigured(address indexed manager, uint256 groupId,
    DFStorage.ItemGroupInput indexed newGroup);

  /**
    An event that gets emitted when the item collection is locked to further
    creation.

    @param locker The caller who locked the collection.
  */
  event CollectionLocked(address indexed locker);

  /**
    An event that gets emitted when a token ID has its on-chain metadata
    changed.

    @param changer The caller who triggered the metadata change.
    @param id The ID of the token which had its metadata changed.
    @param oldMetadata The old metadata of the token.
    @param newMetadata The new metadata of the token.
  */
  event MetadataChanged(address indexed changer, uint256 indexed id,
    string oldMetadata, string indexed newMetadata);

  /**
    An event that indicates we have set a permanent metadata URI for a token.

    @param _value The value of the permanent metadata URI.
    @param _id The token ID associated with the permanent metadata value.
  */
  event PermanentURI(string _value, uint256 indexed _id);

  /**
    An event that emmited when the contract URI is changed

    @param oldURI The old contract URI
    @param newURI The new contract URI
   */
  event ChangeContractURI(string indexed oldURI, string indexed newURI);

  /**
    An event that indicates we have set a permanent contract URI.

    @param _value The value of the permanent contract URI.
    @param _id The token ID associated with the permanent metadata value.
  */
  event PermanentContractURI(string _value, uint256 indexed _id);

  /**
    Construct a new ERC-1155 item collection.

    @param _name The name to assign to this item collection contract.
    @param _metadataURI The metadata URI to perform later token ID substitution with.
    @param _contractURI The contract URI.
    @param _proxyRegistryAddress The address of a proxy registry contract.
  */
  constructor(address _owner, string memory _name, string memory _metadataURI,
    string memory _contractURI, address _proxyRegistryAddress) {

    // Register the ERC-165 interfaces.
    _registerInterface(INTERFACE_ERC1155);
    _registerInterface(INTERFACE_ERC1155_METADATA_URI);

    setPermit(_msgSender(), UNIVERSAL, CONFIGURE_GROUP, MAX_INT);

     if (_owner != owner()) {
      transferOwnership(_owner);
    }
    // Continue initialization.
    name = _name;
    metadataUri = _metadataURI;
    contractURI = _contractURI;
    proxyRegistryAddress = _proxyRegistryAddress;
  }

  /**
    Return a version number for this contract's interface.
  */
  function version() external virtual override pure returns (uint256) {
    return 1;
  }

  /**
    Return the item collection's metadata URI. This implementation returns the
    same URI for all tokens within the collection and relies on client-side
    ID substitution per https://eips.ethereum.org/EIPS/eip-1155#metadata. Per
    said specification, clients calling this function must replace the {id}
    substring with the actual token ID in hex, not prefixed by 0x, and padded
    to 64 characters in length.

    @return The metadata URI string of the item with ID `_itemId`.
  */
  function uri(uint256) external view returns (string memory) {
    return metadataUri;
  }


  /**
    Allow the item collection owner or an approved manager to update the
    metadata URI of this collection. This implementation relies on a single URI
    for all items within the collection, and as such does not emit the standard
    URI event. Instead, we emit our own event to reflect changes in the URI.

    @param _uri The new URI to update to.
  */
  function setURI(string calldata _uri) external virtual
    hasValidPermit(UNIVERSAL, SET_URI) {
    require(!uriLocked,
      "Super1155: the collection URI has been permanently locked");
    string memory oldURI = metadataUri;
    metadataUri = _uri;
    emit ChangeURI(oldURI, _uri);
  }

  /**
    Allow approved manager to update the contract URI. At the end of update, we 
    emit our own event to reflect changes in the URI.

    @param _uri The new contract URI to update to.
  */
  function setContractUri(string calldata _uri) external virtual
    hasValidPermit(UNIVERSAL, SET_URI) {
      require(!contractUriLocked,
        "Super1155: the contract URI has been permanently locked");
      string memory oldContractUri = contractURI;
      contractURI = _uri;
      emit ChangeContractURI(oldContractUri, _uri);
  }

  /**
    Allow the item collection owner or an approved manager to update the proxy
    registry address handling delegated approval.

    @param _proxyRegistryAddress The address of the new proxy registry to
      update to.
  */
  function setProxyRegistry(address _proxyRegistryAddress) external virtual
    hasValidPermit(UNIVERSAL, SET_PROXY_REGISTRY) {
    address oldRegistry = proxyRegistryAddress;
    proxyRegistryAddress = _proxyRegistryAddress;
    emit ChangeProxyRegistry(oldRegistry, _proxyRegistryAddress);
  }

  /**
    Retrieve the balance of a particular token `_id` for a particular address
    `_owner`.

    @param _owner The owner to check for this token balance.
    @param _id The ID of the token to check for a balance.
    @return The amount of token `_id` owned by `_owner`.
  */
  function balanceOf(address _owner, uint256 _id) public view virtual
  returns (uint256) {
    require(_owner != address(0),
      "ERC1155: balance query for the zero address");
    return balances[_id][_owner];
  }

  /**
    Retrieve in a single call the balances of some mulitple particular token
    `_ids` held by corresponding `_owners`.

    @param _owners The owners to check for token balances.
    @param _ids The IDs of tokens to check for balances.
    @return the amount of each token owned by each owner.
  */
  function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids)
    external view virtual returns (uint256[] memory) {
    require(_owners.length == _ids.length,
      "ERC1155: accounts and ids length mismatch");

    // Populate and return an array of balances.
    uint256[] memory batchBalances = new uint256[](_owners.length);
    for (uint256 i = 0; i < _owners.length; ++i) {
      batchBalances[i] = balanceOf(_owners[i], _ids[i]);
    }
    return batchBalances;
  }

  /**
    This function returns true if `_operator` is approved to transfer items
    owned by `_owner`. This approval check features an override to explicitly
    whitelist any addresses delegated in the proxy registry.

    @param _owner The owner of items to check for transfer ability.
    @param _operator The potential transferrer of `_owner`'s items.
    @return Whether `_operator` may transfer items owned by `_owner`.
  */
  function isApprovedForAll(address _owner, address _operator) public
    view virtual returns (bool) {
    if (StubProxyRegistry(proxyRegistryAddress).proxies(_owner) == _operator) {
      return true;
    }

    // We did not find an explicit whitelist in the proxy registry.
    return operatorApprovals[_owner][_operator];
  }

  /**
    Enable or disable approval for a third party `_operator` address to manage
    (transfer or burn) all of the caller's tokens.

    @param _operator The address to grant management rights over all of the
      caller's tokens.
    @param _approved The status of the `_operator`'s approval for the caller.
  */
  function setApprovalForAll(address _operator, bool _approved) external
    virtual {
    require(_msgSender() != _operator,
      "ERC1155: setting approval status for self");
    operatorApprovals[_msgSender()][_operator] = _approved;
    emit ApprovalForAll(_msgSender(), _operator, _approved);
  }

  /**
    This private helper function converts a number into a single-element array.

    @param _element The element to convert to an array.
    @return The array containing the single `_element`.
  */
  function _asSingletonArray(uint256 _element) private pure
    returns (uint256[] memory) {
    uint256[] memory array = new uint256[](1);
    array[0] = _element;
    return array;
  }

  /**
    An inheritable and configurable pre-transfer hook that can be overridden.
    It fires before any token transfer, including mints and burns.

    @param _operator The caller who triggers the token transfer.
    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _ids The specific token IDs to transfer.
    @param _amounts The amounts of the specific `_ids` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function _beforeTokenTransfer(address _operator, address _from, address _to,
    uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)
    internal virtual {
  }

  /**
    ERC-1155 dictates that any contract which wishes to receive ERC-1155 tokens
    must explicitly designate itself as such. This function checks for such
    designation to prevent undesirable token transfers.

    @param _operator The caller who triggers the token transfer.
    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _id The specific token ID to transfer.
    @param _amount The amount of the specific `_id` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function _doSafeTransferAcceptanceCheck(address _operator, address _from,
    address _to, uint256 _id, uint256 _amount, bytes calldata _data) private {
    if (_to.isContract()) {
      try IERC1155Receiver(_to).onERC1155Received(_operator, _from, _id,
        _amount, _data) returns (bytes4 response) {
        if (response != IERC1155Receiver(_to).onERC1155Received.selector) {
          revert("ERC1155: ERC1155Receiver rejected tokens");
        }
      } catch Error(string memory reason) {
        revert(reason);
      } catch {
        revert("ERC1155: transfer to non ERC1155Receiver implementer");
      }
    }
  }

  /**
    The batch equivalent of `_doSafeTransferAcceptanceCheck()`.

    @param _operator The caller who triggers the token transfer.
    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _ids The specific token IDs to transfer.
    @param _amounts The amounts of the specific `_ids` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  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(_to).onERC1155BatchReceived.selector) {
          revert("ERC1155: ERC1155Receiver rejected tokens");
        }
      } catch Error(string memory reason) {
        revert(reason);
      } catch {
        revert("ERC1155: transfer to non ERC1155Receiver implementer");
      }
    }
  }

  /**
    Transfer on behalf of a caller or one of their authorized token managers
    items from one address to another.

    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _ids The specific token IDs to transfer.
    @param _amounts The amounts of the specific `_ids` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function safeBatchTransferFrom(address _from, address _to,
    uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)
    public virtual {
    require(_ids.length == _amounts.length,
      "ERC1155: ids and amounts length mismatch");
    require(_to != address(0),
      "ERC1155: transfer to the zero address");
    require(_from == _msgSender() || isApprovedForAll(_from, _msgSender()),
      "ERC1155: caller is not owner nor approved");

    // Validate transfer and perform all batch token sends.
    _beforeTokenTransfer(_msgSender(), _from, _to, _ids, _amounts, _data);
    for (uint256 i = 0; i < _ids.length; ++i) {

      // Retrieve the item's group ID.
      uint256 groupId = (_ids[i] & GROUP_MASK) >> 128;

      // Update all specially-tracked group-specific balances.
      require(balances[_ids[i]][_from] >= _amounts[i], "ERC1155: insufficient balance for transfer");
      balances[_ids[i]][_from] = balances[_ids[i]][_from] - _amounts[i];
      balances[_ids[i]][_to] = balances[_ids[i]][_to] + _amounts[i];
      groupBalances[groupId][_from] = groupBalances[groupId][_from] - _amounts[i];
      groupBalances[groupId][_to] = groupBalances[groupId][_to] + _amounts[i];
      totalBalances[_from] = totalBalances[_from] - _amounts[i];
      totalBalances[_to] = totalBalances[_to] + _amounts[i];
    }

    // Emit the transfer event and perform the safety check.
    emit TransferBatch(_msgSender(), _from, _to, _ids, _amounts);
    _doSafeBatchTransferAcceptanceCheck(_msgSender(), _from, _to, _ids,
      _amounts, _data);
  }


  /**
    Transfer on behalf of a caller or one of their authorized token managers
    items from one address to another.

    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _id The specific token ID to transfer.
    @param _amount The amount of the specific `_id` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function safeTransferFrom(address _from, address _to, uint256 _id,
    uint256 _amount, bytes calldata _data) external  virtual {
      safeBatchTransferFrom(_from, _to, _asSingletonArray(_id), _asSingletonArray(_amount), _data);
  }

  /**
    Create a new NFT item group or configure an existing one. NFTs within a
    group share a group ID in the upper 128-bits of their full item ID.
    Within a group NFTs can be distinguished for the purposes of serializing
    issue numbers.

    @param _groupId The ID of the item group to create or configure.
    @param _data The `ItemGroup` data input.
  */
  function configureGroup(uint256 _groupId, DFStorage.ItemGroupInput calldata _data) external  {
    require(_groupId != 0,
      "Super1155: group ID 0 is invalid");
    require(_hasItemRight(_groupId, CONFIGURE_GROUP), "Super1155: you don't have rights to configure group");

    // If the collection is not locked, we may add a new item group.
    if (!itemGroups[_groupId].initialized) {
      require(!locked,
        "Super1155: the collection is locked so groups cannot be created");
      itemGroups[_groupId] = ItemGroup({
        initialized: true,
        name: _data.name,
        supplyType: _data.supplyType,
        supplyData: _data.supplyData,
        itemType: _data.itemType,
        itemData: _data.itemData,
        burnType: _data.burnType,
        burnData: _data.burnData,
        circulatingSupply: 0,
        mintCount: 0,
        burnCount: 0
      });

    // Edit an existing item group. The name may always be updated.
    } else {
      itemGroups[_groupId].name = _data.name;

      // A capped supply type may not change.
      // It may also not have its cap increased.
      if (itemGroups[_groupId].supplyType == DFStorage.SupplyType.Capped) {
        require(_data.supplyType == DFStorage.SupplyType.Capped,
          "Super1155: you may not uncap a capped supply type");
        require(_data.supplyData <= itemGroups[_groupId].supplyData,
          "Super1155: you may not increase the supply of a capped type");

      // The flexible and uncapped types may freely change.
      } else {
        itemGroups[_groupId].supplyType = _data.supplyType;
      }

      // Item supply data may not be reduced below the circulating supply.
      require(_data.supplyData >= itemGroups[_groupId].circulatingSupply,
        "Super1155: you may not decrease supply below the circulating amount");
      itemGroups[_groupId].supplyData = _data.supplyData;

      // A nonfungible item may not change type.
      if (itemGroups[_groupId].itemType == DFStorage.ItemType.Nonfungible) {
        require(_data.itemType == DFStorage.ItemType.Nonfungible,
          "Super1155: you may not alter nonfungible items");

      // A semifungible item may not change type.
      } else if (itemGroups[_groupId].itemType == DFStorage.ItemType.Semifungible) {
        require(_data.itemType == DFStorage.ItemType.Semifungible,
          "Super1155: you may not alter nonfungible items");

      // A fungible item may change type if it is unique enough.
      } else if (itemGroups[_groupId].itemType == DFStorage.ItemType.Fungible) {
        if (_data.itemType == DFStorage.ItemType.Nonfungible) {
          require(itemGroups[_groupId].circulatingSupply <= 1,
            "Super1155: the fungible item is not unique enough to change");
          itemGroups[_groupId].itemType = DFStorage.ItemType.Nonfungible;

        // We may also try for semifungible items with a high-enough cap.
        } else if (_data.itemType == DFStorage.ItemType.Semifungible) {
          require(itemGroups[_groupId].circulatingSupply <= _data.itemData,
            "Super1155: the fungible item is not unique enough to change");
          itemGroups[_groupId].itemType = DFStorage.ItemType.Semifungible;
          itemGroups[_groupId].itemData = _data.itemData;
        }
      }
    }

    // Emit the configuration event.
    emit ItemGroupConfigured(_msgSender(), _groupId, _data);
  }

  /**
    This is a private helper function to replace the `hasItemRight` modifier
    that we use on some functions in order to inline this check during batch
    minting and burning.

    @param _id The ID of the item to check for the given `_right` on.
    @param _right The right that the caller is trying to exercise on `_id`.
    @return Whether or not the caller has a valid right on this item.
  */
  function _hasItemRight(uint256 _id, bytes32 _right) private view
    returns (bool) {
    uint256 groupId = _id  >> 128;
    if (_msgSender() == owner()) {
      return true;
    }
    if (hasRight(_msgSender(), UNIVERSAL, _right)) {
      return true;
    } 
    if (hasRight(_msgSender(), bytes32(groupId), _right)) {
      return true;
    }
    if (hasRight(_msgSender(), bytes32(_id), _right)) {
      return true;
    } 
    return false;
  }

  /**
    This is a private helper function to verify, according to all of our various
    minting and burning rules, whether it would be valid to mint some `_amount`
    of a particular item `_id`.

    @param _id The ID of the item to check for minting validity.
    @param _amount The amount of the item to try checking mintability for.
    @return The ID of the item that should have `_amount` minted for it.
  */
  function _mintChecker(uint256 _id, uint256 _amount) private view
    returns (uint256) {

    // Retrieve the item's group ID.
    uint256 shiftedGroupId = (_id & GROUP_MASK);
    uint256 groupId = shiftedGroupId >> 128;
    require(itemGroups[groupId].initialized,
      "Super1155: you cannot mint a non-existent item group");

    // If we can replenish burnt items, then only our currently-circulating
    // supply matters. Otherwise, historic mints are what determine the cap.
    uint256 currentGroupSupply = itemGroups[groupId].mintCount;
    uint256 currentItemSupply = mintCount[_id];
    if (itemGroups[groupId].burnType == DFStorage.BurnType.Replenishable) {
      currentGroupSupply = itemGroups[groupId].circulatingSupply;
      currentItemSupply = circulatingSupply[_id];
    }

    // If we are subject to a cap on group size, ensure we don't exceed it.
    if (itemGroups[groupId].supplyType != DFStorage.SupplyType.Uncapped) {
      require((currentGroupSupply + _amount) <= itemGroups[groupId].supplyData,
        "Super1155: you cannot mint a group beyond its cap");
    }

    // Do not violate nonfungibility rules.
    if (itemGroups[groupId].itemType == DFStorage.ItemType.Nonfungible) {
      require((currentItemSupply + _amount) <= 1,
        "Super1155: you cannot mint more than a single nonfungible item");

    // Do not violate semifungibility rules.
    } else if (itemGroups[groupId].itemType == DFStorage.ItemType.Semifungible) {
      require((currentItemSupply + _amount) <= itemGroups[groupId].itemData,
        "Super1155: you cannot mint more than the alloted semifungible items");
    }

    // Fungible items are coerced into the single group ID + index one slot.
    uint256 mintedItemId = _id;
    if (itemGroups[groupId].itemType == DFStorage.ItemType.Fungible) {
      mintedItemId = shiftedGroupId + 1;
    }
    return mintedItemId;
  }

  /**
    Mint a batch of tokens into existence and send them to the `_recipient`
    address. In order to mint an item, its item group must first have been
    created. Minting an item must obey both the fungibility and size cap of its
    group.

    @param _recipient The address to receive all NFTs within the newly-minted
      group.
    @param _ids The item IDs for the new items to create.
    @param _amounts The amount of each corresponding item ID to create.
    @param _data Any associated data to use on items minted in this transaction.
  */
  function mintBatch(address _recipient, uint256[] calldata _ids,
    uint256[] calldata _amounts, bytes calldata _data)
    external  {
    require(_recipient != address(0),
      "ERC1155: mint to the zero address");
    require(_ids.length == _amounts.length,
      "ERC1155: ids and amounts length mismatch");

    // Validate and perform the mint.
    address operator = _msgSender();
    _beforeTokenTransfer(operator, address(0), _recipient, _ids, _amounts,
      _data);

    // Loop through each of the batched IDs to update storage of special
    // balances and circulation balances.
    for (uint256 i = 0; i < _ids.length; i++) {
      require(_hasItemRight(_ids[i], MINT),
        "Super1155: you do not have the right to mint that item");

      // Retrieve the group ID from the given item `_id` and check mint.
      uint256 groupId = _ids[i] >> 128;
      uint256 mintedItemId = _mintChecker(_ids[i], _amounts[i]);

      // Update storage of special balances and circulating values.
      balances[mintedItemId][_recipient] = balances[mintedItemId][_recipient] + _amounts[i];
      groupBalances[groupId][_recipient] = groupBalances[groupId][_recipient] + _amounts[i];
      totalBalances[_recipient] = totalBalances[_recipient] + _amounts[i];
      mintCount[mintedItemId] = mintCount[mintedItemId] + _amounts[i];
      circulatingSupply[mintedItemId] = circulatingSupply[mintedItemId] + _amounts[i];
      itemGroups[groupId].mintCount = itemGroups[groupId].mintCount + _amounts[i];
      itemGroups[groupId].circulatingSupply =
        itemGroups[groupId].circulatingSupply + _amounts[i];
    }

    // Emit event and handle the safety check.
    emit TransferBatch(operator, address(0), _recipient, _ids, _amounts);
    _doSafeBatchTransferAcceptanceCheck(operator, address(0), _recipient, _ids,
      _amounts, _data);
  }

  /**
    This is a private helper function to verify, according to all of our various
    minting and burning rules, whether it would be valid to burn some `_amount`
    of a particular item `_id`.

    @param _id The ID of the item to check for burning validity.
    @param _amount The amount of the item to try checking burning for.
    @return The ID of the item that should have `_amount` burnt for it.
  */
  function _burnChecker(uint256 _id, uint256 _amount) private view
    returns (uint256) {

    // Retrieve the item's group ID.
    uint256 shiftedGroupId = (_id & GROUP_MASK);
    uint256 groupId = shiftedGroupId >> 128;
    require(itemGroups[groupId].initialized,
      "Super1155: you cannot burn a non-existent item group");

    // If the item group is non-burnable, then revert.
    if (itemGroups[groupId].burnType == DFStorage.BurnType.None) {
      revert("Super1155: you cannot burn a non-burnable item group");
    }

    // If we can burn items, then we must verify that we do not exceed the cap.
    if (itemGroups[groupId].burnType == DFStorage.BurnType.Burnable) {
      require((itemGroups[groupId].burnCount + _amount)
        <= itemGroups[groupId].burnData,
        "Super1155: you may not exceed the burn limit on this item group");
    }

    // Fungible items are coerced into the single group ID + index one slot.
    uint256 burntItemId = _id;
    if (itemGroups[groupId].itemType == DFStorage.ItemType.Fungible) {
      burntItemId = shiftedGroupId + 1;
    }
    return burntItemId;
  }

  /**
    This function allows an address to destroy multiple different items in a
    single call.

    @param _burner The address whose items are burning.
    @param _ids The item IDs to burn.
    @param _amounts The amounts of the corresponding item IDs to burn.
  */
  function burnBatch(address _burner, uint256[] memory _ids,
    uint256[] memory _amounts) public virtual {
    require(_burner != address(0),
      "ERC1155: burn from the zero address");
    require(_ids.length == _amounts.length,
      "ERC1155: ids and amounts length mismatch");

    // Validate and perform the burn.
    address operator = _msgSender();
    _beforeTokenTransfer(operator, _burner, address(0), _ids, _amounts, "");

    // Loop through each of the batched IDs to update storage of special
    // balances and circulation balances.
    for (uint i = 0; i < _ids.length; i++) {
      require(_hasItemRight(_ids[i], BURN),
        "Super1155: you do not have the right to burn that item");

      // Retrieve the group ID from the given item `_id` and check burn.
      uint256 groupId = _ids[i] >> 128;
      uint256 burntItemId = _burnChecker(_ids[i], _amounts[i]);

      // Update storage of special balances and circulating values.
      require(balances[burntItemId][_burner] >= _amounts[i], "ERC1155: burn amount exceeds balance");
      balances[burntItemId][_burner] = balances[burntItemId][_burner] - _amounts[i];
      groupBalances[groupId][_burner] = groupBalances[groupId][_burner] - _amounts[i];
      totalBalances[_burner] = totalBalances[_burner] - _amounts[i];
      burnCount[burntItemId] = burnCount[burntItemId] + _amounts[i];
      circulatingSupply[burntItemId] = circulatingSupply[burntItemId] - _amounts[i];
      itemGroups[groupId].burnCount = itemGroups[groupId].burnCount + _amounts[i];
      itemGroups[groupId].circulatingSupply =
        itemGroups[groupId].circulatingSupply - _amounts[i];
    }

    // Emit the burn event.
    emit TransferBatch(operator, _burner, address(0), _ids, _amounts);
  }

  /**
    This function allows an address to destroy some of its items.

    @param _burner The address whose item is burning.
    @param _id The item ID to burn.
    @param _amount The amount of the corresponding item ID to burn.
  */
  function burn(address _burner, uint256 _id, uint256 _amount) external virtual{
      require(_hasItemRight(_id, BURN), "Super1155: you don't have rights to burn");
      burnBatch(_burner, _asSingletonArray(_id), _asSingletonArray(_amount));
  }

  /**
    Set the on-chain metadata attached to a specific token ID so long as the
    collection as a whole or the token specifically has not had metadata
    editing frozen.

    @param _id The ID of the token to set the `_metadata` for.
    @param _metadata The metadata string to store on-chain.
  */
  function setMetadata(uint256 _id, string memory _metadata) external {
    require(_hasItemRight(_id, SET_METADATA), "Super1155: you don't have rights to setMetadata");
    uint groupId = _id >> 128;
    require(!uriLocked && !metadataFrozen[_id] &&  !metadataFrozen[groupId],
      "Super1155: you cannot edit this metadata because it is frozen");
    string memory oldMetadata = metadata[_id];
    metadata[_id] = _metadata;
    emit MetadataChanged(_msgSender(), _id, oldMetadata, _metadata);
  }

  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on the entire collection to future changes.
  */
  function lockURI() external
    hasValidPermit(UNIVERSAL, LOCK_URI) {
    uriLocked = true;
    emit PermanentURI(metadataUri, 2 ** 256 - 1);
  }

  
  /** 
    Allow the associated manager to forever lock the contract URI to future 
    changes
  */
  function lockContractUri() external
    hasValidPermit(UNIVERSAL, LOCK_URI) {
    contractUriLocked = true;
    emit PermanentContractURI(contractURI, 2 ** 256 - 1);   
  }

  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on an item to future changes.

    @param _uri The value of the URI to lock for `_id`.
    @param _id The token ID to lock a metadata URI value into.
  */
  function lockURI(string calldata _uri, uint256 _id) external {
    require(_hasItemRight(_id, LOCK_ITEM_URI), "Super1155: you don't have rights to lock URI");
    metadataFrozen[_id] = true;
    emit PermanentURI(_uri, _id);
  }

  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on a group of items to future changes.

    @param _uri The value of the URI to lock for `groupId`.
    @param groupId The group ID to lock a metadata URI value into.
  */
  function lockGroupURI(string calldata _uri, uint256 groupId) external {
    require(_hasItemRight(groupId, LOCK_ITEM_URI), "Super1155: you don't have rights to lock group URI");
    metadataFrozen[groupId] = true;
    emit PermanentURI(_uri, groupId);
  }

  /**
    Allow the item collection owner or an associated manager to forever lock
    this contract to further item minting.
  */
  function lock() external virtual hasValidPermit(UNIVERSAL, LOCK_CREATION) {
    locked = true;
    emit CollectionLocked(_msgSender());
  }

}

File 2 of 14 : ERC165Storage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)

pragma solidity ^0.8.0;

import "./ERC165.sol";

/**
 * @dev Storage based implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165Storage is ERC165 {
    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

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

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 3 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 be 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 4 of 14 : 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 5 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.
        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. 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 6 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 14 : PermitControl.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
  @title An advanced permission-management contract.
  @author Tim Clancy

  This contract allows for a contract owner to delegate specific rights to
  external addresses. Additionally, these rights can be gated behind certain
  sets of circumstances and granted expiration times. This is useful for some
  more finely-grained access control in contracts.

  The owner of this contract is always a fully-permissioned super-administrator.

  August 23rd, 2021.
*/
abstract contract PermitControl is Ownable {
  using Address for address;

  /// A special reserved constant for representing no rights.
  bytes32 public constant ZERO_RIGHT = hex"00000000000000000000000000000000";

  /// A special constant specifying the unique, universal-rights circumstance.
  bytes32 public constant UNIVERSAL = hex"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";

  /*
    A special constant specifying the unique manager right. This right allows an
    address to freely-manipulate the `managedRight` mapping.
  **/
  bytes32 public constant MANAGER = hex"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";

  /**
    A mapping of per-address permissions to the circumstances, represented as
    an additional layer of generic bytes32 data, under which the addresses have
    various permits. A permit in this sense is represented by a per-circumstance
    mapping which couples some right, represented as a generic bytes32, to an
    expiration time wherein the right may no longer be exercised. An expiration
    time of 0 indicates that there is in fact no permit for the specified
    address to exercise the specified right under the specified circumstance.

    @dev Universal rights MUST be stored under the 0xFFFFFFFFFFFFFFFFFFFFFFFF...
    max-integer circumstance. Perpetual rights may be given an expiry time of
    max-integer.
  */
  mapping( address => mapping( bytes32 => mapping( bytes32 => uint256 )))
    public permissions;

  /**
    An additional mapping of managed rights to manager rights. This mapping
    represents the administrator relationship that various rights have with one
    another. An address with a manager right may freely set permits for that
    manager right's managed rights. Each right may be managed by only one other
    right.
  */
  mapping( bytes32 => bytes32 ) public managerRight;

  /**
    An event emitted when an address has a permit updated. This event captures,
    through its various parameter combinations, the cases of granting a permit,
    updating the expiration time of a permit, or revoking a permit.

    @param updator The address which has updated the permit.
    @param updatee The address whose permit was updated.
    @param circumstance The circumstance wherein the permit was updated.
    @param role The role which was updated.
    @param expirationTime The time when the permit expires.
  */
  event PermitUpdated(
    address indexed updator,
    address indexed updatee,
    bytes32 circumstance,
    bytes32 indexed role,
    uint256 expirationTime
  );

//   /**
//     A version of PermitUpdated for work with setPermits() function.
    
//     @param updator The address which has updated the permit.
//     @param updatees The addresses whose permit were updated.
//     @param circumstances The circumstances wherein the permits were updated.
//     @param roles The roles which were updated.
//     @param expirationTimes The times when the permits expire.
//   */
//   event PermitsUpdated(
//     address indexed updator,
//     address[] indexed updatees,
//     bytes32[] circumstances,
//     bytes32[] indexed roles,
//     uint256[] expirationTimes
//   );

  /**
    An event emitted when a management relationship in `managerRight` is
    updated. This event captures adding and revoking management permissions via
    observing the update history of the `managerRight` value.

    @param manager The address of the manager performing this update.
    @param managedRight The right which had its manager updated.
    @param managerRight The new manager right which was updated to.
  */
  event ManagementUpdated(
    address indexed manager,
    bytes32 indexed managedRight,
    bytes32 indexed managerRight
  );

  /**
    A modifier which allows only the super-administrative owner or addresses
    with a specified valid right to perform a call.

    @param _circumstance The circumstance under which to check for the validity
      of the specified `right`.
    @param _right The right to validate for the calling address. It must be
      non-expired and exist within the specified `_circumstance`.
  */
  modifier hasValidPermit(
    bytes32 _circumstance,
    bytes32 _right
  ) {
    require(_msgSender() == owner()
      || hasRight(_msgSender(), _circumstance, _right),
      "P1");
    _;
  }

  /**
    Return a version number for this contract's interface.
  */
  function version() external virtual pure returns (uint256) {
    return 1;
  }

  /**
    Determine whether or not an address has some rights under the given
    circumstance, and if they do have the right, until when.

    @param _address The address to check for the specified `_right`.
    @param _circumstance The circumstance to check the specified `_right` for.
    @param _right The right to check for validity.
    @return The timestamp in seconds when the `_right` expires. If the timestamp
      is zero, we can assume that the user never had the right.
  */
  function hasRightUntil(
    address _address,
    bytes32 _circumstance,
    bytes32 _right
  ) public view returns (uint256) {
    return permissions[_address][_circumstance][_right];
  }

   /**
    Determine whether or not an address has some rights under the given
    circumstance,

    @param _address The address to check for the specified `_right`.
    @param _circumstance The circumstance to check the specified `_right` for.
    @param _right The right to check for validity.
    @return true or false, whether user has rights and time is valid.
  */
  function hasRight(
    address _address,
    bytes32 _circumstance,
    bytes32 _right
  ) public view returns (bool) {
    return permissions[_address][_circumstance][_right] > block.timestamp;
  }

  /**
    Set the permit to a specific address under some circumstances. A permit may
    only be set by the super-administrative contract owner or an address holding
    some delegated management permit.

    @param _address The address to assign the specified `_right` to.
    @param _circumstance The circumstance in which the `_right` is valid.
    @param _right The specific right to assign.
    @param _expirationTime The time when the `_right` expires for the provided
      `_circumstance`.
  */
  function setPermit(
    address _address,
    bytes32 _circumstance,
    bytes32 _right,
    uint256 _expirationTime
  ) public virtual hasValidPermit(UNIVERSAL, managerRight[_right]) {
    require(_right != ZERO_RIGHT,
      "P2");
    permissions[_address][_circumstance][_right] = _expirationTime;
    emit PermitUpdated(_msgSender(), _address, _circumstance, _right,
      _expirationTime);
  }

//   /**
//     Version of setPermit() that works with multiple addresses in one transaction.

//     @param _addresses The array of addresses to assign the specified `_right` to.
//     @param _circumstances The array of circumstances in which the `_right` is 
//                           valid.
//     @param _rights The array of specific rights to assign.
//     @param _expirationTimes The array of times when the `_rights` expires for 
//                             the provided _circumstance`.
//   */
//   function setPermits(
//     address[] memory _addresses,
//     bytes32[] memory _circumstances, 
//     bytes32[] memory _rights, 
//     uint256[] memory _expirationTimes
//   ) public virtual {
//     require((_addresses.length == _circumstances.length)
//              && (_circumstances.length == _rights.length)
//              && (_rights.length == _expirationTimes.length),
//              "leghts of input arrays are not equal"
//     );
//     bytes32 lastRight;
//     for(uint i = 0; i < _rights.length; i++) {
//       if (lastRight != _rights[i] || (i == 0)) { 
//         require(_msgSender() == owner() || hasRight(_msgSender(), _circumstances[i], _rights[i]), "P1");
//         require(_rights[i] != ZERO_RIGHT, "P2");
//         lastRight = _rights[i];
//       }
//       permissions[_addresses[i]][_circumstances[i]][_rights[i]] = _expirationTimes[i];
//     }
//     emit PermitsUpdated(
//       _msgSender(), 
//       _addresses,
//       _circumstances,
//       _rights,
//       _expirationTimes
//     );
//   }

  /**
    Set the `_managerRight` whose `UNIVERSAL` holders may freely manage the
    specified `_managedRight`.

    @param _managedRight The right which is to have its manager set to
      `_managerRight`.
    @param _managerRight The right whose `UNIVERSAL` holders may manage
      `_managedRight`.
  */
  function setManagerRight(
    bytes32 _managedRight,
    bytes32 _managerRight
  ) external virtual hasValidPermit(UNIVERSAL, MANAGER) {
    require(_managedRight != ZERO_RIGHT,
      "P3");
    managerRight[_managedRight] = _managerRight;
    emit ManagementUpdated(_msgSender(), _managedRight, _managerRight);
  }
}

File 8 of 14 : StubProxyRegistry.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.7;

/**
  @title A proxy registry contract.
  @author Protinam, Project Wyvern
  @author Tim Clancy

  This contract was originally developed by Project Wyvern
  (https://github.com/ProjectWyvern/) where it currently enjoys great success as
  a component of the primary exchange contract for OpenSea. It has been modified
  to support a more modern version of Solidity with associated best practices.
  The documentation has also been improved to provide more clarity.
*/
abstract contract StubProxyRegistry {

  /**
    This mapping relates an addresses to its own personal `OwnableDelegateProxy`
    which allow it to proxy functionality to the various callers contained in
    `authorizedCallers`.
  */
  mapping(address => address) public proxies;
}

File 9 of 14 : DFStorage.sol
pragma solidity 0.8.8;

library DFStorage {
    /**
    @notice This struct is a source of mapping-free input to the `addPool` function.

    @param name A name for the pool.
    @param startTime The timestamp when this pool begins allowing purchases.
    @param endTime The timestamp after which this pool disallows purchases.
    @param purchaseLimit The maximum number of items a single address may
      purchase from this pool.
    @param singlePurchaseLimit The maximum number of items a single address may
      purchase from this pool in a single transaction.
    @param requirement A PoolRequirement requisite for users who want to
      participate in this pool.
  */
    struct PoolInput {
        string name;
        uint256 startTime;
        uint256 endTime;
        uint256 purchaseLimit;
        uint256 singlePurchaseLimit;
        PoolRequirement requirement;
        address collection;
    }

    /**
    @notice This enumeration type specifies the different access rules that may be
    applied to pools in this shop. Access to a pool may be restricted based on
    the buyer's holdings of either tokens or items.

    @param Public This specifies a pool which requires no special asset holdings
      to buy from.
    @param TokenRequired This specifies a pool which requires the buyer to hold
      some amount of ERC-20 tokens to buy from.
    @param ItemRequired This specifies a pool which requires the buyer to hold
      some amount of an ERC-1155 item to buy from.
    @param PointRequired This specifies a pool which requires the buyer to hold
      some amount of points in a Staker to buy from.
  */
    enum AccessType {
        Public,
        TokenRequired,
        ItemRequired,
        PointRequired,
        ItemRequired721
    }

    /**
    @notice This struct tracks information about a prerequisite for a user to
    participate in a pool.

    @param requiredType The `AccessType` being applied to gate buyers from
      participating in this pool. See `requiredAsset` for how additional data
      can apply to the access type.
    @param requiredAsset Some more specific information about the asset to
      require. If the `requiredType` is `TokenRequired`, we use this address to
      find the ERC-20 token that we should be specifically requiring holdings
      of. If the `requiredType` is `ItemRequired`, we use this address to find
      the item contract that we should be specifically requiring holdings of. If
      the `requiredType` is `PointRequired`, we treat this address as the
      address of a Staker contract. Do note that in order for this to work, the
      Staker must have approved this shop as a point spender.
    @param requiredAmount The amount of the specified `requiredAsset` required
      for the buyer to purchase from this pool.
    @param requiredId The ID of an address whitelist to restrict participants
      in this pool. To participate, a purchaser must have their address present
      in the corresponding whitelist. Other requirements from `requiredType`
      also apply. An ID of 0 is a sentinel value for no whitelist required.
  */
    struct PoolRequirement {
        AccessType requiredType;
        address[] requiredAsset;
        uint256 requiredAmount;
        uint256[] requiredId;
    }

    /**
    @notice This enumeration type specifies the different assets that may be used to
    complete purchases from this mint shop.

    @param Point This specifies that the asset being used to complete
      this purchase is non-transferrable points from a `Staker` contract.
    @param Ether This specifies that the asset being used to complete
      this purchase is native Ether currency.
    @param Token This specifies that the asset being used to complete
      this purchase is an ERC-20 token.
  */
    enum AssetType {
        Point,
        Ether,
        Token
    }

    /**
    @notice This struct tracks information about a single asset with the associated
    price that an item is being sold in the shop for. It also includes an
    `asset` field which is used to convey optional additional data about the
    asset being used to purchase with.

    @param assetType The `AssetType` type of the asset being used to buy.
    @param asset Some more specific information about the asset to charge in.
     If the `assetType` is Point, we use this address to find the specific
     Staker whose points are used as the currency.
     If the `assetType` is Ether, we ignore this field.
     If the `assetType` is Token, we use this address to find the
     ERC-20 token that we should be specifically charging with.
    @param price The amount of the specified `assetType` and `asset` to charge.
  */
    struct Price {
        AssetType assetType;
        address asset;
        uint256 price;
    }
  /**
    This enumeration lists the various supply types that each item group may
    use. In general, the administrator of this collection or those permissioned
    to do so may move from a more-permissive supply type to a less-permissive.
    For example: an uncapped or flexible supply type may be converted to a
    capped supply type. A capped supply type may not be uncapped later, however.

    @param Capped There exists a fixed cap on the size of the item group. The
      cap is set by `supplyData`.
    @param Uncapped There is no cap on the size of the item group. The value of
      `supplyData` cannot be set below the current circulating supply but is
      otherwise ignored.
    @param Flexible There is a cap which can be raised or lowered (down to
      circulating supply) freely. The value of `supplyData` cannot be set below
      the current circulating supply and determines the cap.
  */
  enum SupplyType {
    Capped,
    Uncapped,
    Flexible
  }

  /**
    This enumeration lists the various item types that each item group may use.
    In general, these are static once chosen.

    @param Nonfungible The item group is truly nonfungible where each ID may be
      used only once. The value of `itemData` is ignored.
    @param Fungible The item group is truly fungible and collapses into a single
      ID. The value of `itemData` is ignored.
    @param Semifungible The item group may be broken up across multiple
      repeating token IDs. The value of `itemData` is the cap of any single
      token ID in the item group.
  */
  enum ItemType {
    Nonfungible,
    Fungible,
    Semifungible
  }

  /**
    This enumeration lists the various burn types that each item group may use.
    These are static once chosen.

    @param None The items in this group may not be burnt. The value of
      `burnData` is ignored.
    @param Burnable The items in this group may be burnt. The value of
      `burnData` is the maximum that may be burnt.
    @param Replenishable The items in this group, once burnt, may be reminted by
      the owner. The value of `burnData` is ignored.
  */
  enum BurnType {
    None,
    Burnable,
    Replenishable
  }

  /**
    This struct is a source of mapping-free input to the `configureGroup`
    function. It defines the settings for a particular item group.
   
    @param supplyData An optional integer used by some `supplyType` values.
    @param itemData An optional integer used by some `itemType` values.
    @param burnData An optional integer used by some `burnType` values.
    @param name A name for the item group.
    @param supplyType The supply type for this group of items.
    @param itemType The type of item represented by this item group.
    @param burnType The type of burning permitted by this item group.
    
  */
  struct ItemGroupInput {
    uint256 supplyData;
    uint256 itemData;
    uint256 burnData;
    SupplyType supplyType;
    ItemType itemType;
    BurnType burnType;
    string name;
  }


  /**
    This structure is used at the moment of NFT purchase.
    @param whiteListId Id of a whiteList.
    @param index Element index in the original array
    @param allowance The quantity is available to the user for purchase.
    @param node Base hash of the element.
    @param merkleProof Proof that the user is on the whitelist.
  */
  struct WhiteListInput {
    uint256 whiteListId;
    uint256 index; 
    uint256 allowance;
    bytes32 node; 
    bytes32[] merkleProof;
  }


  /**
    This structure is used at the moment of NFT purchase.
    @param _accesslistId Id of a whiteList.
    @param _merkleRoot Hash root of merkle tree.
    @param _startTime The start date of the whitelist
    @param _endTime The end date of the whitelist
    @param _price The price that applies to the whitelist
    @param _token Token with which the purchase will be made
  */
  struct WhiteListCreate {
    uint256 _accesslistId;
    bytes32 _merkleRoot;
    uint256 _startTime; 
    uint256 _endTime; 
    uint256 _price; 
    address _token;
  }
}

File 10 of 14 : ISuper1155.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.8;

import "../../../libraries/DFStorage.sol";

/**
  @title An interface for the `Super1155` ERC-1155 item collection contract.
  @author 0xthrpw
  @author Tim Clancy

  August 12th, 2021.
*/
interface ISuper1155 {

  /// The public identifier for the right to set this contract's metadata URI.
  function SET_URI () external view returns (bytes32);

  /// The public identifier for the right to set this contract's proxy registry.
  function SET_PROXY_REGISTRY () external view returns (bytes32);

  /// The public identifier for the right to configure item groups.
  function CONFIGURE_GROUP () external view returns (bytes32);

  /// The public identifier for the right to mint items.
  function MINT () external view returns (bytes32);

  /// The public identifier for the right to burn items.
  function BURN () external view returns (bytes32);

  /// The public identifier for the right to set item metadata.
  function SET_METADATA () external view returns (bytes32);

  /// The public identifier for the right to lock the metadata URI.
  function LOCK_URI () external view returns (bytes32);

  /// The public identifier for the right to lock an item's metadata.
  function LOCK_ITEM_URI () external view returns (bytes32);

  /// The public identifier for the right to disable item creation.
  function LOCK_CREATION () external view returns (bytes32);

  /// The public name of this contract.
  function name () external view returns (string memory);

  /**
    The ERC-1155 URI for tracking item metadata, supporting {id} substitution.
    For example: https://token-cdn-domain/{id}.json. See the ERC-1155 spec for
    more details: https://eips.ethereum.org/EIPS/eip-1155#metadata.
  */
  function metadataUri () external view returns (string memory);

  /// A proxy registry address for supporting automatic delegated approval.
  function proxyRegistryAddress () external view returns (address);

  /// A mapping from each group ID to per-address balances.
  function groupBalances (uint256, address) external view returns (uint256);

  /// A mapping from each address to a collection-wide balance.
  function totalBalances (address) external view returns (uint256);

  /// A mapping of data for each item group.
  // function itemGroups (uint256) external view returns (ItemGroup memory);
  /* function itemGroups (uint256) external view returns (bool initialized, string memory _name, uint8 supplyType, uint256 supplyData, uint8 itemType, uint256 itemData, uint8 burnType, uint256 burnData, uint256 _circulatingSupply, uint256 _mintCount, uint256 _burnCount); */

  /// A mapping of circulating supplies for each individual token.
  function circulatingSupply (uint256) external view returns (uint256);

  /// A mapping of the number of times each individual token has been minted.
  function mintCount (uint256) external view returns (uint256);

  /// A mapping of the number of times each individual token has been burnt.
  function burnCount (uint256) external view returns (uint256);

  /**
    A mapping of token ID to a boolean representing whether the item's metadata
    has been explicitly frozen via a call to `lockURI(string calldata _uri,
    uint256 _id)`. Do note that it is possible for an item's mapping here to be
    false while still having frozen metadata if the item collection as a whole
    has had its `uriLocked` value set to true.
  */
  function metadataFrozen (uint256) external view returns (bool);

  /**
    A public mapping of optional on-chain metadata for each token ID. A token's
    on-chain metadata is unable to be changed if the item's metadata URI has
    been permanently fixed or if the collection's metadata URI as a whole has
    been frozen.
  */
  function metadata (uint256) external view returns (string memory);

  /// Whether or not the metadata URI has been locked to future changes.
  function uriLocked () external view returns (bool);

  /// Whether or not the item collection has been locked to all further minting.
  function locked () external view returns (bool);

  /**
    Return a version number for this contract's interface.
  */
  function version () external view returns (uint256);

  /**
    Return the item collection's metadata URI. This implementation returns the
    same URI for all tokens within the collection and relies on client-side
    ID substitution per https://eips.ethereum.org/EIPS/eip-1155#metadata. Per
    said specification, clients calling this function must replace the {id}
    substring with the actual token ID in hex, not prefixed by 0x, and padded
    to 64 characters in length.

    @return The metadata URI string of the item with ID `_itemId`.
  */
  function uri (uint256) external view returns (string memory);

  /**
    Allow the item collection owner or an approved manager to update the
    metadata URI of this collection. This implementation relies on a single URI
    for all items within the collection, and as such does not emit the standard
    URI event. Instead, we emit our own event to reflect changes in the URI.

    @param _uri The new URI to update to.
  */
  function setURI (string memory _uri) external;

  /**
    Allow the item collection owner or an approved manager to update the proxy
    registry address handling delegated approval.

    @param _proxyRegistryAddress The address of the new proxy registry to
      update to.
  */
  function setProxyRegistry (address _proxyRegistryAddress) external;

  /**
    Retrieve the balance of a particular token `_id` for a particular address
    `_owner`.

    @param _owner The owner to check for this token balance.
    @param _id The ID of the token to check for a balance.
    @return The amount of token `_id` owned by `_owner`.
  */
  function balanceOf (address _owner, uint256 _id) external view returns (uint256);

  /**
    Retrieve in a single call the balances of some mulitple particular token
    `_ids` held by corresponding `_owners`.

    @param _owners The owners to check for token balances.
    @param _ids The IDs of tokens to check for balances.
    @return the amount of each token owned by each owner.
  */
  function balanceOfBatch (address[] memory _owners, uint256[] memory _ids) external view returns (uint256[] memory);

  /**
    This function returns true if `_operator` is approved to transfer items
    owned by `_owner`. This approval check features an override to explicitly
    whitelist any addresses delegated in the proxy registry.

    @param _owner The owner of items to check for transfer ability.
    @param _operator The potential transferrer of `_owner`'s items.
    @return Whether `_operator` may transfer items owned by `_owner`.
  */
  function isApprovedForAll (address _owner, address _operator) external view returns (bool);

  /**
    Enable or disable approval for a third party `_operator` address to manage
    (transfer or burn) all of the caller's tokens.

    @param _operator The address to grant management rights over all of the
      caller's tokens.
    @param _approved The status of the `_operator`'s approval for the caller.
  */
  function setApprovalForAll (address _operator, bool _approved) external;

  /**
    Transfer on behalf of a caller or one of their authorized token managers
    items from one address to another.

    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _id The specific token ID to transfer.
    @param _amount The amount of the specific `_id` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function safeTransferFrom (address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data) external;

  /**
    Transfer on behalf of a caller or one of their authorized token managers
    items from one address to another.

    @param _from The address to transfer tokens from.
    @param _to The address to transfer tokens to.
    @param _ids The specific token IDs to transfer.
    @param _amounts The amounts of the specific `_ids` to transfer.
    @param _data Additional call data to send with this transfer.
  */
  function safeBatchTransferFrom (address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data) external;

  /**
    Create a new NFT item group or configure an existing one. NFTs within a
    group share a group ID in the upper 128-bits of their full item ID.
    Within a group NFTs can be distinguished for the purposes of serializing
    issue numbers.

    @param _groupId The ID of the item group to create or configure.
    @param _data The `ItemGroup` data input.
  */
  function configureGroup (uint256 _groupId, DFStorage.ItemGroupInput calldata _data) external;

  /**
    Mint a batch of tokens into existence and send them to the `_recipient`
    address. In order to mint an item, its item group must first have been
    created. Minting an item must obey both the fungibility and size cap of its
    group.

    @param _recipient The address to receive all NFTs within the newly-minted
      group.
    @param _ids The item IDs for the new items to create.
    @param _amounts The amount of each corresponding item ID to create.
    @param _data Any associated data to use on items minted in this transaction.
  */
  function mintBatch (address _recipient, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data) external;

  /**
    This function allows an address to destroy some of its items.

    @param _burner The address whose item is burning.
    @param _id The item ID to burn.
    @param _amount The amount of the corresponding item ID to burn.
  */
  function burn (address _burner, uint256 _id, uint256 _amount) external;

  /**
    This function allows an address to destroy multiple different items in a
    single call.

    @param _burner The address whose items are burning.
    @param _ids The item IDs to burn.
    @param _amounts The amounts of the corresponding item IDs to burn.
  */
  function burnBatch (address _burner, uint256[] memory _ids, uint256[] memory _amounts) external;

  /**
    Set the on-chain metadata attached to a specific token ID so long as the
    collection as a whole or the token specifically has not had metadata
    editing frozen.

    @param _id The ID of the token to set the `_metadata` for.
    @param _metadata The metadata string to store on-chain.
  */
  function setMetadata (uint256 _id, string memory _metadata) external;

  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on the entire collection to future changes.

    @param _uri The value of the URI to lock for `_id`.
  */
  function lockURI(string calldata _uri) external;

  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on an item to future changes.

    @param _uri The value of the URI to lock for `_id`.
    @param _id The token ID to lock a metadata URI value into.
  */
  function lockURI(string calldata _uri, uint256 _id) external;


  /**
    Allow the item collection owner or an associated manager to forever lock the
    metadata URI on a group of items to future changes.

    @param _uri The value of the URI to lock for `groupId`.
    @param groupId The group ID to lock a metadata URI value into.
  */
  function lockGroupURI(string calldata _uri, uint256 groupId) external;

  /**
    Allow the item collection owner or an associated manager to forever lock
    this contract to further item minting.
  */
  function lock() external;
}

File 11 of 14 : 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 12 of 14 : 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 13 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_metadataURI","type":"string"},{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"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":"string","name":"oldURI","type":"string"},{"indexed":true,"internalType":"string","name":"newURI","type":"string"}],"name":"ChangeContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldRegistry","type":"address"},{"indexed":true,"internalType":"address","name":"newRegistry","type":"address"}],"name":"ChangeProxyRegistry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"oldURI","type":"string"},{"indexed":true,"internalType":"string","name":"newURI","type":"string"}],"name":"ChangeURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"locker","type":"address"}],"name":"CollectionLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":false,"internalType":"uint256","name":"groupId","type":"uint256"},{"components":[{"internalType":"uint256","name":"supplyData","type":"uint256"},{"internalType":"uint256","name":"itemData","type":"uint256"},{"internalType":"uint256","name":"burnData","type":"uint256"},{"internalType":"enum DFStorage.SupplyType","name":"supplyType","type":"uint8"},{"internalType":"enum DFStorage.ItemType","name":"itemType","type":"uint8"},{"internalType":"enum DFStorage.BurnType","name":"burnType","type":"uint8"},{"internalType":"string","name":"name","type":"string"}],"indexed":true,"internalType":"struct DFStorage.ItemGroupInput","name":"newGroup","type":"tuple"}],"name":"ItemGroupConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":true,"internalType":"bytes32","name":"managedRight","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"managerRight","type":"bytes32"}],"name":"ManagementUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"changer","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"oldMetadata","type":"string"},{"indexed":true,"internalType":"string","name":"newMetadata","type":"string"}],"name":"MetadataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"updator","type":"address"},{"indexed":true,"internalType":"address","name":"updatee","type":"address"},{"indexed":false,"internalType":"bytes32","name":"circumstance","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"expirationTime","type":"uint256"}],"name":"PermitUpdated","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":"BURN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIGURE_GROUP","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_CREATION","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_ITEM_URI","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_URI","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_METADATA","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_PROXY_REGISTRY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_URI","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIVERSAL","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_RIGHT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_burner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burner","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_groupId","type":"uint256"},{"components":[{"internalType":"uint256","name":"supplyData","type":"uint256"},{"internalType":"uint256","name":"itemData","type":"uint256"},{"internalType":"uint256","name":"burnData","type":"uint256"},{"internalType":"enum DFStorage.SupplyType","name":"supplyType","type":"uint8"},{"internalType":"enum DFStorage.ItemType","name":"itemType","type":"uint8"},{"internalType":"enum DFStorage.BurnType","name":"burnType","type":"uint8"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct DFStorage.ItemGroupInput","name":"_data","type":"tuple"}],"name":"configureGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractUriLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"groupBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32","name":"_circumstance","type":"bytes32"},{"internalType":"bytes32","name":"_right","type":"bytes32"}],"name":"hasRight","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32","name":"_circumstance","type":"bytes32"},{"internalType":"bytes32","name":"_right","type":"bytes32"}],"name":"hasRightUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemGroups","outputs":[{"internalType":"uint256","name":"burnData","type":"uint256"},{"internalType":"uint256","name":"circulatingSupply","type":"uint256"},{"internalType":"uint256","name":"mintCount","type":"uint256"},{"internalType":"uint256","name":"burnCount","type":"uint256"},{"internalType":"uint256","name":"supplyData","type":"uint256"},{"internalType":"uint256","name":"itemData","type":"uint256"},{"internalType":"bool","name":"initialized","type":"bool"},{"internalType":"enum DFStorage.SupplyType","name":"supplyType","type":"uint8"},{"internalType":"enum DFStorage.ItemType","name":"itemType","type":"uint8"},{"internalType":"enum DFStorage.BurnType","name":"burnType","type":"uint8"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"groupId","type":"uint256"}],"name":"lockGroupURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"lockURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"managerRight","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"metadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"metadataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"permissions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_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":"string","name":"_uri","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_managedRight","type":"bytes32"},{"internalType":"bytes32","name":"_managerRight","type":"bytes32"}],"name":"setManagerRight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_metadata","type":"string"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32","name":"_circumstance","type":"bytes32"},{"internalType":"bytes32","name":"_right","type":"bytes32"},{"internalType":"uint256","name":"_expirationTime","type":"uint256"}],"name":"setPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"name":"setProxyRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setURI","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":[{"internalType":"address","name":"","type":"address"}],"name":"totalBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uriLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

60806040526000196004553480156200001757600080fd5b50604051620054ac380380620054ac8339810160408190526200003a91620005cb565b620000453362000142565b62000057636cdb3d1360e11b62000192565b620000696303a24d0760e21b62000192565b620000a7336001600160801b03197f3c07d937e99dce2eb02a49980bd3f83d7b407c435d29715324a7fa6aef462ee06004546200021760201b60201c565b620000b162000354565b6001600160a01b0316856001600160a01b031614620000d557620000d58562000363565b8351620000ea9060059060208701906200043b565b508251620001009060069060208601906200043b565b508151620001169060079060208501906200043b565b50600880546001600160a01b0319166001600160a01b039290921691909117905550620006c092505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160e01b03198082161415620001f25760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b0319166000908152600360205260409020805460ff19166001179055565b6000828152600260205260409020546001600160801b0319906200023a62000354565b6001600160a01b0316336001600160a01b031614806200027b5750336000908152600160209081526040808320858452825280832084845290915290205442105b620002ae5760405162461bcd60e51b8152602060048201526002602482015261503160f01b6044820152606401620001e9565b83620002e25760405162461bcd60e51b8152602060048201526002602482015261281960f11b6044820152606401620001e9565b6001600160a01b03861660008181526001602090815260408083208984528252808320888452825291829020869055815188815290810186905286929133917f71b8ef6d2e182fa6ca30442059cc10398330b3e0561fd4ecc7232b62a8678cb6910160405180910390a4505050505050565b6000546001600160a01b031690565b336200036e62000354565b6001600160a01b031614620003c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620001e9565b6001600160a01b0381166200042d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001e9565b620004388162000142565b50565b828054620004499062000683565b90600052602060002090601f0160209004810192826200046d5760008555620004b8565b82601f106200048857805160ff1916838001178555620004b8565b82800160010185558215620004b8579182015b82811115620004b85782518255916020019190600101906200049b565b50620004c6929150620004ca565b5090565b5b80821115620004c65760008155600101620004cb565b80516001600160a01b0381168114620004f957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200052657600080fd5b81516001600160401b0380821115620005435762000543620004fe565b604051601f8301601f19908116603f011681019082821181831017156200056e576200056e620004fe565b816040528381526020925086838588010111156200058b57600080fd5b600091505b83821015620005af578582018301518183018401529082019062000590565b83821115620005c15760008385830101525b9695505050505050565b600080600080600060a08688031215620005e457600080fd5b620005ef86620004e1565b60208701519095506001600160401b03808211156200060d57600080fd5b6200061b89838a0162000514565b955060408801519150808211156200063257600080fd5b6200064089838a0162000514565b945060608801519150808211156200065757600080fd5b50620006668882890162000514565b9250506200067760808701620004e1565b90509295509295909350565b600181811c908216806200069857607f821691505b60208210811415620006ba57634e487b7160e01b600052602260045260246000fd5b50919050565b614ddc80620006d06000396000f3fe608060405234801561001057600080fd5b506004361061029d5760003560e01c8062fdd58e146102a257806301ffc9a7146102c857806302fe5305146102eb57806306fdde03146103005780630e89341c14610315578063122b0817146103285780631710b95c1461033d57806317f5ebb4146103455780631b2df850146103455780631f7fdffa1461035457806320c5ab6a14610367578063227785bf146103745780632319b64814610387578063249db234146103a7578063267b144f146103bc5780632eb2c2d6146103cf5780633e36f4c7146103e2578063483ba44e146103f75780634e1273f414610428578063504c9a5f1461044857806354fd4d501461046b578063558e156114610472578063593aa2831461049d5780636502cde7146104b057806366a0e54d146104c557806368df6c61146105065780636b20c45414610518578063715018a61461052b5780637178008f1461053357806377a4d559146105485780638681d49c146105505780638c2a4c4f146105635780638da5cb5b1461058d5780638e021c06146105a257806392ff6aea146105aa578063a22cb465146105ca578063a61c59ce146105dd578063a625776e146105f0578063adfdeef9146105f8578063aee9c8721461060b578063af0c22a01461062b578063c0a2526c14610640578063c58f55db14610655578063c5b16c591461066a578063cc2af3081461068a578063ccb4807b1461069d578063cd7c0326146106b0578063cf309012146106c3578063cf64d4c2146106d6578063e3684e39146106e9578063e8a3d485146106fc578063e985e9c514610704578063f242432a14610717578063f2fde38b1461072a578063f5298aca1461073d578063f83d08ba14610750578063f9f82b2d14610758578063fa1100f41461076d575b600080fd5b6102b56102b0366004613d3a565b61078d565b6040519081526020015b60405180910390f35b6102db6102d6366004613d7c565b610829565b60405190151581526020016102bf565b6102fe6102f9366004613de8565b610865565b005b610308610a3a565b6040516102bf9190613e85565b610308610323366004613e98565b610ac8565b6102b5600080516020614d2783398151915281565b6102fe610b5c565b6102b56001600160801b031981565b6102fe610362366004613ef5565b610c0b565b6013546102db9060ff1681565b6102fe610382366004613fa1565b6111dc565b6102b5610395366004613e98565b60106020526000908152604090205481565b6102b5600080516020614c4783398151915281565b6102fe6103ca366004613fa1565b611291565b6102fe6103dd36600461410b565b6112f8565b6102b5600080516020614c0783398151915281565b6102b56104053660046141cc565b600160209081526000938452604080852082529284528284209052825290205481565b61043b610436366004614201565b6118ac565b6040516102bf91906142a7565b6102db610456366004613e98565b60116020526000908152604090205460ff1681565b60016102b5565b6102b56104803660046142ba565b600a60209081526000928352604080842090915290825290205481565b6102fe6104ab3660046142ea565b6119df565b6102b5600080516020614cc783398151915281565b6102b56104d33660046141cc565b6001600160a01b038316600090815260016020908152604080832085845282528083208484529091529020549392505050565b6013546102db90610100900460ff1681565b6102fe610526366004614344565b611c1f565b6102fe61210c565b6102b5600080516020614ca783398151915281565b610308612147565b6102db61055e3660046141cc565b612154565b610576610571366004613e98565b612189565b6040516102bf9b9a999897969594939291906143ed565b61059561227b565b6040516102bf919061446f565b6102fe61228a565b6102b56105b8366004613e98565b600e6020526000908152604090205481565b6102fe6105d8366004614483565b612319565b6102fe6105eb3660046144b6565b6123f1565b6102b5600081565b6102fe6106063660046144f8565b612c3d565b6102b56106193660046144f8565b600b6020526000908152604090205481565b6102b5600080516020614d6783398151915281565b6102b5600080516020614d4783398151915281565b6102b5600080516020614c2783398151915281565b6102b5610678366004613e98565b60026020526000908152604090205481565b6102fe610698366004614515565b612cf0565b6102fe6106ab366004613de8565b612db5565b600854610595906001600160a01b031681565b6013546102db9062010000900460ff1681565b6102fe6106e4366004614537565b612f8a565b6103086106f7366004613e98565b61308e565b6103086130a7565b6102db610712366004614572565b6130b4565b6102fe6107253660046145a0565b613180565b6102fe6107383660046144f8565b6131db565b6102fe61074b3660046141cc565b613278565b6102fe6132f6565b6102b5600080516020614c8783398151915281565b6102b561077b366004613e98565b600f6020526000908152604090205481565b60006001600160a01b0383166107fe5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b60006301ffc9a760e01b6001600160e01b0319831614806108235750506001600160e01b03191660009081526003602052604090205460ff1690565b6001600160801b0319600080516020614cc783398151915261088561227b565b6001600160a01b0316336001600160a01b031614806108ab57506108ab335b8383612154565b6108c75760405162461bcd60e51b81526004016107f59061461b565b60135460ff161561093c5760405162461bcd60e51b815260206004820152603960248201527f5375706572313135353a2074686520636f6c6c656374696f6e205552492068616044820152781cc81899595b881c195c9b585b995b9d1b1e481b1bd8dad959603a1b60648201526084016107f5565b60006006805461094b90614637565b80601f016020809104026020016040519081016040528092919081815260200182805461097790614637565b80156109c45780601f10610999576101008083540402835291602001916109c4565b820191906000526020600020905b8154815290600101906020018083116109a757829003601f168201915b505050505090508484600691906109dc929190613c18565b5084846040516109ed929190614672565b604051809103902081604051610a039190614682565b604051908190038120907f5b17ab475512f2a6f23f05a3d8c95160a0f7fd98f6cac01ed5387920ba1a999e90600090a35050505050565b60058054610a4790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7390614637565b8015610ac05780601f10610a9557610100808354040283529160200191610ac0565b820191906000526020600020905b815481529060010190602001808311610aa357829003601f168201915b505050505081565b606060068054610ad790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0390614637565b8015610b505780601f10610b2557610100808354040283529160200191610b50565b820191906000526020600020905b815481529060010190602001808311610b3357829003601f168201915b50505050509050919050565b6001600160801b0319600080516020614c87833981519152610b7c61227b565b6001600160a01b0316336001600160a01b03161480610b9f5750610b9f336108a4565b610bbb5760405162461bcd60e51b81526004016107f59061461b565b6013805461ff001916610100179055604051600019907f2dc6f10d6929015126b6745f4d24fea778108a14fa4b1c4a8bb1c640c8f9f3c690610bff9060079061469e565b60405180910390a25050565b6001600160a01b038716610c6b5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f5565b848314610c8a5760405162461bcd60e51b81526004016107f590614746565b6000339050610d348160008a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506131d392505050565b60005b868110156110e257610d6f888883818110610d5457610d5461478e565b90506020020135600080516020614c078339815191526133a6565b610dc85760405162461bcd60e51b81526020600482015260366024820152600080516020614ce78339815191526044820152756967687420746f206d696e742074686174206974656d60501b60648201526084016107f5565b60006080898984818110610dde57610dde61478e565b90506020020135901c90506000610e258a8a85818110610e0057610e0061478e565b90506020020135898986818110610e1957610e1961478e565b90506020020135613438565b9050878784818110610e3957610e3961478e565b905060200201356009600083815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610e8191906147ba565b6009600083815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002081905550878784818110610ecd57610ecd61478e565b90506020020135600a600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610f1591906147ba565b600a600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002081905550878784818110610f6157610f6161478e565b6001600160a01b038e166000908152600b6020908152604090912054610f8e9491909202013591506147ba565b6001600160a01b038c166000908152600b6020526040902055878784818110610fb957610fb961478e565b90506020020135600f600083815260200190815260200160002054610fde91906147ba565b6000828152600f6020526040902055878784818110610fff57610fff61478e565b90506020020135600e60008381526020019081526020016000205461102491906147ba565b6000828152600e60205260409020558787848181106110455761104561478e565b90506020020135600d60008481526020019081526020016000206002015461106d91906147ba565b6000838152600d60205260409020600201558787848181106110915761109161478e565b90506020020135600d6000848152602001908152602001600020600101546110b991906147ba565b6000928352600d60205260409092206001019190915550806110da816147d2565b915050610d37565b50876001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020614bc78339815191528a8a8a8a6040516111259493929190614823565b60405180910390a46111d28160008a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506137ac92505050565b5050505050505050565b6111f481600080516020614c478339815191526133a6565b6112495760405162461bcd60e51b81526020600482015260326024820152600080516020614be783398151915260448201527120746f206c6f636b2067726f75702055524960701b60648201526084016107f5565b60008181526011602052604090819020805460ff19166001179055518190600080516020614d0783398151915290611284908690869061484a565b60405180910390a2505050565b6112a981600080516020614c478339815191526133a6565b6112495760405162461bcd60e51b815260206004820152602c6024820152600080516020614be783398151915260448201526b20746f206c6f636b2055524960a01b60648201526084016107f5565b81518351146113195760405162461bcd60e51b81526004016107f590614746565b6001600160a01b03841661137d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107f5565b6001600160a01b038516331480611399575061139985336130b4565b6113f75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107f5565b6113ff565b50565b60005b835181101561184b5760006080806001600160801b038016901b86848151811061142e5761142e61478e565b602002602001015116901c905083828151811061144d5761144d61478e565b60200260200101516009600087858151811061146b5761146b61478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000205410156115065760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107f5565b8382815181106115185761151861478e565b6020026020010151600960008785815181106115365761153661478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000205461157a9190614879565b600960008785815181106115905761159061478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b03168152602001908152602001600020819055508382815181106115df576115df61478e565b6020026020010151600960008785815181106115fd576115fd61478e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000205461164191906147ba565b600960008785815181106116575761165761478e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020819055508382815181106116a6576116a661478e565b6020908102919091018101516000838152600a835260408082206001600160a01b038c16835290935291909120546116de9190614879565b6000828152600a602090815260408083206001600160a01b038c16845290915290205583518490839081106117155761171561478e565b6020908102919091018101516000838152600a835260408082206001600160a01b038b168352909352919091205461174d91906147ba565b6000828152600a602090815260408083206001600160a01b038b16845290915290205583518490839081106117845761178461478e565b6020026020010151600b6000896001600160a01b03166001600160a01b03168152602001908152602001600020546117bc9190614879565b6001600160a01b0388166000908152600b602052604090205583518490839081106117e9576117e961478e565b6020026020010151600b6000886001600160a01b03166001600160a01b031681526020019081526020016000205461182191906147ba565b6001600160a01b0387166000908152600b602052604090205550611844816147d2565b9050611402565b50836001600160a01b0316856001600160a01b03166118673390565b6001600160a01b0316600080516020614bc7833981519152868660405161188f929190614890565b60405180910390a46118a53386868686866137ac565b5050505050565b606083821461190f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f5565b6000846001600160401b0381111561192957611929613fec565b604051908082528060200260200182016040528015611952578160200160208202803683370190505b50905060005b858110156119d5576119a88787838181106119755761197561478e565b905060200201602081019061198a91906144f8565b86868481811061199c5761199c61478e565b9050602002013561078d565b8282815181106119ba576119ba61478e565b60209081029190910101526119ce816147d2565b9050611958565b5095945050505050565b6119f782600080516020614d678339815191526133a6565b611a495760405162461bcd60e51b815260206004820152602f6024820152600080516020614be783398151915260448201526e20746f207365744d6574616461746160881b60648201526084016107f5565b601354608083901c9060ff16158015611a71575060008381526011602052604090205460ff16155b8015611a8c575060008181526011602052604090205460ff16155b611afe5760405162461bcd60e51b815260206004820152603d60248201527f5375706572313135353a20796f752063616e6e6f74206564697420746869732060448201527f6d6574616461746120626563617573652069742069732066726f7a656e00000060648201526084016107f5565b60008381526012602052604081208054611b1790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4390614637565b8015611b905780601f10611b6557610100808354040283529160200191611b90565b820191906000526020600020905b815481529060010190602001808311611b7357829003601f168201915b50505060008781526012602090815260409091208751949550611bba949093509087019150613c9c565b5082604051611bc99190614682565b604051809103902084611bd93390565b6001600160a01b03167f3b12522f3e05c9c8c5449e0089dbd13a1ec5b8226aa41c44e8fd60e45c9915ee84604051611c119190613e85565b60405180910390a450505050565b6001600160a01b038316611c815760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f5565b8051825114611ca25760405162461bcd60e51b81526004016107f590614746565b604080516020810190915260009081905233905b83518110156120cd57611cf0848281518110611cd457611cd461478e565b6020026020010151600080516020614d478339815191526133a6565b611d495760405162461bcd60e51b81526020600482015260366024820152600080516020614ce78339815191526044820152756967687420746f206275726e2074686174206974656d60501b60648201526084016107f5565b60006080858381518110611d5f57611d5f61478e565b6020026020010151901c90506000611da9868481518110611d8257611d8261478e565b6020026020010151868581518110611d9c57611d9c61478e565b6020026020010151613961565b9050848381518110611dbd57611dbd61478e565b60209081029190910181015160008381526009835260408082206001600160a01b038c16835290935291909120541015611e455760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f5565b848381518110611e5757611e5761478e565b60209081029190910181015160008381526009835260408082206001600160a01b038c1683529093529190912054611e8f9190614879565b60008281526009602090815260408083206001600160a01b038c1684529091529020558451859084908110611ec657611ec661478e565b6020908102919091018101516000848152600a835260408082206001600160a01b038c1683529093529190912054611efe9190614879565b6000838152600a602090815260408083206001600160a01b038c1684529091529020558451859084908110611f3557611f3561478e565b6020026020010151600b6000896001600160a01b03166001600160a01b0316815260200190815260200160002054611f6d9190614879565b6001600160a01b0388166000908152600b60205260409020558451859084908110611f9a57611f9a61478e565b60200260200101516010600083815260200190815260200160002054611fc091906147ba565b6000828152601060205260409020558451859084908110611fe357611fe361478e565b6020026020010151600e6000838152602001908152602001600020546120099190614879565b6000828152600e6020526040902055845185908490811061202c5761202c61478e565b6020026020010151600d60008481526020019081526020016000206003015461205591906147ba565b6000838152600d6020526040902060030155845185908490811061207b5761207b61478e565b6020026020010151600d6000848152602001908152602001600020600101546120a49190614879565b6000928352600d60205260409092206001019190915550806120c5816147d2565b915050611cb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020614bc78339815191528686604051611c11929190614890565b3361211561227b565b6001600160a01b03161461213b5760405162461bcd60e51b81526004016107f5906148b5565b6121456000613b7d565b565b60068054610a4790614637565b6001600160a01b0383166000908152600160209081526040808320858452825280832084845290915290205442109392505050565b600d602052600090815260409020805460018201546002830154600384015460048501546005860154600687015460078801805497989697959694959394929360ff8084169461010085048216946201000081048316946301000000909104909216929091906121f890614637565b80601f016020809104026020016040519081016040528092919081815260200182805461222490614637565b80156122715780601f1061224657610100808354040283529160200191612271565b820191906000526020600020905b81548152906001019060200180831161225457829003601f168201915b505050505090508b565b6000546001600160a01b031690565b6001600160801b0319600080516020614c878339815191526122aa61227b565b6001600160a01b0316336001600160a01b031614806122cd57506122cd336108a4565b6122e95760405162461bcd60e51b81526004016107f59061461b565b6013805460ff1916600117905560405160001990600080516020614d0783398151915290610bff9060069061469e565b336001600160a01b03831614156123845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f5565b336000818152600c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a35050565b8161243e5760405162461bcd60e51b815260206004820181905260248201527f5375706572313135353a2067726f7570204944203020697320696e76616c696460448201526064016107f5565b61245682600080516020614ca78339815191526133a6565b6124ac5760405162461bcd60e51b81526020600482015260336024820152600080516020614be7833981519152604482015272020746f20636f6e6669677572652067726f757606c1b60648201526084016107f5565b6000828152600d602052604090206006015460ff1661275b5760135462010000900460ff16156125445760405162461bcd60e51b815260206004820152603f60248201527f5375706572313135353a2074686520636f6c6c656374696f6e206973206c6f6360448201527f6b656420736f2067726f7570732063616e6e6f7420626520637265617465640060648201526084016107f5565b60405180610160016040528082604001358152602001600081526020016000815260200160008152602001826000013581526020018260200135815260200160011515815260200182606001602081019061259f91906148f7565b60028111156125b0576125b06143b9565b81526020016125c560a08401608085016148f7565b60028111156125d6576125d66143b9565b81526020016125eb60c0840160a085016148f7565b60028111156125fc576125fc6143b9565b815260200161260e60c0840184614914565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050848152600d60209081526040918290208451815590840151600182015590830151600280830191909155606084015160038301556080840151600483015560a0840151600583015560c084015160068301805491151560ff1983168117825560e0870151949550909261ff001990911661ffff1990921691909117906101009084908111156126d5576126d56143b9565b021790555061010082015160068201805462ff0000191662010000836002811115612702576127026143b9565b021790555061012082015160068201805463ff00000019166301000000836002811115612731576127316143b9565b02179055506101408201518051612752916007840191602090910190613c9c565b50905050612be6565b61276860c0820182614914565b6000848152600d6020526040902061278592600790910191613c18565b50600080838152600d6020526040902060060154610100900460ff1660028111156127b2576127b26143b9565b14156128cd5760006127ca60808301606084016148f7565b60028111156127db576127db6143b9565b146128425760405162461bcd60e51b815260206004820152603160248201527f5375706572313135353a20796f75206d6179206e6f7420756e63617020612063604482015270617070656420737570706c79207479706560781b60648201526084016107f5565b6000828152600d6020526040902060040154813511156128c85760405162461bcd60e51b815260206004820152603b60248201527f5375706572313135353a20796f75206d6179206e6f7420696e6372656173652060448201527a74686520737570706c79206f66206120636170706564207479706560281b60648201526084016107f5565b612910565b6128dd60808201606083016148f7565b6000838152600d60205260409020600601805461ff00191661010083600281111561290a5761290a6143b9565b02179055505b6000828152600d6020526040902060010154813510156129a45760405162461bcd60e51b815260206004820152604360248201527f5375706572313135353a20796f75206d6179206e6f742064656372656173652060448201527f737570706c792062656c6f77207468652063697263756c6174696e6720616d6f6064820152621d5b9d60ea1b608482015260a4016107f5565b6000828152600d60205260408120823560048201556006015462010000900460ff1660028111156129d7576129d76143b9565b1415612a6a5760005b6129f060a08301608084016148f7565b6002811115612a0157612a016143b9565b14612a655760405162461bcd60e51b815260206004820152602e60248201527f5375706572313135353a20796f75206d6179206e6f7420616c746572206e6f6e60448201526d66756e6769626c65206974656d7360901b60648201526084016107f5565b612be6565b60026000838152600d602052604090206006015462010000900460ff166002811115612a9857612a986143b9565b1415612aa55760026129e0565b60016000838152600d602052604090206006015462010000900460ff166002811115612ad357612ad36143b9565b1415612be6576000612aeb60a08301608084016148f7565b6002811115612afc57612afc6143b9565b1415612b54576000828152600d602052604090206001908101541115612b345760405162461bcd60e51b81526004016107f59061495a565b6000828152600d60205260409020600601805462ff000019169055612be6565b6002612b6660a08301608084016148f7565b6002811115612b7757612b776143b9565b1415612be6578060200135600d6000848152602001908152602001600020600101541115612bb75760405162461bcd60e51b81526004016107f59061495a565b6000828152600d6020908152604090912060068101805462ff0000191662020000179055908201356005909101555b80604051612bf491906149cb565b6040518091039020612c033390565b6001600160a01b03167f3a25def20e6bad6e2df899ba7654f35218053e4dcaffb0a62d89b2ae9b9f8c9b846040516123e591815260200190565b6001600160801b0319600080516020614d27833981519152612c5d61227b565b6001600160a01b0316336001600160a01b03161480612c805750612c80336108a4565b612c9c5760405162461bcd60e51b81526004016107f59061461b565b600880546001600160a01b038581166001600160a01b0319831681179093556040519116919082907f86fc6e0a974f7dc41d8919929be676b3fef83f31983d7699d063d5c515ec37f190600090a350505050565b6001600160801b031980612d0261227b565b6001600160a01b0316336001600160a01b03161480612d255750612d25336108a4565b612d415760405162461bcd60e51b81526004016107f59061461b565b83612d735760405162461bcd60e51b8152602060048201526002602482015261503360f01b60448201526064016107f5565b600084815260026020526040808220859055518491869133917fad26b90be8a18bd2262e914f6fd4919c42f9dd6a0d07a15fa728ec603a836a8891a450505050565b6001600160801b0319600080516020614cc7833981519152612dd561227b565b6001600160a01b0316336001600160a01b03161480612df85750612df8336108a4565b612e145760405162461bcd60e51b81526004016107f59061461b565b601354610100900460ff1615612e8c5760405162461bcd60e51b815260206004820152603760248201527f5375706572313135353a2074686520636f6e74726163742055524920686173206044820152761899595b881c195c9b585b995b9d1b1e481b1bd8dad959604a1b60648201526084016107f5565b600060078054612e9b90614637565b80601f0160208091040260200160405190810160405280929190818152602001828054612ec790614637565b8015612f145780601f10612ee957610100808354040283529160200191612f14565b820191906000526020600020905b815481529060010190602001808311612ef757829003601f168201915b50505050509050848460079190612f2c929190613c18565b508484604051612f3d929190614672565b604051809103902081604051612f539190614682565b604051908190038120907f8158ffb8bbb30bc84e60c5400d46ea4ff4b14db459e62f103de951c808f0bae790600090a35050505050565b6000828152600260205260409020546001600160801b031990612fab61227b565b6001600160a01b0316336001600160a01b03161480612fce5750612fce336108a4565b612fea5760405162461bcd60e51b81526004016107f59061461b565b8361301c5760405162461bcd60e51b8152602060048201526002602482015261281960f11b60448201526064016107f5565b6001600160a01b03861660008181526001602090815260408083208984528252808320888452825291829020869055815188815290810186905286929133917f71b8ef6d2e182fa6ca30442059cc10398330b3e0561fd4ecc7232b62a8678cb6910160405180910390a4505050505050565b60126020526000908152604090208054610a4790614637565b60078054610a4790614637565b60085460405163c455279160e01b81526000916001600160a01b038085169291169063c4552791906130ea90879060040161446f565b60206040518083038186803b15801561310257600080fd5b505afa158015613116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313a9190614a89565b6001600160a01b0316141561315157506001610823565b506001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b6131d3868661318e87613bcd565b61319787613bcd565b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112f892505050565b505050505050565b336131e461227b565b6001600160a01b03161461320a5760405162461bcd60e51b81526004016107f5906148b5565b6001600160a01b03811661326f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f5565b6113fc81613b7d565b61329082600080516020614d478339815191526133a6565b6132db5760405162461bcd60e51b81526020600482015260286024820152600080516020614be7833981519152604482015267103a3790313ab93760c11b60648201526084016107f5565b6132f1836132e884613bcd565b61052684613bcd565b505050565b6001600160801b0319600080516020614c2783398151915261331661227b565b6001600160a01b0316336001600160a01b031614806133395750613339336108a4565b6133555760405162461bcd60e51b81526004016107f59061461b565b6013805462ff000019166201000017905561336d3390565b6001600160a01b03167f48eefaf06cba524834d3f6d1525ccd42511dfbe9fb29a2fb665b324adb5210aa60405160405180910390a25050565b6000608083901c6133b561227b565b6001600160a01b0316336001600160a01b031614156133d8576001915050610823565b6133eb336001600160801b031985612154565b156133fa576001915050610823565b613405338285612154565b15613414576001915050610823565b61341f338585612154565b1561342e576001915050610823565b5060009392505050565b608082901c6000818152600d602052604081206006015490916001600160801b031985169160ff166134c95760405162461bcd60e51b815260206004820152603460248201527f5375706572313135353a20796f752063616e6e6f74206d696e742061206e6f6e60448201527302d6578697374656e74206974656d2067726f75760641b60648201526084016107f5565b6000818152600d60209081526040808320600290810154898552600f90935292205490916000848152600d60205260409020600601546301000000900460ff16600281111561351a5761351a6143b9565b14156135445750506000818152600d6020908152604080832060010154888452600e909252909120545b60016000848152600d6020526040902060060154610100900460ff166002811115613571576135716143b9565b146135fa576000838152600d602052604090206004015461359287846147ba565b11156135fa5760405162461bcd60e51b815260206004820152603160248201527f5375706572313135353a20796f752063616e6e6f74206d696e7420612067726f60448201527007570206265796f6e64206974732063617607c1b60648201526084016107f5565b600080848152600d602052604090206006015462010000900460ff166002811115613627576136276143b9565b14156136a057600161363987836147ba565b111561369b5760405162461bcd60e51b815260206004820152603e6024820152600080516020614c6783398151915260448201527f7468616e20612073696e676c65206e6f6e66756e6769626c65206974656d000060648201526084016107f5565b61375e565b60026000848152600d602052604090206006015462010000900460ff1660028111156136ce576136ce6143b9565b141561375e576000838152600d60205260409020600501546136f087836147ba565b111561375e5760405162461bcd60e51b81526020600482015260436024820152600080516020614c6783398151915260448201527f7468616e2074686520616c6c6f7465642073656d6966756e6769626c65206974606482015262656d7360e81b608482015260a4016107f5565b8660016000858152600d602052604090206006015462010000900460ff16600281111561378d5761378d6143b9565b14156137a15761379e8560016147ba565b90505b979650505050505050565b6001600160a01b0384163b156131d35760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906137f09089908990889088908890600401614aa6565b602060405180830381600087803b15801561380a57600080fd5b505af192505050801561383a575060408051601f3d908101601f1916820190925261383791810190614b04565b60015b6138e757613846614b21565b806308c379a01415613880575061385b614b3d565b806138665750613882565b8060405162461bcd60e51b81526004016107f59190613e85565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f5565b6001600160e01b0319811663bc197c8160e01b146139585760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107f5565b50505050505050565b608082901c6000818152600d602052604081206006015490916001600160801b031985169160ff166139e05760405162461bcd60e51b81526020600482015260346024820152600080516020614d8783398151915260448201527302d6578697374656e74206974656d2067726f75760641b60648201526084016107f5565b600080828152600d60205260409020600601546301000000900460ff166002811115613a0e57613a0e6143b9565b1415613a675760405162461bcd60e51b81526020600482015260346024820152600080516020614d8783398151915260448201527302d6275726e61626c65206974656d2067726f75760641b60648201526084016107f5565b60016000828152600d60205260409020600601546301000000900460ff166002811115613a9657613a966143b9565b1415613b31576000818152600d602052604090208054600390910154613abd9086906147ba565b1115613b315760405162461bcd60e51b815260206004820152603f60248201527f5375706572313135353a20796f75206d6179206e6f742065786365656420746860448201527f65206275726e206c696d6974206f6e2074686973206974656d2067726f75700060648201526084016107f5565b8460016000838152600d602052604090206006015462010000900460ff166002811115613b6057613b606143b9565b1415613b7457613b718360016147ba565b90505b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613c0757613c0761478e565b602090810291909101015292915050565b828054613c2490614637565b90600052602060002090601f016020900481019282613c465760008555613c8c565b82601f10613c5f5782800160ff19823516178555613c8c565b82800160010185558215613c8c579182015b82811115613c8c578235825591602001919060010190613c71565b50613c98929150613d10565b5090565b828054613ca890614637565b90600052602060002090601f016020900481019282613cca5760008555613c8c565b82601f10613ce357805160ff1916838001178555613c8c565b82800160010185558215613c8c579182015b82811115613c8c578251825591602001919060010190613cf5565b5b80821115613c985760008155600101613d11565b6001600160a01b03811681146113fc57600080fd5b60008060408385031215613d4d57600080fd5b8235613d5881613d25565b946020939093013593505050565b6001600160e01b0319811681146113fc57600080fd5b600060208284031215613d8e57600080fd5b8135613d9981613d66565b9392505050565b60008083601f840112613db257600080fd5b5081356001600160401b03811115613dc957600080fd5b602083019150836020828501011115613de157600080fd5b9250929050565b60008060208385031215613dfb57600080fd5b82356001600160401b03811115613e1157600080fd5b613e1d85828601613da0565b90969095509350505050565b60005b83811015613e44578181015183820152602001613e2c565b83811115613e53576000848401525b50505050565b60008151808452613e71816020860160208601613e29565b601f01601f19169290920160200192915050565b602081526000613d996020830184613e59565b600060208284031215613eaa57600080fd5b5035919050565b60008083601f840112613ec357600080fd5b5081356001600160401b03811115613eda57600080fd5b6020830191508360208260051b8501011115613de157600080fd5b60008060008060008060006080888a031215613f1057600080fd5b8735613f1b81613d25565b965060208801356001600160401b0380821115613f3757600080fd5b613f438b838c01613eb1565b909850965060408a0135915080821115613f5c57600080fd5b613f688b838c01613eb1565b909650945060608a0135915080821115613f8157600080fd5b50613f8e8a828b01613da0565b989b979a50959850939692959293505050565b600080600060408486031215613fb657600080fd5b83356001600160401b03811115613fcc57600080fd5b613fd886828701613da0565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561402757614027613fec565b6040525050565b600082601f83011261403f57600080fd5b813560206001600160401b0382111561405a5761405a613fec565b8160051b60405161406d83830182614002565b9283528481018201928281018785111561408657600080fd5b83870192505b848310156140a3578235815291830191830161408c565b509695505050505050565b60006001600160401b038311156140c7576140c7613fec565b6040516140de601f8501601f191660200182614002565b8091508381528484840111156140f357600080fd5b83836020830137600060208583010152509392505050565b600080600080600060a0868803121561412357600080fd5b853561412e81613d25565b9450602086013561413e81613d25565b935060408601356001600160401b038082111561415a57600080fd5b61416689838a0161402e565b9450606088013591508082111561417c57600080fd5b61418889838a0161402e565b9350608088013591508082111561419e57600080fd5b508601601f810188136141b057600080fd5b6141bf888235602084016140ae565b9150509295509295909350565b6000806000606084860312156141e157600080fd5b83356141ec81613d25565b95602085013595506040909401359392505050565b6000806000806040858703121561421757600080fd5b84356001600160401b038082111561422e57600080fd5b61423a88838901613eb1565b9096509450602087013591508082111561425357600080fd5b5061426087828801613eb1565b95989497509550505050565b600081518084526020808501945080840160005b8381101561429c57815187529582019590820190600101614280565b509495945050505050565b602081526000613d99602083018461426c565b600080604083850312156142cd57600080fd5b8235915060208301356142df81613d25565b809150509250929050565b600080604083850312156142fd57600080fd5b8235915060208301356001600160401b0381111561431a57600080fd5b8301601f8101851361432b57600080fd5b61433a858235602084016140ae565b9150509250929050565b60008060006060848603121561435957600080fd5b833561436481613d25565b925060208401356001600160401b038082111561438057600080fd5b61438c8783880161402e565b935060408601359150808211156143a257600080fd5b506143af8682870161402e565b9150509250925092565b634e487b7160e01b600052602160045260246000fd5b600381106113fc57634e487b7160e01b600052602160045260246000fd5b60006101608d83528c60208401528b60408401528a60608401528960808401528860a084015287151560c0840152614424876143cf565b8660e0840152614433866143cf565b85610100840152614443856143cf565b846101208401528061014084015261445d81840185613e59565b9e9d5050505050505050505050505050565b6001600160a01b0391909116815260200190565b6000806040838503121561449657600080fd5b82356144a181613d25565b9150602083013580151581146142df57600080fd5b600080604083850312156144c957600080fd5b8235915060208301356001600160401b038111156144e657600080fd5b830160e081860312156142df57600080fd5b60006020828403121561450a57600080fd5b8135613d9981613d25565b6000806040838503121561452857600080fd5b50508035926020909101359150565b6000806000806080858703121561454d57600080fd5b843561455881613d25565b966020860135965060408601359560600135945092505050565b6000806040838503121561458557600080fd5b823561459081613d25565b915060208301356142df81613d25565b60008060008060008060a087890312156145b957600080fd5b86356145c481613d25565b955060208701356145d481613d25565b9450604087013593506060870135925060808701356001600160401b038111156145fd57600080fd5b61460989828a01613da0565b979a9699509497509295939492505050565b602080825260029082015261503160f01b604082015260600190565b600181811c9082168061464b57607f821691505b6020821081141561466c57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60008251614694818460208701613e29565b9190910192915050565b600060208083526000845481600182811c9150808316806146c057607f831692505b8583108114156146de57634e487b7160e01b85526022600452602485fd5b8786018381526020018180156146fb576001811461470c57614737565b60ff19861682528782019650614737565b60008b81526020902060005b8681101561473157815484820152908501908901614718565b83019750505b50949998505050505050505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156147cd576147cd6147a4565b500190565b60006000198214156147e6576147e66147a4565b5060010190565b81835260006001600160fb1b0383111561480657600080fd5b8260051b8083602087013760009401602001938452509192915050565b6040815260006148376040830186886147ed565b82810360208401526137a18185876147ed565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008282101561488b5761488b6147a4565b500390565b6040815260006148a3604083018561426c565b8281036020840152613b74818561426c565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600381106113fc57600080fd5b60006020828403121561490957600080fd5b8135613d99816148ea565b6000808335601e1984360301811261492b57600080fd5b8301803591506001600160401b0382111561494557600080fd5b602001915036819003821315613de157600080fd5b6020808252603b908201527f5375706572313135353a207468652066756e6769626c65206974656d2069732060408201527a6e6f7420756e6971756520656e6f75676820746f206368616e676560281b606082015260800190565b8181843750600082820152601f01601f19160190565b813581526020820135602082015260408201356040820152600060608301356149f3816148ea565b6149fc816143cf565b60608301526080830135614a0f816148ea565b614a18816143cf565b608083015260a0830135614a2b816148ea565b614a34816143cf565b60a083015260c083013536849003601e19018112614a5157600080fd5b830180356001600160401b03811115614a6957600080fd5b803603851315614a7857600080fd5b613b7460c0850182602085016149b5565b600060208284031215614a9b57600080fd5b8151613d9981613d25565b6001600160a01b0386811682528516602082015260a060408201819052600090614ad29083018661426c565b8281036060840152614ae4818661426c565b90508281036080840152614af88185613e59565b98975050505050505050565b600060208284031215614b1657600080fd5b8151613d9981613d66565b600060033d1115614b3a5760046000803e5060005160e01c5b90565b600060443d1015614b4b5790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715614b7a57505050505090565b8285019150815181811115614b925750505050505090565b843d8701016020828501011115614bac5750505050505090565b614bbb60208286010187614002565b50909594505050505056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb5375706572313135353a20796f7520646f6e2774206861766520726967687473fdf81848136595c31bb5f76217767372bc4bf906663038eb38381131ea27ecbac44198f822082633041989a5350456fe6f345c39095c3ab58d93e8c1746b457cc0dcea4ab243cec6cd1c15c252315928cfd1c09c7171111f751c83ecb1453b2f5375706572313135353a20796f752063616e6e6f74206d696e74206d6f7265208b0421734f7acd679e559d6e2a9b55a743772942c49e512079bbf622d0d779913c07d937e99dce2eb02a49980bd3f83d7b407c435d29715324a7fa6aef462ee0cc04b671ccaa234fc9d17a57caae3184712621f217ae6df57a6b846664e574d75375706572313135353a20796f7520646f206e6f742068617665207468652072a109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b55657207bc2728a99328017f9274b8f60f70953a70e1527c2c96ca4f56a4dfd01e859ba204c6a47ae7910ef8b295215a97e8495a9eaf57b7b05bfd8bf951edb3fd4a16a31654c0b1bc79e5efd11874cb452467bf7311917990e2cd132e1a40ba3ae596e15375706572313135353a20796f752063616e6e6f74206275726e2061206e6f6ea26469706673582212200a3ca297c357a5548475854a3a804fbd4c202c47a3007d3c983abb981323859264736f6c63430008080033000000000000000000000000ccbc4cc6b400c221bba187e0c9ef60a6f1ee655e00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000095261766520506967730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5a346d34774266375242344548737562724157617a72794a793654553356615148655144695133417a4874452f7b69647d2e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000017e00000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061029d5760003560e01c8062fdd58e146102a257806301ffc9a7146102c857806302fe5305146102eb57806306fdde03146103005780630e89341c14610315578063122b0817146103285780631710b95c1461033d57806317f5ebb4146103455780631b2df850146103455780631f7fdffa1461035457806320c5ab6a14610367578063227785bf146103745780632319b64814610387578063249db234146103a7578063267b144f146103bc5780632eb2c2d6146103cf5780633e36f4c7146103e2578063483ba44e146103f75780634e1273f414610428578063504c9a5f1461044857806354fd4d501461046b578063558e156114610472578063593aa2831461049d5780636502cde7146104b057806366a0e54d146104c557806368df6c61146105065780636b20c45414610518578063715018a61461052b5780637178008f1461053357806377a4d559146105485780638681d49c146105505780638c2a4c4f146105635780638da5cb5b1461058d5780638e021c06146105a257806392ff6aea146105aa578063a22cb465146105ca578063a61c59ce146105dd578063a625776e146105f0578063adfdeef9146105f8578063aee9c8721461060b578063af0c22a01461062b578063c0a2526c14610640578063c58f55db14610655578063c5b16c591461066a578063cc2af3081461068a578063ccb4807b1461069d578063cd7c0326146106b0578063cf309012146106c3578063cf64d4c2146106d6578063e3684e39146106e9578063e8a3d485146106fc578063e985e9c514610704578063f242432a14610717578063f2fde38b1461072a578063f5298aca1461073d578063f83d08ba14610750578063f9f82b2d14610758578063fa1100f41461076d575b600080fd5b6102b56102b0366004613d3a565b61078d565b6040519081526020015b60405180910390f35b6102db6102d6366004613d7c565b610829565b60405190151581526020016102bf565b6102fe6102f9366004613de8565b610865565b005b610308610a3a565b6040516102bf9190613e85565b610308610323366004613e98565b610ac8565b6102b5600080516020614d2783398151915281565b6102fe610b5c565b6102b56001600160801b031981565b6102fe610362366004613ef5565b610c0b565b6013546102db9060ff1681565b6102fe610382366004613fa1565b6111dc565b6102b5610395366004613e98565b60106020526000908152604090205481565b6102b5600080516020614c4783398151915281565b6102fe6103ca366004613fa1565b611291565b6102fe6103dd36600461410b565b6112f8565b6102b5600080516020614c0783398151915281565b6102b56104053660046141cc565b600160209081526000938452604080852082529284528284209052825290205481565b61043b610436366004614201565b6118ac565b6040516102bf91906142a7565b6102db610456366004613e98565b60116020526000908152604090205460ff1681565b60016102b5565b6102b56104803660046142ba565b600a60209081526000928352604080842090915290825290205481565b6102fe6104ab3660046142ea565b6119df565b6102b5600080516020614cc783398151915281565b6102b56104d33660046141cc565b6001600160a01b038316600090815260016020908152604080832085845282528083208484529091529020549392505050565b6013546102db90610100900460ff1681565b6102fe610526366004614344565b611c1f565b6102fe61210c565b6102b5600080516020614ca783398151915281565b610308612147565b6102db61055e3660046141cc565b612154565b610576610571366004613e98565b612189565b6040516102bf9b9a999897969594939291906143ed565b61059561227b565b6040516102bf919061446f565b6102fe61228a565b6102b56105b8366004613e98565b600e6020526000908152604090205481565b6102fe6105d8366004614483565b612319565b6102fe6105eb3660046144b6565b6123f1565b6102b5600081565b6102fe6106063660046144f8565b612c3d565b6102b56106193660046144f8565b600b6020526000908152604090205481565b6102b5600080516020614d6783398151915281565b6102b5600080516020614d4783398151915281565b6102b5600080516020614c2783398151915281565b6102b5610678366004613e98565b60026020526000908152604090205481565b6102fe610698366004614515565b612cf0565b6102fe6106ab366004613de8565b612db5565b600854610595906001600160a01b031681565b6013546102db9062010000900460ff1681565b6102fe6106e4366004614537565b612f8a565b6103086106f7366004613e98565b61308e565b6103086130a7565b6102db610712366004614572565b6130b4565b6102fe6107253660046145a0565b613180565b6102fe6107383660046144f8565b6131db565b6102fe61074b3660046141cc565b613278565b6102fe6132f6565b6102b5600080516020614c8783398151915281565b6102b561077b366004613e98565b600f6020526000908152604090205481565b60006001600160a01b0383166107fe5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b60006301ffc9a760e01b6001600160e01b0319831614806108235750506001600160e01b03191660009081526003602052604090205460ff1690565b6001600160801b0319600080516020614cc783398151915261088561227b565b6001600160a01b0316336001600160a01b031614806108ab57506108ab335b8383612154565b6108c75760405162461bcd60e51b81526004016107f59061461b565b60135460ff161561093c5760405162461bcd60e51b815260206004820152603960248201527f5375706572313135353a2074686520636f6c6c656374696f6e205552492068616044820152781cc81899595b881c195c9b585b995b9d1b1e481b1bd8dad959603a1b60648201526084016107f5565b60006006805461094b90614637565b80601f016020809104026020016040519081016040528092919081815260200182805461097790614637565b80156109c45780601f10610999576101008083540402835291602001916109c4565b820191906000526020600020905b8154815290600101906020018083116109a757829003601f168201915b505050505090508484600691906109dc929190613c18565b5084846040516109ed929190614672565b604051809103902081604051610a039190614682565b604051908190038120907f5b17ab475512f2a6f23f05a3d8c95160a0f7fd98f6cac01ed5387920ba1a999e90600090a35050505050565b60058054610a4790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7390614637565b8015610ac05780601f10610a9557610100808354040283529160200191610ac0565b820191906000526020600020905b815481529060010190602001808311610aa357829003601f168201915b505050505081565b606060068054610ad790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0390614637565b8015610b505780601f10610b2557610100808354040283529160200191610b50565b820191906000526020600020905b815481529060010190602001808311610b3357829003601f168201915b50505050509050919050565b6001600160801b0319600080516020614c87833981519152610b7c61227b565b6001600160a01b0316336001600160a01b03161480610b9f5750610b9f336108a4565b610bbb5760405162461bcd60e51b81526004016107f59061461b565b6013805461ff001916610100179055604051600019907f2dc6f10d6929015126b6745f4d24fea778108a14fa4b1c4a8bb1c640c8f9f3c690610bff9060079061469e565b60405180910390a25050565b6001600160a01b038716610c6b5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f5565b848314610c8a5760405162461bcd60e51b81526004016107f590614746565b6000339050610d348160008a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506131d392505050565b60005b868110156110e257610d6f888883818110610d5457610d5461478e565b90506020020135600080516020614c078339815191526133a6565b610dc85760405162461bcd60e51b81526020600482015260366024820152600080516020614ce78339815191526044820152756967687420746f206d696e742074686174206974656d60501b60648201526084016107f5565b60006080898984818110610dde57610dde61478e565b90506020020135901c90506000610e258a8a85818110610e0057610e0061478e565b90506020020135898986818110610e1957610e1961478e565b90506020020135613438565b9050878784818110610e3957610e3961478e565b905060200201356009600083815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610e8191906147ba565b6009600083815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002081905550878784818110610ecd57610ecd61478e565b90506020020135600a600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054610f1591906147ba565b600a600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002081905550878784818110610f6157610f6161478e565b6001600160a01b038e166000908152600b6020908152604090912054610f8e9491909202013591506147ba565b6001600160a01b038c166000908152600b6020526040902055878784818110610fb957610fb961478e565b90506020020135600f600083815260200190815260200160002054610fde91906147ba565b6000828152600f6020526040902055878784818110610fff57610fff61478e565b90506020020135600e60008381526020019081526020016000205461102491906147ba565b6000828152600e60205260409020558787848181106110455761104561478e565b90506020020135600d60008481526020019081526020016000206002015461106d91906147ba565b6000838152600d60205260409020600201558787848181106110915761109161478e565b90506020020135600d6000848152602001908152602001600020600101546110b991906147ba565b6000928352600d60205260409092206001019190915550806110da816147d2565b915050610d37565b50876001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020614bc78339815191528a8a8a8a6040516111259493929190614823565b60405180910390a46111d28160008a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506137ac92505050565b5050505050505050565b6111f481600080516020614c478339815191526133a6565b6112495760405162461bcd60e51b81526020600482015260326024820152600080516020614be783398151915260448201527120746f206c6f636b2067726f75702055524960701b60648201526084016107f5565b60008181526011602052604090819020805460ff19166001179055518190600080516020614d0783398151915290611284908690869061484a565b60405180910390a2505050565b6112a981600080516020614c478339815191526133a6565b6112495760405162461bcd60e51b815260206004820152602c6024820152600080516020614be783398151915260448201526b20746f206c6f636b2055524960a01b60648201526084016107f5565b81518351146113195760405162461bcd60e51b81526004016107f590614746565b6001600160a01b03841661137d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107f5565b6001600160a01b038516331480611399575061139985336130b4565b6113f75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107f5565b6113ff565b50565b60005b835181101561184b5760006080806001600160801b038016901b86848151811061142e5761142e61478e565b602002602001015116901c905083828151811061144d5761144d61478e565b60200260200101516009600087858151811061146b5761146b61478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000205410156115065760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107f5565b8382815181106115185761151861478e565b6020026020010151600960008785815181106115365761153661478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000205461157a9190614879565b600960008785815181106115905761159061478e565b602002602001015181526020019081526020016000206000896001600160a01b03166001600160a01b03168152602001908152602001600020819055508382815181106115df576115df61478e565b6020026020010151600960008785815181106115fd576115fd61478e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000205461164191906147ba565b600960008785815181106116575761165761478e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020819055508382815181106116a6576116a661478e565b6020908102919091018101516000838152600a835260408082206001600160a01b038c16835290935291909120546116de9190614879565b6000828152600a602090815260408083206001600160a01b038c16845290915290205583518490839081106117155761171561478e565b6020908102919091018101516000838152600a835260408082206001600160a01b038b168352909352919091205461174d91906147ba565b6000828152600a602090815260408083206001600160a01b038b16845290915290205583518490839081106117845761178461478e565b6020026020010151600b6000896001600160a01b03166001600160a01b03168152602001908152602001600020546117bc9190614879565b6001600160a01b0388166000908152600b602052604090205583518490839081106117e9576117e961478e565b6020026020010151600b6000886001600160a01b03166001600160a01b031681526020019081526020016000205461182191906147ba565b6001600160a01b0387166000908152600b602052604090205550611844816147d2565b9050611402565b50836001600160a01b0316856001600160a01b03166118673390565b6001600160a01b0316600080516020614bc7833981519152868660405161188f929190614890565b60405180910390a46118a53386868686866137ac565b5050505050565b606083821461190f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f5565b6000846001600160401b0381111561192957611929613fec565b604051908082528060200260200182016040528015611952578160200160208202803683370190505b50905060005b858110156119d5576119a88787838181106119755761197561478e565b905060200201602081019061198a91906144f8565b86868481811061199c5761199c61478e565b9050602002013561078d565b8282815181106119ba576119ba61478e565b60209081029190910101526119ce816147d2565b9050611958565b5095945050505050565b6119f782600080516020614d678339815191526133a6565b611a495760405162461bcd60e51b815260206004820152602f6024820152600080516020614be783398151915260448201526e20746f207365744d6574616461746160881b60648201526084016107f5565b601354608083901c9060ff16158015611a71575060008381526011602052604090205460ff16155b8015611a8c575060008181526011602052604090205460ff16155b611afe5760405162461bcd60e51b815260206004820152603d60248201527f5375706572313135353a20796f752063616e6e6f74206564697420746869732060448201527f6d6574616461746120626563617573652069742069732066726f7a656e00000060648201526084016107f5565b60008381526012602052604081208054611b1790614637565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4390614637565b8015611b905780601f10611b6557610100808354040283529160200191611b90565b820191906000526020600020905b815481529060010190602001808311611b7357829003601f168201915b50505060008781526012602090815260409091208751949550611bba949093509087019150613c9c565b5082604051611bc99190614682565b604051809103902084611bd93390565b6001600160a01b03167f3b12522f3e05c9c8c5449e0089dbd13a1ec5b8226aa41c44e8fd60e45c9915ee84604051611c119190613e85565b60405180910390a450505050565b6001600160a01b038316611c815760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f5565b8051825114611ca25760405162461bcd60e51b81526004016107f590614746565b604080516020810190915260009081905233905b83518110156120cd57611cf0848281518110611cd457611cd461478e565b6020026020010151600080516020614d478339815191526133a6565b611d495760405162461bcd60e51b81526020600482015260366024820152600080516020614ce78339815191526044820152756967687420746f206275726e2074686174206974656d60501b60648201526084016107f5565b60006080858381518110611d5f57611d5f61478e565b6020026020010151901c90506000611da9868481518110611d8257611d8261478e565b6020026020010151868581518110611d9c57611d9c61478e565b6020026020010151613961565b9050848381518110611dbd57611dbd61478e565b60209081029190910181015160008381526009835260408082206001600160a01b038c16835290935291909120541015611e455760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f5565b848381518110611e5757611e5761478e565b60209081029190910181015160008381526009835260408082206001600160a01b038c1683529093529190912054611e8f9190614879565b60008281526009602090815260408083206001600160a01b038c1684529091529020558451859084908110611ec657611ec661478e565b6020908102919091018101516000848152600a835260408082206001600160a01b038c1683529093529190912054611efe9190614879565b6000838152600a602090815260408083206001600160a01b038c1684529091529020558451859084908110611f3557611f3561478e565b6020026020010151600b6000896001600160a01b03166001600160a01b0316815260200190815260200160002054611f6d9190614879565b6001600160a01b0388166000908152600b60205260409020558451859084908110611f9a57611f9a61478e565b60200260200101516010600083815260200190815260200160002054611fc091906147ba565b6000828152601060205260409020558451859084908110611fe357611fe361478e565b6020026020010151600e6000838152602001908152602001600020546120099190614879565b6000828152600e6020526040902055845185908490811061202c5761202c61478e565b6020026020010151600d60008481526020019081526020016000206003015461205591906147ba565b6000838152600d6020526040902060030155845185908490811061207b5761207b61478e565b6020026020010151600d6000848152602001908152602001600020600101546120a49190614879565b6000928352600d60205260409092206001019190915550806120c5816147d2565b915050611cb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020614bc78339815191528686604051611c11929190614890565b3361211561227b565b6001600160a01b03161461213b5760405162461bcd60e51b81526004016107f5906148b5565b6121456000613b7d565b565b60068054610a4790614637565b6001600160a01b0383166000908152600160209081526040808320858452825280832084845290915290205442109392505050565b600d602052600090815260409020805460018201546002830154600384015460048501546005860154600687015460078801805497989697959694959394929360ff8084169461010085048216946201000081048316946301000000909104909216929091906121f890614637565b80601f016020809104026020016040519081016040528092919081815260200182805461222490614637565b80156122715780601f1061224657610100808354040283529160200191612271565b820191906000526020600020905b81548152906001019060200180831161225457829003601f168201915b505050505090508b565b6000546001600160a01b031690565b6001600160801b0319600080516020614c878339815191526122aa61227b565b6001600160a01b0316336001600160a01b031614806122cd57506122cd336108a4565b6122e95760405162461bcd60e51b81526004016107f59061461b565b6013805460ff1916600117905560405160001990600080516020614d0783398151915290610bff9060069061469e565b336001600160a01b03831614156123845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f5565b336000818152600c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a35050565b8161243e5760405162461bcd60e51b815260206004820181905260248201527f5375706572313135353a2067726f7570204944203020697320696e76616c696460448201526064016107f5565b61245682600080516020614ca78339815191526133a6565b6124ac5760405162461bcd60e51b81526020600482015260336024820152600080516020614be7833981519152604482015272020746f20636f6e6669677572652067726f757606c1b60648201526084016107f5565b6000828152600d602052604090206006015460ff1661275b5760135462010000900460ff16156125445760405162461bcd60e51b815260206004820152603f60248201527f5375706572313135353a2074686520636f6c6c656374696f6e206973206c6f6360448201527f6b656420736f2067726f7570732063616e6e6f7420626520637265617465640060648201526084016107f5565b60405180610160016040528082604001358152602001600081526020016000815260200160008152602001826000013581526020018260200135815260200160011515815260200182606001602081019061259f91906148f7565b60028111156125b0576125b06143b9565b81526020016125c560a08401608085016148f7565b60028111156125d6576125d66143b9565b81526020016125eb60c0840160a085016148f7565b60028111156125fc576125fc6143b9565b815260200161260e60c0840184614914565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050848152600d60209081526040918290208451815590840151600182015590830151600280830191909155606084015160038301556080840151600483015560a0840151600583015560c084015160068301805491151560ff1983168117825560e0870151949550909261ff001990911661ffff1990921691909117906101009084908111156126d5576126d56143b9565b021790555061010082015160068201805462ff0000191662010000836002811115612702576127026143b9565b021790555061012082015160068201805463ff00000019166301000000836002811115612731576127316143b9565b02179055506101408201518051612752916007840191602090910190613c9c565b50905050612be6565b61276860c0820182614914565b6000848152600d6020526040902061278592600790910191613c18565b50600080838152600d6020526040902060060154610100900460ff1660028111156127b2576127b26143b9565b14156128cd5760006127ca60808301606084016148f7565b60028111156127db576127db6143b9565b146128425760405162461bcd60e51b815260206004820152603160248201527f5375706572313135353a20796f75206d6179206e6f7420756e63617020612063604482015270617070656420737570706c79207479706560781b60648201526084016107f5565b6000828152600d6020526040902060040154813511156128c85760405162461bcd60e51b815260206004820152603b60248201527f5375706572313135353a20796f75206d6179206e6f7420696e6372656173652060448201527a74686520737570706c79206f66206120636170706564207479706560281b60648201526084016107f5565b612910565b6128dd60808201606083016148f7565b6000838152600d60205260409020600601805461ff00191661010083600281111561290a5761290a6143b9565b02179055505b6000828152600d6020526040902060010154813510156129a45760405162461bcd60e51b815260206004820152604360248201527f5375706572313135353a20796f75206d6179206e6f742064656372656173652060448201527f737570706c792062656c6f77207468652063697263756c6174696e6720616d6f6064820152621d5b9d60ea1b608482015260a4016107f5565b6000828152600d60205260408120823560048201556006015462010000900460ff1660028111156129d7576129d76143b9565b1415612a6a5760005b6129f060a08301608084016148f7565b6002811115612a0157612a016143b9565b14612a655760405162461bcd60e51b815260206004820152602e60248201527f5375706572313135353a20796f75206d6179206e6f7420616c746572206e6f6e60448201526d66756e6769626c65206974656d7360901b60648201526084016107f5565b612be6565b60026000838152600d602052604090206006015462010000900460ff166002811115612a9857612a986143b9565b1415612aa55760026129e0565b60016000838152600d602052604090206006015462010000900460ff166002811115612ad357612ad36143b9565b1415612be6576000612aeb60a08301608084016148f7565b6002811115612afc57612afc6143b9565b1415612b54576000828152600d602052604090206001908101541115612b345760405162461bcd60e51b81526004016107f59061495a565b6000828152600d60205260409020600601805462ff000019169055612be6565b6002612b6660a08301608084016148f7565b6002811115612b7757612b776143b9565b1415612be6578060200135600d6000848152602001908152602001600020600101541115612bb75760405162461bcd60e51b81526004016107f59061495a565b6000828152600d6020908152604090912060068101805462ff0000191662020000179055908201356005909101555b80604051612bf491906149cb565b6040518091039020612c033390565b6001600160a01b03167f3a25def20e6bad6e2df899ba7654f35218053e4dcaffb0a62d89b2ae9b9f8c9b846040516123e591815260200190565b6001600160801b0319600080516020614d27833981519152612c5d61227b565b6001600160a01b0316336001600160a01b03161480612c805750612c80336108a4565b612c9c5760405162461bcd60e51b81526004016107f59061461b565b600880546001600160a01b038581166001600160a01b0319831681179093556040519116919082907f86fc6e0a974f7dc41d8919929be676b3fef83f31983d7699d063d5c515ec37f190600090a350505050565b6001600160801b031980612d0261227b565b6001600160a01b0316336001600160a01b03161480612d255750612d25336108a4565b612d415760405162461bcd60e51b81526004016107f59061461b565b83612d735760405162461bcd60e51b8152602060048201526002602482015261503360f01b60448201526064016107f5565b600084815260026020526040808220859055518491869133917fad26b90be8a18bd2262e914f6fd4919c42f9dd6a0d07a15fa728ec603a836a8891a450505050565b6001600160801b0319600080516020614cc7833981519152612dd561227b565b6001600160a01b0316336001600160a01b03161480612df85750612df8336108a4565b612e145760405162461bcd60e51b81526004016107f59061461b565b601354610100900460ff1615612e8c5760405162461bcd60e51b815260206004820152603760248201527f5375706572313135353a2074686520636f6e74726163742055524920686173206044820152761899595b881c195c9b585b995b9d1b1e481b1bd8dad959604a1b60648201526084016107f5565b600060078054612e9b90614637565b80601f0160208091040260200160405190810160405280929190818152602001828054612ec790614637565b8015612f145780601f10612ee957610100808354040283529160200191612f14565b820191906000526020600020905b815481529060010190602001808311612ef757829003601f168201915b50505050509050848460079190612f2c929190613c18565b508484604051612f3d929190614672565b604051809103902081604051612f539190614682565b604051908190038120907f8158ffb8bbb30bc84e60c5400d46ea4ff4b14db459e62f103de951c808f0bae790600090a35050505050565b6000828152600260205260409020546001600160801b031990612fab61227b565b6001600160a01b0316336001600160a01b03161480612fce5750612fce336108a4565b612fea5760405162461bcd60e51b81526004016107f59061461b565b8361301c5760405162461bcd60e51b8152602060048201526002602482015261281960f11b60448201526064016107f5565b6001600160a01b03861660008181526001602090815260408083208984528252808320888452825291829020869055815188815290810186905286929133917f71b8ef6d2e182fa6ca30442059cc10398330b3e0561fd4ecc7232b62a8678cb6910160405180910390a4505050505050565b60126020526000908152604090208054610a4790614637565b60078054610a4790614637565b60085460405163c455279160e01b81526000916001600160a01b038085169291169063c4552791906130ea90879060040161446f565b60206040518083038186803b15801561310257600080fd5b505afa158015613116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313a9190614a89565b6001600160a01b0316141561315157506001610823565b506001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b6131d3868661318e87613bcd565b61319787613bcd565b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112f892505050565b505050505050565b336131e461227b565b6001600160a01b03161461320a5760405162461bcd60e51b81526004016107f5906148b5565b6001600160a01b03811661326f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f5565b6113fc81613b7d565b61329082600080516020614d478339815191526133a6565b6132db5760405162461bcd60e51b81526020600482015260286024820152600080516020614be7833981519152604482015267103a3790313ab93760c11b60648201526084016107f5565b6132f1836132e884613bcd565b61052684613bcd565b505050565b6001600160801b0319600080516020614c2783398151915261331661227b565b6001600160a01b0316336001600160a01b031614806133395750613339336108a4565b6133555760405162461bcd60e51b81526004016107f59061461b565b6013805462ff000019166201000017905561336d3390565b6001600160a01b03167f48eefaf06cba524834d3f6d1525ccd42511dfbe9fb29a2fb665b324adb5210aa60405160405180910390a25050565b6000608083901c6133b561227b565b6001600160a01b0316336001600160a01b031614156133d8576001915050610823565b6133eb336001600160801b031985612154565b156133fa576001915050610823565b613405338285612154565b15613414576001915050610823565b61341f338585612154565b1561342e576001915050610823565b5060009392505050565b608082901c6000818152600d602052604081206006015490916001600160801b031985169160ff166134c95760405162461bcd60e51b815260206004820152603460248201527f5375706572313135353a20796f752063616e6e6f74206d696e742061206e6f6e60448201527302d6578697374656e74206974656d2067726f75760641b60648201526084016107f5565b6000818152600d60209081526040808320600290810154898552600f90935292205490916000848152600d60205260409020600601546301000000900460ff16600281111561351a5761351a6143b9565b14156135445750506000818152600d6020908152604080832060010154888452600e909252909120545b60016000848152600d6020526040902060060154610100900460ff166002811115613571576135716143b9565b146135fa576000838152600d602052604090206004015461359287846147ba565b11156135fa5760405162461bcd60e51b815260206004820152603160248201527f5375706572313135353a20796f752063616e6e6f74206d696e7420612067726f60448201527007570206265796f6e64206974732063617607c1b60648201526084016107f5565b600080848152600d602052604090206006015462010000900460ff166002811115613627576136276143b9565b14156136a057600161363987836147ba565b111561369b5760405162461bcd60e51b815260206004820152603e6024820152600080516020614c6783398151915260448201527f7468616e20612073696e676c65206e6f6e66756e6769626c65206974656d000060648201526084016107f5565b61375e565b60026000848152600d602052604090206006015462010000900460ff1660028111156136ce576136ce6143b9565b141561375e576000838152600d60205260409020600501546136f087836147ba565b111561375e5760405162461bcd60e51b81526020600482015260436024820152600080516020614c6783398151915260448201527f7468616e2074686520616c6c6f7465642073656d6966756e6769626c65206974606482015262656d7360e81b608482015260a4016107f5565b8660016000858152600d602052604090206006015462010000900460ff16600281111561378d5761378d6143b9565b14156137a15761379e8560016147ba565b90505b979650505050505050565b6001600160a01b0384163b156131d35760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906137f09089908990889088908890600401614aa6565b602060405180830381600087803b15801561380a57600080fd5b505af192505050801561383a575060408051601f3d908101601f1916820190925261383791810190614b04565b60015b6138e757613846614b21565b806308c379a01415613880575061385b614b3d565b806138665750613882565b8060405162461bcd60e51b81526004016107f59190613e85565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f5565b6001600160e01b0319811663bc197c8160e01b146139585760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107f5565b50505050505050565b608082901c6000818152600d602052604081206006015490916001600160801b031985169160ff166139e05760405162461bcd60e51b81526020600482015260346024820152600080516020614d8783398151915260448201527302d6578697374656e74206974656d2067726f75760641b60648201526084016107f5565b600080828152600d60205260409020600601546301000000900460ff166002811115613a0e57613a0e6143b9565b1415613a675760405162461bcd60e51b81526020600482015260346024820152600080516020614d8783398151915260448201527302d6275726e61626c65206974656d2067726f75760641b60648201526084016107f5565b60016000828152600d60205260409020600601546301000000900460ff166002811115613a9657613a966143b9565b1415613b31576000818152600d602052604090208054600390910154613abd9086906147ba565b1115613b315760405162461bcd60e51b815260206004820152603f60248201527f5375706572313135353a20796f75206d6179206e6f742065786365656420746860448201527f65206275726e206c696d6974206f6e2074686973206974656d2067726f75700060648201526084016107f5565b8460016000838152600d602052604090206006015462010000900460ff166002811115613b6057613b606143b9565b1415613b7457613b718360016147ba565b90505b95945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613c0757613c0761478e565b602090810291909101015292915050565b828054613c2490614637565b90600052602060002090601f016020900481019282613c465760008555613c8c565b82601f10613c5f5782800160ff19823516178555613c8c565b82800160010185558215613c8c579182015b82811115613c8c578235825591602001919060010190613c71565b50613c98929150613d10565b5090565b828054613ca890614637565b90600052602060002090601f016020900481019282613cca5760008555613c8c565b82601f10613ce357805160ff1916838001178555613c8c565b82800160010185558215613c8c579182015b82811115613c8c578251825591602001919060010190613cf5565b5b80821115613c985760008155600101613d11565b6001600160a01b03811681146113fc57600080fd5b60008060408385031215613d4d57600080fd5b8235613d5881613d25565b946020939093013593505050565b6001600160e01b0319811681146113fc57600080fd5b600060208284031215613d8e57600080fd5b8135613d9981613d66565b9392505050565b60008083601f840112613db257600080fd5b5081356001600160401b03811115613dc957600080fd5b602083019150836020828501011115613de157600080fd5b9250929050565b60008060208385031215613dfb57600080fd5b82356001600160401b03811115613e1157600080fd5b613e1d85828601613da0565b90969095509350505050565b60005b83811015613e44578181015183820152602001613e2c565b83811115613e53576000848401525b50505050565b60008151808452613e71816020860160208601613e29565b601f01601f19169290920160200192915050565b602081526000613d996020830184613e59565b600060208284031215613eaa57600080fd5b5035919050565b60008083601f840112613ec357600080fd5b5081356001600160401b03811115613eda57600080fd5b6020830191508360208260051b8501011115613de157600080fd5b60008060008060008060006080888a031215613f1057600080fd5b8735613f1b81613d25565b965060208801356001600160401b0380821115613f3757600080fd5b613f438b838c01613eb1565b909850965060408a0135915080821115613f5c57600080fd5b613f688b838c01613eb1565b909650945060608a0135915080821115613f8157600080fd5b50613f8e8a828b01613da0565b989b979a50959850939692959293505050565b600080600060408486031215613fb657600080fd5b83356001600160401b03811115613fcc57600080fd5b613fd886828701613da0565b909790965060209590950135949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561402757614027613fec565b6040525050565b600082601f83011261403f57600080fd5b813560206001600160401b0382111561405a5761405a613fec565b8160051b60405161406d83830182614002565b9283528481018201928281018785111561408657600080fd5b83870192505b848310156140a3578235815291830191830161408c565b509695505050505050565b60006001600160401b038311156140c7576140c7613fec565b6040516140de601f8501601f191660200182614002565b8091508381528484840111156140f357600080fd5b83836020830137600060208583010152509392505050565b600080600080600060a0868803121561412357600080fd5b853561412e81613d25565b9450602086013561413e81613d25565b935060408601356001600160401b038082111561415a57600080fd5b61416689838a0161402e565b9450606088013591508082111561417c57600080fd5b61418889838a0161402e565b9350608088013591508082111561419e57600080fd5b508601601f810188136141b057600080fd5b6141bf888235602084016140ae565b9150509295509295909350565b6000806000606084860312156141e157600080fd5b83356141ec81613d25565b95602085013595506040909401359392505050565b6000806000806040858703121561421757600080fd5b84356001600160401b038082111561422e57600080fd5b61423a88838901613eb1565b9096509450602087013591508082111561425357600080fd5b5061426087828801613eb1565b95989497509550505050565b600081518084526020808501945080840160005b8381101561429c57815187529582019590820190600101614280565b509495945050505050565b602081526000613d99602083018461426c565b600080604083850312156142cd57600080fd5b8235915060208301356142df81613d25565b809150509250929050565b600080604083850312156142fd57600080fd5b8235915060208301356001600160401b0381111561431a57600080fd5b8301601f8101851361432b57600080fd5b61433a858235602084016140ae565b9150509250929050565b60008060006060848603121561435957600080fd5b833561436481613d25565b925060208401356001600160401b038082111561438057600080fd5b61438c8783880161402e565b935060408601359150808211156143a257600080fd5b506143af8682870161402e565b9150509250925092565b634e487b7160e01b600052602160045260246000fd5b600381106113fc57634e487b7160e01b600052602160045260246000fd5b60006101608d83528c60208401528b60408401528a60608401528960808401528860a084015287151560c0840152614424876143cf565b8660e0840152614433866143cf565b85610100840152614443856143cf565b846101208401528061014084015261445d81840185613e59565b9e9d5050505050505050505050505050565b6001600160a01b0391909116815260200190565b6000806040838503121561449657600080fd5b82356144a181613d25565b9150602083013580151581146142df57600080fd5b600080604083850312156144c957600080fd5b8235915060208301356001600160401b038111156144e657600080fd5b830160e081860312156142df57600080fd5b60006020828403121561450a57600080fd5b8135613d9981613d25565b6000806040838503121561452857600080fd5b50508035926020909101359150565b6000806000806080858703121561454d57600080fd5b843561455881613d25565b966020860135965060408601359560600135945092505050565b6000806040838503121561458557600080fd5b823561459081613d25565b915060208301356142df81613d25565b60008060008060008060a087890312156145b957600080fd5b86356145c481613d25565b955060208701356145d481613d25565b9450604087013593506060870135925060808701356001600160401b038111156145fd57600080fd5b61460989828a01613da0565b979a9699509497509295939492505050565b602080825260029082015261503160f01b604082015260600190565b600181811c9082168061464b57607f821691505b6020821081141561466c57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b60008251614694818460208701613e29565b9190910192915050565b600060208083526000845481600182811c9150808316806146c057607f831692505b8583108114156146de57634e487b7160e01b85526022600452602485fd5b8786018381526020018180156146fb576001811461470c57614737565b60ff19861682528782019650614737565b60008b81526020902060005b8681101561473157815484820152908501908901614718565b83019750505b50949998505050505050505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156147cd576147cd6147a4565b500190565b60006000198214156147e6576147e66147a4565b5060010190565b81835260006001600160fb1b0383111561480657600080fd5b8260051b8083602087013760009401602001938452509192915050565b6040815260006148376040830186886147ed565b82810360208401526137a18185876147ed565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008282101561488b5761488b6147a4565b500390565b6040815260006148a3604083018561426c565b8281036020840152613b74818561426c565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600381106113fc57600080fd5b60006020828403121561490957600080fd5b8135613d99816148ea565b6000808335601e1984360301811261492b57600080fd5b8301803591506001600160401b0382111561494557600080fd5b602001915036819003821315613de157600080fd5b6020808252603b908201527f5375706572313135353a207468652066756e6769626c65206974656d2069732060408201527a6e6f7420756e6971756520656e6f75676820746f206368616e676560281b606082015260800190565b8181843750600082820152601f01601f19160190565b813581526020820135602082015260408201356040820152600060608301356149f3816148ea565b6149fc816143cf565b60608301526080830135614a0f816148ea565b614a18816143cf565b608083015260a0830135614a2b816148ea565b614a34816143cf565b60a083015260c083013536849003601e19018112614a5157600080fd5b830180356001600160401b03811115614a6957600080fd5b803603851315614a7857600080fd5b613b7460c0850182602085016149b5565b600060208284031215614a9b57600080fd5b8151613d9981613d25565b6001600160a01b0386811682528516602082015260a060408201819052600090614ad29083018661426c565b8281036060840152614ae4818661426c565b90508281036080840152614af88185613e59565b98975050505050505050565b600060208284031215614b1657600080fd5b8151613d9981613d66565b600060033d1115614b3a5760046000803e5060005160e01c5b90565b600060443d1015614b4b5790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715614b7a57505050505090565b8285019150815181811115614b925750505050505090565b843d8701016020828501011115614bac5750505050505090565b614bbb60208286010187614002565b50909594505050505056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb5375706572313135353a20796f7520646f6e2774206861766520726967687473fdf81848136595c31bb5f76217767372bc4bf906663038eb38381131ea27ecbac44198f822082633041989a5350456fe6f345c39095c3ab58d93e8c1746b457cc0dcea4ab243cec6cd1c15c252315928cfd1c09c7171111f751c83ecb1453b2f5375706572313135353a20796f752063616e6e6f74206d696e74206d6f7265208b0421734f7acd679e559d6e2a9b55a743772942c49e512079bbf622d0d779913c07d937e99dce2eb02a49980bd3f83d7b407c435d29715324a7fa6aef462ee0cc04b671ccaa234fc9d17a57caae3184712621f217ae6df57a6b846664e574d75375706572313135353a20796f7520646f206e6f742068617665207468652072a109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b55657207bc2728a99328017f9274b8f60f70953a70e1527c2c96ca4f56a4dfd01e859ba204c6a47ae7910ef8b295215a97e8495a9eaf57b7b05bfd8bf951edb3fd4a16a31654c0b1bc79e5efd11874cb452467bf7311917990e2cd132e1a40ba3ae596e15375706572313135353a20796f752063616e6e6f74206275726e2061206e6f6ea26469706673582212200a3ca297c357a5548475854a3a804fbd4c202c47a3007d3c983abb981323859264736f6c63430008080033

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

000000000000000000000000ccbc4cc6b400c221bba187e0c9ef60a6f1ee655e00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000095261766520506967730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5a346d34774266375242344548737562724157617a72794a793654553356615148655144695133417a4874452f7b69647d2e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000017e00000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _owner (address): 0xcCbc4CC6B400C221Bba187E0c9Ef60A6F1Ee655E
Arg [1] : _name (string): Rave Pigs
Arg [2] : _metadataURI (string): https://gateway.pinata.cloud/ipfs/QmZ4m4wBf7RB4EHsubrAWazryJy6TU3VaQHeQDiQ3AzHtE/{id}.json
Arg [3] : _contractURI (string): ~
Arg [4] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 000000000000000000000000ccbc4cc6b400c221bba187e0c9ef60a6f1ee655e
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 5261766520506967730000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [8] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [9] : 732f516d5a346d34774266375242344548737562724157617a72794a79365455
Arg [10] : 3356615148655144695133417a4874452f7b69647d2e6a736f6e000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [12] : 7e00000000000000000000000000000000000000000000000000000000000000


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

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