Skip to main content

IAddressManager

Interface to set and get an address for a name.

setAddress

function setAddress(string name, address addr) external

Associate an address to a name.

The original address associated with the name, if exists, will be replaced.

Parameters

NameTypeDescription
namestringThe name which an address will be associated with.
addraddressThe address to be associated with the given name.

getAddress

function getAddress(string name) external view returns (address)

Returns the address associated with the given name.

Parameters

NameTypeDescription
namestringThe name for which an address will be returned.

Return Values

NameTypeDescription
[0]addressThe address associated with the given name. If no address is found, address(0) will be returned.