IMasterRegistry

Git Source

Functions

addRegistry

Add a new registry entry to the master list. Reverts if an entry is already found with the given name.

function addRegistry(bytes32 registryName, address registryAddress) external;

Parameters

NameTypeDescription
registryNamebytes32name for the registry
registryAddressaddressaddress of the new registry

updateRegistry

Update an existing registry entry to the master list. Reverts if no match is found.

function updateRegistry(bytes32 registryName, address registryAddress) external;

Parameters

NameTypeDescription
registryNamebytes32name for the registry
registryAddressaddressaddress of the new registry

resolveNameToLatestAddress

Resolves a name to the latest registry address. Reverts if no match is found.

function resolveNameToLatestAddress(bytes32 registryName) external view returns (address);

Parameters

NameTypeDescription
registryNamebytes32name for the registry

Returns

NameTypeDescription
<none>addressaddress address of the latest registry with the matching name

resolveNameAndVersionToAddress

Resolves a name and version to an address. Reverts if there is no registry with given name and version.

function resolveNameAndVersionToAddress(bytes32 registryName, uint256 version) external view returns (address);

Parameters

NameTypeDescription
registryNamebytes32address of the registry you want to resolve to
versionuint256version of the registry you want to resolve to

resolveNameToAllAddresses

Resolves a name to an array of all addresses. Reverts if no match is found.

function resolveNameToAllAddresses(bytes32 registryName) external view returns (address[] memory);

Parameters

NameTypeDescription
registryNamebytes32name for the registry

Returns

NameTypeDescription
<none>address[]address address of the latest registry with the matching name

resolveAddressToRegistryData

Resolves an address to registry entry data.

function resolveAddressToRegistryData(address registryAddress)
    external
    view
    returns (bytes32 registryName, uint256 version, bool isLatest);

Parameters

NameTypeDescription
registryAddressaddressaddress of a registry you want to resolve

Returns

NameTypeDescription
registryNamebytes32name of the resolved registry
versionuint256version of the resolved registry
isLatestboolboolean flag of whether the given address is the latest version of the given registries with matching name

Structs

ReverseRegistryData

struct ReverseRegistryData {
    bytes32 registryName;
    uint256 version;
}