From 4c8c822c09d3f65ddd3a68bc2fd96f6793f1c90b Mon Sep 17 00:00:00 2001 From: 0xRaccoon Date: Tue, 19 Dec 2023 10:09:25 -0300 Subject: [PATCH] chore: proposalThreshold is segmented by proposalType Signed-off-by: 0xRaccoon --- solidity/contracts/governance/WonderGovernor.sol | 4 ++-- solidity/interfaces/governance/IWonderGovernor.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solidity/contracts/governance/WonderGovernor.sol b/solidity/contracts/governance/WonderGovernor.sol index 4c8cb22..5971757 100644 --- a/solidity/contracts/governance/WonderGovernor.sol +++ b/solidity/contracts/governance/WonderGovernor.sol @@ -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; } @@ -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); } diff --git a/solidity/interfaces/governance/IWonderGovernor.sol b/solidity/interfaces/governance/IWonderGovernor.sol index c697386..e7c21d2 100644 --- a/solidity/interfaces/governance/IWonderGovernor.sol +++ b/solidity/interfaces/governance/IWonderGovernor.sol @@ -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