FCT_ENS.sol is responsible for getting and validating named addresses.
FCT_ENS.sol has internal ens registering and supports external ENS services.
It is used by the FCT_Controller contract is order to extract destination addresses for FCT's calls.

Main Functions


function setLocalEns(
string calldata ens,
address dest
) external onlyRole(LOCAL_ENS_ROLE)
Used by the ens manager to set local mapping, ens(string) to destination(address).
Local ENS always starts with "@" Local library ENS always starts with "@lib:"


function setEns(address ens) external onlyRole(ENS_ROLE)
Used by the ENS manager to set an external service to be used as ENS mapper.


function ensToAddress(
bytes32 ensHash,
address expectedAddress
) public view returns (address result, uint8 ensType)
Validates and returns the address of a given ens hash.
ENS type is also returned: external, local or library. Library is a local ENS that points to a special contract that runs in the context of the FCT_Runner (delegate call) Library ENS starts with "@lib:"
When "expectedAddress" is 0x0, validation is bypassed
If ENS is not fund on the local mapping, calls the external ENS contract.