Skip to content
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 from xyk to cl pools #69

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
26bb3c3
add xyk to cl migrate handler for reserve contract
sotnikov-s Jun 7, 2023
81149f7
refactor reserve migration using callbacks instead of submsgs
sotnikov-s Jun 13, 2023
c2bbba8
tmp rm all but reserve contract
sotnikov-s Jun 13, 2023
4039ef3
fix typo in error name
sotnikov-s Jun 14, 2023
4eaf301
fix pair info and balances query in reserve migration
sotnikov-s Jun 14, 2023
8ff3856
enable all contracts
sotnikov-s Jun 14, 2023
7efb44a
move liquidity migration logic from migration handler to exec one
sotnikov-s Jun 15, 2023
0c74e0f
prettify migration config and reuse lp token addr
sotnikov-s Jun 15, 2023
c3b200e
improve MigrationAmountUnavailable error text
sotnikov-s Jun 16, 2023
3661106
wip
pr0n00gler Jun 16, 2023
68f4b37
wip
pr0n00gler Jun 19, 2023
c37b759
wip
pr0n00gler Jun 19, 2023
0aa2cb8
wip
pr0n00gler Jun 23, 2023
adbe3e1
wip
pr0n00gler Jun 26, 2023
8bdec04
fix voting power calc
quasisamurai Jul 7, 2023
3efb538
fix vp calculation
pr0n00gler Jul 10, 2023
a4b806e
Merge branch 'main' into fix/migrate-from-xyk-to-cl-pairs-vaults
pr0n00gler Aug 7, 2023
d5bc532
review fixes
pr0n00gler Aug 7, 2023
7e4119d
Merge branch 'main' of github.com:neutron-org/neutron-dao into feat/m…
sotnikov-s Aug 7, 2023
686f267
review fixes
pr0n00gler Aug 7, 2023
6dfe2d3
Merge branch 'feat/migrate-from-xyk-to-cl-pairs' into fix/migrate-fro…
pr0n00gler Aug 7, 2023
0edde36
separate contracts for migrated lockdrop and vesting lp vaults to cl …
pr0n00gler Aug 9, 2023
bee854b
Merge branch 'main' of github.com:neutron-org/neutron-dao into feat/m…
sotnikov-s Sep 1, 2023
353c22c
Merge branch 'feat/migrate-from-xyk-to-cl-pairs' into fix/migrate-fro…
pr0n00gler Sep 4, 2023
71981b5
check_contracts --locked
pr0n00gler Sep 4, 2023
f22fbf5
review fixes
pr0n00gler Sep 5, 2023
eb244d3
oracles -> cl_pools
pr0n00gler Sep 5, 2023
f02ec44
schema
pr0n00gler Sep 5, 2023
3394002
Merge pull request #71 from neutron-org/fix/migrate-from-xyk-to-cl-pa…
pr0n00gler Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions contracts/tokenomics/reserve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ exec-control = { path = "../../../packages/exec-control" }
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0" }
cwd-macros = { path = "../../../packages/cwd-macros" }
astroport = { git = "https://github.com/astroport-fi/astroport-core.git", tag = "v2.8.0" }
cw20 = "0.13"

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0", default-features = false }
122 changes: 122 additions & 0 deletions contracts/tokenomics/reserve/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"additionalProperties": false
},
{
"description": "Update config",
"type": "object",
"required": [
"update_config"
Expand Down Expand Up @@ -86,6 +87,19 @@
},
"additionalProperties": false
},
{
"description": "Callbacks; only callable by the contract itself.",
"type": "object",
"required": [
"callback"
],
"properties": {
"callback": {
"$ref": "#/definitions/CallbackMsg"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -122,9 +136,117 @@
}
],
"definitions": {
"CallbackMsg": {
"oneOf": [
{
"type": "object",
"required": [
"migrate_liquidity_to_cl_pair"
],
"properties": {
"migrate_liquidity_to_cl_pair": {
"type": "object",
"required": [
"cl_pair_address",
"ntrn_denom",
"paired_asset_denom",
"xyk_pair_address"
],
"properties": {
"cl_pair_address": {
"type": "string"
},
"ntrn_denom": {
"type": "string"
},
"paired_asset_denom": {
"type": "string"
},
"xyk_pair_address": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"provide_liquidity_to_cl_pair_after_withdrawal"
],
"properties": {
"provide_liquidity_to_cl_pair_after_withdrawal": {
"type": "object",
"required": [
"cl_pair_address",
"ntrn_denom",
"ntrn_init_balance",
"paired_asset_denom",
"paired_asset_init_balance"
],
"properties": {
"cl_pair_address": {
"type": "string"
},
"ntrn_denom": {
"type": "string"
},
"ntrn_init_balance": {
"$ref": "#/definitions/Uint128"
},
"paired_asset_denom": {
"type": "string"
},
"paired_asset_init_balance": {
"$ref": "#/definitions/Uint128"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"post_migration_balances_check"
],
"properties": {
"post_migration_balances_check": {
"type": "object",
"required": [
"ntrn_denom",
"ntrn_init_balance",
"paired_asset_denom",
"paired_asset_init_balance"
],
"properties": {
"ntrn_denom": {
"type": "string"
},
"ntrn_init_balance": {
"$ref": "#/definitions/Uint128"
},
"paired_asset_denom": {
"type": "string"
},
"paired_asset_init_balance": {
"$ref": "#/definitions/Uint128"
}
}
}
},
"additionalProperties": false
}
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
}
}
}
Loading