IHaiDelegatee
Functions
delegatee
Get the address of the delegatee of the contract
function delegatee() external view returns (address _delegatee);
Returns
Name | Type | Description |
---|---|---|
_delegatee | address | The address of the delegatee |
setDelegatee
Set the delegatee of the contract
function setDelegatee(address _delegatee) external;
Parameters
Name | Type | Description |
---|---|---|
_delegatee | address | The address of the new delegatee |
castVote
Cast a vote using the voting power delegated to this contract
function castVote(IGovernor _governor, uint256 _proposalId, uint8 _support) external returns (uint256 _weight);
Parameters
Name | Type | Description |
---|---|---|
_governor | IGovernor | The governor contract to vote on |
_proposalId | uint256 | The id of the proposal |
_support | uint8 | The vote type |
Returns
Name | Type | Description |
---|---|---|
_weight | uint256 | The weight of the vote |
castVoteWithReason
Cast a vote with reason using the voting power delegated to this contract
function castVoteWithReason(
IGovernor _governor,
uint256 _proposalId,
uint8 _support,
string memory _reason
) external returns (uint256 _weight);
Parameters
Name | Type | Description |
---|---|---|
_governor | IGovernor | The governor contract to vote on |
_proposalId | uint256 | The id of the proposal |
_support | uint8 | The vote type |
_reason | string | The reason for the vote |
Returns
Name | Type | Description |
---|---|---|
_weight | uint256 | The weight of the vote |
castVoteWithReasonAndParams
Cast a vote with reason and params using the voting power delegated to this contract
function castVoteWithReasonAndParams(
IGovernor _governor,
uint256 _proposalId,
uint8 _support,
string memory _reason,
bytes memory _params
) external returns (uint256 _weight);
Parameters
Name | Type | Description |
---|---|---|
_governor | IGovernor | The governor contract to vote on |
_proposalId | uint256 | The id of the proposal |
_support | uint8 | The vote type |
_reason | string | The reason for the vote |
_params | bytes | The params for the vote |
Events
DelegateeSet
Emitted when the delegatee of the contract is set
event DelegateeSet(address _delegatee);
Parameters
Name | Type | Description |
---|---|---|
_delegatee | address | The address of the new delegatee |
Errors
OnlyDelegatee
Throws if called by any account other than the delegatee
error OnlyDelegatee();