HomenieuwsCryptoERC-721 approvals: transferring one NFT does not revoke an operator

ERC-721 approvals: transferring one NFT does not revoke an operator

Cryptofocus bron in google
Bybit - sponsored
Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!

Transferring an ERC-721 NFT clears the address approved for that particular token. It does not cancel an operator’s permission over the NFTs you still hold in the same collection. That difference matters when you move an NFT and want to know which permissions remain.

What you need to know
An ERC-721 transfer resets the approval attached to that individual NFT.
An operator approval covers all NFTs belonging to the approving owner within that contract.
Clearing a token approval and revoking an operator approval use different functions.
Check the collection contract, token ID and current owner when reading permissions.

The official ERC-721 specification defines both permission types. Its approve function names a controller for one token ID. Its setApprovalForAll function enables or disables an operator for an owner. The operator can manage that owner’s NFTs in the contract, including initiating transfers; the permission is broader than a single listing.

Follow two NFTs through one transfer

Consider a hypothetical wallet holding tokens 10 and 11 in one ERC-721 collection. The owner has approved an operator for the collection and also approved a separate address for token 10. When token 10 moves to a second wallet, its individual approval is cleared. The original wallet’s operator approval still covers token 11. Moving token 10 therefore does not establish that the original wallet has revoked that operator.

The same operator does not gain permission from the new owner merely because it had permission from the old one. ERC-721 checks whether an operator is authorized by the current owner. The second wallet might already have granted its own operator approval, however. To assess token 10 after the move, query permissions for the second wallet rather than reusing the first wallet’s result.

Lees ook:  Bitcoin CPI test puts $62,000 support in focus

The distinction also applies when removing permissions. Setting the approved address for one token to the zero address removes that token’s individual approval. Calling setApprovalForAll(operator, false) revokes that owner’s approval for the named operator. One action should not be treated as evidence that the other permission has disappeared. These are descriptions of the standard, not a request to sign a transaction.

For a read-only check, getApproved(tokenId) returns the individual approved address, while isApprovedForAll(owner, operator) returns the owner-specific operator result. Read both on the collection contract you intend to inspect. The specification identifies an NFT by the combination of contract address and token ID, so token 10 in a different collection is a different asset. A zero individual approval is only half the answer when an operator permission may still exist.

Partnerdeal

Bybit - Welkomstbonus 30 USDC!

Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!.

Lees hier de voorwaarden
Nu naar Bybit
Voorkeur cryptofocus google nieuws
Lotte Herkens
Lotte Herkens
Lotte Herkens schrijft over crypto alsof het om geld gaat dat je morgen echt nodig hebt. Ze volgt bitcoin en altcoins al jaren, maar wordt pas enthousiast als er data, adoptie of beleid achter zit. Haar stukken zijn kort, scherp en praktisch: wat is er gebeurd, waarom boeit het, en wat kan het betekenen voor je portfolio? Ze heeft een zwak voor on-chain trends, macro-cijfers en alles wat schuurt tussen regelgeving en innovatie. Als ze niet schrijft, zit ze vaak met een koffie in de trein, podcasts te luisteren, of maakt ze lange wandelingen om een verhaal “recht” te krijgen. Lotte is nuchter, nieuwsgierig en allergisch voor hype. Ze wil dat lezers snappen wat er speelt — zonder dat het voelt alsof je een whitepaper moet doorploegen.
Lees ook