Ethereum icon

Ethereum

Interact with Ethereum blockchain

ERC721 → Set Approval For All

AI-generated

Summary

Set approval for all ERC721 tokens for a given operator address.

Inputs

  • contractAddress (required) — ERC721 NFT contract address
  • operator (required) — Operator address to grant approval
  • approved — Whether to set approval (true) or revoke (false); defaults to true

Output shape

a single record containing the transaction hash

If the call fails, an error object is returned; otherwise only success information is emitted.

Examples

Example 1: Approve an operator for a specific ERC721 contract

contractAddress=0x123..., operator=0xabc..., approved=true

Example 2: Revoke all approvals for an operator

contractAddress=0x123..., operator=0xabc..., approved=false

Links

Discussion