getAllOwners

Retrieves the owners of all ERC721 tokens within a specified range.

Example

import { getAllOwners } from "thirdweb/extensions/erc721";
const owners = await getAllOwners({
contract,
start: 0,
count: 10,
});
function getAllOwners(
): Promise<Array<{ owner: string; tokenId: bigint }>>;

Parameters

The options for retrieving the owners.

Type

Returns

let returnType: Promise<Array<{ owner: string; tokenId: bigint }>>;

A promise that resolves to an array of objects containing the token ID and owner address.