Files
openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol
github-actions 37bd309a80 Update docs
2023-10-02 20:05:32 +00:00

25 lines
800 B
Solidity

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0-rc.2) (token/ERC721/utils/ERC721Holder.sol)
pragma solidity ^0.8.20;
import {IERC721Receiver} from "../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}.
*/
abstract contract ERC721Holder is IERC721Receiver {
/**
* @dev See {IERC721Receiver-onERC721Received}.
*
* Always returns `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) {
return this.onERC721Received.selector;
}
}