-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow updating config of pool-manager #328
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v2_contracts #328 +/- ##
=====================================================
Coverage 89.42% 89.42%
=====================================================
Files 260 261 +1
Lines 26656 26704 +48
=====================================================
+ Hits 23836 23879 +43
- Misses 2820 2825 +5 ☔ View full report in Codecov by Sentry. |
f8761f6
to
f5d12b9
Compare
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 🚀
withdrawals_enabled: false, | ||
}), | ||
|res| { | ||
res.unwrap(); |
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 good job keeping the tests in ownership test module
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.
Looks good overall, made a comments on instantiation logic & a state variable name suggestion
use crate::{ | ||
helpers::{self, calculate_stableswap_y, StableSwapDirection}, | ||
state::get_pair_by_identifier, | ||
ContractError, | ||
}; | ||
use crate::{math::Decimal256Helper, state::SWAP_ROUTES}; | ||
|
||
/// Query the config of the contract. | ||
pub fn query_config(deps: Deps) -> Result<Config, ContractError> { | ||
Ok(MANAGER_CONFIG.load(deps.storage)?) |
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.
given that we have several managers on V2, can we use POOL_MANAGER_CONFIG
to make it super clear? Or just 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.
yeah maybe just config could be. I remember at first we started naming them MANAGER_CONFIG
cuz maybe we could have a config for the pools, or vaults... but that wasn't the case. I think we can refactor that later once all the contracts are ready.
c63be19
to
1412749
Compare
Description and Motivation
UpdateConfig
msg to be sent to thepool-manager
contract to update the contract configuration.QueryMsg::Config
on thepool-manager
contractRelated Issues
closes #294, related to #309.
Before merging this PR, we need to have a think about how we want to handle contract ownership. We currently have the cosmwasm contract admin, the
cw-ownable
owner, and theConfig.owner
.Checklist:
Update index.md
)cargo fmt --all --
.cargo clippy -- -D warnings
.cargo schema
.