Skip to content

Commit

Permalink
chore: Merge branch 'release/v2_contracts' into feat/bonding-manager-…
Browse files Browse the repository at this point in the history
…whale-lair
  • Loading branch information
0xFable committed Apr 26, 2024
2 parents 780a5e1 + 40bac77 commit 5a6c9d4
Show file tree
Hide file tree
Showing 17 changed files with 954 additions and 66 deletions.
150 changes: 146 additions & 4 deletions contracts/liquidity_hub/pool-manager/schema/pool-manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,31 @@
},
"additionalProperties": false
},
{
"description": "Removes swap routes from the router.",
"type": "object",
"required": [
"remove_swap_routes"
],
"properties": {
"remove_swap_routes": {
"type": "object",
"required": [
"swap_routes"
],
"properties": {
"swap_routes": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapRoute"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Updates the configuration of the contract. If a field is not specified (i.e., set to `None`), it will not be modified.",
"type": "object",
Expand Down Expand Up @@ -704,14 +729,10 @@
"simulation": {
"type": "object",
"required": [
"ask_asset",
"offer_asset",
"pair_identifier"
],
"properties": {
"ask_asset": {
"$ref": "#/definitions/Coin"
},
"offer_asset": {
"$ref": "#/definitions/Coin"
},
Expand Down Expand Up @@ -794,6 +815,34 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"simulate_swap_operations"
],
"properties": {
"simulate_swap_operations": {
"type": "object",
"required": [
"offer_amount",
"operations"
],
"properties": {
"offer_amount": {
"$ref": "#/definitions/Uint128"
},
"operations": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapOperation"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand All @@ -815,6 +864,32 @@
},
"additionalProperties": false
},
{
"description": "Retrieves the creator of the swap routes that can then remove them.",
"type": "object",
"required": [
"swap_route_creator"
],
"properties": {
"swap_route_creator": {
"type": "object",
"required": [
"ask_asset_denom",
"offer_asset_denom"
],
"properties": {
"ask_asset_denom": {
"type": "string"
},
"offer_asset_denom": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Query the contract's ownership information",
"type": "object",
Expand Down Expand Up @@ -846,6 +921,39 @@
}
}
},
"SwapOperation": {
"oneOf": [
{
"type": "object",
"required": [
"whale_swap"
],
"properties": {
"whale_swap": {
"type": "object",
"required": [
"pool_identifier",
"token_in_denom",
"token_out_denom"
],
"properties": {
"pool_identifier": {
"type": "string"
},
"token_in_denom": {
"type": "string"
},
"token_out_denom": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"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 Expand Up @@ -1273,6 +1381,26 @@
}
}
},
"simulate_swap_operations": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SimulateSwapOperationsResponse",
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false,
"definitions": {
"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"
}
}
},
"simulation": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SimulationResponse",
Expand Down Expand Up @@ -1382,6 +1510,20 @@
}
}
},
"swap_route_creator": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SwapRouteCreatorResponse",
"type": "object",
"required": [
"creator"
],
"properties": {
"creator": {
"type": "string"
}
},
"additionalProperties": false
},
"swap_routes": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SwapRoutesResponse",
Expand Down
25 changes: 25 additions & 0 deletions contracts/liquidity_hub/pool-manager/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,31 @@
},
"additionalProperties": false
},
{
"description": "Removes swap routes from the router.",
"type": "object",
"required": [
"remove_swap_routes"
],
"properties": {
"remove_swap_routes": {
"type": "object",
"required": [
"swap_routes"
],
"properties": {
"swap_routes": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapRoute"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Updates the configuration of the contract. If a field is not specified (i.e., set to `None`), it will not be modified.",
"type": "object",
Expand Down
91 changes: 87 additions & 4 deletions contracts/liquidity_hub/pool-manager/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@
"simulation": {
"type": "object",
"required": [
"ask_asset",
"offer_asset",
"pair_identifier"
],
"properties": {
"ask_asset": {
"$ref": "#/definitions/Coin"
},
"offer_asset": {
"$ref": "#/definitions/Coin"
},
Expand Down Expand Up @@ -142,6 +138,34 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"simulate_swap_operations"
],
"properties": {
"simulate_swap_operations": {
"type": "object",
"required": [
"offer_amount",
"operations"
],
"properties": {
"offer_amount": {
"$ref": "#/definitions/Uint128"
},
"operations": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapOperation"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand All @@ -163,6 +187,32 @@
},
"additionalProperties": false
},
{
"description": "Retrieves the creator of the swap routes that can then remove them.",
"type": "object",
"required": [
"swap_route_creator"
],
"properties": {
"swap_route_creator": {
"type": "object",
"required": [
"ask_asset_denom",
"offer_asset_denom"
],
"properties": {
"ask_asset_denom": {
"type": "string"
},
"offer_asset_denom": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Query the contract's ownership information",
"type": "object",
Expand Down Expand Up @@ -194,6 +244,39 @@
}
}
},
"SwapOperation": {
"oneOf": [
{
"type": "object",
"required": [
"whale_swap"
],
"properties": {
"whale_swap": {
"type": "object",
"required": [
"pool_identifier",
"token_in_denom",
"token_out_denom"
],
"properties": {
"pool_identifier": {
"type": "string"
},
"token_in_denom": {
"type": "string"
},
"token_out_denom": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SimulateSwapOperationsResponse",
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false,
"definitions": {
"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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SwapRouteCreatorResponse",
"type": "object",
"required": [
"creator"
],
"properties": {
"creator": {
"type": "string"
}
},
"additionalProperties": false
}
Loading

0 comments on commit 5a6c9d4

Please sign in to comment.