You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
997 B
28 lines
997 B
// SPDX-License-Identifier: MIT
|
|
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721Receiver.sol)
|
|
|
|
pragma solidity ^0.8.20;
|
|
|
|
/**
|
|
* @title ERC-721 token receiver interface
|
|
* @dev Interface for any contract that wants to support safeTransfers
|
|
* from ERC-721 asset contracts.
|
|
*/
|
|
interface IERC721Receiver {
|
|
/**
|
|
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
|
|
* by `operator` from `from`, this function is called.
|
|
*
|
|
* It must return its Solidity selector to confirm the token transfer.
|
|
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be
|
|
* reverted.
|
|
*
|
|
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
|
|
*/
|
|
function onERC721Received(
|
|
address operator,
|
|
address from,
|
|
uint256 tokenId,
|
|
bytes calldata data
|
|
) external returns (bytes4);
|
|
}
|
|
|