IERC1155TL
Author: transientlabs.xyz
Interface for ERC1155TL
Interface id = 0x452d5a4a
Functions
getTokenDetails
Function to get token creation details
function getTokenDetails(uint256 tokenId) external view returns (Token memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token to lookup |
createToken
Function to create a token that can be minted to creator or airdropped
Requires owner or admin
function createToken(string calldata newUri, address[] calldata addresses, uint256[] calldata amounts) external;
Parameters
Name | Type | Description |
---|---|---|
newUri | string | The uri for the token to create |
addresses | address[] | The addresses to mint the new token to |
amounts | uint256[] | The amount of the new token to mint to each address |
createToken
Function to create a token that can be minted to creator or airdropped
Overloaded function where you can set the token royalty config in this tx
Requires owner or admin
function createToken(
string calldata newUri,
address[] calldata addresses,
uint256[] calldata amounts,
address royaltyAddress,
uint256 royaltyPercent
) external;
Parameters
Name | Type | Description |
---|---|---|
newUri | string | The uri for the token to create |
addresses | address[] | The addresses to mint the new token to |
amounts | uint256[] | The amount of the new token to mint to each address |
royaltyAddress | address | Royalty payout address for the created token |
royaltyPercent | uint256 | Royalty percentage for this token |
batchCreateToken
function to batch create tokens that can be minted to creator or airdropped
requires owner or admin
function batchCreateToken(string[] calldata newUris, address[][] calldata addresses, uint256[][] calldata amounts)
external;
Parameters
Name | Type | Description |
---|---|---|
newUris | string[] | the uris for the tokens to create |
addresses | address[][] | 2d dynamic array holding the addresses to mint the new tokens to |
amounts | uint256[][] | 2d dynamic array holding the amounts of the new tokens to mint to each address |
batchCreateToken
Function to batch create tokens that can be minted to creator or airdropped
Overloaded function where you can set the token royalty config in this tx
Requires owner or admin
function batchCreateToken(
string[] calldata newUris,
address[][] calldata addresses,
uint256[][] calldata amounts,
address[] calldata royaltyAddresses,
uint256[] calldata royaltyPercents
) external;
Parameters
Name | Type | Description |
---|---|---|
newUris | string[] | Rhe uris for the tokens to create |
addresses | address[][] | 2d dynamic array holding the addresses to mint the new tokens to |
amounts | uint256[][] | 2d dynamic array holding the amounts of the new tokens to mint to each address |
royaltyAddresses | address[] | Royalty payout addresses for the tokens |
royaltyPercents | uint256[] | Royalty payout percents for the tokens |
mintToken
Function to mint existing token to recipients
Requires owner or admin
function mintToken(uint256 tokenId, address[] calldata addresses, uint256[] calldata amounts) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token to mint |
addresses | address[] | The addresses to mint to |
amounts | uint256[] | Amounts of the token to mint to each address |
externalMint
External mint function
Requires caller to be an approved mint contract
function externalMint(uint256 tokenId, address[] calldata addresses, uint256[] calldata amounts) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token to mint |
addresses | address[] | The addresses to mint to |
amounts | uint256[] | Amounts of the token to mint to each address |
burn
Function to burn tokens from an account
Msg.sender must be token owner or operator
If this function is called from another contract as part of a burn/redeem, the contract must ensure that no amount is '0' or if it is, that it isn't a vulnerability.
function burn(address from, uint256[] calldata tokenIds, uint256[] calldata amounts) external;
Parameters
Name | Type | Description |
---|---|---|
from | address | Address to burn from |
tokenIds | uint256[] | Array of tokens to burn |
amounts | uint256[] | Amount of each token to burn |
setTokenUri
Function to set a token uri
Requires owner or admin
function setTokenUri(uint256 tokenId, string calldata newUri) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token to mint |
newUri | string | The new token uri |
Structs
Token
Struct defining a token
struct Token {
bool created;
string uri;
}