Skip to content

Commit

Permalink
remove lp migration logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Oct 18, 2023
1 parent d245549 commit a7b0307
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 851 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

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

19 changes: 9 additions & 10 deletions contracts/tokenomics/reserve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ edition = "2021"
license = "Apache-2.0"
name = "neutron-reserve"
repository = "https://github.com/neutron/neutron-dao"
version = "0.1.1"
version = "0.1.0"

[lib]
crate-type = ["cdylib", "rlib"]
Expand All @@ -13,16 +13,15 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-schema = { version = "1.3.0", default-features = false }
cosmwasm-std = { version = "1.3.0" }
cosmwasm-schema = {version = "1.3.0", default-features = false}
cosmwasm-std = {version = "1.3.0"}
cw-storage-plus = "1.1.0"
cwd-macros = { path = "../../../packages/cwd-macros" }
exec-control = { path = "../../../packages/exec-control" }
neutron-sdk = { package = "neutron-sdk", version = "0.7.0" }
cwd-macros = {path = "../../../packages/cwd-macros"}
exec-control = {path = "../../../packages/exec-control"}
neutron-sdk = {package = "neutron-sdk", version = "0.7.0" }
schemars = "0.8.8"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0" }
astroport = { git = "https://github.com/astroport-fi/astroport-core.git", tag = "v2.5.0" }
cw20 = "0.13"
serde = {version = "1.0.103", default-features = false, features = ["derive"]}
thiserror = {version = "1.0"}
cw2 = "1.1.0"

[dev-dependencies]
188 changes: 1 addition & 187 deletions contracts/tokenomics/reserve/schema/neutron-reserve.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "neutron-reserve",
"contract_version": "0.1.1",
"contract_version": "0.1.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down Expand Up @@ -154,64 +154,6 @@
},
"additionalProperties": false
},
{
"description": "Processes either partial or full xyk->CL migration of contract's liquidity.",
"type": "object",
"required": [
"migrate_from_xyk_to_cl"
],
"properties": {
"migrate_from_xyk_to_cl": {
"type": "object",
"properties": {
"ntrn_atom_amount": {
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"ntrn_usdc_amount": {
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"slippage_tolerance": {
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
}
}
}
},
"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 @@ -248,137 +190,9 @@
}
],
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
},
"CallbackMsg": {
"oneOf": [
{
"type": "object",
"required": [
"migrate_liquidity_to_cl_pair"
],
"properties": {
"migrate_liquidity_to_cl_pair": {
"type": "object",
"required": [
"amount",
"cl_pair",
"ntrn_denom",
"paired_asset_denom",
"slippage_tolerance",
"xyk_lp_token",
"xyk_pair"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
},
"cl_pair": {
"$ref": "#/definitions/Addr"
},
"ntrn_denom": {
"type": "string"
},
"paired_asset_denom": {
"type": "string"
},
"slippage_tolerance": {
"$ref": "#/definitions/Decimal"
},
"xyk_lp_token": {
"$ref": "#/definitions/Addr"
},
"xyk_pair": {
"$ref": "#/definitions/Addr"
}
}
}
},
"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",
"ntrn_denom",
"ntrn_init_balance",
"paired_asset_denom",
"paired_asset_init_balance",
"slippage_tolerance"
],
"properties": {
"cl_pair": {
"$ref": "#/definitions/Addr"
},
"ntrn_denom": {
"type": "string"
},
"ntrn_init_balance": {
"$ref": "#/definitions/Uint128"
},
"paired_asset_denom": {
"type": "string"
},
"paired_asset_init_balance": {
"$ref": "#/definitions/Uint128"
},
"slippage_tolerance": {
"$ref": "#/definitions/Decimal"
}
}
}
},
"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"
}
}
},
Expand Down
Loading

0 comments on commit a7b0307

Please sign in to comment.