Skip to main content

Module IAddressRegistry

Module IAddressRegistry 

Source
Expand description

TIP-1022 virtual address registry interface.

Allows EOAs and contracts to register as virtual-address masters via a 32-bit proof-of-work and provides resolution of virtual addresses back to their registered master.

interface IAddressRegistry {
    function registerVirtualMaster(bytes32 salt) external returns (bytes4 masterId);
    function getMaster(bytes4 masterId) external view returns (address);
    function resolveRecipient(address to) external view returns (address effectiveRecipient);
    function resolveVirtualAddress(address virtualAddr) external view returns (address master);
    function isVirtualAddress(address addr) external pure returns (bool);
    function decodeVirtualAddress(address addr) external pure returns (bool isVirtual, bytes4 masterId, bytes6 userTag);
    event MasterRegistered(bytes4 indexed masterId, address indexed masterAddress);
    error MasterIdCollision(address master);
    error InvalidMasterAddress();
    error ProofOfWorkFailed();
    error VirtualAddressUnregistered();
}

Modules§

abi
Contains dynamic ABI definitions for this contract.

Structs§

IAddressRegistryInstance
A IAddressRegistry instance.
InvalidMasterAddress
Custom error with signature InvalidMasterAddress() and selector 0x8a3563c0.
MasterIdCollision
Custom error with signature MasterIdCollision(address) and selector 0xd36e8de2.
MasterRegistered
Event with signature MasterRegistered(bytes4,address) and selector 0xb5c59136d5edcbb78af73e696fa65a73a2856c847f832a8d7be05cff85629015.
ProofOfWorkFailed
Custom error with signature ProofOfWorkFailed() and selector 0x981d64be.
VirtualAddressUnregistered
Custom error with signature VirtualAddressUnregistered() and selector 0xda56842c.
decodeVirtualAddressCall
Function with signature decodeVirtualAddress(address) and selector 0xb35d6fb9.
decodeVirtualAddressReturn
Container type for the return parameters of the decodeVirtualAddress(address) function.
getMasterCall
Function with signature getMaster(bytes4) and selector 0xd84ab166.
getMasterReturn
Container type for the return parameters of the getMaster(bytes4) function.
isVirtualAddressCall
Function with signature isVirtualAddress(address) and selector 0xd501235a.
isVirtualAddressReturn
Container type for the return parameters of the isVirtualAddress(address) function.
registerVirtualMasterCall
Function with signature registerVirtualMaster(bytes32) and selector 0x5c559d20.
registerVirtualMasterReturn
Container type for the return parameters of the registerVirtualMaster(bytes32) function.
resolveRecipientCall
Function with signature resolveRecipient(address) and selector 0xfbea9d67.
resolveRecipientReturn
Container type for the return parameters of the resolveRecipient(address) function.
resolveVirtualAddressCall
Function with signature resolveVirtualAddress(address) and selector 0xe2fc56ef.
resolveVirtualAddressReturn
Container type for the return parameters of the resolveVirtualAddress(address) function.

Enums§

IAddressRegistryCalls
Container for all the IAddressRegistry function calls.
IAddressRegistryErrors
Container for all the IAddressRegistry custom errors.
IAddressRegistryEvents
Container for all the IAddressRegistry events.

Functions§

new
Creates a new wrapper around an on-chain IAddressRegistry contract instance.