From 82d69217db973f7ec90f06a0dd82bf8c558a6aea Mon Sep 17 00:00:00 2001 From: Buckram Date: Thu, 3 Oct 2024 11:46:35 +0300 Subject: [PATCH] revert schema changes --- .../0.23.0/abstract-account-factory.json | 697 ++++ schema/ans-host/0.23.0/abstract-ans-host.json | 79 +- schema/calendar/0.3.0/execute_msg.json | 1401 +++++++ schema/calendar/0.3.0/instantiate_msg.json | 151 + schema/calendar/0.3.0/migrate_msg.json | 38 + schema/calendar/0.3.0/module-schema.json | 457 +++ schema/calendar/0.3.0/query_msg.json | 139 + schema/challenge/0.4.0/execute_msg.json | 1734 +++++++++ schema/challenge/0.4.0/instantiate_msg.json | 150 + schema/challenge/0.4.0/migrate_msg.json | 38 + schema/challenge/0.4.0/module-schema.json | 1992 ++++++++++ schema/challenge/0.4.0/query_msg.json | 323 ++ schema/croncat/0.4.0/execute_msg.json | 2603 +++++++++++++ schema/croncat/0.4.0/instantiate_msg.json | 77 + schema/croncat/0.4.0/migrate_msg.json | 38 + schema/croncat/0.4.0/module-schema.json | 3454 +++++++++++++++++ schema/croncat/0.4.0/query_msg.json | 292 ++ schema/cw-staking/0.23.0/execute_msg.json | 1460 +++++++ schema/cw-staking/0.23.0/instantiate_msg.json | 53 + schema/cw-staking/0.23.0/module-schema.json | 790 ++++ schema/cw-staking/0.23.0/query_msg.json | 277 ++ schema/dca/0.4.0/execute_msg.json | 1502 +++++++ schema/dca/0.4.0/instantiate_msg.json | 129 + schema/dca/0.4.0/migrate_msg.json | 38 + schema/dca/0.4.0/module-schema.json | 688 ++++ schema/dca/0.4.0/query_msg.json | 145 + schema/dex/0.23.0/adapter_response.json | 89 + schema/dex/0.23.0/execute_msg.json | 1679 ++++++++ schema/dex/0.23.0/instantiate_msg.json | 78 + schema/dex/0.23.0/module-schema.json | 2201 +++++++++++ schema/dex/0.23.0/query_msg.json | 680 ++++ .../0.23.0/abstract-ibc-client.json | 2818 +++----------- schema/ibc-host/0.23.0/abstract-ibc-host.json | 3388 +++------------- .../0.23.0/abstract-ica-client.json | 2818 +++----------- schema/manager/0.23.0/abstract-manager.json | 1685 ++++++++ .../0.23.0/abstract-module-factory.json | 88 +- schema/money-market/0.23.0/execute_msg.json | 1866 +++++++++ .../money-market/0.23.0/instantiate_msg.json | 78 + schema/money-market/0.23.0/module-schema.json | 3113 +++++++++++++++ schema/money-market/0.23.0/query_msg.json | 1306 +++++++ schema/payment/0.4.0/execute_msg.json | 1288 ++++++ schema/payment/0.4.0/instantiate_msg.json | 106 + schema/payment/0.4.0/migrate_msg.json | 38 + schema/payment/0.4.0/module-schema.json | 411 ++ schema/payment/0.4.0/query_msg.json | 208 + schema/proxy/0.23.0/abstract-proxy.json | 3268 ++++++++++++++++ schema/subscription/0.23.0/execute_msg.json | 375 ++ .../subscription/0.23.0/instantiate_msg.json | 218 ++ schema/subscription/0.23.0/migrate_msg.json | 39 + schema/subscription/0.23.0/module-schema.json | 992 +++++ schema/subscription/0.23.0/query_msg.json | 211 + .../0.23.0/execute_msg.json | 1423 +++++++ .../0.23.0/instantiate_msg.json | 53 + .../0.23.0/module-schema.json | 204 + .../tendermint-staking/0.23.0/query_msg.json | 94 + .../0.23.0/abstract-version-control.json | 240 +- 56 files changed, 42294 insertions(+), 7506 deletions(-) create mode 100644 schema/account-factory/0.23.0/abstract-account-factory.json create mode 100644 schema/calendar/0.3.0/execute_msg.json create mode 100644 schema/calendar/0.3.0/instantiate_msg.json create mode 100644 schema/calendar/0.3.0/migrate_msg.json create mode 100644 schema/calendar/0.3.0/module-schema.json create mode 100644 schema/calendar/0.3.0/query_msg.json create mode 100644 schema/challenge/0.4.0/execute_msg.json create mode 100644 schema/challenge/0.4.0/instantiate_msg.json create mode 100644 schema/challenge/0.4.0/migrate_msg.json create mode 100644 schema/challenge/0.4.0/module-schema.json create mode 100644 schema/challenge/0.4.0/query_msg.json create mode 100644 schema/croncat/0.4.0/execute_msg.json create mode 100644 schema/croncat/0.4.0/instantiate_msg.json create mode 100644 schema/croncat/0.4.0/migrate_msg.json create mode 100644 schema/croncat/0.4.0/module-schema.json create mode 100644 schema/croncat/0.4.0/query_msg.json create mode 100644 schema/cw-staking/0.23.0/execute_msg.json create mode 100644 schema/cw-staking/0.23.0/instantiate_msg.json create mode 100644 schema/cw-staking/0.23.0/module-schema.json create mode 100644 schema/cw-staking/0.23.0/query_msg.json create mode 100644 schema/dca/0.4.0/execute_msg.json create mode 100644 schema/dca/0.4.0/instantiate_msg.json create mode 100644 schema/dca/0.4.0/migrate_msg.json create mode 100644 schema/dca/0.4.0/module-schema.json create mode 100644 schema/dca/0.4.0/query_msg.json create mode 100644 schema/dex/0.23.0/adapter_response.json create mode 100644 schema/dex/0.23.0/execute_msg.json create mode 100644 schema/dex/0.23.0/instantiate_msg.json create mode 100644 schema/dex/0.23.0/module-schema.json create mode 100644 schema/dex/0.23.0/query_msg.json create mode 100644 schema/manager/0.23.0/abstract-manager.json create mode 100644 schema/money-market/0.23.0/execute_msg.json create mode 100644 schema/money-market/0.23.0/instantiate_msg.json create mode 100644 schema/money-market/0.23.0/module-schema.json create mode 100644 schema/money-market/0.23.0/query_msg.json create mode 100644 schema/payment/0.4.0/execute_msg.json create mode 100644 schema/payment/0.4.0/instantiate_msg.json create mode 100644 schema/payment/0.4.0/migrate_msg.json create mode 100644 schema/payment/0.4.0/module-schema.json create mode 100644 schema/payment/0.4.0/query_msg.json create mode 100644 schema/proxy/0.23.0/abstract-proxy.json create mode 100644 schema/subscription/0.23.0/execute_msg.json create mode 100644 schema/subscription/0.23.0/instantiate_msg.json create mode 100644 schema/subscription/0.23.0/migrate_msg.json create mode 100644 schema/subscription/0.23.0/module-schema.json create mode 100644 schema/subscription/0.23.0/query_msg.json create mode 100644 schema/tendermint-staking/0.23.0/execute_msg.json create mode 100644 schema/tendermint-staking/0.23.0/instantiate_msg.json create mode 100644 schema/tendermint-staking/0.23.0/module-schema.json create mode 100644 schema/tendermint-staking/0.23.0/query_msg.json diff --git a/schema/account-factory/0.23.0/abstract-account-factory.json b/schema/account-factory/0.23.0/abstract-account-factory.json new file mode 100644 index 0000000000..24be082d66 --- /dev/null +++ b/schema/account-factory/0.23.0/abstract-account-factory.json @@ -0,0 +1,697 @@ +{ + "contract_name": "abstract-account-factory", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Msg used on instantiation", + "type": "object", + "required": [ + "admin", + "ans_host_address", + "module_factory_address", + "version_control_address" + ], + "properties": { + "admin": { + "description": "Admin of the contract", + "type": "string" + }, + "ans_host_address": { + "description": "AnsHost contract", + "type": "string" + }, + "module_factory_address": { + "description": "AnsHosts of module factory. Used for instantiating manager.", + "type": "string" + }, + "version_control_address": { + "description": "Version control contract used to get code-ids and register Account", + "type": "string" + } + }, + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Account Factory execute messages", + "oneOf": [ + { + "description": "Update config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_contract": { + "type": [ + "string", + "null" + ] + }, + "module_factory_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_contract": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Creates the core contracts and sets the permissions. [`crate::manager`] and [`crate::proxy`]", + "type": "object", + "required": [ + "create_account" + ], + "properties": { + "create_account": { + "type": "object", + "required": [ + "governance", + "install_modules", + "name" + ], + "properties": { + "account_id": { + "description": "Indicates the AccountId for the new account.\n\nIf `None`, will create a new local account without asserting account-id.\n\nWhen [`AccountTrace::Local`] when sequence in 0..2147483648 range: The tx will error \\ When [`AccountTrace::Local`] when sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction. \\ When [`AccountTrace::Remote`]: Account id on the remote chain.", + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "governance": { + "$ref": "#/definitions/GovernanceDetails_for_String" + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` to be provided can be either to propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/Action" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "Action": { + "description": "Actions that can be taken to alter the contract's ownership", + "oneOf": [ + { + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", + "type": "object", + "required": [ + "transfer_ownership" + ], + "properties": { + "transfer_ownership": { + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "new_owner": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", + "type": "object", + "required": [ + "Monarchy" + ], + "properties": { + "Monarchy": { + "type": "object", + "required": [ + "monarch" + ], + "properties": { + "monarch": { + "description": "The monarch's address", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Used when the account is a sub-account of another account.", + "type": "object", + "required": [ + "SubAccount" + ], + "properties": { + "SubAccount": { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "An external governance source", + "type": "object", + "required": [ + "External" + ], + "properties": { + "External": { + "type": "object", + "required": [ + "governance_address", + "governance_type" + ], + "properties": { + "governance_address": { + "description": "The external contract address", + "type": "string" + }, + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Renounced account This account no longer has an owner and cannot be used.", + "type": "object", + "required": [ + "Renounced" + ], + "properties": { + "Renounced": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "NFT" + ], + "properties": { + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInstallConfig": { + "description": "Module info and init message", + "type": "object", + "required": [ + "module" + ], + "properties": { + "init_msg": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "module": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Account Factory query messages", + "oneOf": [ + { + "description": "Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query the contract's ownership information", + "type": "object", + "required": [ + "ownership" + ], + "properties": { + "ownership": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "Account Factory migrate messages", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "description": "Account Factory config response", + "type": "object", + "required": [ + "ans_host_contract", + "local_account_sequence", + "module_factory_address", + "version_control_contract" + ], + "properties": { + "ans_host_contract": { + "$ref": "#/definitions/Addr" + }, + "local_account_sequence": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "module_factory_address": { + "$ref": "#/definitions/Addr" + }, + "version_control_contract": { + "$ref": "#/definitions/Addr" + } + }, + "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" + } + } + }, + "ownership": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Ownership_for_String", + "description": "The contract's ownership info", + "type": "object", + "properties": { + "owner": { + "description": "The contract's current owner. `None` if the ownership has been renounced.", + "type": [ + "string", + "null" + ] + }, + "pending_expiry": { + "description": "The deadline for the pending owner to accept the ownership. `None` if there isn't a pending ownership transfer, or if a transfer exists and it doesn't have a deadline.", + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "pending_owner": { + "description": "The account who has been proposed to take over the ownership. `None` if there isn't a pending ownership transfer.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false, + "definitions": { + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + } + } +} diff --git a/schema/ans-host/0.23.0/abstract-ans-host.json b/schema/ans-host/0.23.0/abstract-ans-host.json index 0f682d4d18..469f01820c 100644 --- a/schema/ans-host/0.23.0/abstract-ans-host.json +++ b/schema/ans-host/0.23.0/abstract-ans-host.json @@ -443,8 +443,7 @@ "pool_type": { "$ref": "#/definitions/PoolType" } - }, - "additionalProperties": false + } }, "PoolType": { "type": "string", @@ -482,8 +481,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "UncheckedContractEntry": { "description": "Key to get the Address of a contract", @@ -499,8 +497,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "UniquePoolId": { "type": "integer", @@ -1055,8 +1052,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "ChannelFilter": { "description": "UNUSED - stub for future use", @@ -1077,8 +1073,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "ContractFilter": { "description": "UNUSED - stub for future use", @@ -1144,50 +1139,8 @@ "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "InstantiateMsg": { - "description": "AnsHost Instantiate msg", - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "string" - } - }, - "additionalProperties": false - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { @@ -1502,8 +1455,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "TruncatedChainId": { "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", @@ -1552,8 +1504,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } }, "TruncatedChainId": { "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", @@ -1628,8 +1579,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } } } }, @@ -1679,8 +1629,7 @@ "protocol": { "type": "string" } - }, - "additionalProperties": false + } } } }, @@ -1963,8 +1912,7 @@ "pool_type": { "$ref": "#/definitions/PoolType" } - }, - "additionalProperties": false + } }, "PoolType": { "type": "string", @@ -2034,8 +1982,7 @@ "pool_type": { "$ref": "#/definitions/PoolType" } - }, - "additionalProperties": false + } }, "PoolType": { "type": "string", diff --git a/schema/calendar/0.3.0/execute_msg.json b/schema/calendar/0.3.0/execute_msg.json new file mode 100644 index 0000000000..4988c33ae3 --- /dev/null +++ b/schema/calendar/0.3.0/execute_msg.json @@ -0,0 +1,1401 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/CalendarExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "CalendarExecuteMsg": { + "description": "App execute messages", + "oneOf": [ + { + "description": "Request a new meeting.", + "type": "object", + "required": [ + "request_meeting" + ], + "properties": { + "request_meeting": { + "type": "object", + "required": [ + "end_time", + "start_time" + ], + "properties": { + "end_time": { + "description": "The unix timestamp of the end datetime of the meeting.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "start_time": { + "description": "The unix timestamp of the start datetime of the meeting.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fully slashes the stake for a completed meeting. Admin only.", + "type": "object", + "required": [ + "slash_full_stake" + ], + "properties": { + "slash_full_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting to be slashed.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Partially slashes the stake for a completed meeting based on how many minutes the requester was late by. Admin only.", + "type": "object", + "required": [ + "slash_partial_stake" + ], + "properties": { + "slash_partial_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index", + "minutes_late" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting to be slashed.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "minutes_late": { + "description": "The number of minutes the requester was late by resulting in a prorated slash.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the full stake for a completed meeting. Admin only.", + "type": "object", + "required": [ + "return_stake" + ], + "properties": { + "return_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting whose stake should be returned.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update the config. Admin only.", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "denom": { + "description": "The updated denom.", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "price_per_minute": { + "description": "The updated price per minute.", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "Int64": { + "description": "An implementation of i64 that is using strings for JSON encoding/decoding, such that the full i64 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 `i64` to get the value out:\n\n``` # use cosmwasm_std::Int64; let a = Int64::from(258i64); assert_eq!(a.i64(), 258); ```", + "type": "string" + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/calendar/0.3.0/instantiate_msg.json b/schema/calendar/0.3.0/instantiate_msg.json new file mode 100644 index 0000000000..1778fdf68d --- /dev/null +++ b/schema/calendar/0.3.0/instantiate_msg.json @@ -0,0 +1,151 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/CalendarInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CalendarInstantiateMsg": { + "type": "object", + "required": [ + "denom", + "end_time", + "price_per_minute", + "start_time", + "utc_offset" + ], + "properties": { + "denom": { + "description": "The denom of the staked asset.", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "end_time": { + "description": "The end time for each day that meetings can be scheduled.", + "allOf": [ + { + "$ref": "#/definitions/Time" + } + ] + }, + "price_per_minute": { + "description": "The price per minute charged to determine the amount of stake necessary to request a meeting for a given length.", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "start_time": { + "description": "The start time for each day that meetings can be scheduled.", + "allOf": [ + { + "$ref": "#/definitions/Time" + } + ] + }, + "utc_offset": { + "description": "The utc offset of the timezone.", + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "Time": { + "description": "App instantiate message", + "type": "object", + "required": [ + "hour", + "minute" + ], + "properties": { + "hour": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "minute": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "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" + } + } +} diff --git a/schema/calendar/0.3.0/migrate_msg.json b/schema/calendar/0.3.0/migrate_msg.json new file mode 100644 index 0000000000..1967208344 --- /dev/null +++ b/schema/calendar/0.3.0/migrate_msg.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/CalendarMigrateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "CalendarMigrateMsg": { + "type": "object", + "additionalProperties": false + } + } +} diff --git a/schema/calendar/0.3.0/module-schema.json b/schema/calendar/0.3.0/module-schema.json new file mode 100644 index 0000000000..c08c28c3b8 --- /dev/null +++ b/schema/calendar/0.3.0/module-schema.json @@ -0,0 +1,457 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.3.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "denom", + "end_time", + "price_per_minute", + "start_time", + "utc_offset" + ], + "properties": { + "denom": { + "description": "The denom of the staked asset.", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "end_time": { + "description": "The end time for each day that meetings can be scheduled.", + "allOf": [ + { + "$ref": "#/definitions/Time" + } + ] + }, + "price_per_minute": { + "description": "The price per minute charged to determine the amount of stake necessary to request a meeting for a given length.", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "start_time": { + "description": "The start time for each day that meetings can be scheduled.", + "allOf": [ + { + "$ref": "#/definitions/Time" + } + ] + }, + "utc_offset": { + "description": "The utc offset of the timezone.", + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Time": { + "description": "App instantiate message", + "type": "object", + "required": [ + "hour", + "minute" + ], + "properties": { + "hour": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "minute": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "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" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "App execute messages", + "oneOf": [ + { + "description": "Request a new meeting.", + "type": "object", + "required": [ + "request_meeting" + ], + "properties": { + "request_meeting": { + "type": "object", + "required": [ + "end_time", + "start_time" + ], + "properties": { + "end_time": { + "description": "The unix timestamp of the end datetime of the meeting.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "start_time": { + "description": "The unix timestamp of the start datetime of the meeting.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fully slashes the stake for a completed meeting. Admin only.", + "type": "object", + "required": [ + "slash_full_stake" + ], + "properties": { + "slash_full_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting to be slashed.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Partially slashes the stake for a completed meeting based on how many minutes the requester was late by. Admin only.", + "type": "object", + "required": [ + "slash_partial_stake" + ], + "properties": { + "slash_partial_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index", + "minutes_late" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting to be slashed.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "minutes_late": { + "description": "The number of minutes the requester was late by resulting in a prorated slash.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the full stake for a completed meeting. Admin only.", + "type": "object", + "required": [ + "return_stake" + ], + "properties": { + "return_stake": { + "type": "object", + "required": [ + "day_datetime", + "meeting_index" + ], + "properties": { + "day_datetime": { + "description": "The unix timestamp denoting the start of the day the meeting is on. This is equivalent to the \"time\" portion being all zero with respect to the `config.utc_offset`.", + "allOf": [ + { + "$ref": "#/definitions/Int64" + } + ] + }, + "meeting_index": { + "description": "The index of the meeting whose stake should be returned.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update the config. Admin only.", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "denom": { + "description": "The updated denom.", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "price_per_minute": { + "description": "The updated price per minute.", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Int64": { + "description": "An implementation of i64 that is using strings for JSON encoding/decoding, such that the full i64 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 `i64` to get the value out:\n\n``` # use cosmwasm_std::Int64; let a = Int64::from(258i64); assert_eq!(a.i64(), 258); ```", + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "App query messages", + "oneOf": [ + { + "description": "Returns the config. Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the meetings for a given day. Returns [`MeetingsResponse`]", + "type": "object", + "required": [ + "meetings" + ], + "properties": { + "meetings": { + "type": "object", + "required": [ + "day_datetime" + ], + "properties": { + "day_datetime": { + "$ref": "#/definitions/Int64" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Int64": { + "description": "An implementation of i64 that is using strings for JSON encoding/decoding, such that the full i64 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 `i64` to get the value out:\n\n``` # use cosmwasm_std::Int64; let a = Int64::from(258i64); assert_eq!(a.i64(), 258); ```", + "type": "string" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "type": "object", + "required": [ + "end_time", + "price_per_minute", + "start_time", + "utc_offset" + ], + "properties": { + "end_time": { + "$ref": "#/definitions/Time" + }, + "price_per_minute": { + "$ref": "#/definitions/Uint128" + }, + "start_time": { + "$ref": "#/definitions/Time" + }, + "utc_offset": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false, + "definitions": { + "Time": { + "description": "App instantiate message", + "type": "object", + "required": [ + "hour", + "minute" + ], + "properties": { + "hour": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "minute": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "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" + } + } + }, + "meetings": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MeetingsResponse", + "type": "object", + "required": [ + "meetings" + ], + "properties": { + "meetings": { + "type": "array", + "items": { + "$ref": "#/definitions/Meeting" + } + } + }, + "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" + }, + "Meeting": { + "type": "object", + "required": [ + "amount_staked", + "end_time", + "requester", + "start_time" + ], + "properties": { + "amount_staked": { + "$ref": "#/definitions/Uint128" + }, + "end_time": { + "type": "integer", + "format": "int64" + }, + "requester": { + "$ref": "#/definitions/Addr" + }, + "start_time": { + "type": "integer", + "format": "int64" + } + }, + "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" + } + } + } + } +} diff --git a/schema/calendar/0.3.0/query_msg.json b/schema/calendar/0.3.0/query_msg.json new file mode 100644 index 0000000000..a6cd8ac3f1 --- /dev/null +++ b/schema/calendar/0.3.0/query_msg.json @@ -0,0 +1,139 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/CalendarQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "CalendarQueryMsg": { + "description": "App query messages", + "oneOf": [ + { + "description": "Returns the config. Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the meetings for a given day. Returns [`MeetingsResponse`]", + "type": "object", + "required": [ + "meetings" + ], + "properties": { + "meetings": { + "type": "object", + "required": [ + "day_datetime" + ], + "properties": { + "day_datetime": { + "$ref": "#/definitions/Int64" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Int64": { + "description": "An implementation of i64 that is using strings for JSON encoding/decoding, such that the full i64 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 `i64` to get the value out:\n\n``` # use cosmwasm_std::Int64; let a = Int64::from(258i64); assert_eq!(a.i64(), 258); ```", + "type": "string" + } + } +} diff --git a/schema/challenge/0.4.0/execute_msg.json b/schema/challenge/0.4.0/execute_msg.json new file mode 100644 index 0000000000..216857ee17 --- /dev/null +++ b/schema/challenge/0.4.0/execute_msg.json @@ -0,0 +1,1734 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/ChallengeExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "ChallengeEntryUpdate": { + "description": "Only this struct and these fields are allowed to be updated. The status cannot be externally updated, it is updated by the contract.", + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "ChallengeExecuteMsg": { + "description": "Challenge execute messages", + "oneOf": [ + { + "description": "Update challenge config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "required": [ + "new_vote_config" + ], + "properties": { + "new_vote_config": { + "description": "New config for vote", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Create new challenge", + "type": "object", + "required": [ + "create_challenge" + ], + "properties": { + "create_challenge": { + "type": "object", + "required": [ + "challenge_req" + ], + "properties": { + "challenge_req": { + "description": "New challenge arguments", + "allOf": [ + { + "$ref": "#/definitions/ChallengeRequest" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update existing challenge", + "type": "object", + "required": [ + "update_challenge" + ], + "properties": { + "update_challenge": { + "type": "object", + "required": [ + "challenge", + "challenge_id" + ], + "properties": { + "challenge": { + "description": "Updates to this challenge", + "allOf": [ + { + "$ref": "#/definitions/ChallengeEntryUpdate" + } + ] + }, + "challenge_id": { + "description": "Id of the challenge to update", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Cancel challenge", + "type": "object", + "required": [ + "cancel_challenge" + ], + "properties": { + "cancel_challenge": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id to cancel", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update list of friends for challenge", + "type": "object", + "required": [ + "update_friends_for_challenge" + ], + "properties": { + "update_friends_for_challenge": { + "type": "object", + "required": [ + "challenge_id", + "friends", + "op_kind" + ], + "properties": { + "challenge_id": { + "description": "Id of the challenge to update", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "friends": { + "description": "List of added or removed Friends", + "type": "array", + "items": { + "$ref": "#/definitions/Friend_for_String" + } + }, + "op_kind": { + "description": "Kind of operation: add or remove friends", + "allOf": [ + { + "$ref": "#/definitions/UpdateFriendsOpKind" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Cast vote as a friend", + "type": "object", + "required": [ + "cast_vote" + ], + "properties": { + "cast_vote": { + "type": "object", + "required": [ + "challenge_id", + "vote_to_punish" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id to cast vote on", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "vote_to_punish": { + "description": "Wether voter thinks admin deserves punishment", + "allOf": [ + { + "$ref": "#/definitions/Vote" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Count votes for challenge id", + "type": "object", + "required": [ + "count_votes" + ], + "properties": { + "count_votes": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id for counting votes", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Veto the last vote", + "type": "object", + "required": [ + "veto" + ], + "properties": { + "veto": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge id to do the veto", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "ChallengeRequest": { + "description": "Arguments for new challenge", + "type": "object", + "required": [ + "challenge_duration_seconds", + "init_friends", + "name", + "proposal_duration_seconds", + "strike_asset", + "strike_strategy" + ], + "properties": { + "challenge_duration_seconds": { + "description": "In what duration challenge should end", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "description": { + "description": "Description of the challenge", + "type": [ + "string", + "null" + ] + }, + "init_friends": { + "description": "Initial list of friends", + "type": "array", + "items": { + "$ref": "#/definitions/Friend_for_String" + } + }, + "name": { + "description": "Name of challenge", + "type": "string" + }, + "proposal_duration_seconds": { + "description": "Duration set for each proposal Proposals starts after one vote initiated by any of the friends", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "strike_asset": { + "description": "Asset for punishment for failing a challenge", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "strike_strategy": { + "description": "How strike will get distributed between friends", + "allOf": [ + { + "$ref": "#/definitions/StrikeStrategy" + } + ] + }, + "strikes_limit": { + "description": "Strike limit, defaults to 1", + "type": [ + "integer", + "null" + ], + "format": "uint8", + "minimum": 0.0 + } + }, + "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" + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "FriendByAddr_for_String": { + "description": "Friend by address", + "type": "object", + "required": [ + "address", + "name" + ], + "properties": { + "address": { + "description": "Address of the friend", + "type": "string" + }, + "name": { + "description": "Name of the friend", + "type": "string" + } + }, + "additionalProperties": false + }, + "Friend_for_String": { + "description": "Friend object", + "oneOf": [ + { + "description": "Friend with address and a name", + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "$ref": "#/definitions/FriendByAddr_for_String" + } + }, + "additionalProperties": false + }, + { + "description": "Abstract Account Id of the friend", + "type": "object", + "required": [ + "abstract_account" + ], + "properties": { + "abstract_account": { + "$ref": "#/definitions/AccountId" + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "StrikeStrategy": { + "description": "Strategy for striking the admin", + "oneOf": [ + { + "description": "Split amount between friends", + "type": "object", + "required": [ + "split" + ], + "properties": { + "split": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + }, + { + "description": "Amount for every friend", + "type": "object", + "required": [ + "per_friend" + ], + "properties": { + "per_friend": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateFriendsOpKind": { + "oneOf": [ + { + "type": "object", + "required": [ + "add" + ], + "properties": { + "add": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "remove" + ], + "properties": { + "remove": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Vote": { + "description": "Vote struct", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "memo": { + "description": "memo for the vote", + "type": [ + "string", + "null" + ] + }, + "vote": { + "description": "true: Vote for false: Vote against", + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/challenge/0.4.0/instantiate_msg.json b/schema/challenge/0.4.0/instantiate_msg.json new file mode 100644 index 0000000000..4f49a509db --- /dev/null +++ b/schema/challenge/0.4.0/instantiate_msg.json @@ -0,0 +1,150 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/ChallengeInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ChallengeInstantiateMsg": { + "description": "Challenge instantiate message", + "type": "object", + "required": [ + "vote_config" + ], + "properties": { + "vote_config": { + "description": "Config for [`SimpleVoting`](abstract_std::objects::voting::SimpleVoting) object", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + } + }, + "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" + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/challenge/0.4.0/migrate_msg.json b/schema/challenge/0.4.0/migrate_msg.json new file mode 100644 index 0000000000..1ba84208d1 --- /dev/null +++ b/schema/challenge/0.4.0/migrate_msg.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/Empty" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/schema/challenge/0.4.0/module-schema.json b/schema/challenge/0.4.0/module-schema.json new file mode 100644 index 0000000000..c8cd6613b7 --- /dev/null +++ b/schema/challenge/0.4.0/module-schema.json @@ -0,0 +1,1992 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.4.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Challenge instantiate message", + "type": "object", + "required": [ + "vote_config" + ], + "properties": { + "vote_config": { + "description": "Config for [`SimpleVoting`](abstract_std::objects::voting::SimpleVoting) object", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Challenge execute messages", + "oneOf": [ + { + "description": "Update challenge config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "required": [ + "new_vote_config" + ], + "properties": { + "new_vote_config": { + "description": "New config for vote", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Create new challenge", + "type": "object", + "required": [ + "create_challenge" + ], + "properties": { + "create_challenge": { + "type": "object", + "required": [ + "challenge_req" + ], + "properties": { + "challenge_req": { + "description": "New challenge arguments", + "allOf": [ + { + "$ref": "#/definitions/ChallengeRequest" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update existing challenge", + "type": "object", + "required": [ + "update_challenge" + ], + "properties": { + "update_challenge": { + "type": "object", + "required": [ + "challenge", + "challenge_id" + ], + "properties": { + "challenge": { + "description": "Updates to this challenge", + "allOf": [ + { + "$ref": "#/definitions/ChallengeEntryUpdate" + } + ] + }, + "challenge_id": { + "description": "Id of the challenge to update", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Cancel challenge", + "type": "object", + "required": [ + "cancel_challenge" + ], + "properties": { + "cancel_challenge": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id to cancel", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update list of friends for challenge", + "type": "object", + "required": [ + "update_friends_for_challenge" + ], + "properties": { + "update_friends_for_challenge": { + "type": "object", + "required": [ + "challenge_id", + "friends", + "op_kind" + ], + "properties": { + "challenge_id": { + "description": "Id of the challenge to update", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "friends": { + "description": "List of added or removed Friends", + "type": "array", + "items": { + "$ref": "#/definitions/Friend_for_String" + } + }, + "op_kind": { + "description": "Kind of operation: add or remove friends", + "allOf": [ + { + "$ref": "#/definitions/UpdateFriendsOpKind" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Cast vote as a friend", + "type": "object", + "required": [ + "cast_vote" + ], + "properties": { + "cast_vote": { + "type": "object", + "required": [ + "challenge_id", + "vote_to_punish" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id to cast vote on", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vote_to_punish": { + "description": "Wether voter thinks admin deserves punishment", + "allOf": [ + { + "$ref": "#/definitions/Vote" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Count votes for challenge id", + "type": "object", + "required": [ + "count_votes" + ], + "properties": { + "count_votes": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id for counting votes", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Veto the last vote", + "type": "object", + "required": [ + "veto" + ], + "properties": { + "veto": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge id to do the veto", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "ChallengeEntryUpdate": { + "description": "Only this struct and these fields are allowed to be updated. The status cannot be externally updated, it is updated by the contract.", + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "ChallengeRequest": { + "description": "Arguments for new challenge", + "type": "object", + "required": [ + "challenge_duration_seconds", + "init_friends", + "name", + "proposal_duration_seconds", + "strike_asset", + "strike_strategy" + ], + "properties": { + "challenge_duration_seconds": { + "description": "In what duration challenge should end", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "description": { + "description": "Description of the challenge", + "type": [ + "string", + "null" + ] + }, + "init_friends": { + "description": "Initial list of friends", + "type": "array", + "items": { + "$ref": "#/definitions/Friend_for_String" + } + }, + "name": { + "description": "Name of challenge", + "type": "string" + }, + "proposal_duration_seconds": { + "description": "Duration set for each proposal Proposals starts after one vote initiated by any of the friends", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "strike_asset": { + "description": "Asset for punishment for failing a challenge", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "strike_strategy": { + "description": "How strike will get distributed between friends", + "allOf": [ + { + "$ref": "#/definitions/StrikeStrategy" + } + ] + }, + "strikes_limit": { + "description": "Strike limit, defaults to 1", + "type": [ + "integer", + "null" + ], + "format": "uint8", + "minimum": 0 + } + }, + "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" + }, + "FriendByAddr_for_String": { + "description": "Friend by address", + "type": "object", + "required": [ + "address", + "name" + ], + "properties": { + "address": { + "description": "Address of the friend", + "type": "string" + }, + "name": { + "description": "Name of the friend", + "type": "string" + } + }, + "additionalProperties": false + }, + "Friend_for_String": { + "description": "Friend object", + "oneOf": [ + { + "description": "Friend with address and a name", + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "$ref": "#/definitions/FriendByAddr_for_String" + } + }, + "additionalProperties": false + }, + { + "description": "Abstract Account Id of the friend", + "type": "object", + "required": [ + "abstract_account" + ], + "properties": { + "abstract_account": { + "$ref": "#/definitions/AccountId" + } + }, + "additionalProperties": false + } + ] + }, + "StrikeStrategy": { + "description": "Strategy for striking the admin", + "oneOf": [ + { + "description": "Split amount between friends", + "type": "object", + "required": [ + "split" + ], + "properties": { + "split": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + }, + { + "description": "Amount for every friend", + "type": "object", + "required": [ + "per_friend" + ], + "properties": { + "per_friend": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + ] + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateFriendsOpKind": { + "oneOf": [ + { + "type": "object", + "required": [ + "add" + ], + "properties": { + "add": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "remove" + ], + "properties": { + "remove": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Vote": { + "description": "Vote struct", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "memo": { + "description": "memo for the vote", + "type": [ + "string", + "null" + ] + }, + "vote": { + "description": "true: Vote for false: Vote against", + "type": "boolean" + } + }, + "additionalProperties": false + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Challenge query messages", + "oneOf": [ + { + "description": "Get challenge info, will return null if there was no challenge by Id Returns [`ChallengeResponse`]", + "type": "object", + "required": [ + "challenge" + ], + "properties": { + "challenge": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get list of challenges Returns [`ChallengesResponse`]", + "type": "object", + "required": [ + "challenges" + ], + "properties": { + "challenges": { + "type": "object", + "properties": { + "limit": { + "description": "Max amount of challenges in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "start_after": { + "description": "start after challenge Id", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "List of friends by Id Returns [`FriendsResponse`]", + "type": "object", + "required": [ + "friends" + ], + "properties": { + "friends": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get vote of friend Returns [`VoteResponse`]", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "challenge_id", + "voter_addr" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "proposal_id": { + "description": "Proposal id of previous proposal Providing None requests last proposal results", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "voter_addr": { + "description": "Addr of the friend", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get votes of challenge Returns [`VotesResponse`]", + "type": "object", + "required": [ + "votes" + ], + "properties": { + "votes": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "limit": { + "description": "Max amount of challenges in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "proposal_id": { + "description": "Proposal id of previous proposal Providing None requests last proposal results", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "start_after": { + "description": "start after Addr", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get results of previous votes for this challenge Returns [`ProposalsResponse`]", + "type": "object", + "required": [ + "proposals" + ], + "properties": { + "proposals": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id for previous votes", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "limit": { + "description": "Max amount of proposals in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "start_after": { + "description": "start after ProposalId", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "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" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "challenge": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ChallengeResponse", + "description": "Response for challenge query", + "type": "object", + "properties": { + "challenge": { + "description": "Challenge info, will return null if there was no challenge by Id", + "anyOf": [ + { + "$ref": "#/definitions/ChallengeEntryResponse" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AdminStrikes": { + "type": "object", + "required": [ + "limit", + "num_strikes" + ], + "properties": { + "limit": { + "description": "When num_strikes reached the limit, the challenge will be cancelled.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "num_strikes": { + "description": "The number of strikes the admin has incurred.", + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "ChallengeEntryResponse": { + "description": "Response struct for challenge entry", + "type": "object", + "required": [ + "admin_strikes", + "challenge_id", + "description", + "end_timestamp", + "name", + "proposal_duration_seconds", + "strike_asset", + "strike_strategy" + ], + "properties": { + "active_proposal": { + "description": "Current active proposal", + "anyOf": [ + { + "$ref": "#/definitions/ProposalInfo" + }, + { + "type": "null" + } + ] + }, + "admin_strikes": { + "description": "State of strikes of admin for this challenge", + "allOf": [ + { + "$ref": "#/definitions/AdminStrikes" + } + ] + }, + "challenge_id": { + "description": "Id of the challenge,", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "description": { + "description": "Description of the challenge", + "type": "string" + }, + "end_timestamp": { + "description": "When challenge ends", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "name": { + "description": "Name of challenge", + "type": "string" + }, + "proposal_duration_seconds": { + "description": "Proposal duration in seconds", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "strike_asset": { + "description": "Asset for punishment for failing a challenge", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "strike_strategy": { + "description": "How strike will get distributed between friends", + "allOf": [ + { + "$ref": "#/definitions/StrikeStrategy" + } + ] + } + }, + "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" + }, + "ProposalInfo": { + "type": "object", + "required": [ + "config", + "end_timestamp", + "status", + "total_voters", + "votes_against", + "votes_for" + ], + "properties": { + "config": { + "description": "Config it was created with For cases config got changed during voting", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + }, + "end_timestamp": { + "$ref": "#/definitions/Timestamp" + }, + "status": { + "$ref": "#/definitions/ProposalStatus" + }, + "total_voters": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_against": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_for": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "ProposalOutcome": { + "type": "string", + "enum": [ + "passed", + "failed", + "canceled", + "vetoed" + ] + }, + "ProposalStatus": { + "oneOf": [ + { + "type": "string", + "enum": [ + "active", + "waiting_for_count" + ] + }, + { + "type": "object", + "required": [ + "veto_period" + ], + "properties": { + "veto_period": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "finished" + ], + "properties": { + "finished": { + "$ref": "#/definitions/ProposalOutcome" + } + }, + "additionalProperties": false + } + ] + }, + "StrikeStrategy": { + "description": "Strategy for striking the admin", + "oneOf": [ + { + "description": "Split amount between friends", + "type": "object", + "required": [ + "split" + ], + "properties": { + "split": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + }, + { + "description": "Amount for every friend", + "type": "object", + "required": [ + "per_friend" + ], + "properties": { + "per_friend": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + ] + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "challenges": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ChallengesResponse", + "description": "Response for challenges query Returns a list of challenges", + "type": "object", + "required": [ + "challenges" + ], + "properties": { + "challenges": { + "description": "List of indexed challenges", + "type": "array", + "items": { + "$ref": "#/definitions/ChallengeEntryResponse" + } + } + }, + "additionalProperties": false, + "definitions": { + "AdminStrikes": { + "type": "object", + "required": [ + "limit", + "num_strikes" + ], + "properties": { + "limit": { + "description": "When num_strikes reached the limit, the challenge will be cancelled.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "num_strikes": { + "description": "The number of strikes the admin has incurred.", + "type": "integer", + "format": "uint8", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "ChallengeEntryResponse": { + "description": "Response struct for challenge entry", + "type": "object", + "required": [ + "admin_strikes", + "challenge_id", + "description", + "end_timestamp", + "name", + "proposal_duration_seconds", + "strike_asset", + "strike_strategy" + ], + "properties": { + "active_proposal": { + "description": "Current active proposal", + "anyOf": [ + { + "$ref": "#/definitions/ProposalInfo" + }, + { + "type": "null" + } + ] + }, + "admin_strikes": { + "description": "State of strikes of admin for this challenge", + "allOf": [ + { + "$ref": "#/definitions/AdminStrikes" + } + ] + }, + "challenge_id": { + "description": "Id of the challenge,", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "description": { + "description": "Description of the challenge", + "type": "string" + }, + "end_timestamp": { + "description": "When challenge ends", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "name": { + "description": "Name of challenge", + "type": "string" + }, + "proposal_duration_seconds": { + "description": "Proposal duration in seconds", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "strike_asset": { + "description": "Asset for punishment for failing a challenge", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "strike_strategy": { + "description": "How strike will get distributed between friends", + "allOf": [ + { + "$ref": "#/definitions/StrikeStrategy" + } + ] + } + }, + "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" + }, + "ProposalInfo": { + "type": "object", + "required": [ + "config", + "end_timestamp", + "status", + "total_voters", + "votes_against", + "votes_for" + ], + "properties": { + "config": { + "description": "Config it was created with For cases config got changed during voting", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + }, + "end_timestamp": { + "$ref": "#/definitions/Timestamp" + }, + "status": { + "$ref": "#/definitions/ProposalStatus" + }, + "total_voters": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_against": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_for": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "ProposalOutcome": { + "type": "string", + "enum": [ + "passed", + "failed", + "canceled", + "vetoed" + ] + }, + "ProposalStatus": { + "oneOf": [ + { + "type": "string", + "enum": [ + "active", + "waiting_for_count" + ] + }, + { + "type": "object", + "required": [ + "veto_period" + ], + "properties": { + "veto_period": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "finished" + ], + "properties": { + "finished": { + "$ref": "#/definitions/ProposalOutcome" + } + }, + "additionalProperties": false + } + ] + }, + "StrikeStrategy": { + "description": "Strategy for striking the admin", + "oneOf": [ + { + "description": "Split amount between friends", + "type": "object", + "required": [ + "split" + ], + "properties": { + "split": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + }, + { + "description": "Amount for every friend", + "type": "object", + "required": [ + "per_friend" + ], + "properties": { + "per_friend": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + } + ] + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "friends": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FriendsResponse", + "description": "Response for friends query Returns a list of friends", + "type": "object", + "required": [ + "friends" + ], + "properties": { + "friends": { + "description": "List of friends on challenge", + "type": "array", + "items": { + "$ref": "#/definitions/Friend_for_Addr" + } + } + }, + "additionalProperties": false, + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "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" + }, + "FriendByAddr_for_Addr": { + "description": "Friend by address", + "type": "object", + "required": [ + "address", + "name" + ], + "properties": { + "address": { + "description": "Address of the friend", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "name": { + "description": "Name of the friend", + "type": "string" + } + }, + "additionalProperties": false + }, + "Friend_for_Addr": { + "description": "Friend object", + "oneOf": [ + { + "description": "Friend with address and a name", + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "$ref": "#/definitions/FriendByAddr_for_Addr" + } + }, + "additionalProperties": false + }, + { + "description": "Abstract Account Id of the friend", + "type": "object", + "required": [ + "abstract_account" + ], + "properties": { + "abstract_account": { + "$ref": "#/definitions/AccountId" + } + }, + "additionalProperties": false + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + } + } + }, + "proposals": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ProposalsResponse", + "description": "Response for proposals query", + "type": "object", + "required": [ + "proposals" + ], + "properties": { + "proposals": { + "description": "results of proposals", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "$ref": "#/definitions/ProposalInfo" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false, + "definitions": { + "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" + }, + "ProposalInfo": { + "type": "object", + "required": [ + "config", + "end_timestamp", + "status", + "total_voters", + "votes_against", + "votes_for" + ], + "properties": { + "config": { + "description": "Config it was created with For cases config got changed during voting", + "allOf": [ + { + "$ref": "#/definitions/VoteConfig" + } + ] + }, + "end_timestamp": { + "$ref": "#/definitions/Timestamp" + }, + "status": { + "$ref": "#/definitions/ProposalStatus" + }, + "total_voters": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_against": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "votes_for": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "ProposalOutcome": { + "type": "string", + "enum": [ + "passed", + "failed", + "canceled", + "vetoed" + ] + }, + "ProposalStatus": { + "oneOf": [ + { + "type": "string", + "enum": [ + "active", + "waiting_for_count" + ] + }, + { + "type": "object", + "required": [ + "veto_period" + ], + "properties": { + "veto_period": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "finished" + ], + "properties": { + "finished": { + "$ref": "#/definitions/ProposalOutcome" + } + }, + "additionalProperties": false + } + ] + }, + "Threshold": { + "oneOf": [ + { + "type": "object", + "required": [ + "majority" + ], + "properties": { + "majority": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "percentage" + ], + "properties": { + "percentage": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteConfig": { + "type": "object", + "required": [ + "threshold" + ], + "properties": { + "threshold": { + "$ref": "#/definitions/Threshold" + }, + "veto_duration_seconds": { + "description": "Veto duration after the first vote None disables veto", + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "vote": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VoteResponse", + "description": "Response for vote query", + "type": "object", + "properties": { + "vote": { + "description": "The vote, will return null if there was no vote by this user", + "anyOf": [ + { + "$ref": "#/definitions/Vote" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Vote": { + "description": "Vote struct", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "memo": { + "description": "memo for the vote", + "type": [ + "string", + "null" + ] + }, + "vote": { + "description": "true: Vote for false: Vote against", + "type": "boolean" + } + }, + "additionalProperties": false + } + } + }, + "votes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "VotesResponse", + "description": "Response for previous_vote query", + "type": "object", + "required": [ + "votes" + ], + "properties": { + "votes": { + "description": "List of votes by addr", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Addr" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Vote" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "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" + }, + "Vote": { + "description": "Vote struct", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "memo": { + "description": "memo for the vote", + "type": [ + "string", + "null" + ] + }, + "vote": { + "description": "true: Vote for false: Vote against", + "type": "boolean" + } + }, + "additionalProperties": false + } + } + } + } +} diff --git a/schema/challenge/0.4.0/query_msg.json b/schema/challenge/0.4.0/query_msg.json new file mode 100644 index 0000000000..82292e64fb --- /dev/null +++ b/schema/challenge/0.4.0/query_msg.json @@ -0,0 +1,323 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/ChallengeQueryMsg" + } + }, + "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" + }, + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "ChallengeQueryMsg": { + "description": "Challenge query messages", + "oneOf": [ + { + "description": "Get challenge info, will return null if there was no challenge by Id Returns [`ChallengeResponse`]", + "type": "object", + "required": [ + "challenge" + ], + "properties": { + "challenge": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get list of challenges Returns [`ChallengesResponse`]", + "type": "object", + "required": [ + "challenges" + ], + "properties": { + "challenges": { + "type": "object", + "properties": { + "limit": { + "description": "Max amount of challenges in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "start_after": { + "description": "start after challenge Id", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "List of friends by Id Returns [`FriendsResponse`]", + "type": "object", + "required": [ + "friends" + ], + "properties": { + "friends": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get vote of friend Returns [`VoteResponse`]", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "challenge_id", + "voter_addr" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "proposal_id": { + "description": "Proposal id of previous proposal Providing None requests last proposal results", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "voter_addr": { + "description": "Addr of the friend", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get votes of challenge Returns [`VotesResponse`]", + "type": "object", + "required": [ + "votes" + ], + "properties": { + "votes": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Id of requested challenge", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "limit": { + "description": "Max amount of challenges in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "proposal_id": { + "description": "Proposal id of previous proposal Providing None requests last proposal results", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "start_after": { + "description": "start after Addr", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get results of previous votes for this challenge Returns [`ProposalsResponse`]", + "type": "object", + "required": [ + "proposals" + ], + "properties": { + "proposals": { + "type": "object", + "required": [ + "challenge_id" + ], + "properties": { + "challenge_id": { + "description": "Challenge Id for previous votes", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "limit": { + "description": "Max amount of proposals in response", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "start_after": { + "description": "start after ProposalId", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/croncat/0.4.0/execute_msg.json b/schema/croncat/0.4.0/execute_msg.json new file mode 100644 index 0000000000..acc08945ed --- /dev/null +++ b/schema/croncat/0.4.0/execute_msg.json @@ -0,0 +1,2603 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AppExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "Action_for_Empty": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "gas_limit": { + "description": "The gas needed to safely process the execute msg", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "msg": { + "description": "Supported CosmosMsgs only!", + "allOf": [ + { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + ] + } + }, + "additionalProperties": false + }, + "AppExecuteMsg": { + "description": "Croncat execute messages", + "oneOf": [ + { + "description": "Update config currently this method is just placeholder", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Create new croncat task", + "type": "object", + "required": [ + "create_task" + ], + "properties": { + "create_task": { + "type": "object", + "required": [ + "assets", + "task", + "task_tag" + ], + "properties": { + "assets": { + "description": "List of assets to be attached to the task", + "allOf": [ + { + "$ref": "#/definitions/AssetListBase_for_String" + } + ] + }, + "task": { + "description": "Task request", + "allOf": [ + { + "$ref": "#/definitions/TaskRequest" + } + ] + }, + "task_tag": { + "description": "Custom task tag, which helps to use it after creation", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Remove task by tag and withdraw unused cw20 by this task", + "type": "object", + "required": [ + "remove_task" + ], + "properties": { + "remove_task": { + "type": "object", + "required": [ + "task_tag" + ], + "properties": { + "task_tag": { + "description": "Task tag of tag which should get removed", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Refill a task", + "type": "object", + "required": [ + "refill_task" + ], + "properties": { + "refill_task": { + "type": "object", + "required": [ + "assets", + "task_tag" + ], + "properties": { + "assets": { + "description": "List of assets to be added to the task balance", + "allOf": [ + { + "$ref": "#/definitions/AssetListBase_for_String" + } + ] + }, + "task_tag": { + "description": "Task tag of tag which should get refilled", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Clean state Note: it will not check if task is active or not, use it mindfully", + "type": "object", + "required": [ + "purge" + ], + "properties": { + "purge": { + "type": "object", + "required": [ + "task_tags" + ], + "properties": { + "task_tags": { + "description": "List of task tags that should get cleaned from the state", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "AssetListBase_for_String": { + "description": "Represents a list of fungible tokens, each with a known amount", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Boundary": { + "description": "Start and end block or timestamp when task should be executed for the last time", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "$ref": "#/definitions/BoundaryHeight" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "$ref": "#/definitions/BoundaryTime" + } + }, + "additionalProperties": false + } + ] + }, + "BoundaryHeight": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "BoundaryTime": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "additionalProperties": false + } + ] + }, + "CosmosQuery_for_WasmQuery": { + "description": "Query given module contract with a message", + "oneOf": [ + { + "type": "object", + "required": [ + "croncat" + ], + "properties": { + "croncat": { + "$ref": "#/definitions/CroncatQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "CroncatQuery": { + "description": "Query given module contract with a message", + "type": "object", + "required": [ + "check_result", + "contract_addr", + "msg" + ], + "properties": { + "check_result": { + "description": "For queries with `check_result`: query return value should be formatted as a: [`QueryResponse`](mod_sdk::types::QueryResponse)", + "type": "boolean" + }, + "contract_addr": { + "description": "This is address of the queried module contract. For the addr can use one of our croncat-mod-* contracts, or custom contracts", + "type": "string" + }, + "msg": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + "Cw20Coin": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string" + }, + "amount": { + "$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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "Interval": { + "description": "Defines the spacing of execution NOTES: - Block Height Based: Once, Immediate, Block - Timestamp Based: Once, Cron - No Epoch support directly, advised to use block heights instead", + "oneOf": [ + { + "description": "For when this is a non-recurring future scheduled TXN", + "type": "string", + "enum": [ + "once" + ] + }, + { + "description": "The ugly batch schedule type, in case you need to exceed single TXN gas limits, within fewest block(s)", + "type": "string", + "enum": [ + "immediate" + ] + }, + { + "description": "Allows timing based on block intervals rather than timestamps", + "type": "object", + "required": [ + "block" + ], + "properties": { + "block": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "Crontab Spec String", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "PathToValue": { + "type": "array", + "items": { + "$ref": "#/definitions/ValueIndex" + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TaskRequest": { + "description": "Request to create a task", + "type": "object", + "required": [ + "actions", + "interval", + "stop_on_fail" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/Action_for_Empty" + } + }, + "boundary": { + "anyOf": [ + { + "$ref": "#/definitions/Boundary" + }, + { + "type": "null" + } + ] + }, + "cw20": { + "description": "How much of cw20 coin is attached to this task This will be taken from the manager's contract temporary \"Users balance\" and attached directly to the task's balance.\n\nNote: Unlike other coins ( which get refunded to the task creator in the same transaction as task removal) cw20's will get moved back to the temporary \"Users balance\". This is done primarily to save up gas from executing another contract during `proxy_call`", + "anyOf": [ + { + "$ref": "#/definitions/Cw20Coin" + }, + { + "type": "null" + } + ] + }, + "interval": { + "$ref": "#/definitions/Interval" + }, + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/CosmosQuery_for_WasmQuery" + } + }, + "stop_on_fail": { + "type": "boolean" + }, + "transforms": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Transform" + } + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Transform": { + "description": "Transforms of the tasks actions", + "type": "object", + "required": [ + "action_idx", + "action_path", + "query_idx", + "query_response_path" + ], + "properties": { + "action_idx": { + "description": "Action index to update first action would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "action_path": { + "description": "Action key path to the value that should get replaced for example: X: {Y: {Z: value}} \\[X,Y,Z\\] to reach that value", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + }, + "query_idx": { + "description": "Query index of the new data for this action first query would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "query_response_path": { + "description": "Query response key's path to the value that needs to be taken to replace value from the above for example query gave that response: A: {B: {C: value}} In order to reach a value \\[A,B,C\\] should be used as input", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + } + }, + "additionalProperties": false + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "ValueIndex": { + "oneOf": [ + { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + ] + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } +} diff --git a/schema/croncat/0.4.0/instantiate_msg.json b/schema/croncat/0.4.0/instantiate_msg.json new file mode 100644 index 0000000000..8af7077a7d --- /dev/null +++ b/schema/croncat/0.4.0/instantiate_msg.json @@ -0,0 +1,77 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/AppInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "AppInstantiateMsg": { + "description": "Croncat instantiate message", + "type": "object", + "additionalProperties": false + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "type": "string" + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/croncat/0.4.0/migrate_msg.json b/schema/croncat/0.4.0/migrate_msg.json new file mode 100644 index 0000000000..1ba84208d1 --- /dev/null +++ b/schema/croncat/0.4.0/migrate_msg.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/Empty" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/schema/croncat/0.4.0/module-schema.json b/schema/croncat/0.4.0/module-schema.json new file mode 100644 index 0000000000..3f95f92ee5 --- /dev/null +++ b/schema/croncat/0.4.0/module-schema.json @@ -0,0 +1,3454 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.4.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Croncat instantiate message", + "type": "object", + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Croncat execute messages", + "oneOf": [ + { + "description": "Update config currently this method is just placeholder", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Create new croncat task", + "type": "object", + "required": [ + "create_task" + ], + "properties": { + "create_task": { + "type": "object", + "required": [ + "assets", + "task", + "task_tag" + ], + "properties": { + "assets": { + "description": "List of assets to be attached to the task", + "allOf": [ + { + "$ref": "#/definitions/AssetListBase_for_String" + } + ] + }, + "task": { + "description": "Task request", + "allOf": [ + { + "$ref": "#/definitions/TaskRequest" + } + ] + }, + "task_tag": { + "description": "Custom task tag, which helps to use it after creation", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Remove task by tag and withdraw unused cw20 by this task", + "type": "object", + "required": [ + "remove_task" + ], + "properties": { + "remove_task": { + "type": "object", + "required": [ + "task_tag" + ], + "properties": { + "task_tag": { + "description": "Task tag of tag which should get removed", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Refill a task", + "type": "object", + "required": [ + "refill_task" + ], + "properties": { + "refill_task": { + "type": "object", + "required": [ + "assets", + "task_tag" + ], + "properties": { + "assets": { + "description": "List of assets to be added to the task balance", + "allOf": [ + { + "$ref": "#/definitions/AssetListBase_for_String" + } + ] + }, + "task_tag": { + "description": "Task tag of tag which should get refilled", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Clean state Note: it will not check if task is active or not, use it mindfully", + "type": "object", + "required": [ + "purge" + ], + "properties": { + "purge": { + "type": "object", + "required": [ + "task_tags" + ], + "properties": { + "task_tags": { + "description": "List of task tags that should get cleaned from the state", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Action_for_Empty": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "gas_limit": { + "description": "The gas needed to safely process the execute msg", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "msg": { + "description": "Supported CosmosMsgs only!", + "allOf": [ + { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + ] + } + }, + "additionalProperties": false + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "AssetListBase_for_String": { + "description": "Represents a list of fungible tokens, each with a known amount", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Boundary": { + "description": "Start and end block or timestamp when task should be executed for the last time", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "$ref": "#/definitions/BoundaryHeight" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "$ref": "#/definitions/BoundaryTime" + } + }, + "additionalProperties": false + } + ] + }, + "BoundaryHeight": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "BoundaryTime": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "additionalProperties": false + } + ] + }, + "CosmosQuery_for_WasmQuery": { + "description": "Query given module contract with a message", + "oneOf": [ + { + "type": "object", + "required": [ + "croncat" + ], + "properties": { + "croncat": { + "$ref": "#/definitions/CroncatQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "CroncatQuery": { + "description": "Query given module contract with a message", + "type": "object", + "required": [ + "check_result", + "contract_addr", + "msg" + ], + "properties": { + "check_result": { + "description": "For queries with `check_result`: query return value should be formatted as a: [`QueryResponse`](mod_sdk::types::QueryResponse)", + "type": "boolean" + }, + "contract_addr": { + "description": "This is address of the queried module contract. For the addr can use one of our croncat-mod-* contracts, or custom contracts", + "type": "string" + }, + "msg": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + "Cw20Coin": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "type": "string" + }, + "amount": { + "$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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "Interval": { + "description": "Defines the spacing of execution NOTES: - Block Height Based: Once, Immediate, Block - Timestamp Based: Once, Cron - No Epoch support directly, advised to use block heights instead", + "oneOf": [ + { + "description": "For when this is a non-recurring future scheduled TXN", + "type": "string", + "enum": [ + "once" + ] + }, + { + "description": "The ugly batch schedule type, in case you need to exceed single TXN gas limits, within fewest block(s)", + "type": "string", + "enum": [ + "immediate" + ] + }, + { + "description": "Allows timing based on block intervals rather than timestamps", + "type": "object", + "required": [ + "block" + ], + "properties": { + "block": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Crontab Spec String", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "PathToValue": { + "type": "array", + "items": { + "$ref": "#/definitions/ValueIndex" + } + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "TaskRequest": { + "description": "Request to create a task", + "type": "object", + "required": [ + "actions", + "interval", + "stop_on_fail" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/Action_for_Empty" + } + }, + "boundary": { + "anyOf": [ + { + "$ref": "#/definitions/Boundary" + }, + { + "type": "null" + } + ] + }, + "cw20": { + "description": "How much of cw20 coin is attached to this task This will be taken from the manager's contract temporary \"Users balance\" and attached directly to the task's balance.\n\nNote: Unlike other coins ( which get refunded to the task creator in the same transaction as task removal) cw20's will get moved back to the temporary \"Users balance\". This is done primarily to save up gas from executing another contract during `proxy_call`", + "anyOf": [ + { + "$ref": "#/definitions/Cw20Coin" + }, + { + "type": "null" + } + ] + }, + "interval": { + "$ref": "#/definitions/Interval" + }, + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/CosmosQuery_for_WasmQuery" + } + }, + "stop_on_fail": { + "type": "boolean" + }, + "transforms": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Transform" + } + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Transform": { + "description": "Transforms of the tasks actions", + "type": "object", + "required": [ + "action_idx", + "action_path", + "query_idx", + "query_response_path" + ], + "properties": { + "action_idx": { + "description": "Action index to update first action would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "action_path": { + "description": "Action key path to the value that should get replaced for example: X: {Y: {Z: value}} \\[X,Y,Z\\] to reach that value", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + }, + "query_idx": { + "description": "Query index of the new data for this action first query would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "query_response_path": { + "description": "Query response key's path to the value that needs to be taken to replace value from the above for example query gave that response: A: {B: {C: value}} In order to reach a value \\[A,B,C\\] should be used as input", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + } + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "ValueIndex": { + "oneOf": [ + { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Croncat Query Messages", + "oneOf": [ + { + "description": "Get config Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get active tasks Returns [`ActiveTasksResponse`]", + "type": "object", + "required": [ + "active_tasks" + ], + "properties": { + "active_tasks": { + "type": "object", + "properties": { + "checked": { + "description": "On true check if this task exist on croncat contract and filter if it doesn't. Defaults to false", + "type": [ + "boolean", + "null" + ] + }, + "limit": { + "description": "Maximum number of tasks to return. Default limit is 50, if not set", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "start_after": { + "description": "The addr and task tag to start listing after.", + "type": [ + "array", + "null" + ], + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get active tasks by creator Returns [`ActiveTasksByCreatorResponse`]", + "type": "object", + "required": [ + "active_tasks_by_creator" + ], + "properties": { + "active_tasks_by_creator": { + "type": "object", + "required": [ + "creator_addr" + ], + "properties": { + "checked": { + "description": "On true check if this task exist on croncat contract and filter if it doesn't. Defaults to false", + "type": [ + "boolean", + "null" + ] + }, + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "limit": { + "description": "Maximum number of tasks to return. Default limit is 50, if not set", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "start_after": { + "description": "The task tag to start listing after.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get task info Returns [`croncat_sdk_tasks::types::TaskResponse`]", + "type": "object", + "required": [ + "task_info" + ], + "properties": { + "task_info": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get task balance Returns [`croncat_sdk_manager::types::TaskBalanceResponse`]", + "type": "object", + "required": [ + "task_balance" + ], + "properties": { + "task_balance": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get croncat manager address of task Used to verify sender Returns [`Addr`]", + "type": "object", + "required": [ + "manager_addr" + ], + "properties": { + "manager_addr": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "active_tasks": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ActiveTasksResponse", + "description": "Response for active_tasks query", + "oneOf": [ + { + "description": "List of tasks in the module state, without checking if it's still active on croncat side", + "type": "object", + "required": [ + "unchecked" + ], + "properties": { + "unchecked": { + "type": "object", + "required": [ + "tasks" + ], + "properties": { + "tasks": { + "description": "Tasks in CronCat App state", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Lists of tasks in the module state, with checking if it's still active on croncat side", + "type": "object", + "required": [ + "checked" + ], + "properties": { + "checked": { + "type": "object", + "required": [ + "removed_tasks", + "scheduled_tasks" + ], + "properties": { + "removed_tasks": { + "description": "tasks that got removed and can safely get purged", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "scheduled_tasks": { + "description": "tasks that are currently active", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false + } + }, + "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" + } + } + }, + "active_tasks_by_creator": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ActiveTasksByCreatorResponse", + "description": "Response for active_tasks_by_creator query", + "oneOf": [ + { + "description": "List of tasks in the module state, without checking if it's still active on croncat side", + "type": "object", + "required": [ + "unchecked" + ], + "properties": { + "unchecked": { + "type": "object", + "required": [ + "tasks" + ], + "properties": { + "tasks": { + "description": "Tasks in CronCat App state", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Lists of tasks in the module state, with checking if it's still active on croncat side", + "type": "object", + "required": [ + "checked" + ], + "properties": { + "checked": { + "type": "object", + "required": [ + "removed_tasks", + "scheduled_tasks" + ], + "properties": { + "removed_tasks": { + "description": "tasks that got removed and can safely get purged", + "type": "array", + "items": { + "type": "string" + } + }, + "scheduled_tasks": { + "description": "tasks that are currently active", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "description": "Response for config query", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "description": "Config of the croncat module", + "allOf": [ + { + "$ref": "#/definitions/Config" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Config": { + "type": "object", + "additionalProperties": false + } + } + }, + "manager_addr": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "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" + }, + "task_balance": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TaskBalanceResponse", + "type": "object", + "properties": { + "balance": { + "anyOf": [ + { + "$ref": "#/definitions/TaskBalance" + }, + { + "type": "null" + } + ] + } + }, + "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" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Cw20CoinVerified": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + }, + "amount": { + "$ref": "#/definitions/Uint128" + } + }, + "additionalProperties": false + }, + "TaskBalance": { + "type": "object", + "required": [ + "native_balance" + ], + "properties": { + "cw20_balance": { + "anyOf": [ + { + "$ref": "#/definitions/Cw20CoinVerified" + }, + { + "type": "null" + } + ] + }, + "ibc_balance": { + "anyOf": [ + { + "$ref": "#/definitions/Coin" + }, + { + "type": "null" + } + ] + }, + "native_balance": { + "$ref": "#/definitions/Uint128" + } + }, + "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" + } + } + }, + "task_info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TaskResponse", + "type": "object", + "properties": { + "task": { + "anyOf": [ + { + "$ref": "#/definitions/TaskInfo" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Action_for_Empty": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "gas_limit": { + "description": "The gas needed to safely process the execute msg", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "msg": { + "description": "Supported CosmosMsgs only!", + "allOf": [ + { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + ] + } + }, + "additionalProperties": false + }, + "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" + }, + "AmountForOneTask": { + "type": "object", + "required": [ + "agent_fee", + "coin", + "gas", + "gas_price", + "treasury_fee" + ], + "properties": { + "agent_fee": { + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "coin": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/Coin" + }, + { + "type": "null" + } + ] + }, + "maxItems": 2, + "minItems": 2 + }, + "cw20": { + "anyOf": [ + { + "$ref": "#/definitions/Cw20CoinVerified" + }, + { + "type": "null" + } + ] + }, + "gas": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "gas_price": { + "$ref": "#/definitions/GasPrice" + }, + "treasury_fee": { + "type": "integer", + "format": "uint16", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Boundary": { + "description": "Start and end block or timestamp when task should be executed for the last time", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "$ref": "#/definitions/BoundaryHeight" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "$ref": "#/definitions/BoundaryTime" + } + }, + "additionalProperties": false + } + ] + }, + "BoundaryHeight": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Uint64" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "BoundaryTime": { + "type": "object", + "properties": { + "end": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "start": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "additionalProperties": false + } + ] + }, + "CosmosQuery_for_WasmQuery": { + "description": "Query given module contract with a message", + "oneOf": [ + { + "type": "object", + "required": [ + "croncat" + ], + "properties": { + "croncat": { + "$ref": "#/definitions/CroncatQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "CroncatQuery": { + "description": "Query given module contract with a message", + "type": "object", + "required": [ + "check_result", + "contract_addr", + "msg" + ], + "properties": { + "check_result": { + "description": "For queries with `check_result`: query return value should be formatted as a: [`QueryResponse`](mod_sdk::types::QueryResponse)", + "type": "boolean" + }, + "contract_addr": { + "description": "This is address of the queried module contract. For the addr can use one of our croncat-mod-* contracts, or custom contracts", + "type": "string" + }, + "msg": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + "Cw20CoinVerified": { + "type": "object", + "required": [ + "address", + "amount" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + }, + "amount": { + "$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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "GasPrice": { + "description": "We can't store gas_price as floats inside cosmwasm so instead of having 0.04 we use GasPrice {4/100} and after that multiply Gas by `gas_adjustment` {150/100} (1.5)", + "type": "object", + "required": [ + "denominator", + "gas_adjustment_numerator", + "numerator" + ], + "properties": { + "denominator": { + "description": "Denominator is shared", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "gas_adjustment_numerator": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "numerator": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "Interval": { + "description": "Defines the spacing of execution NOTES: - Block Height Based: Once, Immediate, Block - Timestamp Based: Once, Cron - No Epoch support directly, advised to use block heights instead", + "oneOf": [ + { + "description": "For when this is a non-recurring future scheduled TXN", + "type": "string", + "enum": [ + "once" + ] + }, + { + "description": "The ugly batch schedule type, in case you need to exceed single TXN gas limits, within fewest block(s)", + "type": "string", + "enum": [ + "immediate" + ] + }, + { + "description": "Allows timing based on block intervals rather than timestamps", + "type": "object", + "required": [ + "block" + ], + "properties": { + "block": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Crontab Spec String", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "PathToValue": { + "type": "array", + "items": { + "$ref": "#/definitions/ValueIndex" + } + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "TaskInfo": { + "type": "object", + "required": [ + "actions", + "amount_for_one_task", + "boundary", + "interval", + "owner_addr", + "stop_on_fail", + "task_hash", + "transforms", + "version" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/Action_for_Empty" + } + }, + "amount_for_one_task": { + "$ref": "#/definitions/AmountForOneTask" + }, + "boundary": { + "$ref": "#/definitions/Boundary" + }, + "interval": { + "$ref": "#/definitions/Interval" + }, + "owner_addr": { + "$ref": "#/definitions/Addr" + }, + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/CosmosQuery_for_WasmQuery" + } + }, + "stop_on_fail": { + "type": "boolean" + }, + "task_hash": { + "type": "string" + }, + "transforms": { + "type": "array", + "items": { + "$ref": "#/definitions/Transform" + } + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Transform": { + "description": "Transforms of the tasks actions", + "type": "object", + "required": [ + "action_idx", + "action_path", + "query_idx", + "query_response_path" + ], + "properties": { + "action_idx": { + "description": "Action index to update first action would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "action_path": { + "description": "Action key path to the value that should get replaced for example: X: {Y: {Z: value}} \\[X,Y,Z\\] to reach that value", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + }, + "query_idx": { + "description": "Query index of the new data for this action first query would be \"0\"", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "query_response_path": { + "description": "Query response key's path to the value that needs to be taken to replace value from the above for example query gave that response: A: {B: {C: value}} In order to reach a value \\[A,B,C\\] should be used as input", + "allOf": [ + { + "$ref": "#/definitions/PathToValue" + } + ] + } + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "ValueIndex": { + "oneOf": [ + { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } + } + } +} diff --git a/schema/croncat/0.4.0/query_msg.json b/schema/croncat/0.4.0/query_msg.json new file mode 100644 index 0000000000..2546be831c --- /dev/null +++ b/schema/croncat/0.4.0/query_msg.json @@ -0,0 +1,292 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AppQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AppQueryMsg": { + "description": "Croncat Query Messages", + "oneOf": [ + { + "description": "Get config Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get active tasks Returns [`ActiveTasksResponse`]", + "type": "object", + "required": [ + "active_tasks" + ], + "properties": { + "active_tasks": { + "type": "object", + "properties": { + "checked": { + "description": "On true check if this task exist on croncat contract and filter if it doesn't. Defaults to false", + "type": [ + "boolean", + "null" + ] + }, + "limit": { + "description": "Maximum number of tasks to return. Default limit is 50, if not set", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "start_after": { + "description": "The addr and task tag to start listing after.", + "type": [ + "array", + "null" + ], + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get active tasks by creator Returns [`ActiveTasksByCreatorResponse`]", + "type": "object", + "required": [ + "active_tasks_by_creator" + ], + "properties": { + "active_tasks_by_creator": { + "type": "object", + "required": [ + "creator_addr" + ], + "properties": { + "checked": { + "description": "On true check if this task exist on croncat contract and filter if it doesn't. Defaults to false", + "type": [ + "boolean", + "null" + ] + }, + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "limit": { + "description": "Maximum number of tasks to return. Default limit is 50, if not set", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "start_after": { + "description": "The task tag to start listing after.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get task info Returns [`croncat_sdk_tasks::types::TaskResponse`]", + "type": "object", + "required": [ + "task_info" + ], + "properties": { + "task_info": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get task balance Returns [`croncat_sdk_manager::types::TaskBalanceResponse`]", + "type": "object", + "required": [ + "task_balance" + ], + "properties": { + "task_balance": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get croncat manager address of task Used to verify sender Returns [`Addr`]", + "type": "object", + "required": [ + "manager_addr" + ], + "properties": { + "manager_addr": { + "type": "object", + "required": [ + "creator_addr", + "task_tag" + ], + "properties": { + "creator_addr": { + "description": "The addr of creator of tasks", + "type": "string" + }, + "task_tag": { + "description": "The tag of the task", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/cw-staking/0.23.0/execute_msg.json b/schema/cw-staking/0.23.0/execute_msg.json new file mode 100644 index 0000000000..67edc6da4c --- /dev/null +++ b/schema/cw-staking/0.23.0/execute_msg.json @@ -0,0 +1,1460 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AdapterRequestMsg_for_StakingExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AdapterBaseMsg": { + "description": "Configuration message for the adapter", + "oneOf": [ + { + "description": "Add or remove authorized addresses If an authorized address is both in to_add and to_remove, it will be removed.", + "type": "object", + "required": [ + "update_authorized_addresses" + ], + "properties": { + "update_authorized_addresses": { + "type": "object", + "required": [ + "to_add", + "to_remove" + ], + "properties": { + "to_add": { + "type": "array", + "items": { + "type": "string" + } + }, + "to_remove": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AdapterRequestMsg_for_StakingExecuteMsg": { + "description": "An adapter request. If proxy is None, then the sender must be an Account manager and the proxy address is extrapolated from the Account id.", + "type": "object", + "required": [ + "request" + ], + "properties": { + "proxy_address": { + "type": [ + "string", + "null" + ] + }, + "request": { + "description": "The actual request", + "allOf": [ + { + "$ref": "#/definitions/StakingExecuteMsg" + } + ] + } + }, + "additionalProperties": false + }, + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/AdapterBaseMsg" + }, + "proxy_address": { + "description": "The Proxy address for which to apply the configuration If None, the sender must be an Account manager and the configuration is applied to its associated proxy. If Some, the sender must be a direct or indirect owner (through sub-accounts) of the specified proxy.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Duration": { + "description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "Time in seconds", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingAction": { + "description": "Possible actions to perform on the staking contract All provide an asset [AnsAsset] information", + "oneOf": [ + { + "description": "Stakes/bonds a given token", + "type": "object", + "required": [ + "stake" + ], + "properties": { + "stake": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The ANS-resolvable asset information of the assets to stake.", + "type": "array", + "items": { + "$ref": "#/definitions/AnsAsset" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified stake.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Unstake/unbond a given token", + "type": "object", + "required": [ + "unstake" + ], + "properties": { + "unstake": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The ANS-resolvable asset information of the assets to unstake.", + "type": "array", + "items": { + "$ref": "#/definitions/AnsAsset" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified stake.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim rewards for a set of staked assets.", + "type": "object", + "required": [ + "claim_rewards" + ], + "properties": { + "claim_rewards": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "Staked assets to claim rewards for.", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim matured unbonding tokens", + "type": "object", + "required": [ + "claim" + ], + "properties": { + "claim": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "Unbonded staking assets to claim.", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "StakingExecuteMsg": { + "description": "A request message that's sent to this staking adapter", + "type": "object", + "required": [ + "action", + "provider" + ], + "properties": { + "action": { + "description": "the action to execute, see [StakingAction]", + "allOf": [ + { + "$ref": "#/definitions/StakingAction" + } + ] + }, + "provider": { + "description": "The name of the staking provider", + "type": "string" + } + }, + "additionalProperties": false + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/cw-staking/0.23.0/instantiate_msg.json b/schema/cw-staking/0.23.0/instantiate_msg.json new file mode 100644 index 0000000000..19bb736847 --- /dev/null +++ b/schema/cw-staking/0.23.0/instantiate_msg.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/Empty" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseInstantiateMsg": { + "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", + "type": "object", + "required": [ + "ans_host_address", + "version_control_address" + ], + "properties": { + "ans_host_address": { + "description": "Used to easily perform address translation", + "type": "string" + }, + "version_control_address": { + "description": "Used to verify senders", + "type": "string" + } + }, + "additionalProperties": false + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/schema/cw-staking/0.23.0/module-schema.json b/schema/cw-staking/0.23.0/module-schema.json new file mode 100644 index 0000000000..cd6f787369 --- /dev/null +++ b/schema/cw-staking/0.23.0/module-schema.json @@ -0,0 +1,790 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "A request message that's sent to this staking adapter", + "type": "object", + "required": [ + "action", + "provider" + ], + "properties": { + "action": { + "description": "the action to execute, see [StakingAction]", + "allOf": [ + { + "$ref": "#/definitions/StakingAction" + } + ] + }, + "provider": { + "description": "The name of the staking provider", + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Duration": { + "description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Time in seconds", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "StakingAction": { + "description": "Possible actions to perform on the staking contract All provide an asset [AnsAsset] information", + "oneOf": [ + { + "description": "Stakes/bonds a given token", + "type": "object", + "required": [ + "stake" + ], + "properties": { + "stake": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The ANS-resolvable asset information of the assets to stake.", + "type": "array", + "items": { + "$ref": "#/definitions/AnsAsset" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified stake.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Unstake/unbond a given token", + "type": "object", + "required": [ + "unstake" + ], + "properties": { + "unstake": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "The ANS-resolvable asset information of the assets to unstake.", + "type": "array", + "items": { + "$ref": "#/definitions/AnsAsset" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified stake.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim rewards for a set of staked assets.", + "type": "object", + "required": [ + "claim_rewards" + ], + "properties": { + "claim_rewards": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "Staked assets to claim rewards for.", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim matured unbonding tokens", + "type": "object", + "required": [ + "claim" + ], + "properties": { + "claim": { + "type": "object", + "required": [ + "assets" + ], + "properties": { + "assets": { + "description": "Unbonded staking assets to claim.", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Query messages for the staking adapter", + "oneOf": [ + { + "description": "Get the staking info for a given provider Returns [`StakingInfoResponse`]", + "type": "object", + "required": [ + "info" + ], + "properties": { + "info": { + "type": "object", + "required": [ + "provider", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the staked amount for a given provider, staking token, staker address and unbonding period Returns [`StakeResponse`]", + "type": "object", + "required": [ + "staked" + ], + "properties": { + "staked": { + "type": "object", + "required": [ + "provider", + "staker_address", + "stakes" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staker_address": { + "description": "The address of the staker (contract or user)", + "type": "string" + }, + "stakes": { + "description": "The staking token to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified staked position.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the unbonding entries for a given provider, staking token and staker address Returns [`UnbondingResponse`]", + "type": "object", + "required": [ + "unbonding" + ], + "properties": { + "unbonding": { + "type": "object", + "required": [ + "provider", + "staker_address", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staker_address": { + "description": "The address of the staker (contract or user)", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the reward tokens for a given provider and staking token Returns [`RewardTokensResponse`]", + "type": "object", + "required": [ + "reward_tokens" + ], + "properties": { + "reward_tokens": { + "type": "object", + "required": [ + "provider", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Duration": { + "description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Time in seconds", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "StakingInfoResponse", + "description": "Response for the staking_info query", + "type": "object", + "required": [ + "infos" + ], + "properties": { + "infos": { + "description": "Contract or pool id to stake to", + "type": "array", + "items": { + "$ref": "#/definitions/StakingInfo" + } + } + }, + "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" + }, + "AssetInfoBase_for_Addr": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + } + ] + }, + "Duration": { + "description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Time in seconds", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "StakingInfo": { + "description": "Info for a stakeable token", + "type": "object", + "required": [ + "staking_target", + "staking_token" + ], + "properties": { + "max_claims": { + "description": "Max number of claims. None if no limit.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "staking_target": { + "description": "Address or pool id to stake to", + "allOf": [ + { + "$ref": "#/definitions/StakingTarget" + } + ] + }, + "staking_token": { + "description": "Staking token", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + ] + }, + "unbonding_periods": { + "description": "Different supported unbonding periods. None if no unbonding is supported.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Duration" + } + } + }, + "additionalProperties": false + }, + "StakingTarget": { + "description": "Possible staking targets to support staking on cosmwasm contract or cosmos Lockup module", + "oneOf": [ + { + "description": "Address of the staking contract (Cosmwasm)", + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + { + "description": "Pool id of the staking contract (Osmosis)", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + } + } + }, + "reward_tokens": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RewardTokensResponse", + "description": "Response for the rewards query", + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "description": "List of reward tokens, per token provided in query", + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + } + } + }, + "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" + }, + "AssetInfoBase_for_Addr": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + } + ] + } + } + }, + "staked": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "StakeResponse", + "description": "Response for the staked query", + "type": "object", + "required": [ + "amounts" + ], + "properties": { + "amounts": { + "description": "Amount of staked tokens, per token provided in query", + "type": "array", + "items": { + "$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" + } + } + }, + "unbonding": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UnbondingResponse", + "description": "Response for the unbonding query", + "type": "object", + "required": [ + "claims" + ], + "properties": { + "claims": { + "description": "List of unbonding entries, per token provided in query", + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/Claim" + } + } + } + }, + "additionalProperties": false, + "definitions": { + "Claim": { + "description": "A claim for a given amount of tokens that are unbonding.", + "type": "object", + "required": [ + "amount", + "claimable_at" + ], + "properties": { + "amount": { + "description": "Amount of tokens that are unbonding", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "claimable_at": { + "description": "When the tokens can be claimed", + "allOf": [ + { + "$ref": "#/definitions/Expiration" + } + ] + } + }, + "additionalProperties": false + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + } + } +} diff --git a/schema/cw-staking/0.23.0/query_msg.json b/schema/cw-staking/0.23.0/query_msg.json new file mode 100644 index 0000000000..c79d8cb279 --- /dev/null +++ b/schema/cw-staking/0.23.0/query_msg.json @@ -0,0 +1,277 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/StakingQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "BaseQueryMsg": { + "description": "Query adapter message", + "oneOf": [ + { + "description": "Returns [`AdapterConfigResponse`].", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`AuthorizedAddressesResponse`].", + "type": "object", + "required": [ + "authorized_addresses" + ], + "properties": { + "authorized_addresses": { + "type": "object", + "required": [ + "proxy_address" + ], + "properties": { + "proxy_address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`].", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Duration": { + "description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined", + "oneOf": [ + { + "type": "object", + "required": [ + "height" + ], + "properties": { + "height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "Time in seconds", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + ] + }, + "StakingQueryMsg": { + "description": "Query messages for the staking adapter", + "oneOf": [ + { + "description": "Get the staking info for a given provider Returns [`StakingInfoResponse`]", + "type": "object", + "required": [ + "info" + ], + "properties": { + "info": { + "type": "object", + "required": [ + "provider", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the staked amount for a given provider, staking token, staker address and unbonding period Returns [`StakeResponse`]", + "type": "object", + "required": [ + "staked" + ], + "properties": { + "staked": { + "type": "object", + "required": [ + "provider", + "staker_address", + "stakes" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staker_address": { + "description": "The address of the staker (contract or user)", + "type": "string" + }, + "stakes": { + "description": "The staking token to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + }, + "unbonding_period": { + "description": "The unbonding period for the specified staked position.", + "anyOf": [ + { + "$ref": "#/definitions/Duration" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the unbonding entries for a given provider, staking token and staker address Returns [`UnbondingResponse`]", + "type": "object", + "required": [ + "unbonding" + ], + "properties": { + "unbonding": { + "type": "object", + "required": [ + "provider", + "staker_address", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staker_address": { + "description": "The address of the staker (contract or user)", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get the reward tokens for a given provider and staking token Returns [`RewardTokensResponse`]", + "type": "object", + "required": [ + "reward_tokens" + ], + "properties": { + "reward_tokens": { + "type": "object", + "required": [ + "provider", + "staking_tokens" + ], + "properties": { + "provider": { + "description": "Name of the provider", + "type": "string" + }, + "staking_tokens": { + "description": "The staking tokens to query", + "type": "array", + "items": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/dca/0.4.0/execute_msg.json b/schema/dca/0.4.0/execute_msg.json new file mode 100644 index 0000000000..b469b8c35a --- /dev/null +++ b/schema/dca/0.4.0/execute_msg.json @@ -0,0 +1,1502 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/DCAExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "DCAExecuteMsg": { + "description": "App execute messages", + "oneOf": [ + { + "description": "Used to update config of DCA App", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "max_spread": { + "description": "Set the max trade spread", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "native_asset": { + "description": "Native gas asset for this chain used for covering gas expenses of croncat agents", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "new_dca_task_balance": { + "description": "New initial amount in native asset that sent on creating/refilling DCA to croncat to cover gas usage of agents", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "task_refill_threshold": { + "description": "New threshold for refilling a task TIP: you can set it to \"0\" to disable refilling. The task will then stop running when it runs out of funds.", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to create a new DCA", + "type": "object", + "required": [ + "create_d_c_a" + ], + "properties": { + "create_d_c_a": { + "type": "object", + "required": [ + "dex", + "frequency", + "source_asset", + "target_asset" + ], + "properties": { + "dex": { + "description": "The DEX to be used for the swap", + "type": "string" + }, + "frequency": { + "description": "The frequency of purchase", + "allOf": [ + { + "$ref": "#/definitions/Frequency" + } + ] + }, + "source_asset": { + "description": "The name of the asset to be used for purchasing", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "target_asset": { + "description": "The name of the asset to be purchased", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to update an existing DCA", + "type": "object", + "required": [ + "update_d_c_a" + ], + "properties": { + "update_d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + }, + "new_dex": { + "description": "Optional new DEX to be used for the swap", + "type": [ + "string", + "null" + ] + }, + "new_frequency": { + "description": "Optional new frequency of purchase", + "anyOf": [ + { + "$ref": "#/definitions/Frequency" + }, + { + "type": "null" + } + ] + }, + "new_source_asset": { + "description": "Optional new name of the asset to be used for purchasing", + "anyOf": [ + { + "$ref": "#/definitions/AnsAsset" + }, + { + "type": "null" + } + ] + }, + "new_target_asset": { + "description": "Optional new name of the asset to be purchased", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to cancel an existing DCA", + "type": "object", + "required": [ + "cancel_d_c_a" + ], + "properties": { + "cancel_d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Internal method for triggering swap. It can be called only by the Croncat Manager", + "type": "object", + "required": [ + "convert" + ], + "properties": { + "convert": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DCAId": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "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" + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "Frequency": { + "description": "The frequency at which swaps are executed.", + "oneOf": [ + { + "description": "Blocks will schedule the next DCA purchase every `n` blocks.", + "type": "object", + "required": [ + "every_n_blocks" + ], + "properties": { + "every_n_blocks": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "Time will schedule the next DCA purchase using crontab.", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/dca/0.4.0/instantiate_msg.json b/schema/dca/0.4.0/instantiate_msg.json new file mode 100644 index 0000000000..27270fc094 --- /dev/null +++ b/schema/dca/0.4.0/instantiate_msg.json @@ -0,0 +1,129 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/AppInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "AppInstantiateMsg": { + "description": "App instantiate message", + "type": "object", + "required": [ + "dca_creation_amount", + "max_spread", + "native_asset", + "refill_threshold" + ], + "properties": { + "dca_creation_amount": { + "description": "Initial amount in native asset that sent on creating/refilling DCA to croncat to cover gas usage of agents", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "max_spread": { + "description": "Max trade spread", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "native_asset": { + "description": "Native gas/stake asset for this chain used for covering gas expenses of croncat agents", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "refill_threshold": { + "description": "Threshold when task refill should happen if it's lower during [`DCAExecuteMsg::Convert`] DCA will refill croncat task TIP: you can put it to \"0\"", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "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" + }, + "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" + } + } +} diff --git a/schema/dca/0.4.0/migrate_msg.json b/schema/dca/0.4.0/migrate_msg.json new file mode 100644 index 0000000000..1ba84208d1 --- /dev/null +++ b/schema/dca/0.4.0/migrate_msg.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/Empty" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/schema/dca/0.4.0/module-schema.json b/schema/dca/0.4.0/module-schema.json new file mode 100644 index 0000000000..7748fb6c14 --- /dev/null +++ b/schema/dca/0.4.0/module-schema.json @@ -0,0 +1,688 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.4.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "App instantiate message", + "type": "object", + "required": [ + "dca_creation_amount", + "max_spread", + "native_asset", + "refill_threshold" + ], + "properties": { + "dca_creation_amount": { + "description": "Initial amount in native asset that sent on creating/refilling DCA to croncat to cover gas usage of agents", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "max_spread": { + "description": "Max trade spread", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "native_asset": { + "description": "Native gas/stake asset for this chain used for covering gas expenses of croncat agents", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "refill_threshold": { + "description": "Threshold when task refill should happen if it's lower during [`DCAExecuteMsg::Convert`] DCA will refill croncat task TIP: you can put it to \"0\"", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "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" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "App execute messages", + "oneOf": [ + { + "description": "Used to update config of DCA App", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "max_spread": { + "description": "Set the max trade spread", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "native_asset": { + "description": "Native gas asset for this chain used for covering gas expenses of croncat agents", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "new_dca_task_balance": { + "description": "New initial amount in native asset that sent on creating/refilling DCA to croncat to cover gas usage of agents", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "task_refill_threshold": { + "description": "New threshold for refilling a task TIP: you can set it to \"0\" to disable refilling. The task will then stop running when it runs out of funds.", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to create a new DCA", + "type": "object", + "required": [ + "create_d_c_a" + ], + "properties": { + "create_d_c_a": { + "type": "object", + "required": [ + "dex", + "frequency", + "source_asset", + "target_asset" + ], + "properties": { + "dex": { + "description": "The DEX to be used for the swap", + "type": "string" + }, + "frequency": { + "description": "The frequency of purchase", + "allOf": [ + { + "$ref": "#/definitions/Frequency" + } + ] + }, + "source_asset": { + "description": "The name of the asset to be used for purchasing", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "target_asset": { + "description": "The name of the asset to be purchased", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to update an existing DCA", + "type": "object", + "required": [ + "update_d_c_a" + ], + "properties": { + "update_d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + }, + "new_dex": { + "description": "Optional new DEX to be used for the swap", + "type": [ + "string", + "null" + ] + }, + "new_frequency": { + "description": "Optional new frequency of purchase", + "anyOf": [ + { + "$ref": "#/definitions/Frequency" + }, + { + "type": "null" + } + ] + }, + "new_source_asset": { + "description": "Optional new name of the asset to be used for purchasing", + "anyOf": [ + { + "$ref": "#/definitions/AnsAsset" + }, + { + "type": "null" + } + ] + }, + "new_target_asset": { + "description": "Optional new name of the asset to be purchased", + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Used to cancel an existing DCA", + "type": "object", + "required": [ + "cancel_d_c_a" + ], + "properties": { + "cancel_d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Internal method for triggering swap. It can be called only by the Croncat Manager", + "type": "object", + "required": [ + "convert" + ], + "properties": { + "convert": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Unique identifier for the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "DCAId": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "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" + }, + "Frequency": { + "description": "The frequency at which swaps are executed.", + "oneOf": [ + { + "description": "Blocks will schedule the next DCA purchase every `n` blocks.", + "type": "object", + "required": [ + "every_n_blocks" + ], + "properties": { + "every_n_blocks": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Time will schedule the next DCA purchase using crontab.", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "DCA query messages", + "oneOf": [ + { + "description": "Get config of the DCA app Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get DCA Entry Returns [`DCAResponse`]", + "type": "object", + "required": [ + "d_c_a" + ], + "properties": { + "d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Id of the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "DCAId": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "description": "Response for config query", + "type": "object", + "required": [ + "dca_creation_amount", + "max_spread", + "native_asset", + "refill_threshold" + ], + "properties": { + "dca_creation_amount": { + "description": "Initial amount in native asset that sent on creating/refilling DCA to croncat to cover gas usage of agents", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "max_spread": { + "description": "Max trade spread", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "native_asset": { + "description": "Native gas/stake asset that used for attaching to croncat task", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "refill_threshold": { + "description": "Threshold when task refill should happen if it's lower during [`DCAExecuteMsg::Convert`] DCA will refill croncat task", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "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" + } + } + }, + "d_c_a": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DCAResponse", + "description": "Response for d_c_a query", + "type": "object", + "required": [ + "pool_references" + ], + "properties": { + "dca": { + "description": "DCA entry if there is any by this DCA Id", + "anyOf": [ + { + "$ref": "#/definitions/DCAEntry" + }, + { + "type": "null" + } + ] + }, + "pool_references": { + "description": "Pools used for swapping assets by this DCA task", + "type": "array", + "items": { + "$ref": "#/definitions/PoolReference" + } + } + }, + "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" + }, + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "DCAEntry": { + "type": "object", + "required": [ + "dex", + "frequency", + "source_asset", + "target_asset" + ], + "properties": { + "dex": { + "type": "string" + }, + "frequency": { + "$ref": "#/definitions/Frequency" + }, + "source_asset": { + "$ref": "#/definitions/AnsAsset" + }, + "target_asset": { + "$ref": "#/definitions/AssetEntry" + } + }, + "additionalProperties": false + }, + "Frequency": { + "description": "The frequency at which swaps are executed.", + "oneOf": [ + { + "description": "Blocks will schedule the next DCA purchase every `n` blocks.", + "type": "object", + "required": [ + "every_n_blocks" + ], + "properties": { + "every_n_blocks": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + }, + { + "description": "Time will schedule the next DCA purchase using crontab.", + "type": "object", + "required": [ + "cron" + ], + "properties": { + "cron": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "PoolAddressBase_for_Addr": { + "oneOf": [ + { + "type": "object", + "required": [ + "separate_addresses" + ], + "properties": { + "separate_addresses": { + "type": "object", + "required": [ + "liquidity", + "swap" + ], + "properties": { + "liquidity": { + "$ref": "#/definitions/Addr" + }, + "swap": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "PoolReference": { + "type": "object", + "required": [ + "pool_address", + "unique_id" + ], + "properties": { + "pool_address": { + "$ref": "#/definitions/PoolAddressBase_for_Addr" + }, + "unique_id": { + "$ref": "#/definitions/UniquePoolId" + } + }, + "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" + }, + "UniquePoolId": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + } +} diff --git a/schema/dca/0.4.0/query_msg.json b/schema/dca/0.4.0/query_msg.json new file mode 100644 index 0000000000..0d22c3443d --- /dev/null +++ b/schema/dca/0.4.0/query_msg.json @@ -0,0 +1,145 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/DCAQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DCAId": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "DCAQueryMsg": { + "description": "DCA query messages", + "oneOf": [ + { + "description": "Get config of the DCA app Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get DCA Entry Returns [`DCAResponse`]", + "type": "object", + "required": [ + "d_c_a" + ], + "properties": { + "d_c_a": { + "type": "object", + "required": [ + "dca_id" + ], + "properties": { + "dca_id": { + "description": "Id of the DCA", + "allOf": [ + { + "$ref": "#/definitions/DCAId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/dex/0.23.0/adapter_response.json b/schema/dex/0.23.0/adapter_response.json new file mode 100644 index 0000000000..a95670d89b --- /dev/null +++ b/schema/dex/0.23.0/adapter_response.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AdapterResponse", + "description": "Response for simulating a swap.", + "type": "object", + "required": [ + "commission", + "pool", + "return_amount", + "spread_amount", + "usage_fee" + ], + "properties": { + "commission": { + "description": "Commission charged for the swap", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "$ref": "#/definitions/Uint128" + } + ], + "maxItems": 2, + "minItems": 2 + }, + "pool": { + "description": "The pool on which the swap was simulated", + "allOf": [ + { + "$ref": "#/definitions/DexAssetPairing_for_AssetEntry" + } + ] + }, + "return_amount": { + "description": "Amount you would receive when performing the swap.", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "spread_amount": { + "description": "Spread in ask_asset for this swap", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "usage_fee": { + "description": "Adapter fee charged for the swap (paid in offer asset)", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "DexAssetPairing_for_AssetEntry": { + "description": "The key for an asset pairing Consists of the two assets and the dex name TODO: what if we made keys equal based on the two assets either way?", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "string" + } + ], + "maxItems": 3, + "minItems": 3 + }, + "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" + } + } +} diff --git a/schema/dex/0.23.0/execute_msg.json b/schema/dex/0.23.0/execute_msg.json new file mode 100644 index 0000000000..e8efebb7b4 --- /dev/null +++ b/schema/dex/0.23.0/execute_msg.json @@ -0,0 +1,1679 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AdapterRequestMsg_for_DexExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AdapterBaseMsg": { + "description": "Configuration message for the adapter", + "oneOf": [ + { + "description": "Add or remove authorized addresses If an authorized address is both in to_add and to_remove, it will be removed.", + "type": "object", + "required": [ + "update_authorized_addresses" + ], + "properties": { + "update_authorized_addresses": { + "type": "object", + "required": [ + "to_add", + "to_remove" + ], + "properties": { + "to_add": { + "type": "array", + "items": { + "type": "string" + } + }, + "to_remove": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AdapterRequestMsg_for_DexExecuteMsg": { + "description": "An adapter request. If proxy is None, then the sender must be an Account manager and the proxy address is extrapolated from the Account id.", + "type": "object", + "required": [ + "request" + ], + "properties": { + "proxy_address": { + "type": [ + "string", + "null" + ] + }, + "request": { + "description": "The actual request", + "allOf": [ + { + "$ref": "#/definitions/DexExecuteMsg" + } + ] + } + }, + "additionalProperties": false + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/AdapterBaseMsg" + }, + "proxy_address": { + "description": "The Proxy address for which to apply the configuration If None, the sender must be an Account manager and the configuration is applied to its associated proxy. If Some, the sender must be a direct or indirect owner (through sub-accounts) of the specified proxy.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "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" + }, + "DexAction": { + "description": "Possible raw actions to perform on the DEX", + "oneOf": [ + { + "description": "Provide arbitrary liquidity", + "type": "object", + "required": [ + "provide_liquidity" + ], + "properties": { + "provide_liquidity": { + "type": "object", + "required": [ + "assets", + "pool" + ], + "properties": { + "assets": { + "description": "Assets to add", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "max_spread": { + "description": "Max spread to accept, is a percentage represented as a decimal.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "pool": { + "description": "Pool to provide liquidity to", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw liquidity from a pool", + "type": "object", + "required": [ + "withdraw_liquidity" + ], + "properties": { + "withdraw_liquidity": { + "type": "object", + "required": [ + "lp_token", + "pool" + ], + "properties": { + "lp_token": { + "description": "The asset LP token that is provided.", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool to withdraw liquidity from", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Standard swap between one asset to another", + "type": "object", + "required": [ + "swap" + ], + "properties": { + "swap": { + "type": "object", + "required": [ + "ask_asset", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool used to swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Swap by route between multiple assets", + "type": "object", + "required": [ + "route_swap" + ], + "properties": { + "route_swap": { + "type": "object", + "required": [ + "offer_asset", + "route" + ], + "properties": { + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "route": { + "description": "Pool routes used to swap", + "type": "array", + "items": { + "$ref": "#/definitions/SwapNode_for_String" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DexExecuteMsg": { + "description": "Dex Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "swap_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "object", + "required": [ + "action", + "dex" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/DexAction" + } + ] + }, + "dex": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "PoolAddressBase_for_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "separate_addresses" + ], + "properties": { + "separate_addresses": { + "type": "object", + "required": [ + "liquidity", + "swap" + ], + "properties": { + "liquidity": { + "type": "string" + }, + "swap": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + ] + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "SwapNode_for_String": { + "description": "Swap node for swap route", + "type": "object", + "required": [ + "ask_asset", + "pool_id" + ], + "properties": { + "ask_asset": { + "description": "Asset in return from the swap", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "pool_id": { + "description": "Pool id of the swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/dex/0.23.0/instantiate_msg.json b/schema/dex/0.23.0/instantiate_msg.json new file mode 100644 index 0000000000..396f0294b2 --- /dev/null +++ b/schema/dex/0.23.0/instantiate_msg.json @@ -0,0 +1,78 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/DexInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseInstantiateMsg": { + "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", + "type": "object", + "required": [ + "ans_host_address", + "version_control_address" + ], + "properties": { + "ans_host_address": { + "description": "Used to easily perform address translation", + "type": "string" + }, + "version_control_address": { + "description": "Used to verify senders", + "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" + }, + "DexInstantiateMsg": { + "description": "Instantiation message for dex adapter", + "type": "object", + "required": [ + "recipient_account", + "swap_fee" + ], + "properties": { + "recipient_account": { + "description": "Recipient account for fees.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "swap_fee": { + "description": "Fee charged on each swap.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/dex/0.23.0/module-schema.json b/schema/dex/0.23.0/module-schema.json new file mode 100644 index 0000000000..87a8a6b943 --- /dev/null +++ b/schema/dex/0.23.0/module-schema.json @@ -0,0 +1,2201 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Instantiation message for dex adapter", + "type": "object", + "required": [ + "recipient_account", + "swap_fee" + ], + "properties": { + "recipient_account": { + "description": "Recipient account for fees.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "swap_fee": { + "description": "Fee charged on each swap.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Dex Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "swap_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "object", + "required": [ + "action", + "dex" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/DexAction" + } + ] + }, + "dex": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "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" + }, + "DexAction": { + "description": "Possible raw actions to perform on the DEX", + "oneOf": [ + { + "description": "Provide arbitrary liquidity", + "type": "object", + "required": [ + "provide_liquidity" + ], + "properties": { + "provide_liquidity": { + "type": "object", + "required": [ + "assets", + "pool" + ], + "properties": { + "assets": { + "description": "Assets to add", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "max_spread": { + "description": "Max spread to accept, is a percentage represented as a decimal.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "pool": { + "description": "Pool to provide liquidity to", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw liquidity from a pool", + "type": "object", + "required": [ + "withdraw_liquidity" + ], + "properties": { + "withdraw_liquidity": { + "type": "object", + "required": [ + "lp_token", + "pool" + ], + "properties": { + "lp_token": { + "description": "The asset LP token that is provided.", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool to withdraw liquidity from", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Standard swap between one asset to another", + "type": "object", + "required": [ + "swap" + ], + "properties": { + "swap": { + "type": "object", + "required": [ + "ask_asset", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool used to swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Swap by route between multiple assets", + "type": "object", + "required": [ + "route_swap" + ], + "properties": { + "route_swap": { + "type": "object", + "required": [ + "offer_asset", + "route" + ], + "properties": { + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "route": { + "description": "Pool routes used to swap", + "type": "array", + "items": { + "$ref": "#/definitions/SwapNode_for_String" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "PoolAddressBase_for_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "separate_addresses" + ], + "properties": { + "separate_addresses": { + "type": "object", + "required": [ + "liquidity", + "swap" + ], + "properties": { + "liquidity": { + "type": "string" + }, + "swap": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "SwapNode_for_String": { + "description": "Swap node for swap route", + "type": "object", + "required": [ + "ask_asset", + "pool_id" + ], + "properties": { + "ask_asset": { + "description": "Asset in return from the swap", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "pool_id": { + "description": "Pool id of the swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Query messages for the dex adapter", + "oneOf": [ + { + "description": "Simulate a swap between two assets Returns [`SimulateSwapResponse`]", + "type": "object", + "required": [ + "simulate_swap" + ], + "properties": { + "simulate_swap": { + "type": "object", + "required": [ + "ask_asset", + "dex", + "offer_asset" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "dex": { + "description": "Name of the dex to simulate the swap on", + "type": "string" + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulate a swap between two assets Returns [`SimulateSwapResponse`]", + "type": "object", + "required": [ + "simulate_swap_raw" + ], + "properties": { + "simulate_swap_raw": { + "type": "object", + "required": [ + "ask_asset", + "dex", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "dex": { + "description": "Name of the dex to simulate the swap on", + "type": "string" + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Identifies of the pool to simulate the swap on.", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Endpoint can be used by front-end to easily interact with contracts. Returns [`GenerateMessagesResponse`]", + "type": "object", + "required": [ + "generate_messages" + ], + "properties": { + "generate_messages": { + "type": "object", + "required": [ + "addr_as_sender", + "message" + ], + "properties": { + "addr_as_sender": { + "description": "Sender Addr generate messages for", + "type": "string" + }, + "message": { + "description": "Execute message to generate messages for", + "allOf": [ + { + "$ref": "#/definitions/DexExecuteMsg" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fee info for using the different dex actions", + "type": "object", + "required": [ + "fees" + ], + "properties": { + "fees": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "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" + }, + "DexAction": { + "description": "Possible raw actions to perform on the DEX", + "oneOf": [ + { + "description": "Provide arbitrary liquidity", + "type": "object", + "required": [ + "provide_liquidity" + ], + "properties": { + "provide_liquidity": { + "type": "object", + "required": [ + "assets", + "pool" + ], + "properties": { + "assets": { + "description": "Assets to add", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "max_spread": { + "description": "Max spread to accept, is a percentage represented as a decimal.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "pool": { + "description": "Pool to provide liquidity to", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw liquidity from a pool", + "type": "object", + "required": [ + "withdraw_liquidity" + ], + "properties": { + "withdraw_liquidity": { + "type": "object", + "required": [ + "lp_token", + "pool" + ], + "properties": { + "lp_token": { + "description": "The asset LP token that is provided.", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool to withdraw liquidity from", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Standard swap between one asset to another", + "type": "object", + "required": [ + "swap" + ], + "properties": { + "swap": { + "type": "object", + "required": [ + "ask_asset", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool used to swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Swap by route between multiple assets", + "type": "object", + "required": [ + "route_swap" + ], + "properties": { + "route_swap": { + "type": "object", + "required": [ + "offer_asset", + "route" + ], + "properties": { + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "route": { + "description": "Pool routes used to swap", + "type": "array", + "items": { + "$ref": "#/definitions/SwapNode_for_String" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DexExecuteMsg": { + "description": "Dex Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "swap_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "object", + "required": [ + "action", + "dex" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/DexAction" + } + ] + }, + "dex": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "PoolAddressBase_for_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "separate_addresses" + ], + "properties": { + "separate_addresses": { + "type": "object", + "required": [ + "liquidity", + "swap" + ], + "properties": { + "liquidity": { + "type": "string" + }, + "swap": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "additionalProperties": false + } + ] + }, + "SwapNode_for_String": { + "description": "Swap node for swap route", + "type": "object", + "required": [ + "ask_asset", + "pool_id" + ], + "properties": { + "ask_asset": { + "description": "Asset in return from the swap", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "pool_id": { + "description": "Pool id of the swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "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" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "fees": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DexFeesResponse", + "description": "Response for Dex Fees", + "type": "object", + "required": [ + "recipient", + "swap_fee" + ], + "properties": { + "recipient": { + "description": "Address where all fees will go", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "swap_fee": { + "description": "Fee for using swap action", + "allOf": [ + { + "$ref": "#/definitions/Fee" + } + ] + } + }, + "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" + }, + "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" + }, + "Fee": { + "description": "A wrapper around Decimal to help handle fractional fees.", + "type": "object", + "required": [ + "share" + ], + "properties": { + "share": { + "description": "fraction of asset to take as fee.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "generate_messages": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenerateMessagesResponse", + "description": "Response from GenerateMsgs", + "type": "object", + "required": [ + "messages" + ], + "properties": { + "messages": { + "description": "Messages generated for dex action", + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + } + }, + "additionalProperties": false, + "definitions": { + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } + }, + "simulate_swap": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SimulateSwapResponse_for_AssetEntry", + "description": "Response for simulating a swap.", + "type": "object", + "required": [ + "commission", + "pool", + "return_amount", + "spread_amount", + "usage_fee" + ], + "properties": { + "commission": { + "description": "Commission charged for the swap", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "$ref": "#/definitions/Uint128" + } + ], + "maxItems": 2, + "minItems": 2 + }, + "pool": { + "description": "The pool on which the swap was simulated", + "allOf": [ + { + "$ref": "#/definitions/DexAssetPairing_for_AssetEntry" + } + ] + }, + "return_amount": { + "description": "Amount you would receive when performing the swap.", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "spread_amount": { + "description": "Spread in ask_asset for this swap", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "usage_fee": { + "description": "Adapter fee charged for the swap (paid in offer asset)", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "DexAssetPairing_for_AssetEntry": { + "description": "The key for an asset pairing Consists of the two assets and the dex name TODO: what if we made keys equal based on the two assets either way?", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "string" + } + ], + "maxItems": 3, + "minItems": 3 + }, + "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" + } + } + }, + "simulate_swap_raw": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SimulateSwapResponse_for_AssetInfoBase_for_String", + "description": "Response for simulating a swap.", + "type": "object", + "required": [ + "commission", + "pool", + "return_amount", + "spread_amount", + "usage_fee" + ], + "properties": { + "commission": { + "description": "Commission charged for the swap", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + }, + { + "$ref": "#/definitions/Uint128" + } + ], + "maxItems": 2, + "minItems": 2 + }, + "pool": { + "description": "The pool on which the swap was simulated", + "allOf": [ + { + "$ref": "#/definitions/DexAssetPairing_for_AssetInfoBase_for_String" + } + ] + }, + "return_amount": { + "description": "Amount you would receive when performing the swap.", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "spread_amount": { + "description": "Spread in ask_asset for this swap", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "usage_fee": { + "description": "Adapter fee charged for the swap (paid in offer asset)", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "DexAssetPairing_for_AssetInfoBase_for_String": { + "description": "The key for an asset pairing Consists of the two assets and the dex name TODO: what if we made keys equal based on the two assets either way?", + "type": "array", + "items": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + }, + { + "type": "string" + } + ], + "maxItems": 3, + "minItems": 3 + }, + "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" + } + } + } + } +} diff --git a/schema/dex/0.23.0/query_msg.json b/schema/dex/0.23.0/query_msg.json new file mode 100644 index 0000000000..2d01f49704 --- /dev/null +++ b/schema/dex/0.23.0/query_msg.json @@ -0,0 +1,680 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/DexQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "BaseQueryMsg": { + "description": "Query adapter message", + "oneOf": [ + { + "description": "Returns [`AdapterConfigResponse`].", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`AuthorizedAddressesResponse`].", + "type": "object", + "required": [ + "authorized_addresses" + ], + "properties": { + "authorized_addresses": { + "type": "object", + "required": [ + "proxy_address" + ], + "properties": { + "proxy_address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`].", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "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" + }, + "DexAction": { + "description": "Possible raw actions to perform on the DEX", + "oneOf": [ + { + "description": "Provide arbitrary liquidity", + "type": "object", + "required": [ + "provide_liquidity" + ], + "properties": { + "provide_liquidity": { + "type": "object", + "required": [ + "assets", + "pool" + ], + "properties": { + "assets": { + "description": "Assets to add", + "type": "array", + "items": { + "$ref": "#/definitions/AssetBase_for_String" + } + }, + "max_spread": { + "description": "Max spread to accept, is a percentage represented as a decimal.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "pool": { + "description": "Pool to provide liquidity to", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw liquidity from a pool", + "type": "object", + "required": [ + "withdraw_liquidity" + ], + "properties": { + "withdraw_liquidity": { + "type": "object", + "required": [ + "lp_token", + "pool" + ], + "properties": { + "lp_token": { + "description": "The asset LP token that is provided.", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool to withdraw liquidity from", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Standard swap between one asset to another", + "type": "object", + "required": [ + "swap" + ], + "properties": { + "swap": { + "type": "object", + "required": [ + "ask_asset", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Pool used to swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Swap by route between multiple assets", + "type": "object", + "required": [ + "route_swap" + ], + "properties": { + "route_swap": { + "type": "object", + "required": [ + "offer_asset", + "route" + ], + "properties": { + "belief_price": { + "description": "The belief price when submitting the transaction.", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "max_spread": { + "description": "The percentage of spread compared to pre-swap price or belief price (if provided)", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "route": { + "description": "Pool routes used to swap", + "type": "array", + "items": { + "$ref": "#/definitions/SwapNode_for_String" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DexExecuteMsg": { + "description": "Dex Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "swap_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "type": "object", + "required": [ + "action", + "dex" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/DexAction" + } + ] + }, + "dex": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "DexQueryMsg": { + "description": "Query messages for the dex adapter", + "oneOf": [ + { + "description": "Simulate a swap between two assets Returns [`SimulateSwapResponse`]", + "type": "object", + "required": [ + "simulate_swap" + ], + "properties": { + "simulate_swap": { + "type": "object", + "required": [ + "ask_asset", + "dex", + "offer_asset" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "dex": { + "description": "Name of the dex to simulate the swap on", + "type": "string" + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Simulate a swap between two assets Returns [`SimulateSwapResponse`]", + "type": "object", + "required": [ + "simulate_swap_raw" + ], + "properties": { + "simulate_swap_raw": { + "type": "object", + "required": [ + "ask_asset", + "dex", + "offer_asset", + "pool" + ], + "properties": { + "ask_asset": { + "description": "The asset to receive", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "dex": { + "description": "Name of the dex to simulate the swap on", + "type": "string" + }, + "offer_asset": { + "description": "The asset to offer", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "pool": { + "description": "Identifies of the pool to simulate the swap on.", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Endpoint can be used by front-end to easily interact with contracts. Returns [`GenerateMessagesResponse`]", + "type": "object", + "required": [ + "generate_messages" + ], + "properties": { + "generate_messages": { + "type": "object", + "required": [ + "addr_as_sender", + "message" + ], + "properties": { + "addr_as_sender": { + "description": "Sender Addr generate messages for", + "type": "string" + }, + "message": { + "description": "Execute message to generate messages for", + "allOf": [ + { + "$ref": "#/definitions/DexExecuteMsg" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fee info for using the different dex actions", + "type": "object", + "required": [ + "fees" + ], + "properties": { + "fees": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "PoolAddressBase_for_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "separate_addresses" + ], + "properties": { + "separate_addresses": { + "type": "object", + "required": [ + "liquidity", + "swap" + ], + "properties": { + "liquidity": { + "type": "string" + }, + "swap": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "contract" + ], + "properties": { + "contract": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + ] + }, + "SwapNode_for_String": { + "description": "Swap node for swap route", + "type": "object", + "required": [ + "ask_asset", + "pool_id" + ], + "properties": { + "ask_asset": { + "description": "Asset in return from the swap", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "pool_id": { + "description": "Pool id of the swap", + "allOf": [ + { + "$ref": "#/definitions/PoolAddressBase_for_String" + } + ] + } + }, + "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" + } + } +} diff --git a/schema/ibc-client/0.23.0/abstract-ibc-client.json b/schema/ibc-client/0.23.0/abstract-ibc-client.json index 0eb48c13ff..ce525c950e 100644 --- a/schema/ibc-client/0.23.0/abstract-ibc-client.json +++ b/schema/ibc-client/0.23.0/abstract-ibc-client.json @@ -75,6 +75,34 @@ }, "additionalProperties": false }, + { + "description": "Owner method: Update the config on IBC client", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host": { + "type": [ + "string", + "null" + ] + }, + "version_control": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, { "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", "type": "object", @@ -434,23 +462,6 @@ "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" }, - "AnyMsg": { - "description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, "Attribute": { "description": "An key value pair that is used in the context of event attributes in logs", "type": "object", @@ -465,67 +476,7 @@ "value": { "type": "string" } - }, - "additionalProperties": false - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] + } }, "BankQuery": { "oneOf": [ @@ -545,8 +496,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -571,8 +521,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -593,8 +542,7 @@ "address": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -615,8 +563,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -641,8 +588,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -768,79 +714,165 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } }, - "CosmosMsg_for_Empty": { + "DistributionQuery": { "oneOf": [ { + "description": "See ", "type": "object", "required": [ - "bank" + "delegator_withdraw_address" ], "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "custom" + "delegation_rewards" ], "properties": { - "custom": { - "$ref": "#/definitions/Empty" + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "staking" + "delegation_total_rewards" ], "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "distribution" + "delegator_validators" ], "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecuteMsg": { + "description": "Manager execute messages", + "oneOf": [ { - "description": "This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "deprecated": true, + "description": "Forward execution message to module", "type": "object", "required": [ - "stargate" + "exec_on_module" ], "properties": { - "stargate": { + "exec_on_module": { "type": "object", "required": [ - "type_url", - "value" + "exec_msg", + "module_id" ], "properties": { - "type_url": { - "type": "string" - }, - "value": { + "exec_msg": { "$ref": "#/definitions/Binary" + }, + "module_id": { + "type": "string" } }, "additionalProperties": false @@ -849,78 +881,57 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is suppored by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", - "type": "object", - "required": [ - "any" - ], - "properties": { - "any": { - "$ref": "#/definitions/AnyMsg" - } - }, - "additionalProperties": false - }, - { + "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", "type": "object", "required": [ - "ibc" + "update_internal_config" ], "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" + "update_internal_config": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false }, { + "description": "Install module using module factory, callable by Owner", "type": "object", "required": [ - "wasm" + "install_modules" ], "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" + "install_modules": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + } + }, + "additionalProperties": false } }, "additionalProperties": false }, { + "description": "Uninstall a module given its ID.", "type": "object", "required": [ - "gov" + "uninstall_module" ], "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "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" - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "set_withdraw_address" - ], - "properties": { - "set_withdraw_address": { + "uninstall_module": { "type": "object", "required": [ - "address" + "module_id" ], "properties": { - "address": { - "description": "The `withdraw_address`", + "module_id": { "type": "string" } }, @@ -930,21 +941,40 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "Upgrade the module to a new version If module is `abstract::manager` then the contract will do a self-migration.", "type": "object", "required": [ - "withdraw_delegator_reward" + "upgrade" ], "properties": { - "withdraw_delegator_reward": { + "upgrade": { "type": "object", "required": [ - "validator" + "modules" ], "properties": { - "validator": { - "description": "The `validator_address`", - "type": "string" + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/ModuleInfo" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } } }, "additionalProperties": false @@ -953,50 +983,88 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "description": "Creates a sub-account on the account", "type": "object", "required": [ - "fund_community_pool" + "create_sub_account" ], "properties": { - "fund_community_pool": { + "create_sub_account": { "type": "object", "required": [ - "amount" + "install_modules", + "name" ], "properties": { - "amount": { - "description": "The amount to spend", + "account_id": { + "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { "type": "array", "items": { - "$ref": "#/definitions/Coin" + "$ref": "#/definitions/ModuleInstallConfig" } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false } }, "additionalProperties": false - } - ] - }, - "DistributionQuery": { - "oneOf": [ + }, { - "description": "See ", + "description": "Update info", "type": "object", "required": [ - "delegator_withdraw_address" + "update_info" ], "properties": { - "delegator_withdraw_address": { + "update_info": { "type": "object", - "required": [ - "delegator_address" - ], "properties": { - "delegator_address": { - "type": "string" + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -1005,24 +1073,20 @@ "additionalProperties": false }, { - "description": "See ", + "description": "Update account statuses", "type": "object", "required": [ - "delegation_rewards" + "update_status" ], "properties": { - "delegation_rewards": { + "update_status": { "type": "object", - "required": [ - "delegator_address", - "validator_address" - ], "properties": { - "delegator_address": { - "type": "string" - }, - "validator_address": { - "type": "string" + "is_suspended": { + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false @@ -1031,225 +1095,142 @@ "additionalProperties": false }, { - "description": "See ", + "description": "Actions called by internal or external sub-accounts", "type": "object", "required": [ - "delegation_total_rewards" + "update_sub_account" ], "properties": { - "delegation_total_rewards": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { - "type": "string" - } - }, - "additionalProperties": false + "update_sub_account": { + "$ref": "#/definitions/UpdateSubAccountAction" } }, "additionalProperties": false }, { - "description": "See ", + "description": "Callback endpoint", "type": "object", "required": [ - "delegator_validators" + "callback" ], "properties": { - "delegator_validators": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { - "type": "string" - } - }, - "additionalProperties": false + "callback": { + "$ref": "#/definitions/CallbackMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/GovAction" } }, "additionalProperties": false } ] }, - "Empty": { - "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", - "type": "object", - "additionalProperties": false - }, - "ErrorResponse": { + "ExecutionResponse": { "type": "object", "required": [ - "error", - "message_index" + "executed_by", + "result" ], "properties": { - "error": { - "description": "The error that occured executing the message.", + "executed_by": { + "description": "The address on the remote chain that executed the messages.", "type": "string" }, - "message_index": { - "description": "The index of the first message who's execution failed.", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - } - }, - "additionalProperties": false - }, - "Event": { - "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", - "type": "object", - "required": [ - "attributes", - "type" - ], - "properties": { - "attributes": { - "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", "type": "array", "items": { - "$ref": "#/definitions/Attribute" + "$ref": "#/definitions/SubMsgResponse" } - }, - "type": { - "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", - "type": "string" } }, "additionalProperties": false }, - "ExecuteMsg": { + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { - "description": "Update the ownership.", + "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ - "update_ownership" + "at_height" ], "properties": { - "update_ownership": { - "$ref": "#/definitions/Action" + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 } }, "additionalProperties": false }, { - "description": "Owner method: Registers the polytone note on the local chain as well as the host on the remote chain to send messages through This allows for monitoring which chain are connected to the contract remotely", + "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ - "register_infrastructure" + "at_time" ], "properties": { - "register_infrastructure": { - "type": "object", - "required": [ - "chain", - "host", - "note" - ], - "properties": { - "chain": { - "description": "Chain to register the infrastructure for (\"juno\", \"osmosis\", etc.)", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "host": { - "description": "Address of the abstract host deployed on the remote chain", - "type": "string" - }, - "note": { - "description": "Polytone note (locally deployed)", - "type": "string" - } - }, - "additionalProperties": false + "at_time": { + "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { - "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", + "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ - "send_funds" + "never" ], "properties": { - "send_funds": { + "never": { "type": "object", - "required": [ - "funds", - "host_chain" - ], - "properties": { - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "memo": { - "type": [ - "string", - "null" - ] - } - }, "additionalProperties": false } }, "additionalProperties": false - }, + } + ] + }, + "GovAction": { + "description": "Actions that can be taken to alter the contract's governance ownership", + "oneOf": [ { - "description": "Only callable by Account proxy Register an Account on a remote chain over IBC This action creates a proxy for them on the remote chain.", + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", "type": "object", "required": [ - "register" + "transfer_ownership" ], "properties": { - "register": { + "transfer_ownership": { "type": "object", "required": [ - "host_chain", - "install_modules" + "new_owner" ], "properties": { - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, { - "$ref": "#/definitions/TruncatedChainId" + "type": "null" } ] }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "namespace": { - "type": [ - "string", - "null" - ] + "new_owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" } }, "additionalProperties": false @@ -1258,197 +1239,170 @@ "additionalProperties": false }, { - "description": "Only callable by Account Module", + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", "type": "object", "required": [ - "module_ibc_action" + "Monarchy" ], "properties": { - "module_ibc_action": { + "Monarchy": { "type": "object", "required": [ - "host_chain", - "msg", - "target_module" + "monarch" ], "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "anyOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "type": "null" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "msg": { - "description": "Json-encoded IbcMsg to the target module", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "target_module": { - "description": "Module of this account on host chain", - "allOf": [ - { - "$ref": "#/definitions/ModuleInfo" - } - ] + "monarch": { + "description": "The monarch's address", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Only callable by Account Module", + "description": "Used when the account is a sub-account of another account.", "type": "object", "required": [ - "ibc_query" + "SubAccount" ], "properties": { - "ibc_query": { + "SubAccount": { "type": "object", "required": [ - "callback", - "host_chain", - "queries" + "manager", + "proxy" ], "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "allOf": [ - { - "$ref": "#/definitions/Callback" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" }, - "queries": { - "description": "Cosmos Query requests", - "type": "array", - "items": { - "$ref": "#/definitions/QueryRequest_for_ModuleQuery" - } + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Only callable by Account Proxy Action on remote ibc host Which currently only support manager messages", + "description": "An external governance source", "type": "object", "required": [ - "remote_action" + "External" ], "properties": { - "remote_action": { + "External": { "type": "object", "required": [ - "action", - "host_chain" + "governance_address", + "governance_type" ], "properties": { - "action": { - "description": "execute the custom host function", - "allOf": [ - { - "$ref": "#/definitions/HostAction" - } - ] + "governance_address": { + "description": "The external contract address", + "type": "string" }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Owner method: Remove connection for remote chain", + "description": "Renounced account This account no longer has an owner and cannot be used.", "type": "object", "required": [ - "remove_host" + "Renounced" ], "properties": { - "remove_host": { - "type": "object", - "required": [ - "host_chain" - ], - "properties": { - "host_chain": { - "$ref": "#/definitions/TruncatedChainId" - } - }, - "additionalProperties": false + "Renounced": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Callback from the Polytone implementation This is triggered regardless of the execution result", "type": "object", "required": [ - "callback" + "NFT" ], "properties": { - "callback": { - "$ref": "#/definitions/CallbackMessage" + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } } }, "additionalProperties": false } ] }, - "ExecuteMsg_for_Empty": { + "HelperAction": { + "oneOf": [ + { + "description": "What do we need here ? TODO", + "type": "string", + "enum": [ + "send_all_back" + ] + } + ] + }, + "HostAction": { + "description": "Callable actions on a remote host", "oneOf": [ { - "description": "Executes the provided messages if sender is whitelisted", + "description": "Dispatch messages to a remote manager contract. Will create a new Account if required.", "type": "object", "required": [ - "module_action" + "dispatch" ], "properties": { - "module_action": { + "dispatch": { "type": "object", "required": [ - "msgs" + "manager_msgs" ], "properties": { - "msgs": { + "manager_msgs": { "type": "array", "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" + "$ref": "#/definitions/ExecuteMsg" } } }, @@ -1458,982 +1412,75 @@ "additionalProperties": false }, { - "description": "Execute a message and forward the Response data", + "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", "type": "object", "required": [ - "module_action_with_data" + "internal" ], "properties": { - "module_action_with_data": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "additionalProperties": false + "internal": { + "$ref": "#/definitions/InternalAction" } }, "additionalProperties": false }, { - "description": "Execute IBC action on Client", + "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", "type": "object", "required": [ - "ibc_action" + "helpers" ], "properties": { - "ibc_action": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/ExecuteMsg" - } - }, - "additionalProperties": false + "helpers": { + "$ref": "#/definitions/HelperAction" + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Queries the Abstract Ica Client with the provided action query. Provides access to different ICA implementations for different ecosystems.", + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", "type": "object", "required": [ - "ica_action" + "list_channels" ], "properties": { - "ica_action": { + "list_channels": { "type": "object", - "required": [ - "action_query_msg" - ], "properties": { - "action_query_msg": { - "description": "Query of type `abstract-ica-client::msg::QueryMsg`", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } + "port_id": { + "type": [ + "string", + "null" ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Forward execution message to module", + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", "type": "object", "required": [ - "exec_on_module" - ], - "properties": { - "exec_on_module": { - "type": "object", - "required": [ - "exec_msg", - "module_id" - ], - "properties": { - "exec_msg": { - "$ref": "#/definitions/Binary" - }, - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", - "type": "object", - "required": [ - "update_internal_config" - ], - "properties": { - "update_internal_config": { - "$ref": "#/definitions/InternalConfigAction" - } - }, - "additionalProperties": false - }, - { - "description": "Install module using module factory, callable by Owner", - "type": "object", - "required": [ - "install_modules" - ], - "properties": { - "install_modules": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Uninstall a module given its ID.", - "type": "object", - "required": [ - "uninstall_module" - ], - "properties": { - "uninstall_module": { - "type": "object", - "required": [ - "module_id" - ], - "properties": { - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Upgrade the module to a new version If module is `abstract::account` then the contract will do a self-migration. Self-migration is protected and only possible to the [`crate::objects::module_reference::ModuleReference::Account`] registered in Version Control", - "type": "object", - "required": [ - "upgrade" - ], - "properties": { - "upgrade": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/ModuleInfo" - }, - { - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Creates a sub-account on the account", - "type": "object", - "required": [ - "create_sub_account" - ], - "properties": { - "create_sub_account": { - "type": "object", - "required": [ - "install_modules", - "name" - ], - "properties": { - "account_id": { - "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update info", - "type": "object", - "required": [ - "update_info" - ], - "properties": { - "update_info": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update account statuses", - "type": "object", - "required": [ - "update_status" - ], - "properties": { - "update_status": { - "type": "object", - "properties": { - "is_suspended": { - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Actions called by internal or external sub-accounts", - "type": "object", - "required": [ - "update_sub_account" - ], - "properties": { - "update_sub_account": { - "$ref": "#/definitions/UpdateSubAccountAction" - } - }, - "additionalProperties": false - }, - { - "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", - "type": "object", - "required": [ - "update_ownership" - ], - "properties": { - "update_ownership": { - "$ref": "#/definitions/GovAction" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "add_auth_method" - ], - "properties": { - "add_auth_method": { - "type": "object", - "required": [ - "add_authenticator" - ], - "properties": { - "add_authenticator": { - "$ref": "#/definitions/Empty" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "remove_auth_method" - ], - "properties": { - "remove_auth_method": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Callback endpoint", - "type": "object", - "required": [ - "callback" - ], - "properties": { - "callback": { - "$ref": "#/definitions/CallbackMsg" - } - }, - "additionalProperties": false - } - ] - }, - "ExecutionResponse": { - "type": "object", - "required": [ - "executed_by", - "result" - ], - "properties": { - "executed_by": { - "description": "The address on the remote chain that executed the messages.", - "type": "string" - }, - "result": { - "description": "Index `i` corresponds to the result of executing the `i`th message.", - "type": "array", - "items": { - "$ref": "#/definitions/SubMsgResponse" - } - } - }, - "additionalProperties": false - }, - "Expiration": { - "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", - "oneOf": [ - { - "description": "AtHeight will expire when `env.block.height` >= height", - "type": "object", - "required": [ - "at_height" - ], - "properties": { - "at_height": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - { - "description": "AtTime will expire when `env.block.time` >= time", - "type": "object", - "required": [ - "at_time" - ], - "properties": { - "at_time": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - }, - { - "description": "Never will never expire. Used to express the empty variant", - "type": "object", - "required": [ - "never" - ], - "properties": { - "never": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovAction": { - "description": "Actions that can be taken to alter the contract's governance ownership", - "oneOf": [ - { - "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", - "type": "object", - "required": [ - "transfer_ownership" - ], - "properties": { - "transfer_ownership": { - "type": "object", - "required": [ - "new_owner" - ], - "properties": { - "expiry": { - "anyOf": [ - { - "$ref": "#/definitions/Expiration" - }, - { - "type": "null" - } - ] - }, - "new_owner": { - "$ref": "#/definitions/GovernanceDetails_for_String" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", - "type": "string", - "enum": [ - "accept_ownership" - ] - }, - { - "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", - "type": "string", - "enum": [ - "renounce_ownership" - ] - } - ] - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "option", - "proposal_id" - ], - "properties": { - "option": { - "description": "The vote option.\n\nThis used to be called \"vote\", but was changed for consistency with Cosmos SDK.", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote_weighted" - ], - "properties": { - "vote_weighted": { - "type": "object", - "required": [ - "options", - "proposal_id" - ], - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/WeightedVoteOption" - } - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovernanceDetails_for_String": { - "description": "Governance types", - "oneOf": [ - { - "description": "A single address is admin", - "type": "object", - "required": [ - "Monarchy" - ], - "properties": { - "Monarchy": { - "type": "object", - "required": [ - "monarch" - ], - "properties": { - "monarch": { - "description": "The monarch's address", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Used when the account is a sub-account of another account.", - "type": "object", - "required": [ - "SubAccount" - ], - "properties": { - "SubAccount": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "An external governance source", - "type": "object", - "required": [ - "External" - ], - "properties": { - "External": { - "type": "object", - "required": [ - "governance_address", - "governance_type" - ], - "properties": { - "governance_address": { - "description": "The external contract address", - "type": "string" - }, - "governance_type": { - "description": "Governance type used for doing extra off-chain queries depending on the type.", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "NFT" - ], - "properties": { - "NFT": { - "type": "object", - "required": [ - "collection_addr", - "token_id" - ], - "properties": { - "collection_addr": { - "type": "string" - }, - "token_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Abstract account. Admin actions have to be sent through signature bit flag\n\nMore details: https://github.com/burnt-labs/abstract-account/blob/2c933a7b2a8dacc0ae5bf4344159a7d4ab080135/README.md", - "type": "object", - "required": [ - "AbstractAccount" - ], - "properties": { - "AbstractAccount": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "Address of this abstract account", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Renounced account This account no longer has an owner and cannot be used.", - "type": "object", - "required": [ - "Renounced" - ], - "properties": { - "Renounced": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GrpcQuery": { - "description": "Queries the chain using a grpc query. This allows to query information that is not exposed in our API. The chain needs to allowlist the supported queries. The drawback of this query is that you have to handle the protobuf encoding and decoding yourself.\n\nThe returned data is protobuf encoded. The protobuf type depends on the query. Because of this, using it with the [`query`](crate::QuerierWrapper::query) function will result in a deserialization error. Use [`raw_query`](crate::Querier::raw_query) or [`query_grpc`](crate::QuerierWrapper::query_grpc) instead.\n\nTo find the path, as well as the request and response types, you can query the chain's gRPC endpoint using a tool like [grpcurl](https://github.com/fullstorydev/grpcurl).", - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "The expected protobuf message type (not [Any](https://protobuf.dev/programming-guides/proto3/#any)), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "The fully qualified endpoint path used for routing. It follows the format `/service_path/method_name`, eg. \"/cosmos.authz.v1beta1.Query/Grants\"", - "type": "string" - } - }, - "additionalProperties": false - }, - "HelperAction": { - "oneOf": [ - { - "description": "What do we need here ? TODO", - "type": "string", - "enum": [ - "send_all_back" - ] - } - ] - }, - "HostAction": { - "description": "Callable actions on a remote host", - "oneOf": [ - { - "description": "Dispatch messages to a remote Account. Will create a new Account if required.", - "type": "object", - "required": [ - "dispatch" - ], - "properties": { - "dispatch": { - "type": "object", - "required": [ - "account_msgs" - ], - "properties": { - "account_msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/ExecuteMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", - "type": "object", - "required": [ - "internal" - ], - "properties": { - "internal": { - "$ref": "#/definitions/InternalAction" - } - }, - "additionalProperties": false - }, - { - "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", - "type": "object", - "required": [ - "helpers" - ], - "properties": { - "helpers": { - "$ref": "#/definitions/HelperAction" - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "memo": { - "description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.", - "type": [ - "string", - "null" - ] - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "IbcQuery": { - "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", - "oneOf": [ - { - "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", - "type": "object", - "required": [ - "port_id" - ], - "properties": { - "port_id": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", - "type": "object", - "required": [ - "list_channels" - ], - "properties": { - "list_channels": { - "type": "object", - "properties": { - "port_id": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", - "type": "object", - "required": [ - "channel" + "channel" ], "properties": { "channel": { @@ -2451,63 +1498,12 @@ "null" ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false + ] }, "InstalledModuleIdentification": { "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", @@ -2583,87 +1579,6 @@ } ] }, - "InternalConfigAction": { - "description": "Internal configuration actions accessible from the [`ExecuteMsg::UpdateInternalConfig`] message.", - "oneOf": [ - { - "description": "Updates the [`state::ACCOUNT_MODULES`] map Only callable by owner.", - "type": "object", - "required": [ - "update_module_addresses" - ], - "properties": { - "update_module_addresses": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ], - "maxItems": 2, - "minItems": 2 - } - }, - "to_remove": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update the execution whitelist in [`state::WHITELISTED_MODULES`] Only callable by owner.", - "type": "object", - "required": [ - "update_whitelist" - ], - "properties": { - "update_whitelist": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "description": "Addresses to add to the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - }, - "to_remove": { - "description": "Addresses to remove from the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, "ModuleInfo": { "description": "Stores the namespace, name, and version of an Abstract module.", "type": "object", @@ -2767,22 +1682,6 @@ } ] }, - "MsgResponse": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, "Namespace": { "description": "Represents an Abstract namespace for modules", "type": "string" @@ -2803,709 +1702,342 @@ { "type": "null" } - ] - }, - "limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "reverse": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "QueryRequest_for_ModuleQuery": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/ModuleQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionQuery" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", - "deprecated": true, - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "this is the expected protobuf message type (not any), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "this is the fully qualified service path used for routing, eg. \"/cosmos_sdk.x.bank.v1.Query/QueryBalance\"", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "grpc" - ], - "properties": { - "grpc": { - "$ref": "#/definitions/GrpcQuery" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_Array_of_Binary_or_ErrorResponse": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_ExecutionResponse_or_String": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "$ref": "#/definitions/ExecutionResponse" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "type": "string" - } - }, - "additionalProperties": false + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" } - ] + } }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "QueryRequest_for_ModuleQuery": { "oneOf": [ { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ - "delegate" + "bank" ], "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false + "bank": { + "$ref": "#/definitions/BankQuery" } }, "additionalProperties": false }, { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ - "undelegate" + "custom" ], "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false + "custom": { + "$ref": "#/definitions/ModuleQuery" } }, "additionalProperties": false }, { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "StakingQuery": { - "oneOf": [ - { - "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", "type": "object", "required": [ - "bonded_denom" + "staking" ], "properties": { - "bonded_denom": { - "type": "object", - "additionalProperties": false + "staking": { + "$ref": "#/definitions/StakingQuery" } }, "additionalProperties": false }, { - "description": "AllDelegations will return all delegations by the delegator", "type": "object", "required": [ - "all_delegations" + "distribution" ], "properties": { - "all_delegations": { - "type": "object", - "required": [ - "delegator" - ], - "properties": { - "delegator": { - "type": "string" - } - }, - "additionalProperties": false + "distribution": { + "$ref": "#/definitions/DistributionQuery" } }, "additionalProperties": false }, { - "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", "type": "object", "required": [ - "delegation" + "stargate" ], "properties": { - "delegation": { + "stargate": { "type": "object", "required": [ - "delegator", - "validator" + "data", + "path" ], "properties": { - "delegator": { - "type": "string" + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] }, - "validator": { + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", "type": "object", "required": [ - "all_validators" + "ibc" ], "properties": { - "all_validators": { - "type": "object", - "additionalProperties": false + "ibc": { + "$ref": "#/definitions/IbcQuery" } }, "additionalProperties": false }, { - "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", "type": "object", "required": [ - "validator" + "wasm" ], "properties": { - "validator": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", - "type": "string" - } - }, - "additionalProperties": false + "wasm": { + "$ref": "#/definitions/WasmQuery" } }, "additionalProperties": false } ] }, - "SubMsgResponse": { - "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", - "type": "object", - "required": [ - "events" - ], - "properties": { - "data": { - "deprecated": true, - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } } - ] - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/Event" } }, - "msg_responses": { - "description": "The responses from the messages emitted by the submessage. In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message]. However, wasmd allows chains to translate a single contract message into multiple SDK messages. In that case all the MsgResponses from each are concatenated into this flattened `Vec`.\n\n[MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109 [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/MsgResponse" - } - } - }, - "additionalProperties": false - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ { - "$ref": "#/definitions/Uint64" + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } } ] }, - "TruncatedChainId": { - "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", - "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" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "UpdateSubAccountAction": { + "Result_of_ExecutionResponse_or_String": { "oneOf": [ { - "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", "type": "object", "required": [ - "unregister_sub_account" + "Ok" ], "properties": { - "unregister_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false + "Ok": { + "$ref": "#/definitions/ExecutionResponse" } - }, - "additionalProperties": false + } }, { - "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account", "type": "object", "required": [ - "register_sub_account" + "Err" ], "properties": { - "register_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false + "Err": { + "type": "string" } - }, - "additionalProperties": false + } } ] }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "StakingQuery": { "oneOf": [ { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", "type": "object", "required": [ - "execute" + "all_delegations" ], "properties": { - "execute": { + "all_delegations": { "type": "object", "required": [ - "contract_addr", - "funds", - "msg" + "delegator" ], "properties": { - "contract_addr": { + "delegator": { "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", "type": "object", "required": [ - "instantiate" + "delegation" ], "properties": { - "instantiate": { + "delegation": { "type": "object", "required": [ - "code_id", - "funds", - "label", - "msg" + "delegator", + "validator" ], "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "delegator": { "type": "string" }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] + "validator": { + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", "type": "object", "required": [ - "instantiate2" + "all_validators" ], "properties": { - "instantiate2": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg", - "salt" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "salt": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false + "all_validators": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", "type": "object", "required": [ - "migrate" + "validator" ], "properties": { - "migrate": { + "validator": { "type": "object", "required": [ - "contract_addr", - "msg", - "new_code_id" + "address" ], "properties": { - "contract_addr": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 } - }, - "additionalProperties": false + } } }, "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateSubAccountAction": { + "oneOf": [ { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", "type": "object", "required": [ - "update_admin" + "unregister_sub_account" ], "properties": { - "update_admin": { + "unregister_sub_account": { "type": "object", "required": [ - "admin", - "contract_addr" + "id" ], "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3514,20 +2046,22 @@ "additionalProperties": false }, { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account manager Note: since it happens after the claim by this manager state won't have spam accounts", "type": "object", "required": [ - "clear_admin" + "register_sub_account" ], "properties": { - "clear_admin": { + "register_sub_account": { "type": "object", "required": [ - "contract_addr" + "id" ], "properties": { - "contract_addr": { - "type": "string" + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3564,8 +2098,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3595,8 +2128,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3617,8 +2149,7 @@ "contract_addr": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3641,29 +2172,12 @@ "format": "uint64", "minimum": 0.0 } - }, - "additionalProperties": false + } } }, "additionalProperties": false } ] - }, - "WeightedVoteOption": { - "type": "object", - "required": [ - "option", - "weight" - ], - "properties": { - "option": { - "$ref": "#/definitions/VoteOption" - }, - "weight": { - "$ref": "#/definitions/Decimal" - } - }, - "additionalProperties": false } } }, @@ -3913,54 +2427,8 @@ "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "InstantiateMsg": { - "description": "This needs no info. Owner of the contract is whoever signed the InstantiateMsg.", - "type": "object", - "required": [ - "ans_host_address", - "version_control_address" - ], - "properties": { - "ans_host_address": { - "type": "string" - }, - "version_control_address": { - "type": "string" - } - }, - "additionalProperties": false - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { @@ -3988,19 +2456,13 @@ ], "properties": { "ans_host": { - "$ref": "#/definitions/Addr" + "type": "string" }, "version_control_address": { - "$ref": "#/definitions/Addr" - } - }, - "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" } - } + }, + "additionalProperties": false }, "host": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/schema/ibc-host/0.23.0/abstract-ibc-host.json b/schema/ibc-host/0.23.0/abstract-ibc-host.json index 86ecb048f4..5f2a5f9088 100644 --- a/schema/ibc-host/0.23.0/abstract-ibc-host.json +++ b/schema/ibc-host/0.23.0/abstract-ibc-host.json @@ -7,6 +7,25 @@ "title": "InstantiateMsg", "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", "type": "object", + "required": [ + "account_factory_address", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_factory_address": { + "description": "Used to create remote abstract accounts", + "type": "string" + }, + "ans_host_address": { + "description": "Used to easily perform address translation on the app chain", + "type": "string" + }, + "version_control_address": { + "description": "Version control address", + "type": "string" + } + }, "additionalProperties": false }, "execute": { @@ -26,6 +45,39 @@ }, "additionalProperties": false }, + { + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "account_factory_address": { + "type": [ + "string", + "null" + ] + }, + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, { "description": "Register the Polytone proxy for a specific chain. proxy should be a local address (will be validated)", "type": "object", @@ -84,20 +136,20 @@ "execute": { "type": "object", "required": [ - "account_address", "account_id", - "action" + "action", + "proxy_address" ], "properties": { - "account_address": { - "description": "The address of the calling account id. This is used purely for the send-all-back method. We include it in all messages none-the-less to simplify the users life", - "type": "string" - }, "account_id": { "$ref": "#/definitions/AccountId" }, "action": { "$ref": "#/definitions/HostAction" + }, + "proxy_address": { + "description": "The address of the calling account id. This is used purely for the send-all-back method. We include it in all messages none-the-less to simplify the users life", + "type": "string" } }, "additionalProperties": false @@ -239,68 +291,36 @@ } ] }, - "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.", + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", "type": "string" }, - "AnyMsg": { - "description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, - "Attribute": { - "description": "An key value pair that is used in the context of event attributes in logs", + "CallbackMsg": { + "description": "Callback message to set the dependencies after module upgrades.", "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - }, "additionalProperties": false }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "ExecuteMsg": { + "description": "Manager execute messages", "oneOf": [ { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "description": "Forward execution message to module", "type": "object", "required": [ - "send" + "exec_on_module" ], "properties": { - "send": { + "exec_on_module": { "type": "object", "required": [ - "amount", - "to_address" + "exec_msg", + "module_id" ], "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } + "exec_msg": { + "$ref": "#/definitions/Binary" }, - "to_address": { + "module_id": { "type": "string" } }, @@ -310,22 +330,35 @@ "additionalProperties": false }, { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", + "type": "object", + "required": [ + "update_internal_config" + ], + "properties": { + "update_internal_config": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + { + "description": "Install module using module factory, callable by Owner", "type": "object", "required": [ - "burn" + "install_modules" ], "properties": { - "burn": { + "install_modules": { "type": "object", "required": [ - "amount" + "modules" ], "properties": { - "amount": { + "modules": { "type": "array", "items": { - "$ref": "#/definitions/Coin" + "$ref": "#/definitions/ModuleInstallConfig" } } }, @@ -333,25 +366,21 @@ } }, "additionalProperties": false - } - ] - }, - "BankQuery": { - "oneOf": [ + }, { - "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "description": "Uninstall a module given its ID.", "type": "object", "required": [ - "supply" + "uninstall_module" ], "properties": { - "supply": { + "uninstall_module": { "type": "object", "required": [ - "denom" + "module_id" ], "properties": { - "denom": { + "module_id": { "type": "string" } }, @@ -361,24 +390,40 @@ "additionalProperties": false }, { - "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "description": "Upgrade the module to a new version If module is `abstract::manager` then the contract will do a self-migration.", "type": "object", "required": [ - "balance" + "upgrade" ], "properties": { - "balance": { + "upgrade": { "type": "object", "required": [ - "address", - "denom" + "modules" ], "properties": { - "address": { - "type": "string" - }, - "denom": { - "type": "string" + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/ModuleInfo" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } } }, "additionalProperties": false @@ -387,20 +432,54 @@ "additionalProperties": false }, { - "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "description": "Creates a sub-account on the account", "type": "object", "required": [ - "all_balances" + "create_sub_account" ], "properties": { - "all_balances": { + "create_sub_account": { "type": "object", "required": [ - "address" + "install_modules", + "name" ], "properties": { - "address": { + "account_id": { + "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -409,20 +488,32 @@ "additionalProperties": false }, { - "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "description": "Update info", "type": "object", "required": [ - "denom_metadata" + "update_info" ], "properties": { - "denom_metadata": { + "update_info": { "type": "object", - "required": [ - "denom" - ], "properties": { - "denom": { - "type": "string" + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -431,23 +522,19 @@ "additionalProperties": false }, { - "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "description": "Update account statuses", "type": "object", "required": [ - "all_denom_metadata" + "update_status" ], "properties": { - "all_denom_metadata": { + "update_status": { "type": "object", "properties": { - "pagination": { - "anyOf": [ - { - "$ref": "#/definitions/PageRequest" - }, - { - "type": "null" - } + "is_suspended": { + "type": [ + "boolean", + "null" ] } }, @@ -455,201 +542,123 @@ } }, "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec 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. See also .", - "type": "string" - }, - "Callback": { - "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false - }, - "Callback2": { - "oneOf": [ + }, { - "description": "Result of executing the requested query, or an error.\n\nresult[i] corresponds to the i'th query and contains the base64 encoded query response.", + "description": "Actions called by internal or external sub-accounts", "type": "object", "required": [ - "query" + "update_sub_account" ], "properties": { - "query": { - "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + "update_sub_account": { + "$ref": "#/definitions/UpdateSubAccountAction" } }, "additionalProperties": false }, { - "description": "Result of executing the requested messages, or an error.\n\n14/04/23: if a submessage errors the reply handler can see `codespace: wasm, code: 5`, but not the actual error. as a result, we can't return good errors for Execution and this error string will only tell you the error's codespace. for example, an out-of-gas error is code 11 and looks like `codespace: sdk, code: 11`.", + "description": "Callback endpoint", "type": "object", "required": [ - "execute" + "callback" ], "properties": { - "execute": { - "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + "callback": { + "$ref": "#/definitions/CallbackMsg" } }, "additionalProperties": false }, { - "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", "type": "object", "required": [ - "fatal_error" + "update_ownership" ], "properties": { - "fatal_error": { - "type": "string" + "update_ownership": { + "$ref": "#/definitions/GovAction" } }, "additionalProperties": false } ] }, - "CallbackMessage": { - "description": "Executed on the callback receiver upon message completion. When being executed, the message will be tagged with \"callback\":\n\n```json {\"callback\": { \"initiator\": ..., \"initiator_msg\": ..., \"result\": ..., }} ```", - "type": "object", - "required": [ - "initiator", - "initiator_msg", - "result" - ], - "properties": { - "initiator": { - "description": "Initaitor on the note chain.", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "initiator_msg": { - "description": "Message sent by the initaitor. This _must_ be base64 encoded or execution will fail.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "result": { - "description": "Data from the host chain.", - "allOf": [ - { - "$ref": "#/definitions/Callback2" - } - ] - } - }, - "additionalProperties": false - }, - "CallbackMsg": { - "description": "Callback message to set the dependencies after module upgrades.", - "type": "object", - "additionalProperties": false - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - }, - "additionalProperties": false - }, - "CosmosMsg_for_Empty": { + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { + "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" + "at_height" ], "properties": { - "custom": { - "$ref": "#/definitions/Empty" + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 } }, "additionalProperties": false }, { + "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ - "staking" + "at_time" ], "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" + "at_time": { + "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { + "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ - "distribution" + "never" ], "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" + "never": { + "type": "object", + "additionalProperties": false } }, "additionalProperties": false - }, + } + ] + }, + "GovAction": { + "description": "Actions that can be taken to alter the contract's governance ownership", + "oneOf": [ { - "description": "This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "deprecated": true, + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", "type": "object", "required": [ - "stargate" + "transfer_ownership" ], "properties": { - "stargate": { + "transfer_ownership": { "type": "object", "required": [ - "type_url", - "value" + "new_owner" ], "properties": { - "type_url": { - "type": "string" + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] }, - "value": { - "$ref": "#/definitions/Binary" + "new_owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" } }, "additionalProperties": false @@ -658,2637 +667,171 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is suppored by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", - "type": "object", - "required": [ - "any" - ], - "properties": { - "any": { - "$ref": "#/definitions/AnyMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] }, { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] } ] }, - "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" - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "GovernanceDetails_for_String": { + "description": "Governance types", "oneOf": [ { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "description": "A single address is admin", "type": "object", "required": [ - "set_withdraw_address" + "Monarchy" ], "properties": { - "set_withdraw_address": { + "Monarchy": { "type": "object", "required": [ - "address" + "monarch" ], "properties": { - "address": { - "description": "The `withdraw_address`", + "monarch": { + "description": "The monarch's address", "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "Used when the account is a sub-account of another account.", "type": "object", "required": [ - "withdraw_delegator_reward" + "SubAccount" ], "properties": { - "withdraw_delegator_reward": { + "SubAccount": { "type": "object", "required": [ - "validator" + "manager", + "proxy" ], "properties": { - "validator": { - "description": "The `validator_address`", + "manager": { + "description": "The manager of the account of which this account is the sub-account.", "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "fund_community_pool" - ], - "properties": { - "fund_community_pool": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "The amount to spend", - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "DistributionQuery": { - "oneOf": [ - { - "description": "See ", - "type": "object", - "required": [ - "delegator_withdraw_address" - ], - "properties": { - "delegator_withdraw_address": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "See ", + "description": "An external governance source", "type": "object", "required": [ - "delegation_rewards" + "External" ], "properties": { - "delegation_rewards": { + "External": { "type": "object", "required": [ - "delegator_address", - "validator_address" + "governance_address", + "governance_type" ], "properties": { - "delegator_address": { + "governance_address": { + "description": "The external contract address", "type": "string" }, - "validator_address": { + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "See ", + "description": "Renounced account This account no longer has an owner and cannot be used.", "type": "object", "required": [ - "delegation_total_rewards" + "Renounced" ], "properties": { - "delegation_total_rewards": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { - "type": "string" - } - }, - "additionalProperties": false + "Renounced": { + "type": "object" } }, "additionalProperties": false }, { - "description": "See ", "type": "object", "required": [ - "delegator_validators" + "NFT" ], "properties": { - "delegator_validators": { + "NFT": { "type": "object", "required": [ - "delegator_address" + "collection_addr", + "token_id" ], "properties": { - "delegator_address": { + "collection_addr": { + "type": "string" + }, + "token_id": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false } ] }, - "Empty": { - "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", - "type": "object", - "additionalProperties": false - }, - "ErrorResponse": { - "type": "object", - "required": [ - "error", - "message_index" - ], - "properties": { - "error": { - "description": "The error that occured executing the message.", - "type": "string" - }, - "message_index": { - "description": "The index of the first message who's execution failed.", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } + "HelperAction": { + "oneOf": [ + { + "description": "What do we need here ? TODO", + "type": "string", + "enum": [ + "send_all_back" ] } - }, - "additionalProperties": false - }, - "Event": { - "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", - "type": "object", - "required": [ - "attributes", - "type" - ], - "properties": { - "attributes": { - "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", - "type": "array", - "items": { - "$ref": "#/definitions/Attribute" - } - }, - "type": { - "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", - "type": "string" - } - }, - "additionalProperties": false + ] }, - "ExecuteMsg": { - "oneOf": [ - { - "description": "Update the ownership.", - "type": "object", - "required": [ - "update_ownership" - ], - "properties": { - "update_ownership": { - "$ref": "#/definitions/Action" - } - }, - "additionalProperties": false - }, - { - "description": "Owner method: Registers the polytone note on the local chain as well as the host on the remote chain to send messages through This allows for monitoring which chain are connected to the contract remotely", - "type": "object", - "required": [ - "register_infrastructure" - ], - "properties": { - "register_infrastructure": { - "type": "object", - "required": [ - "chain", - "host", - "note" - ], - "properties": { - "chain": { - "description": "Chain to register the infrastructure for (\"juno\", \"osmosis\", etc.)", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "host": { - "description": "Address of the abstract host deployed on the remote chain", - "type": "string" - }, - "note": { - "description": "Polytone note (locally deployed)", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", - "type": "object", - "required": [ - "send_funds" - ], - "properties": { - "send_funds": { - "type": "object", - "required": [ - "funds", - "host_chain" - ], - "properties": { - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "memo": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only callable by Account proxy Register an Account on a remote chain over IBC This action creates a proxy for them on the remote chain.", - "type": "object", - "required": [ - "register" - ], - "properties": { - "register": { - "type": "object", - "required": [ - "host_chain", - "install_modules" - ], - "properties": { - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "namespace": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only callable by Account Module", - "type": "object", - "required": [ - "module_ibc_action" - ], - "properties": { - "module_ibc_action": { - "type": "object", - "required": [ - "host_chain", - "msg", - "target_module" - ], - "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "anyOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "type": "null" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "msg": { - "description": "Json-encoded IbcMsg to the target module", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "target_module": { - "description": "Module of this account on host chain", - "allOf": [ - { - "$ref": "#/definitions/ModuleInfo" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only callable by Account Module", - "type": "object", - "required": [ - "ibc_query" - ], - "properties": { - "ibc_query": { - "type": "object", - "required": [ - "callback", - "host_chain", - "queries" - ], - "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "allOf": [ - { - "$ref": "#/definitions/Callback" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "queries": { - "description": "Cosmos Query requests", - "type": "array", - "items": { - "$ref": "#/definitions/QueryRequest_for_ModuleQuery" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only callable by Account Proxy Action on remote ibc host Which currently only support manager messages", - "type": "object", - "required": [ - "remote_action" - ], - "properties": { - "remote_action": { - "type": "object", - "required": [ - "action", - "host_chain" - ], - "properties": { - "action": { - "description": "execute the custom host function", - "allOf": [ - { - "$ref": "#/definitions/HostAction" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Owner method: Remove connection for remote chain", - "type": "object", - "required": [ - "remove_host" - ], - "properties": { - "remove_host": { - "type": "object", - "required": [ - "host_chain" - ], - "properties": { - "host_chain": { - "$ref": "#/definitions/TruncatedChainId" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Callback from the Polytone implementation This is triggered regardless of the execution result", - "type": "object", - "required": [ - "callback" - ], - "properties": { - "callback": { - "$ref": "#/definitions/CallbackMessage" - } - }, - "additionalProperties": false - } - ] - }, - "ExecuteMsg_for_Empty": { - "oneOf": [ - { - "description": "Executes the provided messages if sender is whitelisted", - "type": "object", - "required": [ - "module_action" - ], - "properties": { - "module_action": { - "type": "object", - "required": [ - "msgs" - ], - "properties": { - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Execute a message and forward the Response data", - "type": "object", - "required": [ - "module_action_with_data" - ], - "properties": { - "module_action_with_data": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Execute IBC action on Client", - "type": "object", - "required": [ - "ibc_action" - ], - "properties": { - "ibc_action": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/ExecuteMsg" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Queries the Abstract Ica Client with the provided action query. Provides access to different ICA implementations for different ecosystems.", - "type": "object", - "required": [ - "ica_action" - ], - "properties": { - "ica_action": { - "type": "object", - "required": [ - "action_query_msg" - ], - "properties": { - "action_query_msg": { - "description": "Query of type `abstract-ica-client::msg::QueryMsg`", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Forward execution message to module", - "type": "object", - "required": [ - "exec_on_module" - ], - "properties": { - "exec_on_module": { - "type": "object", - "required": [ - "exec_msg", - "module_id" - ], - "properties": { - "exec_msg": { - "$ref": "#/definitions/Binary" - }, - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", - "type": "object", - "required": [ - "update_internal_config" - ], - "properties": { - "update_internal_config": { - "$ref": "#/definitions/InternalConfigAction" - } - }, - "additionalProperties": false - }, - { - "description": "Install module using module factory, callable by Owner", - "type": "object", - "required": [ - "install_modules" - ], - "properties": { - "install_modules": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Uninstall a module given its ID.", - "type": "object", - "required": [ - "uninstall_module" - ], - "properties": { - "uninstall_module": { - "type": "object", - "required": [ - "module_id" - ], - "properties": { - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Upgrade the module to a new version If module is `abstract::account` then the contract will do a self-migration. Self-migration is protected and only possible to the [`crate::objects::module_reference::ModuleReference::Account`] registered in Version Control", - "type": "object", - "required": [ - "upgrade" - ], - "properties": { - "upgrade": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/ModuleInfo" - }, - { - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Creates a sub-account on the account", - "type": "object", - "required": [ - "create_sub_account" - ], - "properties": { - "create_sub_account": { - "type": "object", - "required": [ - "install_modules", - "name" - ], - "properties": { - "account_id": { - "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update info", - "type": "object", - "required": [ - "update_info" - ], - "properties": { - "update_info": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update account statuses", - "type": "object", - "required": [ - "update_status" - ], - "properties": { - "update_status": { - "type": "object", - "properties": { - "is_suspended": { - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Actions called by internal or external sub-accounts", - "type": "object", - "required": [ - "update_sub_account" - ], - "properties": { - "update_sub_account": { - "$ref": "#/definitions/UpdateSubAccountAction" - } - }, - "additionalProperties": false - }, - { - "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", - "type": "object", - "required": [ - "update_ownership" - ], - "properties": { - "update_ownership": { - "$ref": "#/definitions/GovAction" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "add_auth_method" - ], - "properties": { - "add_auth_method": { - "type": "object", - "required": [ - "add_authenticator" - ], - "properties": { - "add_authenticator": { - "$ref": "#/definitions/Empty" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "remove_auth_method" - ], - "properties": { - "remove_auth_method": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Callback endpoint", - "type": "object", - "required": [ - "callback" - ], - "properties": { - "callback": { - "$ref": "#/definitions/CallbackMsg" - } - }, - "additionalProperties": false - } - ] - }, - "ExecutionResponse": { - "type": "object", - "required": [ - "executed_by", - "result" - ], - "properties": { - "executed_by": { - "description": "The address on the remote chain that executed the messages.", - "type": "string" - }, - "result": { - "description": "Index `i` corresponds to the result of executing the `i`th message.", - "type": "array", - "items": { - "$ref": "#/definitions/SubMsgResponse" - } - } - }, - "additionalProperties": false - }, - "Expiration": { - "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", - "oneOf": [ - { - "description": "AtHeight will expire when `env.block.height` >= height", - "type": "object", - "required": [ - "at_height" - ], - "properties": { - "at_height": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - { - "description": "AtTime will expire when `env.block.time` >= time", - "type": "object", - "required": [ - "at_time" - ], - "properties": { - "at_time": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - }, - { - "description": "Never will never expire. Used to express the empty variant", - "type": "object", - "required": [ - "never" - ], - "properties": { - "never": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovAction": { - "description": "Actions that can be taken to alter the contract's governance ownership", - "oneOf": [ - { - "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", - "type": "object", - "required": [ - "transfer_ownership" - ], - "properties": { - "transfer_ownership": { - "type": "object", - "required": [ - "new_owner" - ], - "properties": { - "expiry": { - "anyOf": [ - { - "$ref": "#/definitions/Expiration" - }, - { - "type": "null" - } - ] - }, - "new_owner": { - "$ref": "#/definitions/GovernanceDetails_for_String" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", - "type": "string", - "enum": [ - "accept_ownership" - ] - }, - { - "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", - "type": "string", - "enum": [ - "renounce_ownership" - ] - } - ] - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "option", - "proposal_id" - ], - "properties": { - "option": { - "description": "The vote option.\n\nThis used to be called \"vote\", but was changed for consistency with Cosmos SDK.", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote_weighted" - ], - "properties": { - "vote_weighted": { - "type": "object", - "required": [ - "options", - "proposal_id" - ], - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/WeightedVoteOption" - } - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovernanceDetails_for_String": { - "description": "Governance types", - "oneOf": [ - { - "description": "A single address is admin", - "type": "object", - "required": [ - "Monarchy" - ], - "properties": { - "Monarchy": { - "type": "object", - "required": [ - "monarch" - ], - "properties": { - "monarch": { - "description": "The monarch's address", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Used when the account is a sub-account of another account.", - "type": "object", - "required": [ - "SubAccount" - ], - "properties": { - "SubAccount": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "An external governance source", - "type": "object", - "required": [ - "External" - ], - "properties": { - "External": { - "type": "object", - "required": [ - "governance_address", - "governance_type" - ], - "properties": { - "governance_address": { - "description": "The external contract address", - "type": "string" - }, - "governance_type": { - "description": "Governance type used for doing extra off-chain queries depending on the type.", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "NFT" - ], - "properties": { - "NFT": { - "type": "object", - "required": [ - "collection_addr", - "token_id" - ], - "properties": { - "collection_addr": { - "type": "string" - }, - "token_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Abstract account. Admin actions have to be sent through signature bit flag\n\nMore details: https://github.com/burnt-labs/abstract-account/blob/2c933a7b2a8dacc0ae5bf4344159a7d4ab080135/README.md", - "type": "object", - "required": [ - "AbstractAccount" - ], - "properties": { - "AbstractAccount": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "Address of this abstract account", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Renounced account This account no longer has an owner and cannot be used.", - "type": "object", - "required": [ - "Renounced" - ], - "properties": { - "Renounced": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GrpcQuery": { - "description": "Queries the chain using a grpc query. This allows to query information that is not exposed in our API. The chain needs to allowlist the supported queries. The drawback of this query is that you have to handle the protobuf encoding and decoding yourself.\n\nThe returned data is protobuf encoded. The protobuf type depends on the query. Because of this, using it with the [`query`](crate::QuerierWrapper::query) function will result in a deserialization error. Use [`raw_query`](crate::Querier::raw_query) or [`query_grpc`](crate::QuerierWrapper::query_grpc) instead.\n\nTo find the path, as well as the request and response types, you can query the chain's gRPC endpoint using a tool like [grpcurl](https://github.com/fullstorydev/grpcurl).", - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "The expected protobuf message type (not [Any](https://protobuf.dev/programming-guides/proto3/#any)), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "The fully qualified endpoint path used for routing. It follows the format `/service_path/method_name`, eg. \"/cosmos.authz.v1beta1.Query/Grants\"", - "type": "string" - } - }, - "additionalProperties": false - }, - "HelperAction": { - "oneOf": [ - { - "description": "What do we need here ? TODO", - "type": "string", - "enum": [ - "send_all_back" - ] - } - ] - }, - "HostAction": { - "description": "Callable actions on a remote host", - "oneOf": [ - { - "description": "Dispatch messages to a remote Account. Will create a new Account if required.", - "type": "object", - "required": [ - "dispatch" - ], - "properties": { - "dispatch": { - "type": "object", - "required": [ - "account_msgs" - ], - "properties": { - "account_msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/ExecuteMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", - "type": "object", - "required": [ - "internal" - ], - "properties": { - "internal": { - "$ref": "#/definitions/InternalAction" - } - }, - "additionalProperties": false - }, - { - "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", - "type": "object", - "required": [ - "helpers" - ], - "properties": { - "helpers": { - "$ref": "#/definitions/HelperAction" - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "memo": { - "description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.", - "type": [ - "string", - "null" - ] - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "IbcQuery": { - "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", - "oneOf": [ - { - "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", - "type": "object", - "required": [ - "port_id" - ], - "properties": { - "port_id": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", - "type": "object", - "required": [ - "list_channels" - ], - "properties": { - "list_channels": { - "type": "object", - "properties": { - "port_id": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", - "type": "object", - "required": [ - "channel" - ], - "properties": { - "channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "port_id": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "InstalledModuleIdentification": { - "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", - "type": "object", - "required": [ - "module_info" - ], - "properties": { - "account_id": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "module_info": { - "$ref": "#/definitions/ModuleInfo" - } - }, - "additionalProperties": false - }, - "InternalAction": { - "oneOf": [ - { - "description": "Registers a new account from a remote chain", - "type": "object", - "required": [ - "register" - ], - "properties": { - "register": { - "type": "object", - "required": [ - "install_modules", - "name" - ], - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "InternalConfigAction": { - "description": "Internal configuration actions accessible from the [`ExecuteMsg::UpdateInternalConfig`] message.", - "oneOf": [ - { - "description": "Updates the [`state::ACCOUNT_MODULES`] map Only callable by owner.", - "type": "object", - "required": [ - "update_module_addresses" - ], - "properties": { - "update_module_addresses": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ], - "maxItems": 2, - "minItems": 2 - } - }, - "to_remove": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update the execution whitelist in [`state::WHITELISTED_MODULES`] Only callable by owner.", - "type": "object", - "required": [ - "update_whitelist" - ], - "properties": { - "update_whitelist": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "description": "Addresses to add to the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - }, - "to_remove": { - "description": "Addresses to remove from the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "ModuleInfo": { - "description": "Stores the namespace, name, and version of an Abstract module.", - "type": "object", - "required": [ - "name", - "namespace", - "version" - ], - "properties": { - "name": { - "description": "Name of the contract", - "type": "string" - }, - "namespace": { - "description": "Namespace of the module", - "allOf": [ - { - "$ref": "#/definitions/Namespace" - } - ] - }, - "version": { - "description": "Version of the module", - "allOf": [ - { - "$ref": "#/definitions/ModuleVersion" - } - ] - } - }, - "additionalProperties": false - }, - "ModuleInstallConfig": { - "description": "Module info and init message", - "type": "object", - "required": [ - "module" - ], - "properties": { - "init_msg": { - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - }, - "module": { - "$ref": "#/definitions/ModuleInfo" - } - }, - "additionalProperties": false - }, - "ModuleQuery": { - "type": "object", - "required": [ - "msg", - "target_module" - ], - "properties": { - "msg": { - "description": "The WasmQuery::Smart request to the module", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "target_module": { - "description": "Information about the module that gets queried through ibc", - "allOf": [ - { - "$ref": "#/definitions/InstalledModuleIdentification" - } - ] - } - }, - "additionalProperties": false - }, - "ModuleVersion": { - "oneOf": [ - { - "type": "string", - "enum": [ - "latest" - ] - }, - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "MsgResponse": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, - "Namespace": { - "description": "Represents an Abstract namespace for modules", - "type": "string" - }, - "PageRequest": { - "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", - "type": "object", - "required": [ - "limit", - "reverse" - ], - "properties": { - "key": { - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - }, - "limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "reverse": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "QueryRequest_for_ModuleQuery": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/ModuleQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionQuery" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", - "deprecated": true, - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "this is the expected protobuf message type (not any), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "this is the fully qualified service path used for routing, eg. \"/cosmos_sdk.x.bank.v1.Query/QueryBalance\"", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "grpc" - ], - "properties": { - "grpc": { - "$ref": "#/definitions/GrpcQuery" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_Array_of_Binary_or_ErrorResponse": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_ExecutionResponse_or_String": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "$ref": "#/definitions/ExecutionResponse" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "delegate" - ], - "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "undelegate" - ], - "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "StakingQuery": { - "oneOf": [ - { - "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", - "type": "object", - "required": [ - "bonded_denom" - ], - "properties": { - "bonded_denom": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "AllDelegations will return all delegations by the delegator", - "type": "object", - "required": [ - "all_delegations" - ], - "properties": { - "all_delegations": { - "type": "object", - "required": [ - "delegator" - ], - "properties": { - "delegator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", - "type": "object", - "required": [ - "delegation" - ], - "properties": { - "delegation": { - "type": "object", - "required": [ - "delegator", - "validator" - ], - "properties": { - "delegator": { - "type": "string" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", - "type": "object", - "required": [ - "all_validators" - ], - "properties": { - "all_validators": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "SubMsgResponse": { - "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", - "type": "object", - "required": [ - "events" - ], - "properties": { - "data": { - "deprecated": true, - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/Event" - } - }, - "msg_responses": { - "description": "The responses from the messages emitted by the submessage. In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message]. However, wasmd allows chains to translate a single contract message into multiple SDK messages. In that case all the MsgResponses from each are concatenated into this flattened `Vec`.\n\n[MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109 [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/MsgResponse" - } - } - }, - "additionalProperties": false - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "TruncatedChainId": { - "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", - "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" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "UpdateSubAccountAction": { - "oneOf": [ - { - "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", - "type": "object", - "required": [ - "unregister_sub_account" - ], - "properties": { - "unregister_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account", - "type": "object", - "required": [ - "register_sub_account" - ], - "properties": { - "register_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", - "type": "object", - "required": [ - "instantiate2" - ], - "properties": { - "instantiate2": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg", - "salt" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "salt": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, + "HostAction": { + "description": "Callable actions on a remote host", + "oneOf": [ { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "description": "Dispatch messages to a remote manager contract. Will create a new Account if required.", "type": "object", "required": [ - "migrate" + "dispatch" ], "properties": { - "migrate": { + "dispatch": { "type": "object", "required": [ - "contract_addr", - "msg", - "new_code_id" + "manager_msgs" ], "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 + "manager_msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg" + } } }, "additionalProperties": false @@ -3297,80 +840,97 @@ "additionalProperties": false }, { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", "type": "object", "required": [ - "update_admin" + "internal" ], "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - }, - "additionalProperties": false + "internal": { + "$ref": "#/definitions/InternalAction" } }, "additionalProperties": false }, { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", "type": "object", "required": [ - "clear_admin" + "helpers" ], "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - }, - "additionalProperties": false + "helpers": { + "$ref": "#/definitions/HelperAction" } }, "additionalProperties": false } ] }, - "WasmQuery": { + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "InternalAction": { "oneOf": [ { - "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "description": "Registers a new account from a remote chain", "type": "object", "required": [ - "smart" + "register" ], "properties": { - "smart": { + "register": { "type": "object", "required": [ - "contract_addr", - "msg" + "install_modules", + "name" ], "properties": { - "contract_addr": { + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { "type": "string" }, - "msg": { - "description": "msg is the json-encoded QueryMsg struct", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } + "namespace": { + "type": [ + "string", + "null" ] } }, @@ -3378,53 +938,125 @@ } }, "additionalProperties": false + } + ] + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInstallConfig": { + "description": "Module info and init message", + "type": "object", + "required": [ + "module" + ], + "properties": { + "init_msg": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "module": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] }, { - "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", "type": "object", "required": [ - "raw" + "version" ], "properties": { - "raw": { - "type": "object", - "required": [ - "contract_addr", - "key" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "key": { - "description": "Key is the raw key used in the contracts Storage", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false + "version": { + "type": "string" } }, "additionalProperties": false - }, + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateSubAccountAction": { + "oneOf": [ { - "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", "type": "object", "required": [ - "contract_info" + "unregister_sub_account" ], "properties": { - "contract_info": { + "unregister_sub_account": { "type": "object", "required": [ - "contract_addr" + "id" ], "properties": { - "contract_addr": { - "type": "string" + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3433,21 +1065,21 @@ "additionalProperties": false }, { - "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account manager Note: since it happens after the claim by this manager state won't have spam accounts", "type": "object", "required": [ - "code_info" + "register_sub_account" ], "properties": { - "code_info": { + "register_sub_account": { "type": "object", "required": [ - "code_id" + "id" ], "properties": { - "code_id": { + "id": { "type": "integer", - "format": "uint64", + "format": "uint32", "minimum": 0.0 } }, @@ -3457,22 +1089,6 @@ "additionalProperties": false } ] - }, - "WeightedVoteOption": { - "type": "object", - "required": [ - "option", - "weight" - ], - "properties": { - "option": { - "$ref": "#/definitions/VoteOption" - }, - "weight": { - "$ref": "#/definitions/Decimal" - } - }, - "additionalProperties": false } } }, @@ -3734,42 +1350,8 @@ "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "InstantiateMsg": { - "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", - "type": "object", - "additionalProperties": false - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { @@ -3835,15 +1417,15 @@ "title": "ConfigResponse", "type": "object", "required": [ + "account_factory_address", "ans_host_address", - "module_factory_address", "version_control_address" ], "properties": { - "ans_host_address": { + "account_factory_address": { "$ref": "#/definitions/Addr" }, - "module_factory_address": { + "ans_host_address": { "$ref": "#/definitions/Addr" }, "version_control_address": { diff --git a/schema/ica-client/0.23.0/abstract-ica-client.json b/schema/ica-client/0.23.0/abstract-ica-client.json index 7773f64a4c..99e6114d5a 100644 --- a/schema/ica-client/0.23.0/abstract-ica-client.json +++ b/schema/ica-client/0.23.0/abstract-ica-client.json @@ -75,6 +75,34 @@ }, "additionalProperties": false }, + { + "description": "Owner method: Update the config on IBC client", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host": { + "type": [ + "string", + "null" + ] + }, + "version_control": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, { "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", "type": "object", @@ -434,23 +462,6 @@ "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" }, - "AnyMsg": { - "description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, "Attribute": { "description": "An key value pair that is used in the context of event attributes in logs", "type": "object", @@ -465,67 +476,7 @@ "value": { "type": "string" } - }, - "additionalProperties": false - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] + } }, "BankQuery": { "oneOf": [ @@ -545,8 +496,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -571,8 +521,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -593,8 +542,7 @@ "address": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -615,8 +563,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -641,8 +588,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -768,79 +714,165 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } }, - "CosmosMsg_for_Empty": { + "DistributionQuery": { "oneOf": [ { + "description": "See ", "type": "object", "required": [ - "bank" + "delegator_withdraw_address" ], "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "custom" + "delegation_rewards" ], "properties": { - "custom": { - "$ref": "#/definitions/Empty" + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "staking" + "delegation_total_rewards" ], "properties": { - "staking": { - "$ref": "#/definitions/StakingMsg" + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false }, { + "description": "See ", "type": "object", "required": [ - "distribution" + "delegator_validators" ], "properties": { - "distribution": { - "$ref": "#/definitions/DistributionMsg" + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } } }, "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecuteMsg": { + "description": "Manager execute messages", + "oneOf": [ { - "description": "This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", - "deprecated": true, + "description": "Forward execution message to module", "type": "object", "required": [ - "stargate" + "exec_on_module" ], "properties": { - "stargate": { + "exec_on_module": { "type": "object", "required": [ - "type_url", - "value" + "exec_msg", + "module_id" ], "properties": { - "type_url": { - "type": "string" - }, - "value": { + "exec_msg": { "$ref": "#/definitions/Binary" + }, + "module_id": { + "type": "string" } }, "additionalProperties": false @@ -849,78 +881,57 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is suppored by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", - "type": "object", - "required": [ - "any" - ], - "properties": { - "any": { - "$ref": "#/definitions/AnyMsg" - } - }, - "additionalProperties": false - }, - { + "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", "type": "object", "required": [ - "ibc" + "update_internal_config" ], "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" + "update_internal_config": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false }, { + "description": "Install module using module factory, callable by Owner", "type": "object", "required": [ - "wasm" + "install_modules" ], "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" + "install_modules": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + } + }, + "additionalProperties": false } }, "additionalProperties": false }, { + "description": "Uninstall a module given its ID.", "type": "object", "required": [ - "gov" + "uninstall_module" ], "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "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" - }, - "DistributionMsg": { - "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", - "oneOf": [ - { - "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "set_withdraw_address" - ], - "properties": { - "set_withdraw_address": { + "uninstall_module": { "type": "object", "required": [ - "address" + "module_id" ], "properties": { - "address": { - "description": "The `withdraw_address`", + "module_id": { "type": "string" } }, @@ -930,21 +941,40 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "Upgrade the module to a new version If module is `abstract::manager` then the contract will do a self-migration.", "type": "object", "required": [ - "withdraw_delegator_reward" + "upgrade" ], "properties": { - "withdraw_delegator_reward": { + "upgrade": { "type": "object", "required": [ - "validator" + "modules" ], "properties": { - "validator": { - "description": "The `validator_address`", - "type": "string" + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/ModuleInfo" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } } }, "additionalProperties": false @@ -953,50 +983,88 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "description": "Creates a sub-account on the account", "type": "object", "required": [ - "fund_community_pool" + "create_sub_account" ], "properties": { - "fund_community_pool": { + "create_sub_account": { "type": "object", "required": [ - "amount" + "install_modules", + "name" ], "properties": { - "amount": { - "description": "The amount to spend", + "account_id": { + "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { "type": "array", "items": { - "$ref": "#/definitions/Coin" + "$ref": "#/definitions/ModuleInstallConfig" } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false } }, "additionalProperties": false - } - ] - }, - "DistributionQuery": { - "oneOf": [ + }, { - "description": "See ", + "description": "Update info", "type": "object", "required": [ - "delegator_withdraw_address" + "update_info" ], "properties": { - "delegator_withdraw_address": { + "update_info": { "type": "object", - "required": [ - "delegator_address" - ], "properties": { - "delegator_address": { - "type": "string" + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -1005,24 +1073,20 @@ "additionalProperties": false }, { - "description": "See ", + "description": "Update account statuses", "type": "object", "required": [ - "delegation_rewards" + "update_status" ], "properties": { - "delegation_rewards": { + "update_status": { "type": "object", - "required": [ - "delegator_address", - "validator_address" - ], "properties": { - "delegator_address": { - "type": "string" - }, - "validator_address": { - "type": "string" + "is_suspended": { + "type": [ + "boolean", + "null" + ] } }, "additionalProperties": false @@ -1031,225 +1095,142 @@ "additionalProperties": false }, { - "description": "See ", + "description": "Actions called by internal or external sub-accounts", "type": "object", "required": [ - "delegation_total_rewards" + "update_sub_account" ], "properties": { - "delegation_total_rewards": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { - "type": "string" - } - }, - "additionalProperties": false + "update_sub_account": { + "$ref": "#/definitions/UpdateSubAccountAction" } }, "additionalProperties": false }, { - "description": "See ", + "description": "Callback endpoint", "type": "object", "required": [ - "delegator_validators" + "callback" ], "properties": { - "delegator_validators": { - "type": "object", - "required": [ - "delegator_address" - ], - "properties": { - "delegator_address": { - "type": "string" - } - }, - "additionalProperties": false + "callback": { + "$ref": "#/definitions/CallbackMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/GovAction" } }, "additionalProperties": false } ] }, - "Empty": { - "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", - "type": "object", - "additionalProperties": false - }, - "ErrorResponse": { + "ExecutionResponse": { "type": "object", "required": [ - "error", - "message_index" + "executed_by", + "result" ], "properties": { - "error": { - "description": "The error that occured executing the message.", + "executed_by": { + "description": "The address on the remote chain that executed the messages.", "type": "string" }, - "message_index": { - "description": "The index of the first message who's execution failed.", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - } - }, - "additionalProperties": false - }, - "Event": { - "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", - "type": "object", - "required": [ - "attributes", - "type" - ], - "properties": { - "attributes": { - "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", "type": "array", "items": { - "$ref": "#/definitions/Attribute" + "$ref": "#/definitions/SubMsgResponse" } - }, - "type": { - "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", - "type": "string" } }, "additionalProperties": false }, - "ExecuteMsg": { + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { - "description": "Update the ownership.", + "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ - "update_ownership" + "at_height" ], "properties": { - "update_ownership": { - "$ref": "#/definitions/Action" + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 } }, "additionalProperties": false }, { - "description": "Owner method: Registers the polytone note on the local chain as well as the host on the remote chain to send messages through This allows for monitoring which chain are connected to the contract remotely", + "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ - "register_infrastructure" + "at_time" ], "properties": { - "register_infrastructure": { - "type": "object", - "required": [ - "chain", - "host", - "note" - ], - "properties": { - "chain": { - "description": "Chain to register the infrastructure for (\"juno\", \"osmosis\", etc.)", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "host": { - "description": "Address of the abstract host deployed on the remote chain", - "type": "string" - }, - "note": { - "description": "Polytone note (locally deployed)", - "type": "string" - } - }, - "additionalProperties": false + "at_time": { + "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { - "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", + "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ - "send_funds" + "never" ], "properties": { - "send_funds": { + "never": { "type": "object", - "required": [ - "funds", - "host_chain" - ], - "properties": { - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "memo": { - "type": [ - "string", - "null" - ] - } - }, "additionalProperties": false } }, "additionalProperties": false - }, + } + ] + }, + "GovAction": { + "description": "Actions that can be taken to alter the contract's governance ownership", + "oneOf": [ { - "description": "Only callable by Account proxy Register an Account on a remote chain over IBC This action creates a proxy for them on the remote chain.", + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", "type": "object", "required": [ - "register" + "transfer_ownership" ], "properties": { - "register": { + "transfer_ownership": { "type": "object", "required": [ - "host_chain", - "install_modules" + "new_owner" ], "properties": { - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, { - "$ref": "#/definitions/TruncatedChainId" + "type": "null" } ] }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "namespace": { - "type": [ - "string", - "null" - ] + "new_owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" } }, "additionalProperties": false @@ -1258,197 +1239,170 @@ "additionalProperties": false }, { - "description": "Only callable by Account Module", + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", "type": "object", "required": [ - "module_ibc_action" + "Monarchy" ], "properties": { - "module_ibc_action": { + "Monarchy": { "type": "object", "required": [ - "host_chain", - "msg", - "target_module" + "monarch" ], "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "anyOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "type": "null" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] - }, - "msg": { - "description": "Json-encoded IbcMsg to the target module", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "target_module": { - "description": "Module of this account on host chain", - "allOf": [ - { - "$ref": "#/definitions/ModuleInfo" - } - ] + "monarch": { + "description": "The monarch's address", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Only callable by Account Module", + "description": "Used when the account is a sub-account of another account.", "type": "object", "required": [ - "ibc_query" + "SubAccount" ], "properties": { - "ibc_query": { + "SubAccount": { "type": "object", "required": [ - "callback", - "host_chain", - "queries" + "manager", + "proxy" ], "properties": { - "callback": { - "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", - "allOf": [ - { - "$ref": "#/definitions/Callback" - } - ] - }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" }, - "queries": { - "description": "Cosmos Query requests", - "type": "array", - "items": { - "$ref": "#/definitions/QueryRequest_for_ModuleQuery" - } + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Only callable by Account Proxy Action on remote ibc host Which currently only support manager messages", + "description": "An external governance source", "type": "object", "required": [ - "remote_action" + "External" ], "properties": { - "remote_action": { + "External": { "type": "object", "required": [ - "action", - "host_chain" + "governance_address", + "governance_type" ], "properties": { - "action": { - "description": "execute the custom host function", - "allOf": [ - { - "$ref": "#/definitions/HostAction" - } - ] + "governance_address": { + "description": "The external contract address", + "type": "string" }, - "host_chain": { - "description": "host chain to be executed on Example: \"osmosis\"", - "allOf": [ - { - "$ref": "#/definitions/TruncatedChainId" - } - ] + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Owner method: Remove connection for remote chain", + "description": "Renounced account This account no longer has an owner and cannot be used.", "type": "object", "required": [ - "remove_host" + "Renounced" ], "properties": { - "remove_host": { - "type": "object", - "required": [ - "host_chain" - ], - "properties": { - "host_chain": { - "$ref": "#/definitions/TruncatedChainId" - } - }, - "additionalProperties": false + "Renounced": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Callback from the Polytone implementation This is triggered regardless of the execution result", "type": "object", "required": [ - "callback" + "NFT" ], "properties": { - "callback": { - "$ref": "#/definitions/CallbackMessage" + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } } }, "additionalProperties": false } ] }, - "ExecuteMsg_for_Empty": { + "HelperAction": { + "oneOf": [ + { + "description": "What do we need here ? TODO", + "type": "string", + "enum": [ + "send_all_back" + ] + } + ] + }, + "HostAction": { + "description": "Callable actions on a remote host", "oneOf": [ { - "description": "Executes the provided messages if sender is whitelisted", + "description": "Dispatch messages to a remote manager contract. Will create a new Account if required.", "type": "object", "required": [ - "module_action" + "dispatch" ], "properties": { - "module_action": { + "dispatch": { "type": "object", "required": [ - "msgs" + "manager_msgs" ], "properties": { - "msgs": { + "manager_msgs": { "type": "array", "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" + "$ref": "#/definitions/ExecuteMsg" } } }, @@ -1458,982 +1412,75 @@ "additionalProperties": false }, { - "description": "Execute a message and forward the Response data", + "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", "type": "object", "required": [ - "module_action_with_data" + "internal" ], "properties": { - "module_action_with_data": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "additionalProperties": false + "internal": { + "$ref": "#/definitions/InternalAction" } }, "additionalProperties": false }, { - "description": "Execute IBC action on Client", + "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", "type": "object", "required": [ - "ibc_action" + "helpers" ], "properties": { - "ibc_action": { - "type": "object", - "required": [ - "msg" - ], - "properties": { - "msg": { - "$ref": "#/definitions/ExecuteMsg" - } - }, - "additionalProperties": false + "helpers": { + "$ref": "#/definitions/HelperAction" + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Queries the Abstract Ica Client with the provided action query. Provides access to different ICA implementations for different ecosystems.", + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", "type": "object", "required": [ - "ica_action" + "list_channels" ], "properties": { - "ica_action": { + "list_channels": { "type": "object", - "required": [ - "action_query_msg" - ], "properties": { - "action_query_msg": { - "description": "Query of type `abstract-ica-client::msg::QueryMsg`", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } + "port_id": { + "type": [ + "string", + "null" ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Forward execution message to module", + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", "type": "object", "required": [ - "exec_on_module" - ], - "properties": { - "exec_on_module": { - "type": "object", - "required": [ - "exec_msg", - "module_id" - ], - "properties": { - "exec_msg": { - "$ref": "#/definitions/Binary" - }, - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", - "type": "object", - "required": [ - "update_internal_config" - ], - "properties": { - "update_internal_config": { - "$ref": "#/definitions/InternalConfigAction" - } - }, - "additionalProperties": false - }, - { - "description": "Install module using module factory, callable by Owner", - "type": "object", - "required": [ - "install_modules" - ], - "properties": { - "install_modules": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Uninstall a module given its ID.", - "type": "object", - "required": [ - "uninstall_module" - ], - "properties": { - "uninstall_module": { - "type": "object", - "required": [ - "module_id" - ], - "properties": { - "module_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Upgrade the module to a new version If module is `abstract::account` then the contract will do a self-migration. Self-migration is protected and only possible to the [`crate::objects::module_reference::ModuleReference::Account`] registered in Version Control", - "type": "object", - "required": [ - "upgrade" - ], - "properties": { - "upgrade": { - "type": "object", - "required": [ - "modules" - ], - "properties": { - "modules": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "$ref": "#/definitions/ModuleInfo" - }, - { - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" - } - ] - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Creates a sub-account on the account", - "type": "object", - "required": [ - "create_sub_account" - ], - "properties": { - "create_sub_account": { - "type": "object", - "required": [ - "install_modules", - "name" - ], - "properties": { - "account_id": { - "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "install_modules": { - "type": "array", - "items": { - "$ref": "#/definitions/ModuleInstallConfig" - } - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update info", - "type": "object", - "required": [ - "update_info" - ], - "properties": { - "update_info": { - "type": "object", - "properties": { - "description": { - "type": [ - "string", - "null" - ] - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update account statuses", - "type": "object", - "required": [ - "update_status" - ], - "properties": { - "update_status": { - "type": "object", - "properties": { - "is_suspended": { - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Actions called by internal or external sub-accounts", - "type": "object", - "required": [ - "update_sub_account" - ], - "properties": { - "update_sub_account": { - "$ref": "#/definitions/UpdateSubAccountAction" - } - }, - "additionalProperties": false - }, - { - "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", - "type": "object", - "required": [ - "update_ownership" - ], - "properties": { - "update_ownership": { - "$ref": "#/definitions/GovAction" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "add_auth_method" - ], - "properties": { - "add_auth_method": { - "type": "object", - "required": [ - "add_authenticator" - ], - "properties": { - "add_authenticator": { - "$ref": "#/definitions/Empty" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "remove_auth_method" - ], - "properties": { - "remove_auth_method": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Callback endpoint", - "type": "object", - "required": [ - "callback" - ], - "properties": { - "callback": { - "$ref": "#/definitions/CallbackMsg" - } - }, - "additionalProperties": false - } - ] - }, - "ExecutionResponse": { - "type": "object", - "required": [ - "executed_by", - "result" - ], - "properties": { - "executed_by": { - "description": "The address on the remote chain that executed the messages.", - "type": "string" - }, - "result": { - "description": "Index `i` corresponds to the result of executing the `i`th message.", - "type": "array", - "items": { - "$ref": "#/definitions/SubMsgResponse" - } - } - }, - "additionalProperties": false - }, - "Expiration": { - "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", - "oneOf": [ - { - "description": "AtHeight will expire when `env.block.height` >= height", - "type": "object", - "required": [ - "at_height" - ], - "properties": { - "at_height": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - { - "description": "AtTime will expire when `env.block.time` >= time", - "type": "object", - "required": [ - "at_time" - ], - "properties": { - "at_time": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - }, - { - "description": "Never will never expire. Used to express the empty variant", - "type": "object", - "required": [ - "never" - ], - "properties": { - "never": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovAction": { - "description": "Actions that can be taken to alter the contract's governance ownership", - "oneOf": [ - { - "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", - "type": "object", - "required": [ - "transfer_ownership" - ], - "properties": { - "transfer_ownership": { - "type": "object", - "required": [ - "new_owner" - ], - "properties": { - "expiry": { - "anyOf": [ - { - "$ref": "#/definitions/Expiration" - }, - { - "type": "null" - } - ] - }, - "new_owner": { - "$ref": "#/definitions/GovernanceDetails_for_String" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", - "type": "string", - "enum": [ - "accept_ownership" - ] - }, - { - "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", - "type": "string", - "enum": [ - "renounce_ownership" - ] - } - ] - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "option", - "proposal_id" - ], - "properties": { - "option": { - "description": "The vote option.\n\nThis used to be called \"vote\", but was changed for consistency with Cosmos SDK.", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote_weighted" - ], - "properties": { - "vote_weighted": { - "type": "object", - "required": [ - "options", - "proposal_id" - ], - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/WeightedVoteOption" - } - }, - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GovernanceDetails_for_String": { - "description": "Governance types", - "oneOf": [ - { - "description": "A single address is admin", - "type": "object", - "required": [ - "Monarchy" - ], - "properties": { - "Monarchy": { - "type": "object", - "required": [ - "monarch" - ], - "properties": { - "monarch": { - "description": "The monarch's address", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Used when the account is a sub-account of another account.", - "type": "object", - "required": [ - "SubAccount" - ], - "properties": { - "SubAccount": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "An external governance source", - "type": "object", - "required": [ - "External" - ], - "properties": { - "External": { - "type": "object", - "required": [ - "governance_address", - "governance_type" - ], - "properties": { - "governance_address": { - "description": "The external contract address", - "type": "string" - }, - "governance_type": { - "description": "Governance type used for doing extra off-chain queries depending on the type.", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "NFT" - ], - "properties": { - "NFT": { - "type": "object", - "required": [ - "collection_addr", - "token_id" - ], - "properties": { - "collection_addr": { - "type": "string" - }, - "token_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Abstract account. Admin actions have to be sent through signature bit flag\n\nMore details: https://github.com/burnt-labs/abstract-account/blob/2c933a7b2a8dacc0ae5bf4344159a7d4ab080135/README.md", - "type": "object", - "required": [ - "AbstractAccount" - ], - "properties": { - "AbstractAccount": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "Address of this abstract account", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Renounced account This account no longer has an owner and cannot be used.", - "type": "object", - "required": [ - "Renounced" - ], - "properties": { - "Renounced": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "GrpcQuery": { - "description": "Queries the chain using a grpc query. This allows to query information that is not exposed in our API. The chain needs to allowlist the supported queries. The drawback of this query is that you have to handle the protobuf encoding and decoding yourself.\n\nThe returned data is protobuf encoded. The protobuf type depends on the query. Because of this, using it with the [`query`](crate::QuerierWrapper::query) function will result in a deserialization error. Use [`raw_query`](crate::Querier::raw_query) or [`query_grpc`](crate::QuerierWrapper::query_grpc) instead.\n\nTo find the path, as well as the request and response types, you can query the chain's gRPC endpoint using a tool like [grpcurl](https://github.com/fullstorydev/grpcurl).", - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "The expected protobuf message type (not [Any](https://protobuf.dev/programming-guides/proto3/#any)), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "The fully qualified endpoint path used for routing. It follows the format `/service_path/method_name`, eg. \"/cosmos.authz.v1beta1.Query/Grants\"", - "type": "string" - } - }, - "additionalProperties": false - }, - "HelperAction": { - "oneOf": [ - { - "description": "What do we need here ? TODO", - "type": "string", - "enum": [ - "send_all_back" - ] - } - ] - }, - "HostAction": { - "description": "Callable actions on a remote host", - "oneOf": [ - { - "description": "Dispatch messages to a remote Account. Will create a new Account if required.", - "type": "object", - "required": [ - "dispatch" - ], - "properties": { - "dispatch": { - "type": "object", - "required": [ - "account_msgs" - ], - "properties": { - "account_msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/ExecuteMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", - "type": "object", - "required": [ - "internal" - ], - "properties": { - "internal": { - "$ref": "#/definitions/InternalAction" - } - }, - "additionalProperties": false - }, - { - "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", - "type": "object", - "required": [ - "helpers" - ], - "properties": { - "helpers": { - "$ref": "#/definitions/HelperAction" - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "memo": { - "description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.", - "type": [ - "string", - "null" - ] - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "IbcQuery": { - "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", - "oneOf": [ - { - "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", - "type": "object", - "required": [ - "port_id" - ], - "properties": { - "port_id": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", - "type": "object", - "required": [ - "list_channels" - ], - "properties": { - "list_channels": { - "type": "object", - "properties": { - "port_id": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", - "type": "object", - "required": [ - "channel" + "channel" ], "properties": { "channel": { @@ -2451,63 +1498,12 @@ "null" ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false + ] }, "InstalledModuleIdentification": { "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", @@ -2583,87 +1579,6 @@ } ] }, - "InternalConfigAction": { - "description": "Internal configuration actions accessible from the [`ExecuteMsg::UpdateInternalConfig`] message.", - "oneOf": [ - { - "description": "Updates the [`state::ACCOUNT_MODULES`] map Only callable by owner.", - "type": "object", - "required": [ - "update_module_addresses" - ], - "properties": { - "update_module_addresses": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "type": "string" - } - ], - "maxItems": 2, - "minItems": 2 - } - }, - "to_remove": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update the execution whitelist in [`state::WHITELISTED_MODULES`] Only callable by owner.", - "type": "object", - "required": [ - "update_whitelist" - ], - "properties": { - "update_whitelist": { - "type": "object", - "required": [ - "to_add", - "to_remove" - ], - "properties": { - "to_add": { - "description": "Addresses to add to the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - }, - "to_remove": { - "description": "Addresses to remove from the Account's execution whitelist", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, "ModuleInfo": { "description": "Stores the namespace, name, and version of an Abstract module.", "type": "object", @@ -2767,22 +1682,6 @@ } ] }, - "MsgResponse": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, "Namespace": { "description": "Represents an Abstract namespace for modules", "type": "string" @@ -2803,709 +1702,342 @@ { "type": "null" } - ] - }, - "limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "reverse": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "QueryRequest_for_ModuleQuery": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/ModuleQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "staking" - ], - "properties": { - "staking": { - "$ref": "#/definitions/StakingQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "distribution" - ], - "properties": { - "distribution": { - "$ref": "#/definitions/DistributionQuery" - } - }, - "additionalProperties": false - }, - { - "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", - "deprecated": true, - "type": "object", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "data", - "path" - ], - "properties": { - "data": { - "description": "this is the expected protobuf message type (not any), binary encoded", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "path": { - "description": "this is the fully qualified service path used for routing, eg. \"/cosmos_sdk.x.bank.v1.Query/QueryBalance\"", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmQuery" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "grpc" - ], - "properties": { - "grpc": { - "$ref": "#/definitions/GrpcQuery" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_Array_of_Binary_or_ErrorResponse": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "type": "array", - "items": { - "$ref": "#/definitions/Binary" - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "additionalProperties": false - } - ] - }, - "Result_of_ExecutionResponse_or_String": { - "oneOf": [ - { - "type": "object", - "required": [ - "Ok" - ], - "properties": { - "Ok": { - "$ref": "#/definitions/ExecutionResponse" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "Err" - ], - "properties": { - "Err": { - "type": "string" - } - }, - "additionalProperties": false + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" } - ] + } }, - "StakingMsg": { - "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "QueryRequest_for_ModuleQuery": { "oneOf": [ { - "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ - "delegate" + "bank" ], "properties": { - "delegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false + "bank": { + "$ref": "#/definitions/BankQuery" } }, "additionalProperties": false }, { - "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ - "undelegate" + "custom" ], "properties": { - "undelegate": { - "type": "object", - "required": [ - "amount", - "validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "validator": { - "type": "string" - } - }, - "additionalProperties": false + "custom": { + "$ref": "#/definitions/ModuleQuery" } }, "additionalProperties": false }, { - "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "redelegate" - ], - "properties": { - "redelegate": { - "type": "object", - "required": [ - "amount", - "dst_validator", - "src_validator" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Coin" - }, - "dst_validator": { - "type": "string" - }, - "src_validator": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "StakingQuery": { - "oneOf": [ - { - "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", "type": "object", "required": [ - "bonded_denom" + "staking" ], "properties": { - "bonded_denom": { - "type": "object", - "additionalProperties": false + "staking": { + "$ref": "#/definitions/StakingQuery" } }, "additionalProperties": false }, { - "description": "AllDelegations will return all delegations by the delegator", "type": "object", "required": [ - "all_delegations" + "distribution" ], "properties": { - "all_delegations": { - "type": "object", - "required": [ - "delegator" - ], - "properties": { - "delegator": { - "type": "string" - } - }, - "additionalProperties": false + "distribution": { + "$ref": "#/definitions/DistributionQuery" } }, "additionalProperties": false }, { - "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", "type": "object", "required": [ - "delegation" + "stargate" ], "properties": { - "delegation": { + "stargate": { "type": "object", "required": [ - "delegator", - "validator" + "data", + "path" ], "properties": { - "delegator": { - "type": "string" + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] }, - "validator": { + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", "type": "object", "required": [ - "all_validators" + "ibc" ], "properties": { - "all_validators": { - "type": "object", - "additionalProperties": false + "ibc": { + "$ref": "#/definitions/IbcQuery" } }, "additionalProperties": false }, { - "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", "type": "object", "required": [ - "validator" + "wasm" ], "properties": { - "validator": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", - "type": "string" - } - }, - "additionalProperties": false + "wasm": { + "$ref": "#/definitions/WasmQuery" } }, "additionalProperties": false } ] }, - "SubMsgResponse": { - "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", - "type": "object", - "required": [ - "events" - ], - "properties": { - "data": { - "deprecated": true, - "anyOf": [ - { - "$ref": "#/definitions/Binary" - }, - { - "type": "null" + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } } - ] - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/Event" } }, - "msg_responses": { - "description": "The responses from the messages emitted by the submessage. In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message]. However, wasmd allows chains to translate a single contract message into multiple SDK messages. In that case all the MsgResponses from each are concatenated into this flattened `Vec`.\n\n[MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109 [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/MsgResponse" - } - } - }, - "additionalProperties": false - }, - "Timestamp": { - "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", - "allOf": [ { - "$ref": "#/definitions/Uint64" + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } } ] }, - "TruncatedChainId": { - "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", - "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" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "UpdateSubAccountAction": { + "Result_of_ExecutionResponse_or_String": { "oneOf": [ { - "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", "type": "object", "required": [ - "unregister_sub_account" + "Ok" ], "properties": { - "unregister_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false + "Ok": { + "$ref": "#/definitions/ExecutionResponse" } - }, - "additionalProperties": false + } }, { - "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account", "type": "object", "required": [ - "register_sub_account" + "Err" ], "properties": { - "register_sub_account": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false + "Err": { + "type": "string" } - }, - "additionalProperties": false + } } ] }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "StakingQuery": { "oneOf": [ { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", "type": "object", "required": [ - "execute" + "all_delegations" ], "properties": { - "execute": { + "all_delegations": { "type": "object", "required": [ - "contract_addr", - "funds", - "msg" + "delegator" ], "properties": { - "contract_addr": { + "delegator": { "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", "type": "object", "required": [ - "instantiate" + "delegation" ], "properties": { - "instantiate": { + "delegation": { "type": "object", "required": [ - "code_id", - "funds", - "label", - "msg" + "delegator", + "validator" ], "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "delegator": { "type": "string" }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] + "validator": { + "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false }, { - "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", "type": "object", "required": [ - "instantiate2" + "all_validators" ], "properties": { - "instantiate2": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg", - "salt" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "salt": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false + "all_validators": { + "type": "object" } }, "additionalProperties": false }, { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", "type": "object", "required": [ - "migrate" + "validator" ], "properties": { - "migrate": { + "validator": { "type": "object", "required": [ - "contract_addr", - "msg", - "new_code_id" + "address" ], "properties": { - "contract_addr": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 } - }, - "additionalProperties": false + } } }, "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateSubAccountAction": { + "oneOf": [ { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", "type": "object", "required": [ - "update_admin" + "unregister_sub_account" ], "properties": { - "update_admin": { + "unregister_sub_account": { "type": "object", "required": [ - "admin", - "contract_addr" + "id" ], "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3514,20 +2046,22 @@ "additionalProperties": false }, { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account manager Note: since it happens after the claim by this manager state won't have spam accounts", "type": "object", "required": [ - "clear_admin" + "register_sub_account" ], "properties": { - "clear_admin": { + "register_sub_account": { "type": "object", "required": [ - "contract_addr" + "id" ], "properties": { - "contract_addr": { - "type": "string" + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 } }, "additionalProperties": false @@ -3564,8 +2098,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3595,8 +2128,7 @@ } ] } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3617,8 +2149,7 @@ "contract_addr": { "type": "string" } - }, - "additionalProperties": false + } } }, "additionalProperties": false @@ -3641,29 +2172,12 @@ "format": "uint64", "minimum": 0.0 } - }, - "additionalProperties": false + } } }, "additionalProperties": false } ] - }, - "WeightedVoteOption": { - "type": "object", - "required": [ - "option", - "weight" - ], - "properties": { - "option": { - "$ref": "#/definitions/VoteOption" - }, - "weight": { - "$ref": "#/definitions/Decimal" - } - }, - "additionalProperties": false } } }, @@ -3913,54 +2427,8 @@ "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "InstantiateMsg": { - "description": "This needs no info. Owner of the contract is whoever signed the InstantiateMsg.", - "type": "object", - "required": [ - "ans_host_address", - "version_control_address" - ], - "properties": { - "ans_host_address": { - "type": "string" - }, - "version_control_address": { - "type": "string" - } - }, - "additionalProperties": false - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { @@ -3988,19 +2456,13 @@ ], "properties": { "ans_host": { - "$ref": "#/definitions/Addr" + "type": "string" }, "version_control_address": { - "$ref": "#/definitions/Addr" - } - }, - "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" } - } + }, + "additionalProperties": false }, "host": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/schema/manager/0.23.0/abstract-manager.json b/schema/manager/0.23.0/abstract-manager.json new file mode 100644 index 0000000000..547f9d82f8 --- /dev/null +++ b/schema/manager/0.23.0/abstract-manager.json @@ -0,0 +1,1685 @@ +{ + "contract_name": "abstract-manager", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Manager Instantiate Msg", + "type": "object", + "required": [ + "account_id", + "install_modules", + "module_factory_address", + "name", + "owner", + "proxy_addr", + "version_control_address" + ], + "properties": { + "account_id": { + "$ref": "#/definitions/AccountId" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "module_factory_address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" + }, + "proxy_addr": { + "type": "string" + }, + "version_control_address": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", + "type": "object", + "required": [ + "Monarchy" + ], + "properties": { + "Monarchy": { + "type": "object", + "required": [ + "monarch" + ], + "properties": { + "monarch": { + "description": "The monarch's address", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Used when the account is a sub-account of another account.", + "type": "object", + "required": [ + "SubAccount" + ], + "properties": { + "SubAccount": { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "An external governance source", + "type": "object", + "required": [ + "External" + ], + "properties": { + "External": { + "type": "object", + "required": [ + "governance_address", + "governance_type" + ], + "properties": { + "governance_address": { + "description": "The external contract address", + "type": "string" + }, + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Renounced account This account no longer has an owner and cannot be used.", + "type": "object", + "required": [ + "Renounced" + ], + "properties": { + "Renounced": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "NFT" + ], + "properties": { + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInstallConfig": { + "description": "Module info and init message", + "type": "object", + "required": [ + "module" + ], + "properties": { + "init_msg": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "module": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Manager execute messages", + "oneOf": [ + { + "description": "Forward execution message to module", + "type": "object", + "required": [ + "exec_on_module" + ], + "properties": { + "exec_on_module": { + "type": "object", + "required": [ + "exec_msg", + "module_id" + ], + "properties": { + "exec_msg": { + "$ref": "#/definitions/Binary" + }, + "module_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", + "type": "object", + "required": [ + "update_internal_config" + ], + "properties": { + "update_internal_config": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + { + "description": "Install module using module factory, callable by Owner", + "type": "object", + "required": [ + "install_modules" + ], + "properties": { + "install_modules": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Uninstall a module given its ID.", + "type": "object", + "required": [ + "uninstall_module" + ], + "properties": { + "uninstall_module": { + "type": "object", + "required": [ + "module_id" + ], + "properties": { + "module_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Upgrade the module to a new version If module is `abstract::manager` then the contract will do a self-migration.", + "type": "object", + "required": [ + "upgrade" + ], + "properties": { + "upgrade": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/ModuleInfo" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Creates a sub-account on the account", + "type": "object", + "required": [ + "create_sub_account" + ], + "properties": { + "create_sub_account": { + "type": "object", + "required": [ + "install_modules", + "name" + ], + "properties": { + "account_id": { + "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update info", + "type": "object", + "required": [ + "update_info" + ], + "properties": { + "update_info": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update account statuses", + "type": "object", + "required": [ + "update_status" + ], + "properties": { + "update_status": { + "type": "object", + "properties": { + "is_suspended": { + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Actions called by internal or external sub-accounts", + "type": "object", + "required": [ + "update_sub_account" + ], + "properties": { + "update_sub_account": { + "$ref": "#/definitions/UpdateSubAccountAction" + } + }, + "additionalProperties": false + }, + { + "description": "Callback endpoint", + "type": "object", + "required": [ + "callback" + ], + "properties": { + "callback": { + "$ref": "#/definitions/CallbackMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/GovAction" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "CallbackMsg": { + "description": "Callback message to set the dependencies after module upgrades.", + "type": "object", + "additionalProperties": false + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "GovAction": { + "description": "Actions that can be taken to alter the contract's governance ownership", + "oneOf": [ + { + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", + "type": "object", + "required": [ + "transfer_ownership" + ], + "properties": { + "transfer_ownership": { + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "new_owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", + "type": "object", + "required": [ + "Monarchy" + ], + "properties": { + "Monarchy": { + "type": "object", + "required": [ + "monarch" + ], + "properties": { + "monarch": { + "description": "The monarch's address", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Used when the account is a sub-account of another account.", + "type": "object", + "required": [ + "SubAccount" + ], + "properties": { + "SubAccount": { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "An external governance source", + "type": "object", + "required": [ + "External" + ], + "properties": { + "External": { + "type": "object", + "required": [ + "governance_address", + "governance_type" + ], + "properties": { + "governance_address": { + "description": "The external contract address", + "type": "string" + }, + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Renounced account This account no longer has an owner and cannot be used.", + "type": "object", + "required": [ + "Renounced" + ], + "properties": { + "Renounced": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "NFT" + ], + "properties": { + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInstallConfig": { + "description": "Module info and init message", + "type": "object", + "required": [ + "module" + ], + "properties": { + "init_msg": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "module": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateSubAccountAction": { + "oneOf": [ + { + "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", + "type": "object", + "required": [ + "unregister_sub_account" + ], + "properties": { + "unregister_sub_account": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account manager Note: since it happens after the claim by this manager state won't have spam accounts", + "type": "object", + "required": [ + "register_sub_account" + ], + "properties": { + "register_sub_account": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Manager query messages", + "oneOf": [ + { + "description": "Query the versions of modules installed on the account given their `ids`. Returns [`ModuleVersionsResponse`]", + "type": "object", + "required": [ + "module_versions" + ], + "properties": { + "module_versions": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query the addresses of modules installed on the account given their `ids`. Returns [`ModuleAddressesResponse`]", + "type": "object", + "required": [ + "module_addresses" + ], + "properties": { + "module_addresses": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query information of all modules installed on the account. Returns [`ModuleInfosResponse`]", + "type": "object", + "required": [ + "module_infos" + ], + "properties": { + "module_infos": { + "type": "object", + "properties": { + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint8", + "minimum": 0.0 + }, + "start_after": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query the manager's config. Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query the Account info. Returns [`InfoResponse`]", + "type": "object", + "required": [ + "info" + ], + "properties": { + "info": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`SubAccountIdsResponse`]", + "type": "object", + "required": [ + "sub_account_ids" + ], + "properties": { + "sub_account_ids": { + "type": "object", + "properties": { + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint8", + "minimum": 0.0 + }, + "start_after": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query the contract's ownership information", + "type": "object", + "required": [ + "ownership" + ], + "properties": { + "ownership": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "Manager Migrate Msg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "type": "object", + "required": [ + "account_id", + "is_suspended", + "module_factory_address", + "version_control_address" + ], + "properties": { + "account_id": { + "$ref": "#/definitions/AccountId" + }, + "is_suspended": { + "type": "boolean" + }, + "module_factory_address": { + "$ref": "#/definitions/Addr" + }, + "version_control_address": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false, + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "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" + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + } + } + }, + "info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InfoResponse", + "type": "object", + "required": [ + "info" + ], + "properties": { + "info": { + "$ref": "#/definitions/AccountInfo" + } + }, + "additionalProperties": false, + "definitions": { + "AccountInfo": { + "description": "Abstract Account details.", + "type": "object", + "required": [ + "chain_id", + "name" + ], + "properties": { + "chain_id": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "module_addresses": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModuleAddressesResponse", + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Addr" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "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" + } + } + }, + "module_infos": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModuleInfosResponse", + "type": "object", + "required": [ + "module_infos" + ], + "properties": { + "module_infos": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagerModuleInfo" + } + } + }, + "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" + }, + "ContractVersion": { + "type": "object", + "required": [ + "contract", + "version" + ], + "properties": { + "contract": { + "description": "contract is the crate name of the implementing contract, eg. `crate:cw20-base` we will use other prefixes for other languages, and their standard global namespacing", + "type": "string" + }, + "version": { + "description": "version is any string that this implementation knows. It may be simple counter \"1\", \"2\". or semantic version on release tags \"v0.7.0\", or some custom feature flag list. the only code that needs to understand the version parsing is code that knows how to migrate from the given contract (and is tied to it's implementation somehow)", + "type": "string" + } + }, + "additionalProperties": false + }, + "ManagerModuleInfo": { + "type": "object", + "required": [ + "address", + "id", + "version" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + }, + "id": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/ContractVersion" + } + }, + "additionalProperties": false + } + } + }, + "module_versions": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModuleVersionsResponse", + "type": "object", + "required": [ + "versions" + ], + "properties": { + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ContractVersion" + } + } + }, + "additionalProperties": false, + "definitions": { + "ContractVersion": { + "type": "object", + "required": [ + "contract", + "version" + ], + "properties": { + "contract": { + "description": "contract is the crate name of the implementing contract, eg. `crate:cw20-base` we will use other prefixes for other languages, and their standard global namespacing", + "type": "string" + }, + "version": { + "description": "version is any string that this implementation knows. It may be simple counter \"1\", \"2\". or semantic version on release tags \"v0.7.0\", or some custom feature flag list. the only code that needs to understand the version parsing is code that knows how to migrate from the given contract (and is tied to it's implementation somehow)", + "type": "string" + } + }, + "additionalProperties": false + } + } + }, + "ownership": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Ownership_for_String", + "description": "The contract's ownership info", + "type": "object", + "required": [ + "owner" + ], + "properties": { + "owner": { + "description": "The contract's current owner.", + "allOf": [ + { + "$ref": "#/definitions/GovernanceDetails_for_String" + } + ] + }, + "pending_expiry": { + "description": "The deadline for the pending owner to accept the ownership. `None` if there isn't a pending ownership transfer, or if a transfer exists and it doesn't have a deadline.", + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "pending_owner": { + "description": "The account who has been proposed to take over the ownership. `None` if there isn't a pending ownership transfer.", + "anyOf": [ + { + "$ref": "#/definitions/GovernanceDetails_for_String" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", + "type": "object", + "required": [ + "Monarchy" + ], + "properties": { + "Monarchy": { + "type": "object", + "required": [ + "monarch" + ], + "properties": { + "monarch": { + "description": "The monarch's address", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Used when the account is a sub-account of another account.", + "type": "object", + "required": [ + "SubAccount" + ], + "properties": { + "SubAccount": { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "An external governance source", + "type": "object", + "required": [ + "External" + ], + "properties": { + "External": { + "type": "object", + "required": [ + "governance_address", + "governance_type" + ], + "properties": { + "governance_address": { + "description": "The external contract address", + "type": "string" + }, + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Renounced account This account no longer has an owner and cannot be used.", + "type": "object", + "required": [ + "Renounced" + ], + "properties": { + "Renounced": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "NFT" + ], + "properties": { + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + }, + "sub_account_ids": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SubAccountIdsResponse", + "type": "object", + "required": [ + "sub_accounts" + ], + "properties": { + "sub_accounts": { + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "additionalProperties": false + }, + "top_level_owner": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TopLevelOwnerResponse", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + } + }, + "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" + } + } + } + } +} diff --git a/schema/module-factory/0.23.0/abstract-module-factory.json b/schema/module-factory/0.23.0/abstract-module-factory.json index f2030a31c7..a0e5308933 100644 --- a/schema/module-factory/0.23.0/abstract-module-factory.json +++ b/schema/module-factory/0.23.0/abstract-module-factory.json @@ -7,11 +7,21 @@ "title": "InstantiateMsg", "type": "object", "required": [ - "admin" + "admin", + "ans_host_address", + "version_control_address" ], "properties": { "admin": { "type": "string" + }, + "ans_host_address": { + "description": "AnsHost address", + "type": "string" + }, + "version_control_address": { + "description": "Version control address used to get code-ids and register Account", + "type": "string" } }, "additionalProperties": false @@ -21,6 +31,34 @@ "title": "ExecuteMsg", "description": "Module Factory Execute messages", "oneOf": [ + { + "description": "Update config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, { "description": "Install modules", "type": "object", @@ -386,49 +424,8 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", "description": "We currently take no arguments for migrations", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "InstantiateMsg": { - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "string" - } - }, - "additionalProperties": false - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { @@ -621,8 +618,7 @@ "denom": { "type": "string" } - }, - "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); ```", diff --git a/schema/money-market/0.23.0/execute_msg.json b/schema/money-market/0.23.0/execute_msg.json new file mode 100644 index 0000000000..3fc4ff63a7 --- /dev/null +++ b/schema/money-market/0.23.0/execute_msg.json @@ -0,0 +1,1866 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AdapterRequestMsg_for_MoneyMarketExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AdapterBaseMsg": { + "description": "Configuration message for the adapter", + "oneOf": [ + { + "description": "Add or remove authorized addresses If an authorized address is both in to_add and to_remove, it will be removed.", + "type": "object", + "required": [ + "update_authorized_addresses" + ], + "properties": { + "update_authorized_addresses": { + "type": "object", + "required": [ + "to_add", + "to_remove" + ], + "properties": { + "to_add": { + "type": "array", + "items": { + "type": "string" + } + }, + "to_remove": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AdapterRequestMsg_for_MoneyMarketExecuteMsg": { + "description": "An adapter request. If proxy is None, then the sender must be an Account manager and the proxy address is extrapolated from the Account id.", + "type": "object", + "required": [ + "request" + ], + "properties": { + "proxy_address": { + "type": [ + "string", + "null" + ] + }, + "request": { + "description": "The actual request", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketExecuteMsg" + } + ] + } + }, + "additionalProperties": false + }, + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/AdapterBaseMsg" + }, + "proxy_address": { + "description": "The Proxy address for which to apply the configuration If None, the sender must be an Account manager and the configuration is applied to its associated proxy. If Some, the sender must be a direct or indirect owner (through sub-accounts) of the specified proxy.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "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" + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketAnsAction": { + "description": "Possible actions to perform on a Money Market The following actions use the Abstarct Name Service", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketExecuteMsg": { + "description": "MoneyMarket Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "money_market_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with ans asset denomination", + "type": "object", + "required": [ + "ans_action" + ], + "properties": { + "ans_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketAnsAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "raw_action" + ], + "properties": { + "raw_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketRawAction": { + "description": "Action to execute on a money_market", + "type": "object", + "required": [ + "contract_addr", + "request" + ], + "properties": { + "contract_addr": { + "description": "The contract address to execute it against", + "type": "string" + }, + "request": { + "description": "The action to execute", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawRequest" + } + ] + } + }, + "additionalProperties": false + }, + "MoneyMarketRawRequest": { + "description": "Possible actions to perform on a Money Market This is an example using raw assets", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/money-market/0.23.0/instantiate_msg.json b/schema/money-market/0.23.0/instantiate_msg.json new file mode 100644 index 0000000000..0fbcc65856 --- /dev/null +++ b/schema/money-market/0.23.0/instantiate_msg.json @@ -0,0 +1,78 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseInstantiateMsg": { + "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", + "type": "object", + "required": [ + "ans_host_address", + "version_control_address" + ], + "properties": { + "ans_host_address": { + "description": "Used to easily perform address translation", + "type": "string" + }, + "version_control_address": { + "description": "Used to verify senders", + "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" + }, + "MoneyMarketInstantiateMsg": { + "description": "Instantiation message for dex adapter", + "type": "object", + "required": [ + "fee", + "recipient_account" + ], + "properties": { + "fee": { + "description": "Fee charged on each swap.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "recipient_account": { + "description": "Recipient account for fees.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/money-market/0.23.0/module-schema.json b/schema/money-market/0.23.0/module-schema.json new file mode 100644 index 0000000000..c8aabe25b5 --- /dev/null +++ b/schema/money-market/0.23.0/module-schema.json @@ -0,0 +1,3113 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Instantiation message for dex adapter", + "type": "object", + "required": [ + "fee", + "recipient_account" + ], + "properties": { + "fee": { + "description": "Fee charged on each swap.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "recipient_account": { + "description": "Recipient account for fees.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "MoneyMarket Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "money_market_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with ans asset denomination", + "type": "object", + "required": [ + "ans_action" + ], + "properties": { + "ans_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketAnsAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "raw_action" + ], + "properties": { + "raw_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "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" + }, + "MoneyMarketAnsAction": { + "description": "Possible actions to perform on a Money Market The following actions use the Abstarct Name Service", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketRawAction": { + "description": "Action to execute on a money_market", + "type": "object", + "required": [ + "contract_addr", + "request" + ], + "properties": { + "contract_addr": { + "description": "The contract address to execute it against", + "type": "string" + }, + "request": { + "description": "The action to execute", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawRequest" + } + ] + } + }, + "additionalProperties": false + }, + "MoneyMarketRawRequest": { + "description": "Possible actions to perform on a Money Market This is an example using raw assets", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Query messages for the dex adapter", + "oneOf": [ + { + "description": "Endpoint can be used by front-end to easily interact with contracts. Returns [`GenerateMessagesResponse`]", + "type": "object", + "required": [ + "generate_messages" + ], + "properties": { + "generate_messages": { + "type": "object", + "required": [ + "addr_as_sender", + "message" + ], + "properties": { + "addr_as_sender": { + "description": "Sender Addr generate messages for", + "type": "string" + }, + "message": { + "description": "Execute message to generate messages for", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketExecuteMsg" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query using raw asset denoms and addresses Deposited funds for lending", + "type": "object", + "required": [ + "raw_user_deposit" + ], + "properties": { + "raw_user_deposit": { + "type": "object", + "required": [ + "asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "asset": { + "description": "Lended asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposited Collateral funds", + "type": "object", + "required": [ + "raw_user_collateral" + ], + "properties": { + "raw_user_collateral": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some collateral", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrowed funds", + "type": "object", + "required": [ + "raw_user_borrow" + ], + "properties": { + "raw_user_borrow": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Current Loan-to-Value ratio Represents the borrow usage for a specific user Allows to know how much asset are currently borrowed", + "type": "object", + "required": [ + "raw_current_l_t_v" + ], + "properties": { + "raw_current_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Maximum Loan to Value ratio for a user Allows to know how much assets can to be borrowed", + "type": "object", + "required": [ + "raw_max_l_t_v" + ], + "properties": { + "raw_max_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Price of an asset compared to another asset The returned decimal corresponds to How much quote assets can be bought with 1 base asset", + "type": "object", + "required": [ + "raw_price" + ], + "properties": { + "raw_price": { + "type": "object", + "required": [ + "base", + "money_market", + "quote" + ], + "properties": { + "base": { + "description": "Base asset", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "quote": { + "description": "Quote asset", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query using ans assets Deposited funds for lending", + "type": "object", + "required": [ + "ans_user_deposit" + ], + "properties": { + "ans_user_deposit": { + "type": "object", + "required": [ + "asset", + "money_market", + "user" + ], + "properties": { + "asset": { + "description": "Lended asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposited Collateral funds", + "type": "object", + "required": [ + "ans_user_collateral" + ], + "properties": { + "ans_user_collateral": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some collateral", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrowed funds", + "type": "object", + "required": [ + "ans_user_borrow" + ], + "properties": { + "ans_user_borrow": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Current Loan-to-Value ratio Represents the borrow usage for a specific user Allows to know how much asset are currently borrowed", + "type": "object", + "required": [ + "ans_current_l_t_v" + ], + "properties": { + "ans_current_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Maximum Loan to Value ratio for a user Allows to know how much assets can to be borrowed", + "type": "object", + "required": [ + "ans_max_l_t_v" + ], + "properties": { + "ans_max_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Price of an asset compared to another asset The returned decimal corresponds to How much quote assets can be bought with 1 base asset", + "type": "object", + "required": [ + "ans_price" + ], + "properties": { + "ans_price": { + "type": "object", + "required": [ + "base", + "money_market", + "quote" + ], + "properties": { + "base": { + "description": "Base asset", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "quote": { + "description": "Quote asset", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fee info for using the different dex actions", + "type": "object", + "required": [ + "fees" + ], + "properties": { + "fees": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "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" + }, + "MoneyMarketAnsAction": { + "description": "Possible actions to perform on a Money Market The following actions use the Abstarct Name Service", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketExecuteMsg": { + "description": "MoneyMarket Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "money_market_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with ans asset denomination", + "type": "object", + "required": [ + "ans_action" + ], + "properties": { + "ans_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketAnsAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "raw_action" + ], + "properties": { + "raw_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketRawAction": { + "description": "Action to execute on a money_market", + "type": "object", + "required": [ + "contract_addr", + "request" + ], + "properties": { + "contract_addr": { + "description": "The contract address to execute it against", + "type": "string" + }, + "request": { + "description": "The action to execute", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawRequest" + } + ] + } + }, + "additionalProperties": false + }, + "MoneyMarketRawRequest": { + "description": "Possible actions to perform on a Money Market This is an example using raw assets", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_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" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": { + "ans_current_l_t_v": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserCurrentLTVResponse", + "description": "Response wrapper for user current ltv query", + "type": "object", + "required": [ + "current_ltv" + ], + "properties": { + "current_ltv": { + "description": "Current LTV", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "ans_max_l_t_v": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserMaxLTVResponse", + "description": "Response wrapper for user max ltv query", + "type": "object", + "required": [ + "max_ltv" + ], + "properties": { + "max_ltv": { + "description": "Maximum LTV", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "ans_price": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PriceResponse", + "description": "Response wrapper for price query", + "type": "object", + "required": [ + "price" + ], + "properties": { + "price": { + "description": "Price", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "ans_user_borrow": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserBorrowResponse", + "description": "Response wrapper for user borrow query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Borrow Amount", + "allOf": [ + { + "$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" + } + } + }, + "ans_user_collateral": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserCollateralResponse", + "description": "Response wrapper for user collateral query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Collateral Amount", + "allOf": [ + { + "$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" + } + } + }, + "ans_user_deposit": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserDepositResponse", + "description": "Response wrapper for user deposit query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Deposit Amount", + "allOf": [ + { + "$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" + } + } + }, + "fees": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UsageFee", + "description": "A wrapper around Fee to help handle fee logic. Use this with `Chargeable` trait in the SDK to charge fees on asset structs.", + "type": "object", + "required": [ + "fee", + "recipient" + ], + "properties": { + "fee": { + "$ref": "#/definitions/Fee" + }, + "recipient": { + "$ref": "#/definitions/Addr" + } + }, + "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" + }, + "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" + }, + "Fee": { + "description": "A wrapper around Decimal to help handle fractional fees.", + "type": "object", + "required": [ + "share" + ], + "properties": { + "share": { + "description": "fraction of asset to take as fee.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false + } + } + }, + "generate_messages": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenerateMessagesResponse", + "description": "Response from GenerateMsgs", + "type": "object", + "required": [ + "messages" + ], + "properties": { + "messages": { + "description": "Messages generated for dex action", + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + } + }, + "additionalProperties": false, + "definitions": { + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } + }, + "raw_current_l_t_v": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserCurrentLTVResponse", + "description": "Response wrapper for user current ltv query", + "type": "object", + "required": [ + "current_ltv" + ], + "properties": { + "current_ltv": { + "description": "Current LTV", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "raw_max_l_t_v": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserMaxLTVResponse", + "description": "Response wrapper for user max ltv query", + "type": "object", + "required": [ + "max_ltv" + ], + "properties": { + "max_ltv": { + "description": "Maximum LTV", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "raw_price": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PriceResponse", + "description": "Response wrapper for price query", + "type": "object", + "required": [ + "price" + ], + "properties": { + "price": { + "description": "Price", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "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" + } + } + }, + "raw_user_borrow": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserBorrowResponse", + "description": "Response wrapper for user borrow query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Borrow Amount", + "allOf": [ + { + "$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" + } + } + }, + "raw_user_collateral": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserCollateralResponse", + "description": "Response wrapper for user collateral query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Collateral Amount", + "allOf": [ + { + "$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" + } + } + }, + "raw_user_deposit": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "UserDepositResponse", + "description": "Response wrapper for user deposit query", + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "Deposit Amount", + "allOf": [ + { + "$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" + } + } + } + } +} diff --git a/schema/money-market/0.23.0/query_msg.json b/schema/money-market/0.23.0/query_msg.json new file mode 100644 index 0000000000..80b1c4f412 --- /dev/null +++ b/schema/money-market/0.23.0/query_msg.json @@ -0,0 +1,1306 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/MoneyMarketQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetBase_for_String": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "BaseQueryMsg": { + "description": "Query adapter message", + "oneOf": [ + { + "description": "Returns [`AdapterConfigResponse`].", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`AuthorizedAddressesResponse`].", + "type": "object", + "required": [ + "authorized_addresses" + ], + "properties": { + "authorized_addresses": { + "type": "object", + "required": [ + "proxy_address" + ], + "properties": { + "proxy_address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`].", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "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" + }, + "MoneyMarketAnsAction": { + "description": "Possible actions to perform on a Money Market The following actions use the Abstarct Name Service", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AnsAsset" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketExecuteMsg": { + "description": "MoneyMarket Execute msg", + "oneOf": [ + { + "description": "Update the fee", + "type": "object", + "required": [ + "update_fee" + ], + "properties": { + "update_fee": { + "type": "object", + "properties": { + "money_market_fee": { + "description": "New fee to set", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "recipient_account": { + "description": "New recipient account for fees", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with ans asset denomination", + "type": "object", + "required": [ + "ans_action" + ], + "properties": { + "ans_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketAnsAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Action to perform on the DEX with raw asset denominations", + "type": "object", + "required": [ + "raw_action" + ], + "properties": { + "raw_action": { + "type": "object", + "required": [ + "action", + "money_market" + ], + "properties": { + "action": { + "description": "The action to perform", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawAction" + } + ] + }, + "money_market": { + "description": "The name of the dex to interact with", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketQueryMsg": { + "description": "Query messages for the dex adapter", + "oneOf": [ + { + "description": "Endpoint can be used by front-end to easily interact with contracts. Returns [`GenerateMessagesResponse`]", + "type": "object", + "required": [ + "generate_messages" + ], + "properties": { + "generate_messages": { + "type": "object", + "required": [ + "addr_as_sender", + "message" + ], + "properties": { + "addr_as_sender": { + "description": "Sender Addr generate messages for", + "type": "string" + }, + "message": { + "description": "Execute message to generate messages for", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketExecuteMsg" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query using raw asset denoms and addresses Deposited funds for lending", + "type": "object", + "required": [ + "raw_user_deposit" + ], + "properties": { + "raw_user_deposit": { + "type": "object", + "required": [ + "asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "asset": { + "description": "Lended asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposited Collateral funds", + "type": "object", + "required": [ + "raw_user_collateral" + ], + "properties": { + "raw_user_collateral": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some collateral", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrowed funds", + "type": "object", + "required": [ + "raw_user_borrow" + ], + "properties": { + "raw_user_borrow": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Current Loan-to-Value ratio Represents the borrow usage for a specific user Allows to know how much asset are currently borrowed", + "type": "object", + "required": [ + "raw_current_l_t_v" + ], + "properties": { + "raw_current_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Maximum Loan to Value ratio for a user Allows to know how much assets can to be borrowed", + "type": "object", + "required": [ + "raw_max_l_t_v" + ], + "properties": { + "raw_max_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "contract_addr", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "contract_addr": { + "description": "Contract Address on which you execute the query", + "type": "string" + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Price of an asset compared to another asset The returned decimal corresponds to How much quote assets can be bought with 1 base asset", + "type": "object", + "required": [ + "raw_price" + ], + "properties": { + "raw_price": { + "type": "object", + "required": [ + "base", + "money_market", + "quote" + ], + "properties": { + "base": { + "description": "Base asset", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "quote": { + "description": "Quote asset", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Query using ans assets Deposited funds for lending", + "type": "object", + "required": [ + "ans_user_deposit" + ], + "properties": { + "ans_user_deposit": { + "type": "object", + "required": [ + "asset", + "money_market", + "user" + ], + "properties": { + "asset": { + "description": "Lended asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposited Collateral funds", + "type": "object", + "required": [ + "ans_user_collateral" + ], + "properties": { + "ans_user_collateral": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has deposited some collateral", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrowed funds", + "type": "object", + "required": [ + "ans_user_borrow" + ], + "properties": { + "ans_user_borrow": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Current Loan-to-Value ratio Represents the borrow usage for a specific user Allows to know how much asset are currently borrowed", + "type": "object", + "required": [ + "ans_current_l_t_v" + ], + "properties": { + "ans_current_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Maximum Loan to Value ratio for a user Allows to know how much assets can to be borrowed", + "type": "object", + "required": [ + "ans_max_l_t_v" + ], + "properties": { + "ans_max_l_t_v": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset", + "money_market", + "user" + ], + "properties": { + "borrowed_asset": { + "description": "Borrowed asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "collateral_asset": { + "description": "Collateral asset to query", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "user": { + "description": "User that has borrowed some funds", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Price of an asset compared to another asset The returned decimal corresponds to How much quote assets can be bought with 1 base asset", + "type": "object", + "required": [ + "ans_price" + ], + "properties": { + "ans_price": { + "type": "object", + "required": [ + "base", + "money_market", + "quote" + ], + "properties": { + "base": { + "description": "Base asset", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + }, + "money_market": { + "description": "Name of the MoneyMarket to interact with", + "type": "string" + }, + "quote": { + "description": "Quote asset", + "allOf": [ + { + "$ref": "#/definitions/AssetEntry" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Fee info for using the different dex actions", + "type": "object", + "required": [ + "fees" + ], + "properties": { + "fees": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "MoneyMarketRawAction": { + "description": "Action to execute on a money_market", + "type": "object", + "required": [ + "contract_addr", + "request" + ], + "properties": { + "contract_addr": { + "description": "The contract address to execute it against", + "type": "string" + }, + "request": { + "description": "The action to execute", + "allOf": [ + { + "$ref": "#/definitions/MoneyMarketRawRequest" + } + ] + } + }, + "additionalProperties": false + }, + "MoneyMarketRawRequest": { + "description": "Possible actions to perform on a Money Market This is an example using raw assets", + "oneOf": [ + { + "description": "Deposit funds for lending.", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "lending_asset" + ], + "properties": { + "lending_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw lent funds", + "type": "object", + "required": [ + "withdraw" + ], + "properties": { + "withdraw": { + "type": "object", + "required": [ + "lent_asset" + ], + "properties": { + "lent_asset": { + "description": "Asset to withdraw", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Deposit Collateral to borrow against", + "type": "object", + "required": [ + "provide_collateral" + ], + "properties": { + "provide_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to deposit in", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw Collateral to borrow against", + "type": "object", + "required": [ + "withdraw_collateral" + ], + "properties": { + "withdraw_collateral": { + "type": "object", + "required": [ + "borrowable_asset", + "collateral_asset" + ], + "properties": { + "borrowable_asset": { + "description": "Asset that identifies the market you want to withdraw from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset to deposit", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Borrow funds from the money market", + "type": "object", + "required": [ + "borrow" + ], + "properties": { + "borrow": { + "type": "object", + "required": [ + "borrow_asset", + "collateral_asset" + ], + "properties": { + "borrow_asset": { + "description": "Asset to borrow", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Repay funds to the money market", + "type": "object", + "required": [ + "repay" + ], + "properties": { + "repay": { + "type": "object", + "required": [ + "borrowed_asset", + "collateral_asset" + ], + "properties": { + "borrowed_asset": { + "description": "Asset to repay", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_String" + } + ] + }, + "collateral_asset": { + "description": "Asset that identifies the market you want to borrow from", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_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" + } + } +} diff --git a/schema/payment/0.4.0/execute_msg.json b/schema/payment/0.4.0/execute_msg.json new file mode 100644 index 0000000000..fe0d9684c2 --- /dev/null +++ b/schema/payment/0.4.0/execute_msg.json @@ -0,0 +1,1288 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AppExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AppExecuteMsg": { + "description": "PaymentApp execute messages", + "oneOf": [ + { + "type": "object", + "required": [ + "tip" + ], + "properties": { + "tip": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "denom_asset": { + "type": [ + "string", + "null" + ] + }, + "desired_asset": { + "anyOf": [ + { + "$ref": "#/definitions/Clearable_for_AssetEntry" + }, + { + "type": "null" + } + ] + }, + "exchanges": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "Clearable_for_AssetEntry": { + "description": "A type representing a value that can either be cleared or set with a value of type `C`. ``` use cosmwasm_std::{StdResult, Response, DepsMut}; use cw_storage_plus::Item; use cw_clearable::Clearable;\n\nconst FOO: Item> = Item::new(\"foo\");\n\npub fn update_config(deps: DepsMut, foo: Option>) -> StdResult{ if let Some(foo) = foo { FOO.save(deps.storage, &foo.into()); } Ok(Response::new()) } ```", + "oneOf": [ + { + "description": "Clear the current state.", + "type": "string", + "enum": [ + "clear" + ] + }, + { + "description": "Set state with a value of type `C`.", + "type": "object", + "required": [ + "set" + ], + "properties": { + "set": { + "$ref": "#/definitions/AssetEntry" + } + }, + "additionalProperties": false + } + ] + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/payment/0.4.0/instantiate_msg.json b/schema/payment/0.4.0/instantiate_msg.json new file mode 100644 index 0000000000..a21ad09fb9 --- /dev/null +++ b/schema/payment/0.4.0/instantiate_msg.json @@ -0,0 +1,106 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/AppInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "AppInstantiateMsg": { + "description": "PaymentApp instantiate message", + "type": "object", + "required": [ + "denom_asset", + "exchanges" + ], + "properties": { + "denom_asset": { + "type": "string" + }, + "desired_asset": { + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "exchanges": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "type": "string" + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/payment/0.4.0/migrate_msg.json b/schema/payment/0.4.0/migrate_msg.json new file mode 100644 index 0000000000..5ebb337828 --- /dev/null +++ b/schema/payment/0.4.0/migrate_msg.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/AppMigrateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AppMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + } + } +} diff --git a/schema/payment/0.4.0/module-schema.json b/schema/payment/0.4.0/module-schema.json new file mode 100644 index 0000000000..a6aa1f605e --- /dev/null +++ b/schema/payment/0.4.0/module-schema.json @@ -0,0 +1,411 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.4.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "PaymentApp instantiate message", + "type": "object", + "required": [ + "denom_asset", + "exchanges" + ], + "properties": { + "denom_asset": { + "type": "string" + }, + "desired_asset": { + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "exchanges": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "PaymentApp execute messages", + "oneOf": [ + { + "type": "object", + "required": [ + "tip" + ], + "properties": { + "tip": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "denom_asset": { + "type": [ + "string", + "null" + ] + }, + "desired_asset": { + "anyOf": [ + { + "$ref": "#/definitions/Clearable_for_AssetEntry" + }, + { + "type": "null" + } + ] + }, + "exchanges": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "Clearable_for_AssetEntry": { + "description": "A type representing a value that can either be cleared or set with a value of type `C`. ``` use cosmwasm_std::{StdResult, Response, DepsMut}; use cw_storage_plus::Item; use cw_clearable::Clearable;\n\nconst FOO: Item> = Item::new(\"foo\");\n\npub fn update_config(deps: DepsMut, foo: Option>) -> StdResult{ if let Some(foo) = foo { FOO.save(deps.storage, &foo.into()); } Ok(Response::new()) } ```", + "oneOf": [ + { + "description": "Clear the current state.", + "type": "string", + "enum": [ + "clear" + ] + }, + { + "description": "Set state with a value of type `C`.", + "type": "object", + "required": [ + "set" + ], + "properties": { + "set": { + "$ref": "#/definitions/AssetEntry" + } + }, + "additionalProperties": false + } + ] + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TipperResponse`]", + "type": "object", + "required": [ + "tipper" + ], + "properties": { + "tipper": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + }, + "at_height": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "start_after": { + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TipCountResponse`]", + "type": "object", + "required": [ + "tip_count" + ], + "properties": { + "tip_count": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TippersCountResponse`]", + "type": "object", + "required": [ + "list_tippers_count" + ], + "properties": { + "list_tippers_count": { + "type": "object", + "properties": { + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0 + }, + "start_after": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "type": "object", + "required": [ + "denom_asset", + "exchanges" + ], + "properties": { + "denom_asset": { + "type": "string" + }, + "desired_asset": { + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + }, + "exchanges": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "definitions": { + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + } + } + }, + "list_tippers_count": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TippersCountResponse", + "type": "object", + "required": [ + "tippers" + ], + "properties": { + "tippers": { + "type": "array", + "items": { + "$ref": "#/definitions/TipperCountResponse" + } + } + }, + "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" + }, + "TipperCountResponse": { + "type": "object", + "required": [ + "address", + "count" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + }, + "count": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + } + }, + "tip_count": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TipCountResponse", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + }, + "tipper": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TipperResponse", + "type": "object", + "required": [ + "address", + "tip_count", + "total_amounts" + ], + "properties": { + "address": { + "$ref": "#/definitions/Addr" + }, + "tip_count": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "total_amounts": { + "type": "array", + "items": { + "$ref": "#/definitions/AnsAsset" + } + } + }, + "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" + }, + "AnsAsset": { + "type": "object", + "required": [ + "amount", + "name" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "name": { + "$ref": "#/definitions/AssetEntry" + } + } + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "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" + } + } + } + } +} diff --git a/schema/payment/0.4.0/query_msg.json b/schema/payment/0.4.0/query_msg.json new file mode 100644 index 0000000000..75f10dbda7 --- /dev/null +++ b/schema/payment/0.4.0/query_msg.json @@ -0,0 +1,208 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AppQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AppQueryMsg": { + "oneOf": [ + { + "description": "Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TipperResponse`]", + "type": "object", + "required": [ + "tipper" + ], + "properties": { + "tipper": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + }, + "at_height": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "start_after": { + "anyOf": [ + { + "$ref": "#/definitions/AssetEntry" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TipCountResponse`]", + "type": "object", + "required": [ + "tip_count" + ], + "properties": { + "tip_count": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`TippersCountResponse`]", + "type": "object", + "required": [ + "list_tippers_count" + ], + "properties": { + "list_tippers_count": { + "type": "object", + "properties": { + "limit": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "start_after": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AssetEntry": { + "description": "An unchecked ANS asset entry. This is a string that is formatted as `src_chain>[intermediate_chain>]asset_name`", + "type": "string" + }, + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/proxy/0.23.0/abstract-proxy.json b/schema/proxy/0.23.0/abstract-proxy.json new file mode 100644 index 0000000000..0c7ad48764 --- /dev/null +++ b/schema/proxy/0.23.0/abstract-proxy.json @@ -0,0 +1,3268 @@ +{ + "contract_name": "abstract-proxy", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "account_id", + "ans_host_address", + "manager_addr" + ], + "properties": { + "account_id": { + "$ref": "#/definitions/AccountId" + }, + "ans_host_address": { + "type": "string" + }, + "manager_addr": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Sets the admin", + "type": "object", + "required": [ + "set_admin" + ], + "properties": { + "set_admin": { + "type": "object", + "required": [ + "admin" + ], + "properties": { + "admin": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Executes the provided messages if sender is whitelisted", + "type": "object", + "required": [ + "module_action" + ], + "properties": { + "module_action": { + "type": "object", + "required": [ + "msgs" + ], + "properties": { + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Execute a message and forward the Response data", + "type": "object", + "required": [ + "module_action_with_data" + ], + "properties": { + "module_action_with_data": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/CosmosMsg_for_Empty" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Execute IBC action on Client", + "type": "object", + "required": [ + "ibc_action" + ], + "properties": { + "ibc_action": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/ExecuteMsg" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Queries the Abstract Ica Client with the provided action query. Provides access to different ICA implementations for different ecosystems.", + "type": "object", + "required": [ + "ica_action" + ], + "properties": { + "ica_action": { + "type": "object", + "required": [ + "action_query_msg" + ], + "properties": { + "action_query_msg": { + "description": "Query of type `abstract-ica-client::msg::QueryMsg`", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Adds the provided address to whitelisted dapps", + "type": "object", + "required": [ + "add_modules" + ], + "properties": { + "add_modules": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Removes the provided address from the whitelisted dapps", + "type": "object", + "required": [ + "remove_module" + ], + "properties": { + "remove_module": { + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "Action": { + "description": "Actions that can be taken to alter the contract's ownership", + "oneOf": [ + { + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", + "type": "object", + "required": [ + "transfer_ownership" + ], + "properties": { + "transfer_ownership": { + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "new_owner": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "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" + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankMsg": { + "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", + "oneOf": [ + { + "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "send" + ], + "properties": { + "send": { + "type": "object", + "required": [ + "amount", + "to_address" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", + "type": "object", + "required": [ + "burn" + ], + "properties": { + "burn": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "Callback2": { + "oneOf": [ + { + "description": "Result of executing the requested query, or an error.\n\nresult[i] corresponds to the i'th query and contains the base64 encoded query response.", + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + }, + { + "description": "Result of executing the requested messages, or an error.\n\n14/04/23: if a submessage errors the reply handler can see `codespace: wasm, code: 5`, but not the actual error. as a result, we can't return good errors for Execution and this error string will only tell you the error's codespace. for example, an out-of-gas error is code 11 and looks like `codespace: sdk, code: 11`.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CallbackMessage": { + "description": "Executed on the callback receiver upon message completion. When being executed, the message will be tagged with \"callback\":\n\n```json {\"callback\": { \"initiator\": ..., \"initiator_msg\": ..., \"result\": ..., }} ```", + "type": "object", + "required": [ + "initiator", + "initiator_msg", + "result" + ], + "properties": { + "initiator": { + "description": "Initaitor on the note chain.", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "initiator_msg": { + "description": "Message sent by the initaitor. This _must_ be base64 encoded or execution will fail.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "result": { + "description": "Data from the host chain.", + "allOf": [ + { + "$ref": "#/definitions/Callback2" + } + ] + } + }, + "additionalProperties": false + }, + "CallbackMsg": { + "description": "Callback message to set the dependencies after module upgrades.", + "type": "object", + "additionalProperties": false + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_Empty": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/Empty" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionMsg" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "gov" + ], + "properties": { + "gov": { + "$ref": "#/definitions/GovMsg" + } + }, + "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" + }, + "DistributionMsg": { + "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The `withdraw_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "The `validator_address`", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "fund_community_pool" + ], + "properties": { + "fund_community_pool": { + "type": "object", + "required": [ + "amount" + ], + "properties": { + "amount": { + "description": "The amount to spend", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecuteMsg": { + "oneOf": [ + { + "description": "Update the ownership.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/Action" + } + }, + "additionalProperties": false + }, + { + "description": "Owner method: Registers the polytone note on the local chain as well as the host on the remote chain to send messages through This allows for monitoring which chain are connected to the contract remotely", + "type": "object", + "required": [ + "register_infrastructure" + ], + "properties": { + "register_infrastructure": { + "type": "object", + "required": [ + "chain", + "host", + "note" + ], + "properties": { + "chain": { + "description": "Chain to register the infrastructure for (\"juno\", \"osmosis\", etc.)", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "host": { + "description": "Address of the abstract host deployed on the remote chain", + "type": "string" + }, + "note": { + "description": "Polytone note (locally deployed)", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Owner method: Update the config on IBC client", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host": { + "type": [ + "string", + "null" + ] + }, + "version_control": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Only callable by Account proxy Will attempt to forward the specified funds to the corresponding address on the remote chain.", + "type": "object", + "required": [ + "send_funds" + ], + "properties": { + "send_funds": { + "type": "object", + "required": [ + "funds", + "host_chain" + ], + "properties": { + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "host_chain": { + "description": "host chain to be executed on Example: \"osmosis\"", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "memo": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Only callable by Account proxy Register an Account on a remote chain over IBC This action creates a proxy for them on the remote chain.", + "type": "object", + "required": [ + "register" + ], + "properties": { + "register": { + "type": "object", + "required": [ + "host_chain", + "install_modules" + ], + "properties": { + "host_chain": { + "description": "host chain to be executed on Example: \"osmosis\"", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "namespace": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Only callable by Account Module", + "type": "object", + "required": [ + "module_ibc_action" + ], + "properties": { + "module_ibc_action": { + "type": "object", + "required": [ + "host_chain", + "msg", + "target_module" + ], + "properties": { + "callback": { + "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", + "anyOf": [ + { + "$ref": "#/definitions/Callback" + }, + { + "type": "null" + } + ] + }, + "host_chain": { + "description": "host chain to be executed on Example: \"osmosis\"", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "msg": { + "description": "Json-encoded IbcMsg to the target module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Module of this account on host chain", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Only callable by Account Module", + "type": "object", + "required": [ + "ibc_query" + ], + "properties": { + "ibc_query": { + "type": "object", + "required": [ + "callback", + "host_chain", + "queries" + ], + "properties": { + "callback": { + "description": "Callback info to identify the callback that is sent (acts similar to the reply ID)", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "host_chain": { + "description": "host chain to be executed on Example: \"osmosis\"", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "queries": { + "description": "Cosmos Query requests", + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Only callable by Account Proxy Action on remote ibc host Which currently only support manager messages", + "type": "object", + "required": [ + "remote_action" + ], + "properties": { + "remote_action": { + "type": "object", + "required": [ + "action", + "host_chain" + ], + "properties": { + "action": { + "description": "execute the custom host function", + "allOf": [ + { + "$ref": "#/definitions/HostAction" + } + ] + }, + "host_chain": { + "description": "host chain to be executed on Example: \"osmosis\"", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Owner method: Remove connection for remote chain", + "type": "object", + "required": [ + "remove_host" + ], + "properties": { + "remove_host": { + "type": "object", + "required": [ + "host_chain" + ], + "properties": { + "host_chain": { + "$ref": "#/definitions/TruncatedChainId" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Callback from the Polytone implementation This is triggered regardless of the execution result", + "type": "object", + "required": [ + "callback" + ], + "properties": { + "callback": { + "$ref": "#/definitions/CallbackMessage" + } + }, + "additionalProperties": false + } + ] + }, + "ExecuteMsg2": { + "description": "Manager execute messages", + "oneOf": [ + { + "description": "Forward execution message to module", + "type": "object", + "required": [ + "exec_on_module" + ], + "properties": { + "exec_on_module": { + "type": "object", + "required": [ + "exec_msg", + "module_id" + ], + "properties": { + "exec_msg": { + "$ref": "#/definitions/Binary" + }, + "module_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update Abstract-specific configuration of the module. Only callable by the account factory or owner.", + "type": "object", + "required": [ + "update_internal_config" + ], + "properties": { + "update_internal_config": { + "$ref": "#/definitions/Binary" + } + }, + "additionalProperties": false + }, + { + "description": "Install module using module factory, callable by Owner", + "type": "object", + "required": [ + "install_modules" + ], + "properties": { + "install_modules": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Uninstall a module given its ID.", + "type": "object", + "required": [ + "uninstall_module" + ], + "properties": { + "uninstall_module": { + "type": "object", + "required": [ + "module_id" + ], + "properties": { + "module_id": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Upgrade the module to a new version If module is `abstract::manager` then the contract will do a self-migration.", + "type": "object", + "required": [ + "upgrade" + ], + "properties": { + "upgrade": { + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/ModuleInfo" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Creates a sub-account on the account", + "type": "object", + "required": [ + "create_sub_account" + ], + "properties": { + "create_sub_account": { + "type": "object", + "required": [ + "install_modules", + "name" + ], + "properties": { + "account_id": { + "description": "If `None`, will create a new local account without asserting account-id.\n\nWhen provided sequence in 0..2147483648 range: The tx will error When provided sequence in 2147483648..u32::MAX range: Signals use of unclaimed Account Id in this range. The tx will error if this account-id already claimed. Useful for instantiate2 address prediction.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update info", + "type": "object", + "required": [ + "update_info" + ], + "properties": { + "update_info": { + "type": "object", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update account statuses", + "type": "object", + "required": [ + "update_status" + ], + "properties": { + "update_status": { + "type": "object", + "properties": { + "is_suspended": { + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Actions called by internal or external sub-accounts", + "type": "object", + "required": [ + "update_sub_account" + ], + "properties": { + "update_sub_account": { + "$ref": "#/definitions/UpdateSubAccountAction" + } + }, + "additionalProperties": false + }, + { + "description": "Callback endpoint", + "type": "object", + "required": [ + "callback" + ], + "properties": { + "callback": { + "$ref": "#/definitions/CallbackMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` can propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership of the account permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/GovAction" + } + }, + "additionalProperties": false + } + ] + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "GovAction": { + "description": "Actions that can be taken to alter the contract's governance ownership", + "oneOf": [ + { + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", + "type": "object", + "required": [ + "transfer_ownership" + ], + "properties": { + "transfer_ownership": { + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "new_owner": { + "$ref": "#/definitions/GovernanceDetails_for_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "GovMsg": { + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", + "oneOf": [ + { + "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote" + ], + "properties": { + "vote": { + "type": "object", + "required": [ + "proposal_id", + "vote" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "vote": { + "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", + "allOf": [ + { + "$ref": "#/definitions/VoteOption" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", + "type": "object", + "required": [ + "vote_weighted" + ], + "properties": { + "vote_weighted": { + "type": "object", + "required": [ + "options", + "proposal_id" + ], + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/WeightedVoteOption" + } + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "GovernanceDetails_for_String": { + "description": "Governance types", + "oneOf": [ + { + "description": "A single address is admin", + "type": "object", + "required": [ + "Monarchy" + ], + "properties": { + "Monarchy": { + "type": "object", + "required": [ + "monarch" + ], + "properties": { + "monarch": { + "description": "The monarch's address", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Used when the account is a sub-account of another account.", + "type": "object", + "required": [ + "SubAccount" + ], + "properties": { + "SubAccount": { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "description": "The manager of the account of which this account is the sub-account.", + "type": "string" + }, + "proxy": { + "description": "The proxy of the account of which this account is the sub-account.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "An external governance source", + "type": "object", + "required": [ + "External" + ], + "properties": { + "External": { + "type": "object", + "required": [ + "governance_address", + "governance_type" + ], + "properties": { + "governance_address": { + "description": "The external contract address", + "type": "string" + }, + "governance_type": { + "description": "Governance type used for doing extra off-chain queries depending on the type.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Renounced account This account no longer has an owner and cannot be used.", + "type": "object", + "required": [ + "Renounced" + ], + "properties": { + "Renounced": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "NFT" + ], + "properties": { + "NFT": { + "type": "object", + "required": [ + "collection_addr", + "token_id" + ], + "properties": { + "collection_addr": { + "type": "string" + }, + "token_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "HelperAction": { + "oneOf": [ + { + "description": "What do we need here ? TODO", + "type": "string", + "enum": [ + "send_all_back" + ] + } + ] + }, + "HostAction": { + "description": "Callable actions on a remote host", + "oneOf": [ + { + "description": "Dispatch messages to a remote manager contract. Will create a new Account if required.", + "type": "object", + "required": [ + "dispatch" + ], + "properties": { + "dispatch": { + "type": "object", + "required": [ + "manager_msgs" + ], + "properties": { + "manager_msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg2" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Can't be called by an account directly. These are permissioned messages that only the IBC Client is allowed to call by itself.", + "type": "object", + "required": [ + "internal" + ], + "properties": { + "internal": { + "$ref": "#/definitions/InternalAction" + } + }, + "additionalProperties": false + }, + { + "description": "Some helpers that allow calling dispatch messages faster (for actions that are called regularly)", + "type": "object", + "required": [ + "helpers" + ], + "properties": { + "helpers": { + "$ref": "#/definitions/HelperAction" + } + }, + "additionalProperties": false + } + ] + }, + "IbcMsg": { + "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", + "oneOf": [ + { + "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", + "type": "object", + "required": [ + "transfer" + ], + "properties": { + "transfer": { + "type": "object", + "required": [ + "amount", + "channel_id", + "timeout", + "to_address" + ], + "properties": { + "amount": { + "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "channel_id": { + "description": "existing channel to send the tokens over", + "type": "string" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + }, + "to_address": { + "description": "address on the remote chain to receive these tokens", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", + "type": "object", + "required": [ + "send_packet" + ], + "properties": { + "send_packet": { + "type": "object", + "required": [ + "channel_id", + "data", + "timeout" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "data": { + "$ref": "#/definitions/Binary" + }, + "timeout": { + "description": "when packet times out, measured on remote chain", + "allOf": [ + { + "$ref": "#/definitions/IbcTimeout" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", + "type": "object", + "required": [ + "close_channel" + ], + "properties": { + "close_channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcTimeout": { + "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", + "type": "object", + "properties": { + "block": { + "anyOf": [ + { + "$ref": "#/definitions/IbcTimeoutBlock" + }, + { + "type": "null" + } + ] + }, + "timestamp": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + } + }, + "IbcTimeoutBlock": { + "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", + "type": "object", + "required": [ + "height", + "revision" + ], + "properties": { + "height": { + "description": "block height after which the packet times out. the height within the given revision", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "revision": { + "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "InternalAction": { + "oneOf": [ + { + "description": "Registers a new account from a remote chain", + "type": "object", + "required": [ + "register" + ], + "properties": { + "register": { + "type": "object", + "required": [ + "install_modules", + "name" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "install_modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleInstallConfig" + } + }, + "link": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInstallConfig": { + "description": "Module info and init message", + "type": "object", + "required": [ + "module" + ], + "properties": { + "init_msg": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "module": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingMsg": { + "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", + "oneOf": [ + { + "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "undelegate" + ], + "properties": { + "undelegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "amount", + "dst_validator", + "src_validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Coin" + }, + "dst_validator": { + "type": "string" + }, + "src_validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "UpdateSubAccountAction": { + "oneOf": [ + { + "description": "Unregister sub-account It will unregister sub-account from the state Could be called only by the sub-account itself", + "type": "object", + "required": [ + "unregister_sub_account" + ], + "properties": { + "unregister_sub_account": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Register sub-account It will register new sub-account into the state Could be called by the sub-account manager Note: since it happens after the claim by this manager state won't have spam accounts", + "type": "object", + "required": [ + "register_sub_account" + ], + "properties": { + "register_sub_account": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", + "type": "object", + "required": [ + "instantiate2" + ], + "properties": { + "instantiate2": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg", + "salt" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "salt": { + "$ref": "#/definitions/Binary" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "migrate" + ], + "properties": { + "migrate": { + "type": "object", + "required": [ + "contract_addr", + "msg", + "new_code_id" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "new_code_id": { + "description": "the code_id of the new logic to place in the given contract", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "update_admin" + ], + "properties": { + "update_admin": { + "type": "object", + "required": [ + "admin", + "contract_addr" + ], + "properties": { + "admin": { + "type": "string" + }, + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", + "type": "object", + "required": [ + "clear_admin" + ], + "properties": { + "clear_admin": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WeightedVoteOption": { + "type": "object", + "required": [ + "option", + "weight" + ], + "properties": { + "option": { + "$ref": "#/definitions/VoteOption" + }, + "weight": { + "$ref": "#/definitions/Decimal" + } + } + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Contains the enabled modules Returns [`ConfigResponse`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "type": "object", + "required": [ + "modules" + ], + "properties": { + "modules": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + } +} diff --git a/schema/subscription/0.23.0/execute_msg.json b/schema/subscription/0.23.0/execute_msg.json new file mode 100644 index 0000000000..e7334e1df1 --- /dev/null +++ b/schema/subscription/0.23.0/execute_msg.json @@ -0,0 +1,375 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Custom execute handler", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/SubscriptionExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom msg type", + "type": "object", + "required": [ + "receive" + ], + "properties": { + "receive": { + "$ref": "#/definitions/Cw20ReceiveMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "oneOf": [ + { + "description": "Updates the base config", + "type": "object", + "required": [ + "update_config" + ], + "properties": { + "update_config": { + "type": "object", + "properties": { + "ans_host_address": { + "type": [ + "string", + "null" + ] + }, + "version_control_address": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Clearable_for_String": { + "description": "A type representing a value that can either be cleared or set with a value of type `C`. ``` use cosmwasm_std::{StdResult, Response, DepsMut}; use cw_storage_plus::Item; use cw_clearable::Clearable;\n\nconst FOO: Item> = Item::new(\"foo\");\n\npub fn update_config(deps: DepsMut, foo: Option>) -> StdResult{ if let Some(foo) = foo { FOO.save(deps.storage, &foo.into()); } Ok(Response::new()) } ```", + "oneOf": [ + { + "description": "Clear the current state.", + "type": "string", + "enum": [ + "clear" + ] + }, + { + "description": "Set state with a value of type `C`.", + "type": "object", + "required": [ + "set" + ], + "properties": { + "set": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "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" + }, + "EmissionType_for_String": { + "description": "Setting for protocol token emissions", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "A fixed number of tokens are distributed to users on a per-second basis. emission = second_shared / total_subscribers", + "type": "object", + "required": [ + "second_shared" + ], + "properties": { + "second_shared": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + }, + { + "description": "Each user receives a fixed number of tokens on a per-second basis. emission = second_per_user", + "type": "object", + "required": [ + "second_per_user" + ], + "properties": { + "second_per_user": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + ] + }, + "SubscriptionExecuteMsg": { + "description": "App execution messages", + "oneOf": [ + { + "description": "Subscriber payment", + "type": "object", + "required": [ + "pay" + ], + "properties": { + "pay": { + "type": "object", + "properties": { + "subscriber_addr": { + "description": "Address of new subscriber defaults to the sender", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Unsubscribe inactive accounts", + "type": "object", + "required": [ + "unsubscribe" + ], + "properties": { + "unsubscribe": { + "type": "object", + "required": [ + "unsubscribe_addrs" + ], + "properties": { + "unsubscribe_addrs": { + "description": "List of inactive accounts to move to the `DORMANT_SUBSCRIBERS` list", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim the emissions for subscriber", + "type": "object", + "required": [ + "claim_emissions" + ], + "properties": { + "claim_emissions": { + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "description": "Address of subscriber", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update config of subscription", + "type": "object", + "required": [ + "update_subscription_config" + ], + "properties": { + "update_subscription_config": { + "type": "object", + "properties": { + "payment_asset": { + "description": "New asset for payment", + "anyOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + }, + { + "type": "null" + } + ] + }, + "subscription_cost_per_second": { + "description": "new subscription_cost_per_second", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "subscription_per_second_emissions": { + "description": "Subscription emissions per second", + "anyOf": [ + { + "$ref": "#/definitions/EmissionType_for_String" + }, + { + "type": "null" + } + ] + }, + "unsubscribe_hook_addr": { + "description": "New unsubscribe_hook_addr", + "anyOf": [ + { + "$ref": "#/definitions/Clearable_for_String" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Refresh TWA value", + "type": "object", + "required": [ + "refresh_t_w_a" + ], + "properties": { + "refresh_t_w_a": { + "type": "object", + "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" + } + } +} diff --git a/schema/subscription/0.23.0/instantiate_msg.json b/schema/subscription/0.23.0/instantiate_msg.json new file mode 100644 index 0000000000..b98b01f6a6 --- /dev/null +++ b/schema/subscription/0.23.0/instantiate_msg.json @@ -0,0 +1,218 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/SubscriptionInstantiateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, + "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" + }, + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "BaseInstantiateMsg": { + "description": "Used by Module Factory to instantiate App", + "type": "object", + "required": [ + "account_base", + "ans_host_address", + "version_control_address" + ], + "properties": { + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "ans_host_address": { + "type": "string" + }, + "version_control_address": { + "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" + }, + "EmissionType_for_String": { + "description": "Setting for protocol token emissions", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "A fixed number of tokens are distributed to users on a per-second basis. emission = second_shared / total_subscribers", + "type": "object", + "required": [ + "second_shared" + ], + "properties": { + "second_shared": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + }, + { + "description": "Each user receives a fixed number of tokens on a per-second basis. emission = second_per_user", + "type": "object", + "required": [ + "second_per_user" + ], + "properties": { + "second_per_user": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + ] + }, + "SubscriptionInstantiateMsg": { + "description": "Subscription instantiation message", + "type": "object", + "required": [ + "income_averaging_period", + "payment_asset", + "subscription_cost_per_second", + "subscription_per_second_emissions" + ], + "properties": { + "income_averaging_period": { + "description": "How often update income average", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "payment_asset": { + "description": "Asset for payment", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "subscription_cost_per_second": { + "description": "Cost of the subscription on a per-second basis.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "subscription_per_second_emissions": { + "description": "Subscription emissions per second", + "allOf": [ + { + "$ref": "#/definitions/EmissionType_for_String" + } + ] + }, + "unsubscribe_hook_addr": { + "description": "Unsubscription hook addr to send [unsubscribe message](`crate::msg::UnsubscribedHookMsg`)", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } +} diff --git a/schema/subscription/0.23.0/migrate_msg.json b/schema/subscription/0.23.0/migrate_msg.json new file mode 100644 index 0000000000..26e19d3a11 --- /dev/null +++ b/schema/subscription/0.23.0/migrate_msg.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base migrate information", + "allOf": [ + { + "$ref": "#/definitions/BaseMigrateMsg" + } + ] + }, + "module": { + "description": "custom migrate msg", + "allOf": [ + { + "$ref": "#/definitions/SubscriptionMigrateMsg" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseMigrateMsg": { + "type": "object", + "additionalProperties": false + }, + "SubscriptionMigrateMsg": { + "description": "Subscription migration message", + "type": "object", + "additionalProperties": false + } + } +} diff --git a/schema/subscription/0.23.0/module-schema.json b/schema/subscription/0.23.0/module-schema.json new file mode 100644 index 0000000000..598a2ffef3 --- /dev/null +++ b/schema/subscription/0.23.0/module-schema.json @@ -0,0 +1,992 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "Subscription instantiation message", + "type": "object", + "required": [ + "income_averaging_period", + "payment_asset", + "subscription_cost_per_second", + "subscription_per_second_emissions" + ], + "properties": { + "income_averaging_period": { + "description": "How often update income average", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "payment_asset": { + "description": "Asset for payment", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ] + }, + "subscription_cost_per_second": { + "description": "Cost of the subscription on a per-second basis.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "subscription_per_second_emissions": { + "description": "Subscription emissions per second", + "allOf": [ + { + "$ref": "#/definitions/EmissionType_for_String" + } + ] + }, + "unsubscribe_hook_addr": { + "description": "Unsubscription hook addr to send [unsubscribe message](`crate::msg::UnsubscribedHookMsg`)", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false, + "definitions": { + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "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" + }, + "EmissionType_for_String": { + "description": "Setting for protocol token emissions", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "A fixed number of tokens are distributed to users on a per-second basis. emission = second_shared / total_subscribers", + "type": "object", + "required": [ + "second_shared" + ], + "properties": { + "second_shared": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + }, + { + "description": "Each user receives a fixed number of tokens on a per-second basis. emission = second_per_user", + "type": "object", + "required": [ + "second_per_user" + ], + "properties": { + "second_per_user": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "App execution messages", + "oneOf": [ + { + "description": "Subscriber payment", + "type": "object", + "required": [ + "pay" + ], + "properties": { + "pay": { + "type": "object", + "properties": { + "subscriber_addr": { + "description": "Address of new subscriber defaults to the sender", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Unsubscribe inactive accounts", + "type": "object", + "required": [ + "unsubscribe" + ], + "properties": { + "unsubscribe": { + "type": "object", + "required": [ + "unsubscribe_addrs" + ], + "properties": { + "unsubscribe_addrs": { + "description": "List of inactive accounts to move to the `DORMANT_SUBSCRIBERS` list", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claim the emissions for subscriber", + "type": "object", + "required": [ + "claim_emissions" + ], + "properties": { + "claim_emissions": { + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "description": "Address of subscriber", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update config of subscription", + "type": "object", + "required": [ + "update_subscription_config" + ], + "properties": { + "update_subscription_config": { + "type": "object", + "properties": { + "payment_asset": { + "description": "New asset for payment", + "anyOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_String" + }, + { + "type": "null" + } + ] + }, + "subscription_cost_per_second": { + "description": "new subscription_cost_per_second", + "anyOf": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "type": "null" + } + ] + }, + "subscription_per_second_emissions": { + "description": "Subscription emissions per second", + "anyOf": [ + { + "$ref": "#/definitions/EmissionType_for_String" + }, + { + "type": "null" + } + ] + }, + "unsubscribe_hook_addr": { + "description": "New unsubscribe_hook_addr", + "anyOf": [ + { + "$ref": "#/definitions/Clearable_for_String" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Refresh TWA value", + "type": "object", + "required": [ + "refresh_t_w_a" + ], + "properties": { + "refresh_t_w_a": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AssetInfoBase_for_String": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Clearable_for_String": { + "description": "A type representing a value that can either be cleared or set with a value of type `C`. ``` use cosmwasm_std::{StdResult, Response, DepsMut}; use cw_storage_plus::Item; use cw_clearable::Clearable;\n\nconst FOO: Item> = Item::new(\"foo\");\n\npub fn update_config(deps: DepsMut, foo: Option>) -> StdResult{ if let Some(foo) = foo { FOO.save(deps.storage, &foo.into()); } Ok(Response::new()) } ```", + "oneOf": [ + { + "description": "Clear the current state.", + "type": "string", + "enum": [ + "clear" + ] + }, + { + "description": "Set state with a value of type `C`.", + "type": "object", + "required": [ + "set" + ], + "properties": { + "set": { + "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" + }, + "EmissionType_for_String": { + "description": "Setting for protocol token emissions", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "A fixed number of tokens are distributed to users on a per-second basis. emission = second_shared / total_subscribers", + "type": "object", + "required": [ + "second_shared" + ], + "properties": { + "second_shared": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + }, + { + "description": "Each user receives a fixed number of tokens on a per-second basis. emission = second_per_user", + "type": "object", + "required": [ + "second_per_user" + ], + "properties": { + "second_per_user": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_String" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + ] + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Subscriptions query messages", + "oneOf": [ + { + "description": "Get state of subscriptions and contributors Returns [`StateResponse`]", + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get config of subscriptions and contributors Returns [`SubscriptionConfig`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get minimum of one month's worth to (re)-subscribe. Returns [`SubscriptionFeeResponse`]", + "type": "object", + "required": [ + "fee" + ], + "properties": { + "fee": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get state of the subscriber Returns [`SubscriberResponse`]", + "type": "object", + "required": [ + "subscriber" + ], + "properties": { + "subscriber": { + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "description": "Address of subscriber", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get list of subscribers Returns [`SubscribersResponse`]", + "type": "object", + "required": [ + "subscribers" + ], + "properties": { + "subscribers": { + "type": "object", + "properties": { + "expired_subs": { + "description": "Get list of expired(inactive) subscribers instead", + "type": [ + "boolean", + "null" + ] + }, + "limit": { + "description": "Limit", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "start_after": { + "description": "Start after subscriber address", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "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" + } + } + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "Subscription migration message", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SubscriptionConfig", + "description": "Config for subscriber functionality", + "type": "object", + "required": [ + "payment_asset", + "subscription_cost_per_second", + "subscription_per_second_emissions" + ], + "properties": { + "payment_asset": { + "description": "Asset that's accepted as payment", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + ] + }, + "subscription_cost_per_second": { + "description": "Cost of the subscription on a per-second basis.", + "allOf": [ + { + "$ref": "#/definitions/Decimal" + } + ] + }, + "subscription_per_second_emissions": { + "description": "Subscription emissions per second", + "allOf": [ + { + "$ref": "#/definitions/EmissionType_for_Addr" + } + ] + }, + "unsubscribe_hook_addr": { + "description": "Unsubscription hook addr", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "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" + }, + "AssetInfoBase_for_Addr": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "$ref": "#/definitions/Addr" + } + }, + "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" + }, + "EmissionType_for_Addr": { + "description": "Setting for protocol token emissions", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "A fixed number of tokens are distributed to users on a per-second basis. emission = second_shared / total_subscribers", + "type": "object", + "required": [ + "second_shared" + ], + "properties": { + "second_shared": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + }, + { + "description": "Each user receives a fixed number of tokens on a per-second basis. emission = second_per_user", + "type": "object", + "required": [ + "second_per_user" + ], + "properties": { + "second_per_user": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Decimal" + }, + { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + ], + "maxItems": 2, + "minItems": 2 + } + }, + "additionalProperties": false + } + ] + } + } + }, + "fee": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SubscriptionFeeResponse", + "description": "Query response for [`SubscriptionQueryMsg::Fee`]", + "type": "object", + "required": [ + "fee" + ], + "properties": { + "fee": { + "description": "minimum of one month's worth to (re)-subscribe.", + "allOf": [ + { + "$ref": "#/definitions/AssetBase_for_Addr" + } + ] + } + }, + "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" + }, + "AssetBase_for_Addr": { + "description": "Represents a fungible asset with a known amount\n\nEach asset instance contains two values: `info`, which specifies the asset's type (CW20 or native), and its `amount`, which specifies the asset's amount.", + "type": "object", + "required": [ + "amount", + "info" + ], + "properties": { + "amount": { + "description": "Specifies the asset's amount", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "info": { + "description": "Specifies the asset's type (CW20 or native)", + "allOf": [ + { + "$ref": "#/definitions/AssetInfoBase_for_Addr" + } + ] + } + }, + "additionalProperties": false + }, + "AssetInfoBase_for_Addr": { + "description": "Represents the type of an fungible asset.\n\nEach **asset info** instance can be one of three variants:\n\n- Native SDK coins. To create an **asset info** instance of this type, provide the denomination. - CW20 tokens. To create an **asset info** instance of this type, provide the contract address.", + "oneOf": [ + { + "type": "object", + "required": [ + "native" + ], + "properties": { + "native": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "cw20" + ], + "properties": { + "cw20": { + "$ref": "#/definitions/Addr" + } + }, + "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" + } + } + }, + "state": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "StateResponse", + "description": "Query response for [`SubscriptionQueryMsg::State`]", + "type": "object", + "required": [ + "subscription" + ], + "properties": { + "subscription": { + "description": "State of subscribers", + "allOf": [ + { + "$ref": "#/definitions/SubscriptionState" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "SubscriptionState": { + "description": "Keeps track of the active subscribers. Is updated each time a sub joins/leaves Used to calculate income.", + "type": "object", + "required": [ + "active_subs" + ], + "properties": { + "active_subs": { + "description": "amount of active subscribers", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "additionalProperties": false + } + } + }, + "subscriber": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SubscriberResponse", + "description": "Query response for [`SubscriptionQueryMsg::Subscriber`]", + "type": "object", + "required": [ + "currently_subscribed" + ], + "properties": { + "currently_subscribed": { + "description": "If the user currently active subscriber", + "type": "boolean" + }, + "subscriber_details": { + "description": "State of the subscription", + "anyOf": [ + { + "$ref": "#/definitions/Subscriber" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Subscriber": { + "description": "Stored info for each subscriber.", + "type": "object", + "required": [ + "expiration_timestamp", + "last_emission_claim_timestamp" + ], + "properties": { + "expiration_timestamp": { + "description": "When the subscription ends", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "last_emission_claim_timestamp": { + "description": "last time emissions were claimed", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + }, + "subscribers": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SubscribersResponse", + "description": "Query response for [`SubscriptionQueryMsg::Subscribers`]", + "type": "object", + "required": [ + "subscribers" + ], + "properties": { + "subscribers": { + "description": "list of subscribers", + "type": "array", + "items": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/Addr" + }, + { + "$ref": "#/definitions/SubscriberResponse" + } + ], + "maxItems": 2, + "minItems": 2 + } + } + }, + "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" + }, + "Subscriber": { + "description": "Stored info for each subscriber.", + "type": "object", + "required": [ + "expiration_timestamp", + "last_emission_claim_timestamp" + ], + "properties": { + "expiration_timestamp": { + "description": "When the subscription ends", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + }, + "last_emission_claim_timestamp": { + "description": "last time emissions were claimed", + "allOf": [ + { + "$ref": "#/definitions/Timestamp" + } + ] + } + }, + "additionalProperties": false + }, + "SubscriberResponse": { + "description": "Query response for [`SubscriptionQueryMsg::Subscriber`]", + "type": "object", + "required": [ + "currently_subscribed" + ], + "properties": { + "currently_subscribed": { + "description": "If the user currently active subscriber", + "type": "boolean" + }, + "subscriber_details": { + "description": "State of the subscription", + "anyOf": [ + { + "$ref": "#/definitions/Subscriber" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } + } + } +} diff --git a/schema/subscription/0.23.0/query_msg.json b/schema/subscription/0.23.0/query_msg.json new file mode 100644 index 0000000000..fb51d1b4fe --- /dev/null +++ b/schema/subscription/0.23.0/query_msg.json @@ -0,0 +1,211 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/SubscriptionQueryMsg" + } + }, + "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" + }, + "BaseQueryMsg": { + "oneOf": [ + { + "description": "Returns [`AppConfigResponse`]", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the admin. Returns [`AdminResponse`]", + "type": "object", + "required": [ + "base_admin" + ], + "properties": { + "base_admin": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`]", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns top level owner Returns [`TopLevelOwnerResponse`]", + "type": "object", + "required": [ + "top_level_owner" + ], + "properties": { + "top_level_owner": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "SubscriptionQueryMsg": { + "description": "Subscriptions query messages", + "oneOf": [ + { + "description": "Get state of subscriptions and contributors Returns [`StateResponse`]", + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get config of subscriptions and contributors Returns [`SubscriptionConfig`]", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get minimum of one month's worth to (re)-subscribe. Returns [`SubscriptionFeeResponse`]", + "type": "object", + "required": [ + "fee" + ], + "properties": { + "fee": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get state of the subscriber Returns [`SubscriberResponse`]", + "type": "object", + "required": [ + "subscriber" + ], + "properties": { + "subscriber": { + "type": "object", + "required": [ + "addr" + ], + "properties": { + "addr": { + "description": "Address of subscriber", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Get list of subscribers Returns [`SubscribersResponse`]", + "type": "object", + "required": [ + "subscribers" + ], + "properties": { + "subscribers": { + "type": "object", + "properties": { + "expired_subs": { + "description": "Get list of expired(inactive) subscribers instead", + "type": [ + "boolean", + "null" + ] + }, + "limit": { + "description": "Limit", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "start_after": { + "description": "Start after subscriber address", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/tendermint-staking/0.23.0/execute_msg.json b/schema/tendermint-staking/0.23.0/execute_msg.json new file mode 100644 index 0000000000..0eb140f870 --- /dev/null +++ b/schema/tendermint-staking/0.23.0/execute_msg.json @@ -0,0 +1,1423 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "description": "Wrapper around all possible messages that can be sent to the module.", + "oneOf": [ + { + "description": "A configuration message, defined by the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "An app request defined by a base consumer.", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/AdapterRequestMsg_for_TendermintStakingExecuteMsg" + } + }, + "additionalProperties": false + }, + { + "description": "IbcReceive to process IBC callbacks In order to trust this, the apps and adapters verify this comes from the ibc-client contract.", + "type": "object", + "required": [ + "ibc_callback" + ], + "properties": { + "ibc_callback": { + "$ref": "#/definitions/IbcResponseMsg" + } + }, + "additionalProperties": false + }, + { + "description": "ModuleIbc endpoint to receive messages from modules on other chains In order to trust this, the apps and adapters verify this comes from the ibc-host contract. They should also trust the sending chain", + "type": "object", + "required": [ + "module_ibc" + ], + "properties": { + "module_ibc": { + "$ref": "#/definitions/ModuleIbcMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "AccountId": { + "description": "Unique identifier for an account. On each chain this is unique.", + "type": "object", + "required": [ + "seq", + "trace" + ], + "properties": { + "seq": { + "description": "Unique identifier for the accounts create on a local chain. Is reused when creating an interchain account.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "trace": { + "description": "Sequence of the chain that triggered the IBC account creation `AccountTrace::Local` if the account was created locally Example: Account created on Juno which has an abstract interchain account on Osmosis, which in turn creates an interchain account on Terra -> `AccountTrace::Remote(vec![\"juno\", \"osmosis\"])`", + "allOf": [ + { + "$ref": "#/definitions/AccountTrace" + } + ] + } + }, + "additionalProperties": false + }, + "AccountTrace": { + "description": "The identifier of chain that triggered the account creation", + "oneOf": [ + { + "type": "string", + "enum": [ + "local" + ] + }, + { + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "array", + "items": { + "$ref": "#/definitions/TruncatedChainId" + } + } + }, + "additionalProperties": false + } + ] + }, + "AdapterBaseMsg": { + "description": "Configuration message for the adapter", + "oneOf": [ + { + "description": "Add or remove authorized addresses If an authorized address is both in to_add and to_remove, it will be removed.", + "type": "object", + "required": [ + "update_authorized_addresses" + ], + "properties": { + "update_authorized_addresses": { + "type": "object", + "required": [ + "to_add", + "to_remove" + ], + "properties": { + "to_add": { + "type": "array", + "items": { + "type": "string" + } + }, + "to_remove": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "AdapterRequestMsg_for_TendermintStakingExecuteMsg": { + "description": "An adapter request. If proxy is None, then the sender must be an Account manager and the proxy address is extrapolated from the Account id.", + "type": "object", + "required": [ + "request" + ], + "properties": { + "proxy_address": { + "type": [ + "string", + "null" + ] + }, + "request": { + "description": "The actual request", + "allOf": [ + { + "$ref": "#/definitions/TendermintStakingExecuteMsg" + } + ] + } + }, + "additionalProperties": false + }, + "Attribute": { + "description": "An key value pair that is used in the context of event attributes in logs", + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "BankQuery": { + "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", + "type": "object", + "required": [ + "balance" + ], + "properties": { + "balance": { + "type": "object", + "required": [ + "address", + "denom" + ], + "properties": { + "address": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.", + "type": "object", + "required": [ + "all_balances" + ], + "properties": { + "all_balances": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse", + "type": "object", + "required": [ + "denom_metadata" + ], + "properties": { + "denom_metadata": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse", + "type": "object", + "required": [ + "all_denom_metadata" + ], + "properties": { + "all_denom_metadata": { + "type": "object", + "properties": { + "pagination": { + "anyOf": [ + { + "$ref": "#/definitions/PageRequest" + }, + { + "type": "null" + } + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "BaseExecuteMsg": { + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "$ref": "#/definitions/AdapterBaseMsg" + }, + "proxy_address": { + "description": "The Proxy address for which to apply the configuration If None, the sender must be an Account manager and the configuration is applied to its associated proxy. If Some, the sender must be a direct or indirect owner (through sub-accounts) of the specified proxy.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "Binary": { + "description": "Binary is a wrapper around Vec 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. See also .", + "type": "string" + }, + "Callback": { + "description": "Callback from modules, that is turned into an IbcResponseMsg by the ibc client A callback can only be sent to itself", + "type": "object", + "required": [ + "msg" + ], + "properties": { + "msg": { + "description": "Used to add information to the callback. This is usually used to provide information to the ibc callback function for context", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + }, + "additionalProperties": false + }, + "DistributionQuery": { + "oneOf": [ + { + "description": "See ", + "type": "object", + "required": [ + "delegator_withdraw_address" + ], + "properties": { + "delegator_withdraw_address": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_rewards" + ], + "properties": { + "delegation_rewards": { + "type": "object", + "required": [ + "delegator_address", + "validator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + }, + "validator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegation_total_rewards" + ], + "properties": { + "delegation_total_rewards": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "See ", + "type": "object", + "required": [ + "delegator_validators" + ], + "properties": { + "delegator_validators": { + "type": "object", + "required": [ + "delegator_address" + ], + "properties": { + "delegator_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error", + "message_index" + ], + "properties": { + "error": { + "description": "The error that occured executing the message.", + "type": "string" + }, + "message_index": { + "description": "The index of the first message who's execution failed.", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + } + }, + "additionalProperties": false + }, + "Event": { + "description": "A full [*Cosmos SDK* event].\n\nThis version uses string attributes (similar to [*Cosmos SDK* StringEvent]), which then get magically converted to bytes for Tendermint somewhere between the Rust-Go interface, JSON deserialization and the `NewEvent` call in Cosmos SDK.\n\n[*Cosmos SDK* event]: https://docs.cosmos.network/main/learn/advanced/events [*Cosmos SDK* StringEvent]: https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/base/abci/v1beta1/abci.proto#L56-L70", + "type": "object", + "required": [ + "attributes", + "type" + ], + "properties": { + "attributes": { + "description": "The attributes to be included in the event.\n\nYou can learn more about these from [*Cosmos SDK* docs].\n\n[*Cosmos SDK* docs]: https://docs.cosmos.network/main/learn/advanced/events", + "type": "array", + "items": { + "$ref": "#/definitions/Attribute" + } + }, + "type": { + "description": "The event type. This is renamed to \"ty\" because \"type\" is reserved in Rust. This sucks, we know.", + "type": "string" + } + } + }, + "ExecutionResponse": { + "type": "object", + "required": [ + "executed_by", + "result" + ], + "properties": { + "executed_by": { + "description": "The address on the remote chain that executed the messages.", + "type": "string" + }, + "result": { + "description": "Index `i` corresponds to the result of executing the `i`th message.", + "type": "array", + "items": { + "$ref": "#/definitions/SubMsgResponse" + } + } + }, + "additionalProperties": false + }, + "IbcQuery": { + "description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"", + "oneOf": [ + { + "description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.", + "type": "object", + "required": [ + "port_id" + ], + "properties": { + "port_id": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port.\n\nReturns a `ListChannelsResponse`.", + "type": "object", + "required": [ + "list_channels" + ], + "properties": { + "list_channels": { + "type": "object", + "properties": { + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Lists all information for a (portID, channelID) pair. If port_id is omitted, it will default to the contract's own channel. (To save a PortId{} call)\n\nReturns a `ChannelResponse`.", + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string" + }, + "port_id": { + "type": [ + "string", + "null" + ] + } + } + } + }, + "additionalProperties": false + } + ] + }, + "IbcResponseMsg": { + "description": "IbcResponseMsg should be de/serialized under `IbcCallback()` variant in a ExecuteMsg", + "type": "object", + "required": [ + "callback", + "result" + ], + "properties": { + "callback": { + "description": "The msg sent with the callback request.", + "allOf": [ + { + "$ref": "#/definitions/Callback" + } + ] + }, + "result": { + "$ref": "#/definitions/IbcResult" + } + }, + "additionalProperties": false + }, + "IbcResult": { + "oneOf": [ + { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "object", + "required": [ + "queries", + "results" + ], + "properties": { + "queries": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryRequest_for_ModuleQuery" + } + }, + "results": { + "$ref": "#/definitions/Result_of_Array_of_Binary_or_ErrorResponse" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "initiator_msg", + "result" + ], + "properties": { + "initiator_msg": { + "$ref": "#/definitions/Binary" + }, + "result": { + "$ref": "#/definitions/Result_of_ExecutionResponse_or_String" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "An error occured that could not be recovered from. The only known way that this can occur is message handling running out of gas, in which case the error will be `codespace: sdk, code: 11`.\n\nThis error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don't expect this to happen and have carefully written the code to avoid it.", + "type": "object", + "required": [ + "fatal_error" + ], + "properties": { + "fatal_error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "InstalledModuleIdentification": { + "description": "This is used for identifying calling modules For adapters, we don't need the account id because it's independent of an account For apps and standalone, the account id is used to identify the calling module", + "type": "object", + "required": [ + "module_info" + ], + "properties": { + "account_id": { + "anyOf": [ + { + "$ref": "#/definitions/AccountId" + }, + { + "type": "null" + } + ] + }, + "module_info": { + "$ref": "#/definitions/ModuleInfo" + } + }, + "additionalProperties": false + }, + "ModuleIbcInfo": { + "type": "object", + "required": [ + "chain", + "module" + ], + "properties": { + "chain": { + "description": "Remote chain identification", + "allOf": [ + { + "$ref": "#/definitions/TruncatedChainId" + } + ] + }, + "module": { + "description": "Information about the module that called ibc action on this module", + "allOf": [ + { + "$ref": "#/definitions/ModuleInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleIbcMsg": { + "type": "object", + "required": [ + "msg", + "src_module_info" + ], + "properties": { + "msg": { + "description": "The message sent by the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "src_module_info": { + "description": "Sender Module Identification", + "allOf": [ + { + "$ref": "#/definitions/ModuleIbcInfo" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleInfo": { + "description": "Stores the namespace, name, and version of an Abstract module.", + "type": "object", + "required": [ + "name", + "namespace", + "version" + ], + "properties": { + "name": { + "description": "Name of the contract", + "type": "string" + }, + "namespace": { + "description": "Namespace of the module", + "allOf": [ + { + "$ref": "#/definitions/Namespace" + } + ] + }, + "version": { + "description": "Version of the module", + "allOf": [ + { + "$ref": "#/definitions/ModuleVersion" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleQuery": { + "type": "object", + "required": [ + "msg", + "target_module" + ], + "properties": { + "msg": { + "description": "The WasmQuery::Smart request to the module", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "target_module": { + "description": "Information about the module that gets queried through ibc", + "allOf": [ + { + "$ref": "#/definitions/InstalledModuleIdentification" + } + ] + } + }, + "additionalProperties": false + }, + "ModuleVersion": { + "oneOf": [ + { + "type": "string", + "enum": [ + "latest" + ] + }, + { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "Namespace": { + "description": "Represents an Abstract namespace for modules", + "type": "string" + }, + "PageRequest": { + "description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk", + "type": "object", + "required": [ + "limit", + "reverse" + ], + "properties": { + "key": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "reverse": { + "type": "boolean" + } + } + }, + "QueryRequest_for_ModuleQuery": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/ModuleQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "staking" + ], + "properties": { + "staking": { + "$ref": "#/definitions/StakingQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "distribution" + ], + "properties": { + "distribution": { + "$ref": "#/definitions/DistributionQuery" + } + }, + "additionalProperties": false + }, + { + "description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.", + "type": "object", + "required": [ + "stargate" + ], + "properties": { + "stargate": { + "type": "object", + "required": [ + "data", + "path" + ], + "properties": { + "data": { + "description": "this is the expected protobuf message type (not any), binary encoded", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "this is the fully qualified service path used for routing, eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ibc" + ], + "properties": { + "ibc": { + "$ref": "#/definitions/IbcQuery" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "wasm" + ], + "properties": { + "wasm": { + "$ref": "#/definitions/WasmQuery" + } + }, + "additionalProperties": false + } + ] + }, + "Result_of_Array_of_Binary_or_ErrorResponse": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "type": "array", + "items": { + "$ref": "#/definitions/Binary" + } + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + ] + }, + "Result_of_ExecutionResponse_or_String": { + "oneOf": [ + { + "type": "object", + "required": [ + "Ok" + ], + "properties": { + "Ok": { + "$ref": "#/definitions/ExecutionResponse" + } + } + }, + { + "type": "object", + "required": [ + "Err" + ], + "properties": { + "Err": { + "type": "string" + } + } + } + ] + }, + "StakingQuery": { + "oneOf": [ + { + "description": "Returns the denomination that can be bonded (if there are multiple native tokens on the chain)", + "type": "object", + "required": [ + "bonded_denom" + ], + "properties": { + "bonded_denom": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "AllDelegations will return all delegations by the delegator", + "type": "object", + "required": [ + "all_delegations" + ], + "properties": { + "all_delegations": { + "type": "object", + "required": [ + "delegator" + ], + "properties": { + "delegator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Delegation will return more detailed info on a particular delegation, defined by delegator/validator pair", + "type": "object", + "required": [ + "delegation" + ], + "properties": { + "delegation": { + "type": "object", + "required": [ + "delegator", + "validator" + ], + "properties": { + "delegator": { + "type": "string" + }, + "validator": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns all validators in the currently active validator set.\n\nThe query response type is `AllValidatorsResponse`.", + "type": "object", + "required": [ + "all_validators" + ], + "properties": { + "all_validators": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "description": "Returns the validator at the given address. Returns None if the validator is not part of the currently active validator set.\n\nThe query response type is `ValidatorResponse`.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The validator's address (e.g. (e.g. cosmosvaloper1...))", + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "SubMsgResponse": { + "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "type": "object", + "required": [ + "events" + ], + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "TendermintStakingExecuteMsg": { + "oneOf": [ + { + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "undelegate_from" + ], + "properties": { + "undelegate_from": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "amount": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "undelegate_all" + ], + "properties": { + "undelegate_all": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "destination_validator", + "source_validator" + ], + "properties": { + "amount": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "destination_validator": { + "description": "Validator address", + "type": "string" + }, + "source_validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "new_withdraw_address" + ], + "properties": { + "new_withdraw_address": { + "description": "The new `withdraw_address`", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw all the rewards", + "type": "object", + "required": [ + "withdraw_all_rewards" + ], + "properties": { + "withdraw_all_rewards": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "TruncatedChainId": { + "description": "The name of a chain, aka the chain-id without the post-fix number. ex. `cosmoshub-4` -> `cosmoshub`, `juno-1` -> `juno`", + "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" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + }, + "WasmQuery": { + "oneOf": [ + { + "description": "this queries the public API of another contract at a known address (with known ABI) Return value is whatever the contract returns (caller should know), wrapped in a ContractResult that is JSON encoded.", + "type": "object", + "required": [ + "smart" + ], + "properties": { + "smart": { + "type": "object", + "required": [ + "contract_addr", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "msg": { + "description": "msg is the json-encoded QueryMsg struct", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "this queries the raw kv-store of the contract. returns the raw, unparsed data stored at that key, which may be an empty vector if not present", + "type": "object", + "required": [ + "raw" + ], + "properties": { + "raw": { + "type": "object", + "required": [ + "contract_addr", + "key" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "key": { + "description": "Key is the raw key used in the contracts Storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`ContractInfoResponse`] with metadata on the contract from the runtime", + "type": "object", + "required": [ + "contract_info" + ], + "properties": { + "contract_info": { + "type": "object", + "required": [ + "contract_addr" + ], + "properties": { + "contract_addr": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + } + ] + } + } +} diff --git a/schema/tendermint-staking/0.23.0/instantiate_msg.json b/schema/tendermint-staking/0.23.0/instantiate_msg.json new file mode 100644 index 0000000000..19bb736847 --- /dev/null +++ b/schema/tendermint-staking/0.23.0/instantiate_msg.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "base", + "module" + ], + "properties": { + "base": { + "description": "base instantiate information", + "allOf": [ + { + "$ref": "#/definitions/BaseInstantiateMsg" + } + ] + }, + "module": { + "description": "custom instantiate msg", + "allOf": [ + { + "$ref": "#/definitions/Empty" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "BaseInstantiateMsg": { + "description": "Used by Abstract to instantiate the contract The contract is then registered on the version control contract using [`crate::version_control::ExecuteMsg::ProposeModules`].", + "type": "object", + "required": [ + "ans_host_address", + "version_control_address" + ], + "properties": { + "ans_host_address": { + "description": "Used to easily perform address translation", + "type": "string" + }, + "version_control_address": { + "description": "Used to verify senders", + "type": "string" + } + }, + "additionalProperties": false + }, + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/schema/tendermint-staking/0.23.0/module-schema.json b/schema/tendermint-staking/0.23.0/module-schema.json new file mode 100644 index 0000000000..7881071de4 --- /dev/null +++ b/schema/tendermint-staking/0.23.0/module-schema.json @@ -0,0 +1,204 @@ +{ + "contract_name": "module-schema", + "contract_version": "0.23.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "delegate" + ], + "properties": { + "delegate": { + "type": "object", + "required": [ + "amount", + "validator" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "undelegate_from" + ], + "properties": { + "undelegate_from": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "amount": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "undelegate_all" + ], + "properties": { + "undelegate_all": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "redelegate" + ], + "properties": { + "redelegate": { + "type": "object", + "required": [ + "destination_validator", + "source_validator" + ], + "properties": { + "amount": { + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "destination_validator": { + "description": "Validator address", + "type": "string" + }, + "source_validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "set_withdraw_address" + ], + "properties": { + "set_withdraw_address": { + "type": "object", + "required": [ + "new_withdraw_address" + ], + "properties": { + "new_withdraw_address": { + "description": "The new `withdraw_address`", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "withdraw_delegator_reward" + ], + "properties": { + "withdraw_delegator_reward": { + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "Validator address", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw all the rewards", + "type": "object", + "required": [ + "withdraw_all_rewards" + ], + "properties": { + "withdraw_all_rewards": { + "type": "object", + "additionalProperties": false + } + }, + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "description": "Staking queries are available on [`cosmwasm_std::QuerierWrapper`] through [`cosmwasm_std::Deps`].", + "type": "string", + "enum": [] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + }, + "sudo": null, + "responses": {} +} diff --git a/schema/tendermint-staking/0.23.0/query_msg.json b/schema/tendermint-staking/0.23.0/query_msg.json new file mode 100644 index 0000000000..bab8b23b0e --- /dev/null +++ b/schema/tendermint-staking/0.23.0/query_msg.json @@ -0,0 +1,94 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "A query to the base.", + "type": "object", + "required": [ + "base" + ], + "properties": { + "base": { + "$ref": "#/definitions/BaseQueryMsg" + } + }, + "additionalProperties": false + }, + { + "description": "Custom query", + "type": "object", + "required": [ + "module" + ], + "properties": { + "module": { + "$ref": "#/definitions/TendermintStakingQueryMsg" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "BaseQueryMsg": { + "description": "Query adapter message", + "oneOf": [ + { + "description": "Returns [`AdapterConfigResponse`].", + "type": "object", + "required": [ + "base_config" + ], + "properties": { + "base_config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns [`AuthorizedAddressesResponse`].", + "type": "object", + "required": [ + "authorized_addresses" + ], + "properties": { + "authorized_addresses": { + "type": "object", + "required": [ + "proxy_address" + ], + "properties": { + "proxy_address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns module data Returns [`ModuleDataResponse`].", + "type": "object", + "required": [ + "module_data" + ], + "properties": { + "module_data": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "TendermintStakingQueryMsg": { + "description": "Staking queries are available on [`cosmwasm_std::QuerierWrapper`] through [`cosmwasm_std::Deps`].", + "type": "string", + "enum": [] + } + } +} diff --git a/schema/version-control/0.23.0/abstract-version-control.json b/schema/version-control/0.23.0/abstract-version-control.json index 7cd5da0487..0ac0d5ee6a 100644 --- a/schema/version-control/0.23.0/abstract-version-control.json +++ b/schema/version-control/0.23.0/abstract-version-control.json @@ -47,8 +47,7 @@ "denom": { "type": "string" } - }, - "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); ```", @@ -229,13 +228,13 @@ "additionalProperties": false }, { - "description": "Forgo namespace claims Only admin or root user can call this", + "description": "Remove namespace claims Only admin or root user can call this", "type": "object", "required": [ - "forgo_namespace" + "remove_namespaces" ], "properties": { - "forgo_namespace": { + "remove_namespaces": { "type": "object", "required": [ "namespaces" @@ -254,7 +253,7 @@ "additionalProperties": false }, { - "description": "Register a new Account to the deployed Accounts. Claims namespace if provided. Only new accounts can call this.", + "description": "Register a new Account to the deployed Accounts. Claims namespace if provided. Only Factory can call this", "type": "object", "required": [ "add_account" @@ -263,11 +262,15 @@ "add_account": { "type": "object", "required": [ - "creator" + "account_base", + "account_id" ], "properties": { - "creator": { - "type": "string" + "account_base": { + "$ref": "#/definitions/AccountBase" + }, + "account_id": { + "$ref": "#/definitions/AccountId" }, "namespace": { "type": [ @@ -291,6 +294,13 @@ "update_config": { "type": "object", "properties": { + "account_factory_address": { + "description": "Address of the account factory", + "type": [ + "string", + "null" + ] + }, "namespace_registration_fee": { "description": "The fee charged when registering a namespace", "anyOf": [ @@ -330,6 +340,23 @@ } ], "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, "AccountId": { "description": "Unique identifier for an account. On each chain this is unique.", "type": "object", @@ -474,8 +501,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } }, "Expiration": { "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", @@ -577,13 +603,13 @@ "ModuleReference": { "oneOf": [ { - "description": "Account Contract", + "description": "Core Abstract Contracts", "type": "object", "required": [ - "account" + "account_base" ], "properties": { - "account": { + "account_base": { "type": "integer", "format": "uint64", "minimum": 0.0 @@ -816,13 +842,13 @@ "description": "Version Control Query Msg", "oneOf": [ { - "description": "Query Core of an Account Returns [`AccountResponse`]", + "description": "Query Core of an Account Returns [`AccountBaseResponse`]", "type": "object", "required": [ - "account" + "account_base" ], "properties": { - "account": { + "account_base": { "type": "object", "required": [ "account_id" @@ -1192,111 +1218,41 @@ "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", - "oneOf": [ - { - "description": "Migrating from blob contract", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "$ref": "#/definitions/InstantiateMsg" - } - }, - "additionalProperties": false - }, - { - "description": "Migrating from previous version", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InstantiateMsg": { - "description": "Version Control Instantiate Msg", - "type": "object", - "required": [ - "admin" - ], - "properties": { - "admin": { - "type": "string" - }, - "namespace_registration_fee": { - "anyOf": [ - { - "$ref": "#/definitions/Coin" - }, - { - "type": "null" - } - ] - }, - "security_disabled": { - "description": "allows users to directly register modules without going through approval Also allows them to change the module reference of an existing module Also allows to claim namespaces permisionlessly SHOULD ONLY BE `true` FOR TESTING", - "type": [ - "boolean", - "null" - ] - } - }, - "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" - } - } + "type": "object", + "additionalProperties": false }, "sudo": null, "responses": { - "account": { + "account_base": { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AccountResponse", + "title": "AccountBaseResponse", "type": "object", "required": [ - "account" + "account_base" ], "properties": { - "account": { - "$ref": "#/definitions/Account_for_Addr" + "account_base": { + "$ref": "#/definitions/AccountBase" } }, "additionalProperties": false, "definitions": { - "Account_for_Addr": { + "AccountBase": { "description": "Contains the minimal Abstract Account contract addresses.", - "allOf": [ - { + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { "$ref": "#/definitions/Addr" } - ] + }, + "additionalProperties": false }, "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.", @@ -1309,14 +1265,18 @@ "title": "ConfigResponse", "type": "object", "required": [ - "local_account_sequence", "security_disabled" ], "properties": { - "local_account_sequence": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 + "account_factory_address": { + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] }, "namespace_registration_fee": { "anyOf": [ @@ -1334,6 +1294,10 @@ }, "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" + }, "Coin": { "type": "object", "required": [ @@ -1347,8 +1311,7 @@ "denom": { "type": "string" } - }, - "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); ```", @@ -1390,8 +1353,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } }, "FixedFee": { "description": "A wrapper around Coin to help handle fixed fees (with multiples).", @@ -1487,13 +1449,13 @@ "ModuleReference": { "oneOf": [ { - "description": "Account Contract", + "description": "Core Abstract Contracts", "type": "object", "required": [ - "account" + "account_base" ], "properties": { - "account": { + "account_base": { "type": "integer", "format": "uint64", "minimum": 0.0 @@ -1677,8 +1639,7 @@ "denom": { "type": "string" } - }, - "additionalProperties": false + } }, "FixedFee": { "description": "A wrapper around Coin to help handle fixed fees (with multiples).", @@ -1774,13 +1735,13 @@ "ModuleReference": { "oneOf": [ { - "description": "Account Contract", + "description": "Core Abstract Contracts", "type": "object", "required": [ - "account" + "account_base" ], "properties": { - "account": { + "account_base": { "type": "integer", "format": "uint64", "minimum": 0.0 @@ -1961,6 +1922,23 @@ } ], "definitions": { + "AccountBase": { + "description": "Contains the minimal Abstract Account contract addresses.", + "type": "object", + "required": [ + "manager", + "proxy" + ], + "properties": { + "manager": { + "$ref": "#/definitions/Addr" + }, + "proxy": { + "$ref": "#/definitions/Addr" + } + }, + "additionalProperties": false + }, "AccountId": { "description": "Unique identifier for an account. On each chain this is unique.", "type": "object", @@ -2012,14 +1990,6 @@ } ] }, - "Account_for_Addr": { - "description": "Contains the minimal Abstract Account contract addresses.", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, "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" @@ -2027,12 +1997,12 @@ "NamespaceInfo": { "type": "object", "required": [ - "account", + "account_base", "account_id" ], "properties": { - "account": { - "$ref": "#/definitions/Account_for_Addr" + "account_base": { + "$ref": "#/definitions/AccountBase" }, "account_id": { "$ref": "#/definitions/AccountId"