ERC-721 function
safeTransferFrom(address,address,uint256)
Transfers an ERC-721 token and checks compatible contract recipients.
- Selector
- 0x42842e0e
- Mutability
- nonpayable
Generate safeTransferFrom calldata
Edit the example inputs to rebuild the bytes instantly in your browser. Nothing is sent and no transaction is submitted.
address
address
uint256
calldata100 bytes
sel0x42842e0e
safeTransferFrom(address,address,uint256)
0x000000000000000000000000001111111111111111111111111111111111111111
from · address =0x11111111…111111
0x200000000000000000000000002222222222222222222222222222222222222222
to · address =0x22222222…222222
0x40000000000000000000000000000000000000000000000000000000000000002a
tokenId · uint256 =42
How safeTransferFrom works
For a contract recipient, the NFT contract calls onERC721Received and reverts unless the expected acceptance value is returned. This overload sends empty data.
Parameters
| Name | Solidity type | Meaning |
|---|---|---|
| from | address | Current owner of the NFT. |
| to | address | New owner or receiving contract. |
| tokenId | uint256 | NFT to transfer. |