From 09499885fd69ff91f54268ba938cf0051e4f6d90 Mon Sep 17 00:00:00 2001 From: Giorgi Lagidze Date: Thu, 7 Nov 2024 22:23:54 +0700 Subject: [PATCH 1/2] override add --- packages/contracts/src/MajorityVotingBase.sol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/contracts/src/MajorityVotingBase.sol b/packages/contracts/src/MajorityVotingBase.sol index 23037f6c..4998b3c5 100644 --- a/packages/contracts/src/MajorityVotingBase.sol +++ b/packages/contracts/src/MajorityVotingBase.sol @@ -369,8 +369,10 @@ abstract contract MajorityVotingBase is _vote(_proposalId, _voteOption, account, _tryEarlyExecution); } - /// @inheritdoc IMajorityVoting - function execute(uint256 _proposalId) public virtual auth(EXECUTE_PROPOSAL_PERMISSION_ID) { + /// @inheritdoc IProposal + function execute( + uint256 _proposalId + ) public virtual override(IMajorityVoting, IProposal) auth(EXECUTE_PROPOSAL_PERMISSION_ID) { if (!_canExecute(_proposalId)) { revert ProposalExecutionForbidden(_proposalId); } From a2d794a3145885dd9ccfcb23b7c85cec1e0ada05 Mon Sep 17 00:00:00 2001 From: Giorgi Lagidze Date: Fri, 8 Nov 2024 01:06:05 +0700 Subject: [PATCH 2/2] canExecute from IProposal overriden --- packages/contracts/src/MajorityVotingBase.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contracts/src/MajorityVotingBase.sol b/packages/contracts/src/MajorityVotingBase.sol index 4998b3c5..1c31e297 100644 --- a/packages/contracts/src/MajorityVotingBase.sol +++ b/packages/contracts/src/MajorityVotingBase.sol @@ -403,7 +403,7 @@ abstract contract MajorityVotingBase is /// @inheritdoc IMajorityVoting function canExecute( uint256 _proposalId - ) public view virtual override(IMajorityVoting) returns (bool) { + ) public view virtual override(IMajorityVoting, IProposal) returns (bool) { if (!_proposalExists(_proposalId)) { revert NonexistentProposal(_proposalId); }