-
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
Improvements/gauges are cool #861
Improvements/gauges are cool #861
Conversation
…p versions to v2.5.0) (DA0-DA0#843)
TODO: 2 tests are failing, because the cw20 cannot be validated with cw-denom. This should be fixed with a cw-orch refactor.
Nightly toolchain is required for integration_tests
@JakeHartnell ok should have all gauge-orchestrator cw-orch test mirrored |
* fix cargo errors * clarify scalar values a bit more and update comments * added extensions that make math more readable and maintainable
…xpiry (DA0-DA0#862) * fix cargo errors * reorganized fund logic and fixed rewards being lost when funding a previously expired discontinuous linear distribution
* fix cargo errors * validate pre propose submission policy update before reading from storage
* fix cargo errors * remove unnecessary state update
…ate NFT token IDs (DA0-DA0#864) * fix cargo errors * fix ONFT double counting vulnerability
…gration (DA0-DA0#866) * fix cargo errors * validate pre-propose policy on migrate
…tion (DA0-DA0#868) * fix cargo errors * replaced pre-propose submission policy's optional vectors of strings with vectors of addrs * de-dupe redundant code * updated schema
#[cw_serde] | ||
pub struct InstantiateMsg { | ||
/// Address that is allowed to return deposits. | ||
pub admin: String, |
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.
Maybe let's call this "owner" to differentiate it from the CosmWasm contract admin.
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.
Let's update this contract to use cw-ownable
.
#[cw_serde] | ||
#[derive(QueryResponses, cw_orch::QueryFns)] | ||
pub enum AdapterQueryMsg { | ||
#[returns(crate::state::Config)] | ||
Config {}, | ||
#[returns(AllOptionsResponse)] | ||
AllOptions {}, | ||
#[returns(CheckOptionResponse)] | ||
CheckOption { option: String }, | ||
#[returns(SampleGaugeMsgsResponse)] | ||
SampleGaugeMsgs { | ||
/// Option along with weight. | ||
/// Sum of all weights should be 1.0 (within rounding error). | ||
selected: Vec<(String, Decimal)>, | ||
}, | ||
|
||
// Marketing-gauge specific queries to help on frontend | ||
#[returns(SubmissionResponse)] | ||
Submission { address: String }, | ||
#[returns(AllSubmissionsResponse)] | ||
AllSubmissions {}, | ||
} |
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.
I like adding robust comments for ExecuteMsg
and QueryMsg
because they basically document the API (and show up in generated docs).
contracts/gauges/gauge/src/msg.rs
Outdated
/// Addres that will call voting power change hooks (often same as voting power contract) | ||
pub hook_caller: String, | ||
/// Address that can add new gauges or stop them | ||
pub owner: String, |
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.
Let's use cw-ownable
for this contract as well.
4c7ffe1
to
3990e13
Compare
TODO:
|
Closing this as we really should separate Please make a new PR with gauges related work into #844. |
adds epoch limit for gauge to turn off automatically once reached.
test incoming!