Skip to content

Instantly share code, notes, and snippets.

@Amxx
Last active September 30, 2023 17:04
Show Gist options
  • Save Amxx/a565a27f2e333214ac1617e7e2524753 to your computer and use it in GitHub Desktop.
Save Amxx/a565a27f2e333214ac1617e7e2524753 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.21+commit.d9974bed.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165Upgradeable, ERC165Upgradeable } from "./ERC165Upgradeable.sol";
import { IERC1363Upgradeable } from "./IERC1363Upgradeable.sol";
contract ERC1363Upgradeable is IERC1363Upgradeable, ERC165Upgradeable {
function supportsInterface(bytes4 id) public view virtual override returns (bool) {
return id == type(IERC1363Upgradeable).interfaceId || super.supportsInterface(id);
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165 } from "./IERC165.sol";
contract ERC165 {
function supportsInterface(bytes4 id) public view virtual returns (bool) {
return id == type(IERC165).interfaceId;
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165Upgradeable } from "./IERC165Upgradeable.sol";
import { ERC165 as ERC165Upgradeable } from "./ERC165.sol";
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165 } from "./IERC165.sol";
interface IERC1363 is IERC165 {}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165Upgradeable } from "./IERC165Upgradeable.sol";
import { IERC1363 as IERC1363Upgradeable } from "./IERC1363.sol";
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
interface IERC165 {
function supportsInterface(bytes4) external view returns (bool);
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165 as IERC165Upgradeable } from "./IERC165.sol";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment