-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Governor documentation #1235
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1235 +/- ##
=======================================
Coverage 92.26% 92.26%
=======================================
Files 59 59
Lines 1811 1811
=======================================
Hits 1671 1671
Misses 140 140
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, Eric! Phew...the governor is a big addition. Sorry for the 32423402340923 comments 😅
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
I added the right interface id cc @andrew-fleming. All I needed to do was to add the empty type to the enum variants in ProposalState, and the src5_rs did the trick without issues. I double checked that every Extended Function Selector looked right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improvements look great! I left a few more suggestions and comments, but I think we're super close. And nice work with src5 workaround solution!
packages/governance/src/governor/extensions/governor_timelock_execution.cairo
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -54,6 +54,8 @@ pub mod GovernorVotesQuorumFractionComponent { | |||
+Drop<TContractState> | |||
> of GovernorComponent::GovernorQuorumTrait<TContractState> { | |||
/// See `GovernorComponent::GovernorQuorumTrait::quorum`. | |||
/// | |||
/// Returns a percentage of the votes token total supply at a given timepoint in the past. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds a bit difficult to understand, maybe it could be rephrased
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, tried to rephrase it a bit.
percentage of the total supply at the block when a proposal’s voting power is retrieved. This requires an initializer | ||
parameter to set the percentage besides the votes token address. Most Governors nowadays use 4%, so we will initialize | ||
the module with parameter 40 since the quorum denominator is 1000 for precision (this indicates the percentage, | ||
resulting in 4%). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part could be rephrased to improve clarity:
"Most Governors nowadays use a quorum of 4%. Since the quorum denominator is 1000 for precision, we initialize the module with a numerator of 40, resulting in a 4% quorum (40/1000 = 0.04 or 4%)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better indeed.
* docs: document main component * feat: add extensions API References * Update docs/modules/ROOT/pages/governance/governor.adoc Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com> * Update docs/modules/ROOT/pages/governance/governor.adoc Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com> * feat: apply review updates * feat: add interface id * feat: apply review updates * feat: add interface * feat: apply review updates --------- Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Fixes #1234