Add active threshold functionality to CW4 voting module, closes #781 - #819
Open
theghostmac wants to merge 6 commits into
Open
theghostmac wants to merge 6 commits into
theghostmac wants to merge 6 commits into
Conversation
Member
|
Needs a few things:
|
JakeHartnell
reviewed
Apr 7, 2024
JakeHartnell
reviewed
Apr 7, 2024
Comment on lines
+13
to
+19
| #[cw_serde] | ||
| pub struct Config { | ||
| pub active_threshold_enabled: bool, | ||
| pub active_threshold: Option<ActiveThreshold>, | ||
| } | ||
|
|
||
| pub const CONFIG: Item<Config> = Item::new("config"); No newline at end of file |
Member
There was a problem hiding this comment.
We don't really need this as if ACTIVE_THRESHOLD is not set, it's not enabled. There is no other config needed for this contract.
JakeHartnell
reviewed
Apr 7, 2024
JakeHartnell
reviewed
Apr 7, 2024
Author
I have updated the contract with everything you pointed out. Build passes. Moving on to the tests. |
JakeHartnell
reviewed
Apr 7, 2024
JakeHartnell
reviewed
Apr 7, 2024
Comment on lines
+12
to
+17
| #[cw_serde] | ||
| pub struct Config { | ||
| pub active_threshold: Option<ActiveThreshold>, | ||
| } | ||
|
|
||
| pub const CONFIG: Item<Config> = Item::new("config"); |
Member
There was a problem hiding this comment.
This is the same info as ACTIVE_THRESHOLD. Delete Config struct.
JakeHartnell
reviewed
Apr 7, 2024
JakeHartnell
reviewed
Apr 7, 2024
Member
Close, but see above comments.
|
JakeHartnell
reviewed
Jul 5, 2024
Co-authored-by: Jake Hartnell <Jake.Hartnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
InvalidThresholdquery_is_activefunction and correspondingQuery::IsActiveexecute_update_active_thresholdfunction and correspondingExecuteMsg::UpdateActiveThresholdConfigand updated theinstantiatefunction to make use of it.Author
GhostMac