Skip to content

[WIP] Multi governor client #84

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

Open
wants to merge 43 commits into
base: client-sub-delegation
Choose a base branch
from

Conversation

davidlaprade
Copy link
Contributor

@davidlaprade davidlaprade commented Apr 1, 2025

#82 should be merged before this

@davidlaprade davidlaprade changed the base branch from master to client-sub-delegation April 1, 2025 20:24
///
/// To get the vote weight on a governor for a user at timepoint t use:
/// voteWeightCheckpoints[governor][user].upperLookup(t)
mapping(IFractionalGovernor => mapping(address => Checkpoints.Trace208)) internal
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can use named params

import {FlexVotingBase} from "src/FlexVotingBase.sol";
import {IFractionalGovernor} from "src/interfaces/IFractionalGovernor.sol";

abstract contract FlexVotingMultiGov is FlexVotingBase, Ownable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need a whitelist

@davidlaprade davidlaprade force-pushed the multi-governor-client branch from e15c058 to d3b7a04 Compare April 15, 2025 20:56
It was weird to begin with to have functions like `rawBalanceOf` and
`deposit` and `withdraw` take a governor argument instead of a token
argument. It's much more natural to think in terms of
depositing/withdrawing/having a balance of a *token* than a governor.

Also it quickly became clear in tests that this weirdness was more than
inconvenient, as there were contexts where a deposit would need to be
made, the token was available, but the governor was not -- and since you
can't ask the token for the governor, we were stuck.
@davidlaprade davidlaprade force-pushed the multi-governor-client branch from 79c7dc1 to 022363a Compare April 18, 2025 18:58
@davidlaprade davidlaprade force-pushed the multi-governor-client branch from 0be0970 to f3b6559 Compare May 8, 2025 20:53
Copy link

github-actions bot commented Jun 6, 2025

Coverage after merging multi-governor-client into client-sub-delegation will be

91.61%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   FlexVotingBase.sol100%100%100%100%
   FlexVotingClient.sol100%100%100%100%
   FlexVotingDelegable.sol100%100%100%100%
   FractionalPool.sol79.44%70.59%73.33%82.67%110, 112, 114, 117, 192–193, 195–197, 200, 204, 240–241, 81, 83, 85–86, 88

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.

1 participant