List ERC721 NFTs

Remarks

Easily list all the NFTs in a ERC721 contract.

Example

const contract = await sdk.getContract("{{contract_address}}");
const nfts = await contract.nft.query.all();

Hierarchy

  • Erc721Supply

Implements

  • DetectableFeature

Constructors

Properties

contractWrapper: ContractWrapper<IERC721 & IERC721Metadata & IERC721Supply>
erc721: Erc721<BaseERC721>
featureName: "ERC721Supply" = FEATURE_NFT_SUPPLY.name
owned: undefined | Erc721Enumerable | Erc721AQueryable

Methods

  • Get all NFTs

    Parameters

    • Optional queryParams: {
          count?: number;
          start?: number;
      }

      optional filtering to only fetch a subset of results.

      • Optional count?: number
      • Optional start?: number

    Returns Promise<NFT[]>

    The NFT metadata for all NFTs queried.

    Remarks

    Get all the data associated with every NFT in this contract.

    By default, returns the first 100 NFTs, use queryParams to fetch more.

    Example

    const nfts = await contract.nft.query.all();
    
  • Get the number of NFTs of this contract currently owned by end users

    Returns Promise<BigNumber>

    the total number of NFTs of this contract in circulation (minted & not burned)

  • Get the number of NFTs minted

    Returns Promise<BigNumber>

    the total number of NFTs minted in this contract

    Remarks

    This returns the total number of NFTs minted in this contract, not the total supply of a given token.

Generated using TypeDoc