Skip to content
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

Make FlexVotingClient clock agnostic #77

Merged
merged 7 commits into from
Jan 10, 2025

Conversation

davidlaprade
Copy link
Contributor

Fixes #70

@davidlaprade davidlaprade marked this pull request as ready for review January 7, 2025 20:24
@davidlaprade davidlaprade changed the title [WIP] Clock agnostic flex client Make FlexVotingClient clock agnostic Jan 7, 2025
The client should expose this behavior so that child contracts don't
have to know about details like `totalBalanceCheckpoint.latest()`, which
feels like a mixing of concerns.

This function is analogous to the helper function we expose for
raw balances, namely: FlexVotingClient._checkpointRawBalanceOf
Copy link

github-actions bot commented Jan 8, 2025

Coverage after merging clock-agnostic-flex-client into master will be

91.91%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   FlexVotingClient.sol100%100%100%100%
   FractionalPool.sol79.63%70.59%73.33%82.89%107, 109, 111, 114, 190–191, 193–195, 198, 202, 238–239, 78, 80, 82–83, 85
   GovernorCountingFractional.sol94.59%76.92%100%98.04%184, 186, 188, 191

Copy link
Contributor

@alexkeating alexkeating left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, only question is on the need for the IVotingToken interface

src/FlexVotingClient.sol Show resolved Hide resolved
test/FlexVotingClient.t.sol Show resolved Hide resolved
@jferas jferas self-requested a review January 10, 2025 19:44
Copy link

@jferas jferas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidlaprade davidlaprade merged commit 37e12d4 into master Jan 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make FlexVotingClient generic with respect to clock type
3 participants