Skip to main content

ERC1155Enumerable

Functionality available for contracts that implement the IERC1155Enumerable interface.

Metadata for each NFT is fetched from the NFTs uri property.

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

GetAll

Get the metadata and current owner of all NFTs in the contract.

By default, returns the first 100 NFTs (in order of token ID). Use queryParams to paginate the results.

var data = await contract.ERC1155.GetAll();
Configuration

queryParams (optional)

Provide an optional object to configure the query. Useful for paginating the results.

var data = await contract.ERC1155.GetAll(new QueryAllParams()
{
count = 100,
start = 0
});

Return Value

Returns a list of NFT structs, each containing the following properties:

{
{
string id;
string uri;
string description;
string image;
string name;
string external_url;
object attributes;
}
string owner;
string type;
int supply;
int quantityOwned;
}

GetOwned

Get all the data associated with the NFTs owned by a specific wallet.

var data = await contract.ERC1155.GetOwned();
Configuration

address

The address of the wallet to get the NFTs of.

Must be a string.

Return Value

Returns a list of NFT structs, each containing the following properties:

{
{
string id;
string uri;
string description;
string image;
string name;
string external_url;
object attributes;
}
string owner;
string type;
int supply;
int quantityOwned;
}