Skip to content

FlareContractRegistry#

The Flare contract registry.

Entry point for all external dapps that need the latest contract addresses deployed by Flare.

Functions#

constructor#

Defined in FlareContractRegistry (Docs, Source).

constructor(
    address _addressUpdater
) public;

getAddressUpdater#

Defined in AddressUpdatable (Docs, Source).

function getAddressUpdater(
) public view returns (
    address _addressUpdater);

Returns the configured address updater.

Returns Type Description
_addressUpdater address The AddresUpdater contract that can update our contract address list, as a response to a governance call.

getAllContracts#

Defined in FlareContractRegistry (Docs, Source).

function getAllContracts(
) external view returns (
    string[] _names,
    address[] _addresses);

Returns all contract names and their corresponding addresses.

Returns Type Description
_names string[] Array of contract names.
_addresses address[] Array of corresponding contract addresses.

getContractAddressByHash#

Defined in FlareContractRegistry (Docs, Source).

function getContractAddressByHash(
    bytes32 _nameHash
) external view returns (
    address);

Returns the address of a given contract hash.

Parameters Type Description
_nameHash bytes32 Hash of the contract name as: keccak256(abi.encode(name)).
Returns Type Description
[0] address Address of the contract, or address(0) if not found.

getContractAddressByName#

Defined in FlareContractRegistry (Docs, Source).

function getContractAddressByName(
    string _name
) external view returns (
    address);

Returns the address of a given contract name.

Parameters Type Description
_name string Name of the contract.
Returns Type Description
[0] address Address of the contract, or address(0) if not found.

getContractAddressesByHash#

Defined in FlareContractRegistry (Docs, Source).

function getContractAddressesByHash(
    bytes32[] _nameHashes
) external view returns (
    address[]);

Returns the addresses of a list of contract hashes.

Parameters Type Description
_nameHashes bytes32[] Array of contract name hashes as: keccak256(abi.encode(name)).
Returns Type Description
[0] address[] Array of addresses of the contracts. Any of them might be address(0) if not found.

getContractAddressesByName#

Defined in FlareContractRegistry (Docs, Source).

function getContractAddressesByName(
    string[] _names
) external view returns (
    address[]);

Returns the addresses of a list of contract names.

Parameters Type Description
_names string[] Array of contract names.
Returns Type Description
[0] address[] Array of addresses of the contracts. Any of them might be address(0) if not found.

updateContractAddresses#

Defined in AddressUpdatable (Docs, Source).

function updateContractAddresses(
    bytes32[] _contractNameHashes,
    address[] _contractAddresses
) external;

External method called from AddressUpdater only.