// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
interface IMyContract {
function myFunction() external;
}
contract MyContract is IMyContract, IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool) {
return interfaceId == type(IMyContract).interfaceId || interfaceId == interfaceId == type(IERC165).interfaceId;
}
function myFunction() external {
// do something
}
}