Skip to content

fix: document correct magic return value - #320

Merged
fulldecent merged 1 commit into
mainfrom
fix-receiver-magic-natspec
Nov 15, 2026
Merged

fulldecent merged 1 commit into
mainfrom
fix-receiver-magic-natspec

Conversation

@fulldecent

Copy link
Copy Markdown
Owner

The safeTransferFrom comments named onERC721Received(address,uint256,bytes). The code, MAGIC_ON_ERC721_RECEIVED, and erc721-token-receiver.sol require onERC721Received(address,address,uint256,bytes), which is 0x150b7a02.

Both comments now use that signature. The function and the constant are unchanged.

8a2492c fix: document correct magic return value, fixes #299

Copilot AI balanced review requested due to automatic review settings November 15, 2026 01:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the documentation-only correction to the ERC-721 receiver callback comments.

No open issues 🎉

What changed in this PR

Corrects the safeTransferFrom NatSpec comments to match the implemented ERC-721 receiver callback, addressing issue #299. This is a documentation-only change.

Changes:

  • Replaces the three-argument callback signature with onERC721Received(address,address,uint256,bytes) in both comments.
  • Aligns the documented return value with 0x150b7a02; contract logic and constants remain unchanged.
File Description
src/​contracts/​tokens/​nf-token.sol Corrects the callback signature in the implementation’s NatSpec.
src/​contracts/​tokens/​erc721.sol Corrects the callback signature in the interface’s NatSpec.

Review effort: Balanced

@fulldecent
fulldecent merged commit f3dac1f into main Nov 15, 2026
4 checks passed
@fulldecent
fulldecent deleted the fix-receiver-magic-natspec branch November 15, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Bounty Report: natspec documents wrong onERC721Received magic value (0xf0b9e5ba vs implemented 0x150b7a02)

2 participants