HaiProxyRegistry

Git Source

Inherits: IHaiProxyRegistry

This contract is used to deploy and keep track of the user's proxy instances

The registry deploys new proxies using HaiProxyFactory contract

State Variables

proxies

Mapping of user addresses to proxy instances

mapping(address _owner => IHaiProxy) public proxies;

factory

Address of the proxy factory

IHaiProxyFactory public factory;

Functions

constructor

constructor(address _factory);

Parameters

NameTypeDescription
_factoryaddressAddress of the HaiProxyFactory contract

build

Deploys a new proxy instance, setting the caller as the owner

function build() public returns (address payable _proxy);

Returns

NameTypeDescription
_proxyaddress payableAddress of the new proxy

build

Deploys a new proxy instance, setting the caller as the owner

function build(address _owner) public returns (address payable _proxy);

Returns

NameTypeDescription
_proxyaddress payableAddress of the new proxy

_build

Internal method used to deploy a new proxy instance and store it in the registry

function _build(address _owner) internal returns (address payable _proxy);