CCIP v1.5.1 RegistryModuleOwnerCustom Contract API Reference
RegistryModuleOwnerCustom
A contract that facilitates token administrator registration through various ownership patterns.
Inherits:
Events
AdministratorRegistered
event AdministratorRegistered(address indexed token, address indexed administrator);
Parameters
Name | Type | Indexed | Description |
---|---|---|---|
token | address | Yes | The token contract address |
administrator | address | Yes | The registered administrator address |
Errors
AddressZero
error AddressZero();
CanOnlySelfRegister
error CanOnlySelfRegister(address admin, address token);
Parameters
Name | Type | Description |
---|---|---|
admin | address | The expected administrator address |
token | address | The token contract address |
RequiredRoleNotFound
error RequiredRoleNotFound(address msgSender, bytes32 role, address token);
Parameters
Name | Type | Description |
---|---|---|
msgSender | address | The caller's address |
role | bytes32 | The required role identifier |
token | address | The token contract address |
State Variables
i_tokenAdminRegistry
ITokenAdminRegistry internal immutable i_tokenAdminRegistry;
typeAndVersion
string public constant override typeAndVersion = "RegistryModuleOwnerCustom 1.6.0";
Functions
constructor
constructor(address tokenAdminRegistry);
Parameters
Name | Type | Description |
---|---|---|
tokenAdminRegistry | address | The address of the TokenAdminRegistry contract |
registerAccessControlDefaultAdmin
Registers a token administrator using OpenZeppelin's AccessControl DEFAULT_ADMIN_ROLE.
function registerAccessControlDefaultAdmin(address token) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | The token contract to register admin for |
registerAdminViaGetCCIPAdmin
Registers a token administrator using the getCCIPAdmin
method.
function registerAdminViaGetCCIPAdmin(address token) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | The token contract to register admin for |
registerAdminViaOwner
Registers a token administrator using the owner
method.
function registerAdminViaOwner(address token) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | The token contract to register admin for |
_registerAdmin
Internal function to handle administrator registration.
function _registerAdmin(address token, address admin) internal;
Parameters
Name | Type | Description |
---|---|---|
token | address | The token contract to register admin for |
admin | address | The administrator address being registered |