IERC1155TL

Git Source

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

NameTypeDescription
tokenIduint256The 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

NameTypeDescription
newUristringThe uri for the token to create
addressesaddress[]The addresses to mint the new token to
amountsuint256[]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

NameTypeDescription
newUristringThe uri for the token to create
addressesaddress[]The addresses to mint the new token to
amountsuint256[]The amount of the new token to mint to each address
royaltyAddressaddressRoyalty payout address for the created token
royaltyPercentuint256Royalty 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

NameTypeDescription
newUrisstring[]the uris for the tokens to create
addressesaddress[][]2d dynamic array holding the addresses to mint the new tokens to
amountsuint256[][]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

NameTypeDescription
newUrisstring[]Rhe uris for the tokens to create
addressesaddress[][]2d dynamic array holding the addresses to mint the new tokens to
amountsuint256[][]2d dynamic array holding the amounts of the new tokens to mint to each address
royaltyAddressesaddress[]Royalty payout addresses for the tokens
royaltyPercentsuint256[]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

NameTypeDescription
tokenIduint256The token to mint
addressesaddress[]The addresses to mint to
amountsuint256[]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

NameTypeDescription
tokenIduint256The token to mint
addressesaddress[]The addresses to mint to
amountsuint256[]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

NameTypeDescription
fromaddressAddress to burn from
tokenIdsuint256[]Array of tokens to burn
amountsuint256[]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

NameTypeDescription
tokenIduint256The token to mint
newUristringThe new token uri

Structs

Token

Struct defining a token

struct Token {
    bool created;
    string uri;
}