CCIP v1.5.1 RegistryModuleOwnerCustom Contract API Reference

The RegistryModuleOwnerCustom contract provides different methods for token developers to register themselves as administrators for their tokens in CCIP.

Errors

CanOnlySelfRegister

error CanOnlySelfRegister(address admin, address token)

Thrown when someone tries to register an admin address that does not belong to them.

ParameterTypeDescription
adminaddressExpected admin address
tokenaddressToken being registered

RequiredRoleNotFound

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

Thrown when caller doesn't have the required role for registration.

ParameterTypeDescription
msgSenderaddressAddress that attempted registration
rolebytes32Required role that was missing
tokenaddressToken being registered

AddressZero

error AddressZero()

Thrown when trying to set the TokenAdminRegistry address to zero.

Events

AdministratorRegistered

event AdministratorRegistered(address indexed token, address indexed administrator)

Emitted when an administrator is successfully registered for a token.

ParameterTypeDescription
tokenaddressToken address that got an administrator
administratoraddressAddress registered as administrator

Functions

constructor

constructor(
    address tokenAdminRegistry
)

Initializes the contract with the TokenAdminRegistry address.

Parameters

NameTypeDescription
tokenAdminRegistryaddressAddress of the TokenAdminRegistry contract

registerAdminViaGetCCIPAdmin

function registerAdminViaGetCCIPAdmin(
    address token
) external

Registers an administrator using the token's getCCIPAdmin() method.

Parameters

NameTypeDescription
tokenaddressToken address to register administrator for

registerAdminViaOwner

function registerAdminViaOwner(
    address token
) external

Registers an administrator using the token's owner() method.

Parameters

NameTypeDescription
tokenaddressToken address to register administrator for

registerAccessControlDefaultAdmin

function registerAccessControlDefaultAdmin(
    address token
) external

Registers an administrator using OpenZeppelin's AccessControl DEFAULT_ADMIN_ROLE.

Parameters

NameTypeDescription
tokenaddressToken address to register administrator for

typeAndVersion

string public constant override typeAndVersion = "RegistryModuleOwnerCustom 1.6.0"

Returns the type and version of the contract.

Return Value

TypeDescription
stringThe string "RegistryModuleOwnerCustom 1.6.0"

Get the latest Chainlink content straight to your inbox.