-
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.
- Loading branch information
Showing
6 changed files
with
640 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity ^0.8.17; | ||
|
||
import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; | ||
|
||
/// @title IMultisig | ||
/// @author Aragon Association - 2023 | ||
/// @notice An interface for an on-chain multisig governance plugin in which a proposal passes if X out of Y approvals are met. | ||
interface IMultisig { | ||
/// @notice Adds new members to the address list. Previously, it checks if the new address list length would be greater than `type(uint16).max`, the maximal number of approvals. | ||
/// @param _members The addresses of the members to be added. | ||
function addAddresses(address[] calldata _members) external; | ||
|
||
/// @notice Removes existing members from the address list. Previously, it checks if the new address list length is at least as long as the minimum approvals parameter requires. Note that `minApprovals` is must be at least 1 so the address list cannot become empty. | ||
/// @param _members The addresses of the members to be removed. | ||
function removeAddresses(address[] calldata _members) external; | ||
|
||
/// @notice Approves and, optionally, executes the proposal. | ||
/// @param _proposalId The ID of the proposal. | ||
/// @param _tryExecution If `true`, execution is tried after the approval cast. The call does not revert if execution is not possible. | ||
function approve(uint256 _proposalId, bool _tryExecution) external; | ||
|
||
/// @notice Checks if an account can participate on a proposal vote. This can be because the vote | ||
/// - was executed, or | ||
/// - the voter is not listed. | ||
/// @param _proposalId The proposal Id. | ||
/// @param _account The address of the user to check. | ||
/// @return Returns true if the account is allowed to vote. | ||
/// @dev The function assumes the queried proposal exists. | ||
function canApprove(uint256 _proposalId, address _account) external view returns (bool); | ||
|
||
/// @notice Checks if a proposal can be executed. | ||
/// @param _proposalId The ID of the proposal to be checked. | ||
/// @return True if the proposal can be executed, false otherwise. | ||
function canExecute(uint256 _proposalId) external view returns (bool); | ||
|
||
/// @notice Returns whether the account has approved the proposal. Note, that this does not check if the account is listed. | ||
/// @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. | ||
function hasApproved(uint256 _proposalId, address _account) external view returns (bool); | ||
|
||
/// @notice Executes a proposal. | ||
/// @param _proposalId The ID of the proposal to be executed. | ||
function execute(uint256 _proposalId) external; | ||
} |
Oops, something went wrong.