Improve forcedTransfer for NFT precompile. - #2003
Merged
HenriqueNogara merged 1 commit intoSep 10, 2026
Merged
Conversation
HenriqueNogara
requested review from
Neopallium
and
a lite review from Copilot
and removed request for
Neopallium
September 10, 2026 16:33
Neopallium
approved these changes
Sep 10, 2026
Neopallium
marked this pull request as ready for review
September 10, 2026 16:35
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Solidity stub ABI change requires regenerating and committing the corresponding NonFungibleAssetStub.bin artifact to keep embedded runtime bytecode in sync.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the NFT precompile’s forcedTransfer API to accept an explicit destination address, aligning the Solidity interface, Rust precompile dispatch, and integration test helpers so agents can forcibly transfer an NFT to a chosen recipient.
Changes:
- Extend
forcedTransferinINonFungibleAssettoforcedTransfer(address from, address to, uint256 tokenId). - Update the Rust precompile implementation to route through
pallet_nft::controller_transfer_toand emit events with the providedto. - Update integration helper/test call sites to pass the new
toargument and validate event fields.
File summaries
| File | Description |
|---|---|
| precompiles/src/interfaces/NonFungibleAssetStub.sol | Updates the Solidity interface + stub implementation signature for forcedTransfer to include to. |
| pallets/precompiles/src/interface/nft/erc7943.rs | Adjusts the precompile handler to accept to, dispatch controller_transfer_to, and emit events with the correct destination. |
| integration/tests/revive_erc721.rs | Updates the forced transfer integration test to pass to and assert the event’s to field. |
| integration/src/erc721_helper.rs | Updates the ERC721 helper wrapper to include the new to argument in the call encoding. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
HenriqueNogara
enabled auto-merge (squash)
September 10, 2026 16:40
HenriqueNogara
deleted the
improve-nft-precompile-controller-transfer
branch
September 10, 2026 17:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changelog
new features
address totoforcedTransferinNonFungibleAssetStub.sol