-
Notifications
You must be signed in to change notification settings - Fork 3
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
Hydro DAO DAO governance support #226
Conversation
], | ||
"properties": { | ||
"claims": { | ||
"type": "array", | ||
"items": { |
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.
these changes happen because some ordering is not deterministic, right? Since nothing changed here, only the order of elements. might be worth making deterministic (though not as part of this PR, of course)
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.
Yeah I've noticed this as well. I think it has something to do with how the tool works on Mac vs. Linux. If I run it now on this branch I would get no diff, but if you run it it would reorder stuff. You can even try this and let me know if I'm 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.
LGTM, great work. Just a few comments, mostly about comments - but nothing major
* Introduce compounder cap (#220) * introduce participant's cap * Introduce snapshot map for total voting power tracking and handle its population * Added round<->height tracking and implemented validation for users locking in extra_cap based on their voting power in previous round. * Introduced USER_LOCKS to be able to calculate users voting power at a given height * - Added test for compunders cap and fixed couple of minor bugs within the new code - validate_denom() modified to be able to execute for past rounds as well * fixing errors after merge from main * added tests for user lock snapshoting and heght<->round tracking * added transaction to remove the constants at a specified timestamps * implementation of migration * CR required changes * added SNAPSHOTS_ACTIVATION_HEIGHT * added migration tests * added changelogs, recompiled contracts and schemas * added util function for ICQ results mock * fixed interchain tests (#222) * borrow input Deps, Env and MessageInfo whenever possible (#224) * Allowing to unvote without having to switch to a new vote (#218) * Refactoring vote and adding unvote feature * Make clippy happy * Remove unnecessary unvoted_proposals in process_unvotes * Adding a test case for unvote * Update wasms * Improving readability by adding / restoring comments, renaming variables * Store vote and voting allowed round directly in process_votes * Adding new test: attempts to unvote non-existing or not-owned locks should fail * Adding changelog * Fix HydroBase.client.ts as generated by make schema * Addressing Dusan's comments * Hydro DAO DAO governance support (#226) * implement hydro DAO DAO governance support * added changelog * CR changes * Prepare release for v3.1.0 (#227) * Prepare v3.1.0 release * Regenerate schema * Regenerate client types * Change migration and version to v3.1.0 * Fix migration mod --------- Co-authored-by: arlai <[email protected]> Co-authored-by: Philip Offtermatt <[email protected]>
Description
This PR introduces the following changes:
TotalPowerAtHeight
andVotingPowerAtHeight
) on Hydro contract, which support querying total and specific user voting powers at the given height. Queries allow us to plug-in existing Hydro contract into DAO DAO governance.dao-voting-adapter
contract that implements DAO DAO voting module queries (all 4 of them). When queried, the contract will forward 2 main queries to the Hydro contract, whileDao
andInfo
queries are implemented by the contract itself. The contract is also necessary because DAO DAO, during instantiation process, can not accept address of an existing voting module SC. Instead, new voting module is instantiated with info provided in the DAO Core instantiation message. In our case, we will instantiatedao-voting-adapter
by giving it address of an existing Hydro SC.Minor changes:
get_current_user_voting_power()
,get_user_voting_power_for_past_round()
,to_lockup_with_power()
,get_lock_time_weighted_shares()
andscale_lockup_power()
are moved fromcontract.rs
intoutils.rs
because they are now used in different places (external queries, compounder cap, governance).get_current_user_voting_power()
andget_user_voting_power_for_past_round()
since they both callto_lockup_with_power() -> get_lock_time_weighted_shares()
that handles expired lockups properly already.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
.changelog
make compile
and included content of the artifacts directory into the PRmake schema
and included generated files into the PR