IHaiProxyFactory
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
Name | Type | Description |
---|---|---|
_proxy | address payable | Address 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
Name | Type | Description |
---|---|---|
_owner | address | Address of the owner of the new proxy |
Returns
Name | Type | Description |
---|---|---|
_proxy | address payable | Address of the new proxy |
Events
Created
Emitted when a new proxy is deployed
event Created(address indexed _sender, address indexed _owner, address _proxy);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | Address of the caller that deployed the proxy |
_owner | address | Address of the owner of the new proxy |
_proxy | address | Address 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);