Skip to main content

sdk.erc721base

Home > @openformat/sdk > ERC721Base

ERC721Base class

Represents an ERC721 contract instance with utility methods to interact with an ERC721 contract ERC721 BaseContract

Signature:

export declare class ERC721Base extends BaseContract 

Extends: BaseContract

Constructors

ConstructorModifiersDescription
(constructor)(provider, appId, contractAddress, signer)Constructs a new instance of the ERC721Base class

Methods

MethodModifiersDescription
address()

Get the contract address.

address

approve(params)Grants approval to another address to transfer ownership of an ERC721 token. approve
balanceOf(params)Gets the number of tokens owned by a specific account. balanceOf
batchMint(params)Mint multiple tokens and transfer them to the specified address. batchMint
burn(params)Burns an ERC721 token with the specified token ID. burn
getApproved(params)Retrieves the account approved to transfer the ownership of a specific token ID. getApproved
grantRole(params)Grants a give role to the specified account for the current ERC721 contract. grantRole
mint(params)Mint a new ERC721 token with the given tokenURI to the specified recipient address. mint
nextTokenIdToMint()Get the next token ID to be minted.
ownerOf(params)Returns the owner of the specified NFT. ownerOf
setApprovalForAll(params)
tokenURI(params)Returns the tokenURI of the specified NFT. tokenURI
totalSupply(params)Returns the total supply of tokens in the ERC721 contract totalSupply
transfer(params)Transfers ownership of an ERC721 token from one address to another. transfer