-
Notifications
You must be signed in to change notification settings - Fork 22
Migrate owner state. #205
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
Migrate owner state. #205
Conversation
* Pyth (#183) * Pyth integration. * Add mocks. * Add validation. * Tests. * Add update_config. * Update schema. * Apply review comments. * Update clippy. * MP-2475. Pyth phase 1 aligment. * Implementation for LSD v1 (#190) * Add LSD price source. * Split PriceSource to Unchecked and Checked. * LSD fmt. * Query LSD price. * Fix tests. * Add tests for LSD. * Update schema. * Apply comments from review. * Extract pyth addr to Pyth price source config. * Update decimals (#194) * Add decimals for Pyth prices. * Update schema. * Fix fmt. * Fix missing cw dep. * Add base_denom_decimals for price normalization in Pyth. * Add config arg. Change query_price signature. * Move fmt test cases. * Update comment. * Fix clippy. * Update comment. * Use wasm from optimizer for integration tests. * Fix pipeline. * Improve pyth base dec (#202) * Use price source for usd -> base_denom convertion. * Fix test and update comments. * Fix fmt. * Bump deps (#204) * Bump deps. Fix build. * Migrate Spot / Pool queries to poolmanager. * Use GammQueries for Spot. New PoolManager query is not yet whitelisted. * Bump contract ver and rust-optimizer. * Use old Pool query. * Set version to 1.1.0. * Migrate owner state. (#205)
|
||
// map old owner struct to new one | ||
let old_owner = old_state::OWNER.load(deps.storage)?; | ||
let owner = match old_owner { |
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.
Shouldn't this throw here when it's not B or C?
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 think the idea is that we know for sure mainnet is not in the other states. Otherwise it would raise in runtime anyway. Though, this is an argument that we should just import the old package so it forces us to pattern match on all of the possibilities.
* Pyth (#183) * Pyth integration. * Add mocks. * Add validation. * Tests. * Add update_config. * Update schema. * Apply review comments. * Update clippy. * MP-2475. Pyth phase 1 aligment. * Implementation for LSD v1 (#190) * Add LSD price source. * Split PriceSource to Unchecked and Checked. * LSD fmt. * Query LSD price. * Fix tests. * Add tests for LSD. * Update schema. * Apply comments from review. * Extract pyth addr to Pyth price source config. * Update decimals (#194) * Add decimals for Pyth prices. * Update schema. * Fix fmt. * Fix missing cw dep. * Add base_denom_decimals for price normalization in Pyth. * Add config arg. Change query_price signature. * Move fmt test cases. * Update comment. * Fix clippy. * Update comment. * Use wasm from optimizer for integration tests. * Fix pipeline. * Improve pyth base dec (#202) * Use price source for usd -> base_denom convertion. * Fix test and update comments. * Fix fmt. * Bump deps (#204) * Bump deps. Fix build. * Migrate Spot / Pool queries to poolmanager. * Use GammQueries for Spot. New PoolManager query is not yet whitelisted. * Bump contract ver and rust-optimizer. * Use old Pool query. * Set version to 1.1.0. * Migrate owner state. (#205) Signed-off-by: Pacman <pacman@apollo.farm>
* add revenue share to rewards collector * fmt * remove v2.0 migration test * update types * improve pop_array methods * remove estimate exact out for reward amounts * improve tests for rewards collector * small tidy * safety fund and revenue share use same denom * fix integration test * update schema * generate types * update deploy scripts * make distribute method configurable * tidy comments * review comments * fix ibc integration test * update types and schema * enforce rc config cannot have fee_collector_denom the same as other denoms
* Add Revenue share to Rewards Collector (#205) * add revenue share to rewards collector * fmt * remove v2.0 migration test * update types * improve pop_array methods * remove estimate exact out for reward amounts * improve tests for rewards collector * small tidy * safety fund and revenue share use same denom * fix integration test * update schema * generate types * update deploy scripts * make distribute method configurable * tidy comments * review comments * fix ibc integration test * update types and schema * enforce rc config cannot have fee_collector_denom the same as other denoms * Rewards Collector Contract migration (Neutron 2.2.0 -> 2.2.1, Osmosis 2.1.0 -> 2.1.1) (#208) * add revenue share to rewards collector * fmt * remove v2.0 migration test * update types * improve pop_array methods * remove estimate exact out for reward amounts * improve tests for rewards collector * small tidy * safety fund and revenue share use same denom * fix integration test * update schema * generate types * update deploy scripts * make distribute method configurable * tidy comments * review comments * fix ibc integration test * update types and schema * enforce rc config cannot have fee_collector_denom the same as other denoms * add neutron migration * fix migration tests for neutron rc * migration for address provider * update schema * add osmosis RC migration * fix old migration test * fix old migration test * clear old state on migration * fmt * update osmosis rc and ap versions * remove redundant file * remove perps from ap * update types * fix audit warn * fix typo (#446)
new version of owner package contains breaking changes. We need to migrate owner state.