From f7fd958fe7b2ce05d38f5757127570b7da03f920 Mon Sep 17 00:00:00 2001 From: Timofey <5527315+epanchee@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:36:31 +0300 Subject: [PATCH] update schemas --- schemas/astroport-maker/astroport-maker.json | 153 ++++++++++++++++++ schemas/astroport-maker/raw/execute.json | 57 +++++++ schemas/astroport-maker/raw/query.json | 14 ++ .../raw/response_to_query_seize_config.json | 82 ++++++++++ 4 files changed, 306 insertions(+) create mode 100644 schemas/astroport-maker/raw/response_to_query_seize_config.json diff --git a/schemas/astroport-maker/astroport-maker.json b/schemas/astroport-maker/astroport-maker.json index 19c3fdf3a..41f6e8126 100644 --- a/schemas/astroport-maker/astroport-maker.json +++ b/schemas/astroport-maker/astroport-maker.json @@ -502,6 +502,63 @@ } }, "additionalProperties": false + }, + { + "description": "Permissionless endpoint that sends certain assets to predefined seizing address", + "type": "object", + "required": [ + "seize" + ], + "properties": { + "seize": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The assets to seize", + "type": "array", + "items": { + "$ref": "#/definitions/AssetWithLimit" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Sets parameters for seizing assets. Permissioned to a contract owner. If governance wants to stop seizing assets, it can set an empty list of seizable assets.", + "type": "object", + "required": [ + "update_seize_config" + ], + "properties": { + "update_seize_config": { + "type": "object", + "properties": { + "receiver": { + "description": "The address that will receive the seized tokens", + "type": [ + "string", + "null" + ] + }, + "seizable_assets": { + "description": "The assets that can be seized. Resets the list to this one every time it is executed", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/AssetInfo" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { @@ -760,6 +817,20 @@ } }, "additionalProperties": false + }, + { + "description": "Returns the seize config", + "type": "object", + "required": [ + "query_seize_config" + ], + "properties": { + "query_seize_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { @@ -1251,6 +1322,88 @@ "type": "string" } } + }, + "query_seize_config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SeizeConfig", + "type": "object", + "required": [ + "receiver", + "seizable_assets" + ], + "properties": { + "receiver": { + "description": "The address of the contract that will receive the seized tokens", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "seizable_assets": { + "description": "The assets that can be seized", + "type": "array", + "items": { + "$ref": "#/definitions/AssetInfo" + } + } + }, + "additionalProperties": false, + "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" + }, + "AssetInfo": { + "description": "This enum describes available Token types. ## Examples ``` # use cosmwasm_std::Addr; # use astroport::asset::AssetInfo::{NativeToken, Token}; Token { contract_addr: Addr::unchecked(\"stake...\") }; NativeToken { denom: String::from(\"uluna\") }; ```", + "oneOf": [ + { + "description": "Non-native Token", + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Native token", + "type": "object", + "required": [ + "native_token" + ], + "properties": { + "native_token": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } } } } diff --git a/schemas/astroport-maker/raw/execute.json b/schemas/astroport-maker/raw/execute.json index 028d6fab9..d14e4cfb6 100644 --- a/schemas/astroport-maker/raw/execute.json +++ b/schemas/astroport-maker/raw/execute.json @@ -315,6 +315,63 @@ } }, "additionalProperties": false + }, + { + "description": "Permissionless endpoint that sends certain assets to predefined seizing address", + "type": "object", + "required": [ + "seize" + ], + "properties": { + "seize": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The assets to seize", + "type": "array", + "items": { + "$ref": "#/definitions/AssetWithLimit" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Sets parameters for seizing assets. Permissioned to a contract owner. If governance wants to stop seizing assets, it can set an empty list of seizable assets.", + "type": "object", + "required": [ + "update_seize_config" + ], + "properties": { + "update_seize_config": { + "type": "object", + "properties": { + "receiver": { + "description": "The address that will receive the seized tokens", + "type": [ + "string", + "null" + ] + }, + "seizable_assets": { + "description": "The assets that can be seized. Resets the list to this one every time it is executed", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/AssetInfo" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { diff --git a/schemas/astroport-maker/raw/query.json b/schemas/astroport-maker/raw/query.json index 74f087eae..c1602afb3 100644 --- a/schemas/astroport-maker/raw/query.json +++ b/schemas/astroport-maker/raw/query.json @@ -54,6 +54,20 @@ } }, "additionalProperties": false + }, + { + "description": "Returns the seize config", + "type": "object", + "required": [ + "query_seize_config" + ], + "properties": { + "query_seize_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false } ], "definitions": { diff --git a/schemas/astroport-maker/raw/response_to_query_seize_config.json b/schemas/astroport-maker/raw/response_to_query_seize_config.json new file mode 100644 index 000000000..874f52574 --- /dev/null +++ b/schemas/astroport-maker/raw/response_to_query_seize_config.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SeizeConfig", + "type": "object", + "required": [ + "receiver", + "seizable_assets" + ], + "properties": { + "receiver": { + "description": "The address of the contract that will receive the seized tokens", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "seizable_assets": { + "description": "The assets that can be seized", + "type": "array", + "items": { + "$ref": "#/definitions/AssetInfo" + } + } + }, + "additionalProperties": false, + "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" + }, + "AssetInfo": { + "description": "This enum describes available Token types. ## Examples ``` # use cosmwasm_std::Addr; # use astroport::asset::AssetInfo::{NativeToken, Token}; Token { contract_addr: Addr::unchecked(\"stake...\") }; NativeToken { denom: String::from(\"uluna\") }; ```", + "oneOf": [ + { + "description": "Non-native Token", + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Native token", + "type": "object", + "required": [ + "native_token" + ], + "properties": { + "native_token": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +}