ERC165Base

Git Source

Inherits: IERC165

Base contract for ERC165 interface support

Provides common supportsInterface functionality for Diamond facets

Reduces code duplication across CMX Protocol contracts

Functions

supportsInterface

See IERC165-supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool);

Parameters

Name
Type
Description

interfaceId

bytes4

The interface identifier to check

Returns

Name
Type
Description

<none>

bool

bool True if the interface is supported

_supportsInterface

Internal function to check interface support

function _supportsInterface(bytes4 interfaceId) internal view returns (bool);

Parameters

Name
Type
Description

interfaceId

bytes4

The interface identifier to check

Returns

Name
Type
Description

<none>

bool

bool True if the interface is supported

_addInterface

Add support for an interface

function _addInterface(bytes4 interfaceId) internal;

Parameters

Name
Type
Description

interfaceId

bytes4

The interface identifier to add

_removeInterface

Remove support for an interface

function _removeInterface(bytes4 interfaceId) internal;

Parameters

Name
Type
Description

interfaceId

bytes4

The interface identifier to remove

_initializeERC165

Initialize common interfaces

Should be called in facet initialization functions

function _initializeERC165() internal;

Last updated

Was this helpful?