RegistryModuleOwnerCustom API Reference

The RegistryModuleOwnerCustom contract is responsible for registering the administrator of a token in the TokenAdminRegistry. This contract allows for the registration of token administrators through either the getCCIPAdmin() method (for tokens with a CCIP admin) or the owner() method (for standard tokens with an owner). The contract enforces that only the rightful administrator of the token can register themselves, ensuring secure and accurate registration within the TokenAdminRegistry. The contract also emits an event, AdministratorRegistered, whenever a token administrator is successfully registered.

Errors

CanOnlySelfRegister

error CanOnlySelfRegister(address admin, address token)

AddressZero

error AddressZero()

Events

AdministratorRegistered

event AdministratorRegistered(address token, address administrator)

Constants

typeAndVersion

string typeAndVersion

Variables

i_tokenAdminRegistry

ITokenAdminRegistry i_tokenAdminRegistry

Functions

constructor

constructor(address tokenAdminRegistry) public

registerAdminViaGetCCIPAdmin

function registerAdminViaGetCCIPAdmin(address token) external

Registers the admin of the token using the getCCIPAdmin method.

The caller must be the admin returned by the getCCIPAdmin method.

Parameters

NameTypeDescription
tokenaddressThe token to register the admin for.

registerAdminViaOwner

function registerAdminViaOwner(address token) external

Registers the admin of the token using the owner method.

The caller must be the admin returned by the owner method.

Parameters

NameTypeDescription
tokenaddressThe token to register the admin for.

_registerAdmin

function _registerAdmin(address token, address admin) internal

Registers the admin of the token to msg.sender given that the admin is equal to msg.sender.

Parameters

NameTypeDescription
tokenaddressThe token to register the admin for.
adminaddressThe caller must be the admin.

Get the latest Chainlink content straight to your inbox.