Skip to main content

ImQuarkTemplate

  struct Category {
// The ID of the category
uint256 id;
// The selector of the category
bytes4 selector;
// The name of the category
string name;
// The URI of the category
string uri;
}
  function createTemplate(string calldata uri) external;
  function createBatchTemplate(string[] calldata uris) external;
  function createCategory(string calldata name, string calldata uri) external;
  function createBatchCategory(string[] calldata names, string[] calldata uris) external;
  function setTemplateCategory(string calldata category, uint256[] calldata templateIds_) external;
  function removeCategoryFromTemplate(string memory category, uint256 templateId) external;
  function getAllCategoryTemplates(string memory category) external view returns (uint256[] memory);

  function getCategoryTemplatesByIndex(
string memory category,
uint16 startIndex,
uint16 batchLength
) external view returns (uint256[] memory);
  function getTemplatesCategory(uint256 templateId) external view returns (string[] memory);
  function getCategoryTemplateLength(string calldata category) external view returns (uint256);
  function getCategoryByName(
string calldata name
) external view returns (uint256 id, bytes4 selector, string memory uri);
  function getCategoryById(uint256 id) external view returns (bytes4 selector, string memory name, string memory uri);
  function getCategoryBySelector(
bytes4 selector
) external view returns (uint256 id, string memory name, string memory uri);
  function templateUri(uint256 templateId) external view returns (string memory);
  function getLastTemplateId() external view returns (uint256);
  function isTemplateIdExist(uint256 templateId) external view returns (bool exist);