Skip to main content

ERC721

ERC721 resource provides operations for interacting with NFT (Non-Fungible Token) contracts.

Overview

ERC721 is the standard for NFTs on Ethereum. Each token has a unique ID and represents a distinct asset.

Operations

Get Balance

Get the number of NFTs owned by an address.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Owner Address (required): Address to check balance for

Owner Of

Get the owner of a specific token ID.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Token ID (required): The token ID to query

Transfer From

Transfer an NFT to another address.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • From (required): Current owner address
  • To (required): Recipient address
  • Token ID (required): The token ID to transfer

Safe Transfer From

Safely transfer an NFT with receiver validation.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • From (required): Current owner address
  • To (required): Recipient address
  • Token ID (required): The token ID to transfer

Approve

Approve another address to transfer a specific NFT.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Spender (required): Address to approve
  • Token ID (required): The token ID to approve

Set Approval For All

Approve an operator to manage all NFTs.

Required Credentials: Ethereum RPC, Ethereum Account

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Operator (required): Address to approve
  • Approved (required): true to approve, false to revoke

Get Approved

Get the approved address for a token.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Token ID (required): The token ID to query

Is Approved For All

Check if an operator is approved for all tokens.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Owner (required): Owner address
  • Operator (required): Operator address

Token URI

Get the metadata URI for a token.

Required Credentials: Ethereum RPC

Parameters:

  • Contract Address (required): The ERC721 NFT contract address
  • Token ID (required): The token ID to query

Example Output:

{
"tokenURI": "ipfs://QmXxxx.../1"
}

Common Use Cases

Monitor NFT Ownership

[Ethereum Trigger: Event] → [Owner Of] → [Check Owner] → [Action]

Automated NFT Transfer

[Trigger] → [Safe Transfer From] → [Wait For Transaction] → [Notification]

Check NFT Metadata

[Trigger] → [Token URI] → [Fetch Metadata] → [Display]

Tips

  • Safe Transfer: Prefer Safe Transfer From to prevent NFTs being sent to contracts that can't handle them
  • Token IDs: Usually sequential but can be any uint256 value
  • Metadata: Token URI typically points to JSON metadata (often on IPFS)
  • Approval: Set Approval For All is commonly used for marketplace interactions