Skip to content

UniverseToken

UniverseToken

CallerIsNotRegistry

error CallerIsNotRegistry()

Thrown when the message sender doesn't match the registries address.

_registry

contract IUniverseRegistry _registry

Registry.

_tokenIdTracker

struct Counters.Counter _tokenIdTracker

Token ID counter.

onlyRegistry

modifier onlyRegistry()

Modifier to make a function callable only by the registry contract.

constructor

constructor(contract IUniverseRegistry registry) public

UniverseToken constructor.

Name Type Description
registry contract IUniverseRegistry Universe registry.

mint

function mint(address to) external returns (uint256 tokenId)

Mints new token and transfers it to `to` address.

Name Type Description
to address Universe owner address.
Name Type Description
tokenId uint256 Minted token ID.

currentId

function currentId() external view returns (uint256)

Returns current token ID.

supportsInterface

function supportsInterface(bytes4 interfaceId) public view returns (bool)

_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._

_baseURI

function _baseURI() internal view returns (string)

Base URI for computing {tokenURI}. If set, the resulting URI for each token will be the concatenation of the `baseURI` and the `tokenId`. Empty by default, can be overridden in child contracts.