This contract is a type of Service Locator pattern that allows for easier interaction between multiple contracts. Instead of contract A needing references to contracts B and C (and updating ever release), contract A can refer to an
AddressResolver and query for B and C at transaction time. Then, during a release, the AddressResolver is updated with the latest B and C contarct. Thus this ensures that contract A always has the latest B and C contracts.
The mapping of contract name to address
mapping(bytes32 => address) public
The constructor simply sets this contract as
constructor(address _owner) public
Returns a single address by it's
getAddress(bytes32 name) public view returns (address)
Import one or more addresses into the system for the given keys. Note: this function will overrwite any previous entries with the same key names, allowing for inline updates.
importAddresses(bytes32 names, address destinations) public
- The length of
namesmust match the length of