HaiProxy
Inherits: HaiOwnable2Step, IHaiProxy
This contract is an ownable proxy to execute batched transactions in the protocol contracts
The proxy executes a delegate call to an Actions contract, which have the logic to execute the batched transactions
Functions
constructor
constructor(address _owner) Ownable(_owner);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | The owner of the proxy contract |
execute
Executes a call to the target contract through a delegate call
The proxy will call the target through a delegate call (the target must not be a direct protocol contract)
function execute(address _target, bytes memory _data) external payable onlyOwner returns (bytes memory _response);
Parameters
Name | Type | Description |
---|---|---|
_target | address | Address of the target Actions contract |
_data | bytes | Encoded data of the transaction to execute |
Returns
Name | Type | Description |
---|---|---|
_response | bytes | The raw response of the target call |
owner
Emitted when an ownership transfer is initiated
function owner() public view override(HaiOwnable2Step, IHaiOwnable2Step) returns (address _owner);
pendingOwner
The address of the pending owner
function pendingOwner() public view override(HaiOwnable2Step, IHaiOwnable2Step) returns (address _pendingOwner);
renounceOwnership
Leaves the contract without an owner, thereby disabling any functionality that is only available to the owner
It will not be possible to call onlyOwner
functions
function renounceOwnership() public override(HaiOwnable2Step, IHaiOwnable2Step) onlyOwner;
transferOwnership
Starts the ownership transfer of the contract to a new account
Replaces the pending transfer if there is one
function transferOwnership(address _newOwner) public override(HaiOwnable2Step, IHaiOwnable2Step) onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_newOwner | address | The address of the new owner |
acceptOwnership
Accepts the ownership transfer
Can only be called by the current pending owner
function acceptOwnership() public override(HaiOwnable2Step, IHaiOwnable2Step);