Skip to content

Conversation

piobab
Copy link
Collaborator

@piobab piobab commented Jun 12, 2023

new version of owner package contains breaking changes. We need to migrate owner state.

@piobab piobab requested review from brimigs and grod220 June 12, 2023 11:55
@piobab piobab merged commit aab034e into release/pyth-v1 Jun 12, 2023
piobab added a commit that referenced this pull request Jun 12, 2023
* 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 {
Copy link

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?

Copy link
Contributor

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.

@piobab piobab deleted the fix-owner-state branch June 19, 2023 08:37
pacmanifold pushed a commit that referenced this pull request Jul 18, 2023
* 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>
markonmars added a commit that referenced this pull request Feb 20, 2025
* 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
markonmars added a commit that referenced this pull request Apr 1, 2025
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants