12345678910111213141516171819202122232425262728293031323334353637 |
- // SPDX-License-Identifier: MIT
- // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
- pragma solidity ^0.8.0;
- import "./IERC165Upgradeable.sol";
- import "../../proxy/utils/Initializable.sol";
- /**
- * @dev Implementation of the {IERC165} interface.
- *
- * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
- * for the additional interface id that will be supported. For example:
- *
- * ```solidity
- * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
- * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
- * }
- * ```
- *
- * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
- */
- abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
- function __ERC165_init() internal onlyInitializing {
- __ERC165_init_unchained();
- }
- function __ERC165_init_unchained() internal onlyInitializing {
- }
- /**
- * @dev See {IERC165-supportsInterface}.
- */
- function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
- return interfaceId == type(IERC165Upgradeable).interfaceId;
- }
- uint256[50] private __gap;
- }
|