-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/voting power #19
Conversation
This greatly simplifies things as we can drop in template values where needed vs trying to initialize everything after the fact and require calling functions with extra information, e.g. trait contracts. From here we can review how to calculate liquid balance at proposal block, then complete the voting logic.
This hardcodes them for the purpose we're using them for, and they can be extended/upgraded/changed out in the future. This way the voting calculations are not in flux if something changes, and we can use the templates to provide the correct contract names when generating the contracts.
This was a one-off shot at adding tests and def would fix a few things, going to set a standard on the first few then iterate, as well as focus on key elements.
Still leaves some boilerplate this should be tested language for what wouldve been empty files, otherwise removes blank checks that were hints to what tests should be run. Can pass through again and turn them back on.
This version works with the test, the clarinet check version causes problems for some reason. Shouldn't be an issue in GH action.
Updated calculation in each proposal contract for: This will make both voting extensions valid before and after the DEX graduates. Changing the target pool or providing liquidity after graduation may affect this extension and require some modification / replacement. Also cleaned up the test files to get everything at a clear starting point. Next PR let's add tests to verify everything is working as expected. |
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.
Huge 🙏
This PR:
total supply - tokens in treasury - tokens in dex