forked from aragon/osx-plugin-template-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update natspec of IMajorityVoting
- Loading branch information
Showing
3 changed files
with
148 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
pragma solidity ^0.8.8; | ||
|
||
/// @title IMajorityVoting | ||
/// @author Aragon X - 2022-2023 | ||
/// @author Aragon X - 2022-2024 | ||
/// @notice The interface of majority voting plugin. | ||
/// @custom:security-contact [email protected] | ||
interface IMajorityVoting { | ||
|
@@ -36,7 +36,7 @@ interface IMajorityVoting { | |
/// @return The support threshold parameter. | ||
function supportThreshold() external view returns (uint32); | ||
|
||
/// @notice Returns the min approval value stored configured. | ||
/// @notice Returns the configured minimum approval value. | ||
/// @return The minimal approval value. | ||
function minApproval() external view returns (uint256); | ||
|
||
|
@@ -46,33 +46,33 @@ interface IMajorityVoting { | |
|
||
/// @notice Checks if the support value defined as: | ||
/// $$\texttt{support} = \frac{N_\text{yes}}{N_\text{yes}+N_\text{no}}$$ | ||
/// for a proposal vote is greater than the support threshold. | ||
/// for a proposal is greater than the support threshold. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @return Returns `true` if the support is greater than the support threshold and `false` otherwise. | ||
function isSupportThresholdReached(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Checks if the worst-case support value defined as: | ||
/// $$\texttt{worstCaseSupport} = \frac{N_\text{yes}}{ N_\text{total}-N_\text{abstain}}$$ | ||
/// for a proposal vote is greater than the support threshold. | ||
/// for a proposal is greater than the support threshold. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @return Returns `true` if the worst-case support is greater than the support threshold and `false` otherwise. | ||
function isSupportThresholdReachedEarly(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Checks if the participation value defined as: | ||
/// $$\texttt{participation} = \frac{N_\text{yes}+N_\text{no}+N_\text{abstain}}{N_\text{total}}$$ | ||
/// for a proposal vote is greater or equal than the minimum participation value. | ||
/// for a proposal is greater or equal than the minimum participation value. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @return Returns `true` if the participation is greater than the minimum participation and `false` otherwise. | ||
/// @return Returns `true` if the participation is greater or equal than the minimum participation and `false` otherwise. | ||
function isMinParticipationReached(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Checks if the min approval value defined as: | ||
///$$\texttt{minApproval} = \frac{N_\text{yes}}{N_\text{total}}$$ | ||
/// for a proposal vote is greater or equal than the minimum approval value. | ||
/// for a proposal is greater or equal than the minimum approval value. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @return Returns `true` if the participation is greater than the minimum participation and `false` otherwise. | ||
/// @return Returns `true` if the approvals is greater or equal than the minimum approval and `false` otherwise. | ||
function isMinApprovalReached(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Checks if an account can participate on a proposal vote. This can be because the vote | ||
/// @notice Checks if an account can participate on a proposal. This can be because the vote | ||
/// - has not started, | ||
/// - has ended, | ||
/// - was executed, or | ||
|
@@ -81,7 +81,7 @@ interface IMajorityVoting { | |
/// @param _account The account address to be checked. | ||
/// @param _voteOption Whether the voter abstains, supports or opposes the proposal. | ||
/// @return Returns true if the account is allowed to vote. | ||
/// @dev The function assumes the queried proposal exists. | ||
/// @dev Reverts if the proposal with the given `_proposalId` does not exist. | ||
function canVote( | ||
uint256 _proposalId, | ||
address _account, | ||
|
@@ -93,7 +93,7 @@ interface IMajorityVoting { | |
/// @return True if the proposal can be executed, false otherwise. | ||
function canExecute(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Votes for a vote option and, optionally, executes the proposal. | ||
/// @notice Votes on a proposal and, optionally, executes the proposal. | ||
/// @dev `_voteOption`, 1 -> abstain, 2 -> yes, 3 -> no | ||
/// @param _proposalId The ID of the proposal. | ||
/// @param _voteOption The chosen vote option. | ||
|
@@ -106,10 +106,11 @@ interface IMajorityVoting { | |
function execute(uint256 _proposalId) external; | ||
|
||
/// @notice Returns whether the account has voted for the proposal. | ||
/// Note, that this does not check if the account has voting power. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @param _account The account address to be checked. | ||
/// @return The vote option cast by a voter for a certain proposal. | ||
/// @dev May return `none` if the `_proposalId` do not exist, | ||
/// or the `_account` does not have voting power. | ||
function getVoteOption( | ||
uint256 _proposalId, | ||
address _account | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.