IMasterRegistry
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
Name | Type | Description |
---|---|---|
registryName | bytes32 | name for the registry |
registryAddress | address | address 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
Name | Type | Description |
---|---|---|
registryName | bytes32 | name for the registry |
registryAddress | address | address 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
Name | Type | Description |
---|---|---|
registryName | bytes32 | name for the registry |
Returns
Name | Type | Description |
---|---|---|
<none> | address | address 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
Name | Type | Description |
---|---|---|
registryName | bytes32 | address of the registry you want to resolve to |
version | uint256 | version 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
Name | Type | Description |
---|---|---|
registryName | bytes32 | name for the registry |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
registryAddress | address | address of a registry you want to resolve |
Returns
Name | Type | Description |
---|---|---|
registryName | bytes32 | name of the resolved registry |
version | uint256 | version of the resolved registry |
isLatest | bool | boolean 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;
}