Skip to content

Commit

Permalink
👷 getIsNominated
Browse files Browse the repository at this point in the history
  • Loading branch information
cmontecoding committed Sep 14, 2023
1 parent e3f8040 commit 3636b46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AutomatedVoting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ contract AutomatedVoting is IAutomatedVoting {
return elections[_election].voteCounts[nominee];
}

/// @inheritdoc IAutomatedVoting
function getIsNominated(uint256 _election, address nominee) public view override returns (bool isNominated) {
return elections[_election].isNominated[nominee];
}

/// @notice gets the current council
/// @return address[] the current council
function getCouncil() public view override returns (address[] memory) {
Expand Down
6 changes: 6 additions & 0 deletions src/interfaces/IAutomatedVoting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ interface IAutomatedVoting {
/// @return count the vote counts of a nominee in an election
function getVoteCounts(uint256 _election, address nominee) external view returns (uint256);

/// @notice returns if an address is nominated in an election
/// @param _election the election to check
/// @param nominee the nominee to check
/// @return isNominated if the address is nominated in an election
function getIsNominated(uint256 _election, address nominee) external view returns (bool);

/// @notice returns the current council
function getCouncil() external view returns (address[] memory);

Expand Down

0 comments on commit 3636b46

Please sign in to comment.