An NFT transfer to a contract can fail even when the address looks correct and the sender has permission. The destination may not accept the token through the receiving handshake. That is one of the jobs hidden inside the name safeTransferFrom.
For an ERC-721 safe transfer that checks a contract recipient, the token contract calls the recipient's onERC721Received hook. The recipient must return the expected four-byte value, 0x150b7a02; rejection or an incorrect response causes the safe-transfer call to revert. This checks a specific receiving interaction. It does not guarantee that the recipient can later release the NFT, display it or protect it.
This explainer follows a hypothetical transfer into a contract. It describes the ERC-721 standard, not a tested marketplace, bridge, wallet or deployed collection.
Three participants, not one generic “sender”
Start with a fictional collection contract COLLECTION-C, its token 42, an existing owner OWNER-A, an authorized caller OPERATOR-B, and a receiving contract RECEIVER-R. These names are labels, not network addresses. Assume the caller has the necessary authority and that the other transfer conditions are met.
The ERC-721 specification separates the transfer entry point from the receiver callback:
| Role in the example | What it means |
|---|---|
| COLLECTION-C | The NFT contract processing the transfer; it calls the receiver hook |
| OPERATOR-B | The address that called safeTransferFrom on COLLECTION-C |
| OWNER-A | The previous owner, represented by the callback's from argument |
| RECEIVER-R | The contract destination asked to accept the NFT |
Inside the receiver hook, the immediate message sender is COLLECTION-C, not automatically OPERATOR-B or OWNER-A. The operator and former owner arrive as separate callback arguments. Collapsing them into one “sender” loses information needed to understand the interaction.
Token 42 also belongs to COLLECTION-C. A number alone does not identify an NFT across collections or networks. The existing ERC-721 and ERC-1155 identifier guide covers that ownership model and approval scopes; this article follows the acceptance step.
What happens during the receiving handshake?
For this example, assume RECEIVER-R is a contract to which the implementation applies the receiver check. The safe-transfer call passes its ownership and authorization checks and transfers the NFT within the call. The NFT contract then invokes onERC721Received on RECEIVER-R.
The callback carries the operator, previous owner, token ID and additional data. ERC-721 defines two safeTransferFrom overloads: the version without the extra data argument behaves as though that data were empty. The data is not a universal safety instruction; its meaning depends on the receiving implementation.
RECEIVER-R can inspect the incoming context and either accept or reject it. To signal acceptance under the standard, the hook returns 0x150b7a02, the selector associated with onERC721Received(address,address,uint256,bytes). It is a four-byte return value, not a contract address, a token ID, a transaction hash or a generic Boolean true.
The order matters. State can be updated before the external callback runs, but a later revert undoes the changes within the reverted call. Seeing an intermediate operation in a trace does not by itself establish a surviving transfer.
Accepted, rejected and still unresolved
Consider three invented outcomes, with no live contract involved:
| RECEIVER-R's behavior | Consequence for this safe-transfer call | What the result does not establish |
|---|---|---|
| The hook returns the required value and the call otherwise completes | The receiver acceptance requirement is satisfied in this interaction | Future withdrawal, a marketplace listing or a security audit |
| The hook reverts or returns another value | The safe-transfer call reverts | The receiver's intent or a universal diagnosis of the failure |
| The callback accepts but performs another transfer during execution | The handshake can succeed while ownership moves again | That RECEIVER-R must remain the final owner |
The third case is a useful limit on the word “received.” The standard's rationale permits receiver-side behavior; a callback is executable contract logic, not a passive delivery receipt. An acceptance response cannot be read as a promise that the NFT stays in that address.
A rejected call also needs the right scope. A direct transaction whose failure propagates outward reverts. But a surrounding contract can catch a failed subcall and continue other work. An outer transaction marked successful therefore does not universally prove that every nested NFT transfer succeeded. Brokzi's logs and transaction traces explainer separates those records.
Why “safe” does not promise a safe exit
The receiver hook checks acceptance through this transfer route. It does not require a usable withdrawal function, establish who may invoke one, or prove the contract's future behavior. A contract can accept an NFT while offering no route that the intended person can actually use to recover it.
It also does not check whether the collection is genuine, whether the image is permanently stored, whether the NFT has market value, or whether an offer is legitimate. NFT metadata and storage is a separate question from who owns the token.
ERC-721's traditional check is described in terms of recipient code being present. That is not a general identity test for every account or a guarantee about all construction, delegation and implementation contexts. This article does not infer receiving behavior from an address's appearance or from a wallet's marketing label. A particular integration needs its actual implementation and execution context.
An interface badge does not perform the callback
supportsInterface and onERC721Received have different jobs. The first reports interface support under ERC-165. The second participates in the actual receiving interaction.
The receiver's identifier and its callback selector can share the same four-byte value in this single-function interface. That does not make a positive interface declaration equivalent to a successful transfer. No amount of reading the badge substitutes for the actual call's outcome. The ERC-165 explainer follows that declaration-versus-behavior boundary.
Likewise, permission to move an NFT does not establish that the destination accepts it. Authorization, receiver acceptance and a later exit route are separate questions.
Do not bypass a rejection with another transfer function
ERC-721 also defines transferFrom. Its specification explicitly puts responsibility on the caller to establish that the recipient can receive NFTs; it does not provide the safe-transfer receiver check described above.
A failed handshake is therefore not a reason to switch methods merely to force delivery. Skipping this check can leave the NFT at a contract that cannot release it. This article provides no bypass instructions and recommends no live test transfer.
ERC-1155 has its own single-token and batch receiving hooks, with different signatures and acceptance values. An ERC-721 hook does not establish ERC-1155 compatibility. Do not carry the 0x150b7a02 result across standards as a universal NFT acceptance code.
What to read before concluding that delivery worked
Keep the chain, NFT contract, token ID, intended recipient and actual transfer method together. Then distinguish:
- Authority: who invoked the token contract, and which owner or permission made that call eligible?
- Acceptance: was a receiver hook invoked, what did it return, and did that safe-transfer call complete or revert?
- Final state: what ownership survives the relevant execution, including any receiver-side forwarding or surrounding calls?
- Exit: what documented mechanism lets the intended user move the NFT out again, with which permissions and limits?
If a record is missing, leave that part unresolved. A transaction badge, a wallet thumbnail and an interface-support answer each describe narrower observations than this whole chain of questions.
Sources and scope
The complete final ERC-721 specification was checked on 22 November 2026, including its receiver interface, transfer conditions, caveats and rationale. Its legacy Solidity interface examples describe the standard; they are not current compiler instructions. ERC-1155 was checked to keep the cross-standard boundary accurate.
COLLECTION-C, token 42, OWNER-A, OPERATOR-B and RECEIVER-R are fictional labels. No receiver was deployed, no callback or RPC request was executed, and no wallet, signature, approval, transfer or recovery attempt was performed. This is technical education, not a contract audit, custody assurance or financial advice.
- ERC-721: Non-Fungible Token Standard — transfer authorization, safe transfer, receiver callback and implementation caveats.
- ERC-1155: Multi Token Standard — the separate single and batch receiver interfaces; not an alternative acceptance code for ERC-721.
See something wrong? Brokzi logs material changes. Prepare a correction note.




