Module
Git Source (opens in a new tab)
Inherits: IModule, WorldContextConsumer
Abstract contract that implements the ERC-165 supportsInterface function for IModule.
State Variables
__self
address internal immutable __self = address(this);
Functions
supportsInterface
Checks if the given interfaceId is supported by this contract.
Overrides the functionality from IERC165 and WorldContextConsumer to check for supported interfaces.
function supportsInterface(
bytes4 interfaceId
) public pure virtual override(IERC165, WorldContextConsumer) returns (bool);
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | The bytes4 identifier for the interface. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if the interface is supported, false otherwise. |
isInstalled
Check if a module with the given name and arguments is installed.
function isInstalled(address moduleAddress, bytes memory encodedArgs) internal view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
moduleAddress | address | The address of the module. |
encodedArgs | bytes | The ABI encoded arguments for the module installation. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if the module is installed, false otherwise. |
requireNotInstalled
Revert if the module with the given name and arguments is already installed.
function requireNotInstalled(address moduleAddress, bytes memory encodedArgs) internal view;
Parameters
Name | Type | Description |
---|---|---|
moduleAddress | address | The address of the module. |
encodedArgs | bytes | The ABI encoded arguments for the module installation. |