diff --git a/packages/governance/src/governor/governor.cairo b/packages/governance/src/governor/governor.cairo index d3f32eb2e..600000bfb 100644 --- a/packages/governance/src/governor/governor.cairo +++ b/packages/governance/src/governor/governor.cairo @@ -363,10 +363,10 @@ pub mod GovernorComponent { GovernorSettings::voting_period(self) } - /// Minimum number of cast voted required for a proposal to be successful. + /// Minimum number of casted votes required for a proposal to be successful. /// - /// NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This - /// allows to scale the quorum depending on values such as the total supply of a token at + /// NOTE: The `timepoint` parameter corresponds to the snapshot used for counting votes. This + /// allows the quorum to scale depending on values such as the total supply of a token at /// this timepoint. fn quorum(self: @ComponentState, timepoint: u64) -> u256 { GovernorQuorum::quorum(self, timepoint) @@ -400,7 +400,7 @@ pub mod GovernorComponent { GovernorCounting::has_voted(self, proposal_id, account) } - /// Creates a new proposal. Vote start after a delay specified by `voting_delay` and + /// Creates a new proposal. Voting starts after the delay specified by `voting_delay` and /// lasts for a duration specified by `voting_period`. Returns the id of the proposal. /// /// This function has opt-in frontrunning protection, described in diff --git a/packages/governance/src/governor/interface.cairo b/packages/governance/src/governor/interface.cairo index 75d14c6e9..f0f392c43 100644 --- a/packages/governance/src/governor/interface.cairo +++ b/packages/governance/src/governor/interface.cairo @@ -110,7 +110,7 @@ pub trait IGovernor { /// Minimum number of cast voted required for a proposal to be successful. /// /// NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This - /// allows to scale the quorum depending on values such as the total supply of a token at this + /// allows the quorum to scale depending on values such as the total supply of a token at this /// timepoint. fn quorum(self: @TState, timepoint: u64) -> u256; @@ -206,7 +206,7 @@ pub trait IGovernor { /// /// In cases where the governance executor is some contract other than the governor itself, like /// when using a timelock, this function can be invoked in a governance proposal to recover - /// tokens that was sent to the governor contract by mistake. + /// tokens that were sent to the governor contract by mistake. /// /// NOTE: If the executor is simply the governor itself, use of `relay` is redundant. fn relay(ref self: TState, call: Call); diff --git a/packages/governance/src/governor/proposal_core.cairo b/packages/governance/src/governor/proposal_core.cairo index eeeb189d0..ffc385533 100644 --- a/packages/governance/src/governor/proposal_core.cairo +++ b/packages/governance/src/governor/proposal_core.cairo @@ -27,15 +27,15 @@ const _1_BIT_MASK: u256 = 0x1; /// /// The packing is done as follows: /// -/// - The first felt of the tuple contains `proposer` serialized. -/// - The second felt of the tuple contains `vote_start`, `vote_duration`, `executed`, `canceled` -/// and `eta_seconds` organized as presented next. -/// - `vote_start` is stored at range [4,67] bits (0-indexed), taking the most significant usable +/// 1. The first felt of the tuple contains `proposer` serialized. +/// 2. The second felt of the tuple contains `vote_start`, `vote_duration`, `executed`, `canceled` +/// and `eta_seconds` organized as: +/// - `vote_start` is stored at range [4,67] bits (0-indexed), taking the most significant usable /// bits. -/// - `vote_duration` is stored at range [68, 131], following `vote_start`. -/// - `executed` is stored at range [132, 132], following `vote_duration`. -/// - `canceled` is stored at range [133, 133], following `executed`. -/// - `eta_seconds` is stored at range [134, 197], following `canceled`. +/// - `vote_duration` is stored at range [68, 131], following `vote_start`. +/// - `executed` is stored at range [132, 132], following `vote_duration`. +/// - `canceled` is stored at range [133, 133], following `executed`. +/// - `eta_seconds` is stored at range [134, 197], following `canceled`. /// /// NOTE: In the second felt252, the first four bits are skipped to avoid representation errors due /// to `felt252` max value being a bit less than a 252 bits number max value