API Version: v1.5.1

CCIP v1.5.1 RegistryModuleOwnerCustom Contract API Reference

RegistryModuleOwnerCustom

A contract that facilitates token administrator registration through various ownership patterns.

Git Source

Inherits:

Events

AdministratorRegistered

event AdministratorRegistered(address indexed token, address indexed administrator);

Parameters

NameTypeIndexedDescription
tokenaddressYesThe token contract address
administratoraddressYesThe registered administrator address

Errors

AddressZero

error AddressZero();

CanOnlySelfRegister

error CanOnlySelfRegister(address admin, address token);

Parameters

NameTypeDescription
adminaddressThe expected administrator address
tokenaddressThe token contract address

RequiredRoleNotFound

error RequiredRoleNotFound(address msgSender, bytes32 role, address token);

Parameters

NameTypeDescription
msgSenderaddressThe caller's address
rolebytes32The required role identifier
tokenaddressThe 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

NameTypeDescription
tokenAdminRegistryaddressThe address of the TokenAdminRegistry contract

registerAccessControlDefaultAdmin

Registers a token administrator using OpenZeppelin's AccessControl DEFAULT_ADMIN_ROLE.

function registerAccessControlDefaultAdmin(address token) external;

Parameters

NameTypeDescription
tokenaddressThe token contract to register admin for

registerAdminViaGetCCIPAdmin

Registers a token administrator using the getCCIPAdmin method.

function registerAdminViaGetCCIPAdmin(address token) external;

Parameters

NameTypeDescription
tokenaddressThe token contract to register admin for

registerAdminViaOwner

Registers a token administrator using the owner method.

function registerAdminViaOwner(address token) external;

Parameters

NameTypeDescription
tokenaddressThe token contract to register admin for

_registerAdmin

Internal function to handle administrator registration.

function _registerAdmin(address token, address admin) internal;

Parameters

NameTypeDescription
tokenaddressThe token contract to register admin for
adminaddressThe administrator address being registered

Get the latest Chainlink content straight to your inbox.