I Address Manager
IAddressManager
Section titled “IAddressManager”Interface to set and get an address for a name.
setAddress
Section titled “setAddress”function setAddress(string name, address addr) externalAssociate an address to a name.
The original address associated with the name, if exists, will be replaced.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| name | string | The name which an address will be associated with. |
| addr | address | The address to be associated with the given name. |
getAddress
Section titled “getAddress”function getAddress(string name) external view returns (address)Returns the address associated with the given name.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| name | string | The name for which an address will be returned. |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | address | The address associated with the given name. If no address is found, address(0) will be returned. |