Skip to content

Commit

Permalink
chore(smart-contracts): regenerate all schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
nseguias committed Feb 5, 2024
1 parent 10c0bd3 commit b698457
Show file tree
Hide file tree
Showing 12 changed files with 1,648 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,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
}
],
"definitions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"receive"
],
"properties": {
"receive": {
"$ref": "#/definitions/Cw20ReceiveMsg"
}
},
"additionalProperties": false
},
{
"description": "Execute multiple [SwapOperation]s, i.e. multi-hop swaps.",
"type": "object",
"required": [
"execute_swap_operations"
],
"properties": {
"execute_swap_operations": {
"type": "object",
"required": [
"operations"
],
"properties": {
"max_spread": {
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
},
"minimum_receive": {
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"operations": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapOperation"
}
},
"to": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Swap the offer to ask token. This message can only be called internally by the router contract.",
"type": "object",
"required": [
"execute_swap_operation"
],
"properties": {
"execute_swap_operation": {
"type": "object",
"required": [
"operation"
],
"properties": {
"max_spread": {
"anyOf": [
{
"$ref": "#/definitions/Decimal"
},
{
"type": "null"
}
]
},
"operation": {
"$ref": "#/definitions/SwapOperation"
},
"to": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Checks if the swap amount exceeds the minimum_receive. This message can only be called internally by the router contract.",
"type": "object",
"required": [
"assert_minimum_receive"
],
"properties": {
"assert_minimum_receive": {
"type": "object",
"required": [
"asset_info",
"minimum_receive",
"prev_balance",
"receiver"
],
"properties": {
"asset_info": {
"$ref": "#/definitions/AssetInfo"
},
"minimum_receive": {
"$ref": "#/definitions/Uint128"
},
"prev_balance": {
"$ref": "#/definitions/Uint128"
},
"receiver": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Adds swap routes to the router.",
"type": "object",
"required": [
"add_swap_routes"
],
"properties": {
"add_swap_routes": {
"type": "object",
"required": [
"swap_routes"
],
"properties": {
"swap_routes": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapRoute"
}
}
},
"additionalProperties": false
}
},
"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
}
],
"definitions": {
"AssetInfo": {
"description": "AssetInfo contract_addr is usually passed from the cw20 hook so we can trust the contract_addr is properly validated.",
"oneOf": [
{
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"type": "object",
"required": [
"contract_addr"
],
"properties": {
"contract_addr": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"native_token"
],
"properties": {
"native_token": {
"type": "object",
"required": [
"denom"
],
"properties": {
"denom": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"Cw20ReceiveMsg": {
"description": "Cw20ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg",
"type": "object",
"required": [
"amount",
"msg",
"sender"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
},
"msg": {
"$ref": "#/definitions/Binary"
},
"sender": {
"type": "string"
}
},
"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"
},
"SwapOperation": {
"oneOf": [
{
"type": "object",
"required": [
"terra_swap"
],
"properties": {
"terra_swap": {
"type": "object",
"required": [
"ask_asset_info",
"offer_asset_info"
],
"properties": {
"ask_asset_info": {
"$ref": "#/definitions/AssetInfo"
},
"offer_asset_info": {
"$ref": "#/definitions/AssetInfo"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"SwapRoute": {
"type": "object",
"required": [
"ask_asset_info",
"offer_asset_info",
"swap_operations"
],
"properties": {
"ask_asset_info": {
"$ref": "#/definitions/AssetInfo"
},
"offer_asset_info": {
"$ref": "#/definitions/AssetInfo"
},
"swap_operations": {
"type": "array",
"items": {
"$ref": "#/definitions/SwapOperation"
}
}
},
"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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"type": "object",
"required": [
"terraswap_factory"
],
"properties": {
"terraswap_factory": {
"type": "string"
}
},
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MigrateMsg",
"description": "We currently take no arguments for migrations",
"type": "object",
"additionalProperties": false
}
Loading

0 comments on commit b698457

Please sign in to comment.