Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

TestMultiToken

Git Source

Inherits: ERC1155

Functions

constructor

constructor() ERC1155("https://test-multi-token.com/{id}.json");

mint

Mint multi-tokens for oneself.

function mint(uint256 tokenId, uint256 value) external;

Parameters

NameTypeDescription
tokenIduint256The multi-token ID
valueuint256The amount of fungible tokens to mint

mintBatch

Mint a batch of multi-tokens for oneself.

function mintBatch(uint256[] calldata tokenIds, uint256[] calldata values) external;

Parameters

NameTypeDescription
tokenIdsuint256[]The multi-token IDs
valuesuint256[]The amounts of fungible tokens to mint

mint

Mint multi-tokens.

function mint(address to, uint256 tokenId, uint256 value) external;

Parameters

NameTypeDescription
toaddressThe account that will receive the tokens
tokenIduint256The multi-token ID
valueuint256The amount of fungible tokens to mint

mintBatch

Mint a batch of multi-tokens.

function mintBatch(address to, uint256[] calldata tokenIds, uint256[] calldata values)
    external;

Parameters

NameTypeDescription
toaddressThe account that will receive the tokens
tokenIdsuint256[]The multi-token IDs
valuesuint256[]The amounts of fungible tokens to mint