Skip to main content

UntangledERC721

UntangledERC721

registry

contract Registry registry

UntangledERC721init

function __UntangledERC721__init(string name, string symbol, string baseTokenURI) internal

UntangledERC721init_unchained

function __UntangledERC721__init_unchained(string name, string symbol, string baseTokenURI) internal

mint

function mint(address to, uint256 tokenId) public virtual

Function to mint a new NFT. Can only be called by the minter role.

Parameters

NameTypeDescription
toaddressAddress of the receiver.
tokenIduint256ID of the token to be minted.

safeMint

function safeMint(address to, uint256 tokenId) public virtual

Function to mint an NFT. Only the minter role can call this function.

Parameters

NameTypeDescription
toaddressAddress of the receiver.
tokenIduint256ID of the token to be minted.

setBaseURI

function setBaseURI(string baseTokenURI) public virtual

Sets the base URI for all tokens. It's used to create the full tokenURI in {_tokenURI}. Can only be called by the contract owner (DEFAULT_ADMIN_ROLE).

Parameters

NameTypeDescription
baseTokenURIstringThe new base URI.

_baseURI

function _baseURI() internal view virtual returns (string)

Returns the base URI for computing {tokenURI}. The format of the returned value is always '{base}{id}', where 'base' is set in the constructor and 'id' is the token id. This function returns _baseTokenURI which is a string containing the base URI for all tokens.

Return Values

NameTypeDescription
[0]stringstring memory - Returns the base URI of the contract.

tokenURI

function tokenURI(uint256 tokenId) public view virtual returns (string)

Returns the URI for a given token ID. Throws if the token ID has not been minted yet. The resulting string concatenates the baseURI, hexadecimal representation of the tokenId and chain id in query parameters.

Parameters

NameTypeDescription
tokenIduint256- The ID of the token to retrieve the URI for.

Return Values

NameTypeDescription
[0]stringA URI for a given token ID.