Skip to content

Commit

Permalink
update schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
epanchee committed Feb 18, 2025
1 parent 5d49fd9 commit f7fd958
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 0 deletions.
153 changes: 153 additions & 0 deletions schemas/astroport-maker/astroport-maker.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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
}
]
}
}
}
}
}
57 changes: 57 additions & 0 deletions schemas/astroport-maker/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
14 changes: 14 additions & 0 deletions schemas/astroport-maker/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
82 changes: 82 additions & 0 deletions schemas/astroport-maker/raw/response_to_query_seize_config.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
}
}

0 comments on commit f7fd958

Please sign in to comment.