-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add active threshold functionality to CW4 voting module, closes #781 #819
base: development
Are you sure you want to change the base?
Conversation
Needs a few things:
|
#[cw_serde] | ||
pub struct Config { | ||
pub active_threshold_enabled: bool, | ||
pub active_threshold: Option<ActiveThreshold>, | ||
} | ||
|
||
pub const CONFIG: Item<Config> = Item::new("config"); |
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.
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.
I have updated the contract with everything you pointed out. Build passes. Moving on to the tests. |
#[cw_serde] | ||
pub struct Config { | ||
pub active_threshold: Option<ActiveThreshold>, | ||
} | ||
|
||
pub const CONFIG: Item<Config> = Item::new("config"); |
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.
This is the same info as ACTIVE_THRESHOLD
. Delete Config struct.
Close, but see above comments.
|
Co-authored-by: Jake Hartnell <[email protected]>
Changelog
InvalidThreshold
query_is_active
function and correspondingQuery::IsActive
execute_update_active_threshold
function and correspondingExecuteMsg::UpdateActiveThreshold
Config
and updated theinstantiate
function to make use of it.Author
GhostMac