Reorganize the repo structure (#2503)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
23
contracts/token/ERC721/utils/ERC721Holder.sol
Normal file
23
contracts/token/ERC721/utils/ERC721Holder.sol
Normal file
@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "../IERC721Receiver.sol";
|
||||
|
||||
/**
|
||||
* @dev Implementation of the {IERC721Receiver} interface.
|
||||
*
|
||||
* Accepts all token transfers.
|
||||
* Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
|
||||
*/
|
||||
contract ERC721Holder is IERC721Receiver {
|
||||
|
||||
/**
|
||||
* @dev See {IERC721Receiver-onERC721Received}.
|
||||
*
|
||||
* Always returns `IERC721Receiver.onERC721Received.selector`.
|
||||
*/
|
||||
function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) {
|
||||
return this.onERC721Received.selector;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user