IGovernanceVotePower
Interface for contracts delegating their governance vote power.
Functions
delegate
function delegate(
address _to
) external;
Delegates all governance vote power of msg.sender
to address _to
.
Parameters |
Type |
Description |
_to |
address |
The address of the recipient. |
getDelegateOfAt
function getDelegateOfAt(
address _who,
uint256 _blockNumber
) external view returns (
address);
Gets the address an account is delegating its governance vote power to, at a given block number.
Parameters |
Type |
Description |
_who |
address |
The address being queried. |
_blockNumber |
uint256 |
The block number at which to fetch the address. |
Returns |
Type |
Description |
[0] |
address |
Address where _who was delegating its governance vote power at block _blockNumber . |
getDelegateOfAtNow
function getDelegateOfAtNow(
address _who
) external view returns (
address);
Gets the address an account is delegating its governance vote power to, at the latest block number.
Parameters |
Type |
Description |
_who |
address |
The address being queried. |
Returns |
Type |
Description |
[0] |
address |
Address where _who is currently delegating its governance vote power. |
getVotes
function getVotes(
address _who
) external view returns (
uint256);
Gets the governance vote power of an address at the latest block, including
all delegations made to it.
Parameters |
Type |
Description |
_who |
address |
The address being queried. |
Returns |
Type |
Description |
[0] |
uint256 |
Governance vote power of account at the lastest block. |
undelegate
function undelegate(
) external;
Undelegates all governance vote power of msg.sender
.
votePowerOfAt
function votePowerOfAt(
address _who,
uint256 _blockNumber
) external view returns (
uint256);
Gets the governance vote power of an address at a given block number, including
all delegations made to it.
Parameters |
Type |
Description |
_who |
address |
The address being queried. |
_blockNumber |
uint256 |
The block number at which to fetch the vote power. |
Returns |
Type |
Description |
[0] |
uint256 |
Governance vote power of _who at _blockNumber . |