-
Notifications
You must be signed in to change notification settings - Fork 86
/
ITokenUtils.sol
38 lines (31 loc) · 1.9 KB
/
ITokenUtils.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import {IRoyaltyUGC} from "@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyUGC.sol";
/// @title TokenUtils interface
/// @author The Sandbox
interface ITokenUtils is IRoyaltyUGC {
/// @notice Extracts the tier from a given token id
/// @param tokenId The token id to extract the tier from
/// @return tier The asset tier, determined by the catalyst used to create it
function getTier(uint256 tokenId) external pure returns (uint8 tier);
/// @notice Extracts the revealed flag from a given token id
/// @param tokenId The token id to extract the revealed flag from
/// @return revealed Whether the asset is revealed or not
function isRevealed(uint256 tokenId) external pure returns (bool revealed);
/// @notice Extracts the asset nonce from a given token id
/// @param tokenId The token id to extract the asset nonce from
/// @return creatorNonce The asset creator nonce
function getCreatorNonce(uint256 tokenId) external pure returns (uint16 creatorNonce);
/// @notice Extracts the abilities and enhancements hash from a given token id
/// @param tokenId The token id to extract reveal nonce from
/// @return revealNonce The reveal nonce of the asset
function getRevealNonce(uint256 tokenId) external pure returns (uint16 revealNonce);
/// @notice Extracts the bridged flag from a given token id
/// @param tokenId The token id to extract the bridged flag from
/// @return bridged Whether the asset is bridged or not
function isBridged(uint256 tokenId) external pure returns (bool bridged);
/// @notice Extracts the creator address from a given token id
/// @param tokenId The token id to extract the creator address from
/// @return creator The asset creator address
function getCreatorAddress(uint256 tokenId) external pure returns (address creator);
}