ERC1155

Functionality available for contracts that implement the IERC1155 interface.

Balance

Get the quantity of a specific NFT owned by the connected wallet.

var data = await contract.ERC1155.Balance("{{token_id}}");

BalanceOf

Get the quantity of a specific NFT owned by a wallet.

var data = await contract.ERC1155.BalanceOf("{{wallet_address}}", "{{token_id}}");

Get

Get the metadata of an NFT using it’s token ID.

Metadata is fetched from the uri property of the NFT.

If the metadata is hosted on IPFS, the metadata is fetched and made available as an object. The object’s image property will be a URL that is available through the thirdweb IPFS gateway.

var data = await contract.ERC1155.Get("{{token_id}}");

Transfer

Transfer an NFT from the connected wallet to another wallet.

var data = await contract.ERC1155.Transfer("{{wallet_address}}", "{{token_id}}", 1);

IsApprovedForAll

Get whether this wallet has approved transfers from the given operator.

This means that the operator can transfer NFTs on behalf of this wallet.

var data = await contract.ERC1155.IsApprovedForAll("{{owner_address}}", "{{operator_address}}");

SetApprovalForAll

Give another address approval (or remove approval) to transfer all of your NFTs from this collection.

var data = await contract.ERC1155.SetApprovalForAll("{{operator_address}}", true);

TotalCount

Get the total number of unique NFTs in the collection.

var data = await contract.ERC1155.TotalCount();

TotalSupply

Returns the total supply of a token in the collection, including burned tokens.

var data = await contract.ERC1155.TotalSupply("{{token_id}}");