IHaiProxyFactory

Git Source

Functions

isProxy

Mapping of proxy addresses to boolean state

function isProxy(address _proxyAddress) external view returns (bool _exists);

proxies

Mapping of user addresses to proxy instances

function proxies(address _owner) external view returns (IHaiProxy _proxy);

nonces

Mapping of the next nonce to be used for the specified owner

function nonces(address _owner) external view returns (uint256 _nonce);

build

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

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

Returns

NameTypeDescription
_proxyaddress payableAddress of the new proxy

build

Deploys a new proxy instance, setting the specified address as the owner

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

Parameters

NameTypeDescription
_owneraddressAddress of the owner of the new proxy

Returns

NameTypeDescription
_proxyaddress payableAddress of the new proxy

Events

Created

Emitted when a new proxy is deployed

event Created(address indexed _sender, address indexed _owner, address _proxy);

Parameters

NameTypeDescription
_senderaddressAddress of the caller that deployed the proxy
_owneraddressAddress of the owner of the new proxy
_proxyaddressAddress of the new proxy

Errors

AlreadyHasProxy

Throws if the user already has a proxy and remains being the owner

error AlreadyHasProxy(address _owner, IHaiProxy _proxy);