From de594b3b5390039a45c7e3a946907ce1569809d1 Mon Sep 17 00:00:00 2001 From: dragosrebegea Date: Tue, 9 Apr 2024 16:27:36 +0200 Subject: [PATCH] total quorum check --- energy-integration/governance-v2/src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index c914e3a95..0165979cd 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -52,6 +52,17 @@ pub trait GovernanceV2: self.try_change_fee_token_id(fee_token); } + #[endpoint] + fn upgrade(&self) { + &self, + proposal_id: ProposalId, + total_percentage: BigUint, + ) { + let mut proposal = self.proposals().get(proposal_id); + proposal.total_quorum = total_percentage; + self.proposals().set(proposal_id, &proposal); + } + /// Propose a list of actions. /// A maximum of MAX_GOVERNANCE_PROPOSAL_ACTIONS can be proposed at a time. ///