Skip to main content

ERC721Supply

Functionality available for contracts that implement the ERC721 and `ERC721Supply extensions.

get_all

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 query_params to paginate the results.

nfts = contract.erc721.get_all()
print(nfts)
Configuration

query_params (optional)

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

const query_params = {
# The number of NFTs to return
count: 100, # Default is 100
# The index to start from
start: 0, # Default is 0
}

const nfts = await contract.erc721.getAll(query_params)

query_params has to be of type QueryAllParams.

class QueryAllParams:
start: int = 0
count: int = 100

Return Value

Returns a list of NFTMetadataOwner objects.

class NFTMetadataOwner:
metadata: NFTMetadata
owner: str

get_total_count

Get the total number of NFTs minted in this contract.

Unlike totalCirculatingSupply, this includes NFTs that have been burned.

total_count = contract.erc721.get_total_count()
Configuration

Return Value

Returns an int.

total_supply

Get the total number of NFTs that are currently in circulation.

i.e. the number of NFTs that have been minted and not burned.

total_supply = contract.erc721.total_supply()
Configuration

Return Value

Returns an int.