Skip to the content.

ERC165Upgradeable.sol

View Source: @openzeppelin\contracts-upgradeable\utils\introspection\ERC165Upgradeable.sol

↗ Extends: Initializable, IERC165Upgradeable ↘ Derived Contracts: ERC721Upgradeable

ERC165Upgradeable

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:

 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.

Contract Members

Constants & Variables

uint256[50] private __gap;

Functions

__ERC165_init

function __ERC165_init() internal nonpayable onlyInitializing 

Arguments

| Name | Type | Description | | ————- |————- | —–|

__ERC165_init_unchained

function __ERC165_init_unchained() internal nonpayable onlyInitializing 

Arguments

| Name | Type | Description | | ————- |————- | —–|

supportsInterface

See {IERC165-supportsInterface}.

function supportsInterface(bytes4 interfaceId) public view
returns(bool)

Arguments

Name Type Description
interfaceId bytes4  

Contracts