Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IERC721

Interface that represents a smart contract, which implements EIP721

interface

Hierarchy

Implemented by

Index

Methods

  • approve(to: string, tokenId: string): Promise<Transaction>
  • Gives permission to to to transfer tokenId token to another account. The approval is cleared when the token is transferred.

    Only a single account can be approved at a time, so approving the zero address clears previous approvals.

    Requirements:

    • The caller must own the token or be an approved operator.
    • tokenId must exist.

    Emits an {Approval} event.

    Parameters

    • to: string
    • tokenId: string

    Returns Promise<Transaction>

  • balanceOf(owner: string): Promise<bigint>
  • getApproved(tokenId: string): Promise<string>
  • Returns the account approved for tokenId token.

    Requirements:

    • tokenId must exist.

    Parameters

    • tokenId: string

    Returns Promise<string>

  • isApprovedForAll(owner: string, operator: string): Promise<boolean>
  • name(): Promise<string>
  • ownerOf(tokenId: string): Promise<string>
  • Returns the owner of the tokenId token.

    Requirements:

    • tokenId must exist.

    Parameters

    • tokenId: string

    Returns Promise<string>

  • safeTransferFrom(from: string, to: string, tokenId: string): Promise<Transaction>
  • Safely transfers tokenId token from from to to, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must exist and be owned by from.
    • If the caller is not from, it must be have been allowed to move this token by either approve or setApprovalForAll.
    • If to refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.

    Emits a {Transfer} event.

    Parameters

    • from: string
    • to: string
    • tokenId: string

    Returns Promise<Transaction>

  • safeTransferFromData(from: string, to: string, tokenId: string, data: string): Promise<Transaction>
  • Safely transfers tokenId token from from to to.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must exist and be owned by from.
    • If the caller is not from, it must be approved to move this token by either approve or setApprovalForAll.
    • If to refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.

    Emits a {Transfer} event.

    Parameters

    • from: string
    • to: string
    • tokenId: string
    • data: string

    Returns Promise<Transaction>

  • setApprovalForAll(operator: string, approved: boolean): Promise<Transaction>
  • Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.

    Requirements:

    • The operator cannot be the caller.

    Emits an {ApprovalForAll} event.

    Parameters

    • operator: string
    • approved: boolean

    Returns Promise<Transaction>

  • supportsInterface(interfaceId: string): Promise<boolean>
  • symbol(): Promise<string>
  • tokenURI(tokenId: string): Promise<string>
  • Returns the Uniform Resource Identifier (URI) for tokenId token.

    Parameters

    • tokenId: string

    Returns Promise<string>

  • transferFrom(from: string, to: string, tokenId: string): Promise<Transaction>
  • Transfers tokenId token from from to to.

    WARNING: Usage of this method is discouraged, use safeTransferFrom whenever possible.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must be owned by from.
    • If the caller is not from, it must be approved to move this token by either approve or setApprovalForAll.

    Emits a {Transfer} event.

    Parameters

    • from: string
    • to: string
    • tokenId: string

    Returns Promise<Transaction>

Generated using TypeDoc