Skip to content

IGovernanceVotePower#

Interface for contracts delegating their governance vote power.

Functions#

delegate#

Defined in IGovernanceVotePower (Docs, Source).

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#

Defined in IGovernanceVotePower (Docs, Source).

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#

Defined in IGovernanceVotePower (Docs, Source).

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#

Defined in IGovernanceVotePower (Docs, Source).

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#

Defined in IGovernanceVotePower (Docs, Source).

function undelegate(
) external;

Undelegates all governance vote power of msg.sender.

votePowerOfAt#

Defined in IGovernanceVotePower (Docs, Source).

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.

Last update: 2024-03-01