Docs
Reference
Common
AddressResolver

AddressResolver

This abstract contract provides a name-to-address lookup. Under the hood, it uses an AddressManager to manage the name-to-address mapping.

_addressManager

contract IAddressManager _addressManager

onlyFromNamed

modifier onlyFromNamed(string name)

onlyFromNamedEither

modifier onlyFromNamedEither(string name1, string name2)

resolve

function resolve(string name) public view virtual returns (address payable)

Resolves a name to an address on the current chain.

This function will throw if the resolved address is address(0).

Parameters

NameTypeDescription
namestringThe name to resolve.

Return Values

NameTypeDescription
[0]address payableThe name's corresponding address.

resolve

function resolve(uint256 chainId, string name) public view virtual returns (address payable)

Resolves a name to an address on the specified chain.

This function will throw if the resolved address is address(0).

Parameters

NameTypeDescription
chainIduint256The chainId.
namestringThe name to resolve.

Return Values

NameTypeDescription
[0]address payableThe name's corresponding address.

addressManager

function addressManager() public view returns (address)

Returns the AddressManager's address.

Return Values

NameTypeDescription
[0]addressThe AddressManager's address.

_init

function _init(address addressManager_) internal virtual