Skip to content

Commit

Permalink
chore: proposalThreshold is segmented by proposalType
Browse files Browse the repository at this point in the history
Signed-off-by: 0xRaccoon <[email protected]>
  • Loading branch information
0xRaccoon committed Dec 19, 2023
1 parent c330457 commit 4c8c822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions solidity/contracts/governance/WonderGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ abstract contract WonderGovernor is
/**
* @dev See {IWonderGovernor-proposalThreshold}.
*/
function proposalThreshold() public view virtual returns (uint256) {
function proposalThreshold(uint8 proposalType) public view virtual returns (uint256) {
return 0;
}

Expand Down Expand Up @@ -312,7 +312,7 @@ abstract contract WonderGovernor is

// check proposal threshold
uint256 proposerVotes = getVotes(proposer, proposalType, clock() - 1);
uint256 votesThreshold = proposalThreshold();
uint256 votesThreshold = proposalThreshold(proposalType);
if (proposerVotes < votesThreshold) {
revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold);
}
Expand Down
4 changes: 2 additions & 2 deletions solidity/interfaces/governance/IWonderGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ interface IWonderGovernor is IERC165, IERC6372 {

/**
* @notice module:core
* @dev The number of votes required in order for a voter to become a proposer.
* @dev The number of votes required in order for a voter to become a proposer given a proposalType.
*/
function proposalThreshold() external view returns (uint256); // TODO: check if it should be segmented by proposalType
function proposalThreshold(uint8 proposalType) external view returns (uint256);

/**
* @notice module:core
Expand Down

0 comments on commit 4c8c822

Please sign in to comment.