{ "contract_name": "storage-outpost", "contract_version": "0.1.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "description": "The message to instantiate the ICA controller contract.", "type": "object", "properties": { "admin": { "description": "This inner admin really has no authority The address of the admin of the outpost. If not specified, the sender is the admin.", "type": [ "string", "null" ] }, "callback": { "description": "The callback information to be used", "anyOf": [ { "$ref": "#/definitions/Callback" }, { "type": "null" } ] }, "channel_open_init_options": { "description": "The options to initialize the IBC channel upon contract instantiation. If not specified, the IBC channel is not initialized, and the relayer must create the channel", "anyOf": [ { "$ref": "#/definitions/ChannelOpenInitOptions" }, { "type": "null" } ] }, "owner": { "description": "The address of the owner of the outpost. If not specified, the sender is the owner.", "type": [ "string", "null" ] } }, "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" }, "Callback": { "description": "The message to instantiate the ICA controller contract.", "type": "object", "required": [ "contract", "outpost_owner" ], "properties": { "contract": { "description": "The contract address that we will call back", "type": "string" }, "msg": { "description": "The msg we will make the above contract execute", "anyOf": [ { "$ref": "#/definitions/Binary" }, { "type": "null" } ] }, "outpost_owner": { "description": "The owner of the outpost. We need this because the info.sender that instantiates the outpost is the factory address--not the user address But we want the user to be the owner", "type": "string" } }, "additionalProperties": false }, "ChannelOpenInitOptions": { "description": "The message used to provide the MsgChannelOpenInit with the required data.", "type": "object", "required": [ "connection_id", "counterparty_connection_id" ], "properties": { "connection_id": { "description": "The connection id on this chain.", "type": "string" }, "counterparty_connection_id": { "description": "The counterparty connection id on the counterparty chain.", "type": "string" }, "counterparty_port_id": { "description": "The counterparty port id. If not specified, [crate::ibc::types::keys::HOST_PORT_ID] is used. Currently, this contract only supports the host port.", "type": [ "string", "null" ] }, "tx_encoding": { "description": "TxEncoding is the encoding used for the ICA txs. If not specified, [TxEncoding::Protobuf] is used.", "anyOf": [ { "$ref": "#/definitions/TxEncoding" }, { "type": "null" } ] } }, "additionalProperties": false }, "TxEncoding": { "description": "Encoding is the encoding of the transactions sent to the ICA host.", "oneOf": [ { "description": "Protobuf is the protobuf serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3" ] }, { "description": "Proto3Json is the json serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3json" ] } ] } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "description": "The messages to execute the ICA controller contract. #[cw_ownable::cw_ownable_execute] - might need this?", "oneOf": [ { "description": "CreateChannel makes the contract submit a stargate MsgChannelOpenInit to the chain. This is a wrapper around [`options::ChannelOpenInitOptions`] and thus requires the same fields.", "type": "object", "required": [ "create_channel" ], "properties": { "create_channel": { "$ref": "#/definitions/ChannelOpenInitOptions" } }, "additionalProperties": false }, { "description": "CreateTransferChannel makes the contract submit a stargate MsgChannelOpenInit to the chain. This works the same as above but opens a channel for the transfer module specifically.", "type": "object", "required": [ "create_transfer_channel" ], "properties": { "create_transfer_channel": { "$ref": "#/definitions/ChannelOpenInitOptions" } }, "additionalProperties": false }, { "description": "`SendCosmosMsgs` converts the provided array of [`CosmosMsg`] to an ICA tx and sends them to the ICA host. [`CosmosMsg::Stargate`] and [`CosmosMsg::Wasm`] are only supported if the [`TxEncoding`](crate::ibc::types::metadata::TxEncoding) is [`TxEncoding::Protobuf`](crate::ibc::types::metadata::TxEncoding).\n\n**This is the recommended way to send messages to the ICA host.**", "type": "object", "required": [ "send_cosmos_msgs" ], "properties": { "send_cosmos_msgs": { "type": "object", "required": [ "messages" ], "properties": { "messages": { "description": "The stargate messages to convert and send to the ICA host.", "type": "array", "items": { "$ref": "#/definitions/CosmosMsg_for_Empty" } }, "packet_memo": { "description": "Optional memo to include in the ibc packet.", "type": [ "string", "null" ] }, "timeout_seconds": { "description": "Optional timeout in seconds to include with the ibc packet. If not specified, the [default timeout](crate::ibc::types::packet::DEFAULT_TIMEOUT_SECONDS) is used.", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "WARNING: This ExecuteMsg is completely experimental and not ready for production. `SendCosmosMsgsCli` works the same as above, with the addition that canine-chain's filetree msgs can be packed into CosmosMsgs completely from the cli", "type": "object", "required": [ "send_cosmos_msgs_cli" ], "properties": { "send_cosmos_msgs_cli": { "type": "object", "required": [ "path" ], "properties": { "packet_memo": { "description": "Optional memo to include in the ibc packet.", "type": [ "string", "null" ] }, "path": { "description": "readable path", "type": "string" }, "timeout_seconds": { "description": "Optional timeout in seconds to include with the ibc packet. If not specified, the [default timeout](crate::ibc::types::packet::DEFAULT_TIMEOUT_SECONDS) is used.", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "`SendTransferMsg` sends a local token to Jackal using ICS-20", "type": "object", "required": [ "send_transfer_msg" ], "properties": { "send_transfer_msg": { "type": "object", "required": [ "recipient" ], "properties": { "packet_memo": { "description": "Let's hard code one specific transfer msg for now just to see if it works Optional memo to include in the ibc packet.", "type": [ "string", "null" ] }, "recipient": { "description": "The receiver of the tokens on the Jackal chain", "type": "string" }, "timeout_seconds": { "description": "Optional timeout in seconds to include with the ibc packet. If not specified, the [default timeout](crate::ibc::types::packet::DEFAULT_TIMEOUT_SECONDS) is used.", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "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" }, "ChannelOpenInitOptions": { "description": "The message used to provide the MsgChannelOpenInit with the required data.", "type": "object", "required": [ "connection_id", "counterparty_connection_id" ], "properties": { "connection_id": { "description": "The connection id on this chain.", "type": "string" }, "counterparty_connection_id": { "description": "The counterparty connection id on the counterparty chain.", "type": "string" }, "counterparty_port_id": { "description": "The counterparty port id. If not specified, [crate::ibc::types::keys::HOST_PORT_ID] is used. Currently, this contract only supports the host port.", "type": [ "string", "null" ] }, "tx_encoding": { "description": "TxEncoding is the encoding used for the ICA txs. If not specified, [TxEncoding::Protobuf] is used.", "anyOf": [ { "$ref": "#/definitions/TxEncoding" }, { "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 }, { "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" }, "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.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 } ] }, "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 } } }, "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" } ] }, "TxEncoding": { "description": "Encoding is the encoding of the transactions sent to the ICA host.", "oneOf": [ { "description": "Protobuf is the protobuf serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3" ] }, { "description": "Proto3Json is the json serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3json" ] } ] }, "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.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 } ] }, "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": "The messages to query the ICA controller contract.", "oneOf": [ { "description": "GetChannel returns the IBC channel info.", "type": "object", "required": [ "get_channel" ], "properties": { "get_channel": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "GetContractState returns the contact's state.", "type": "object", "required": [ "get_contract_state" ], "properties": { "get_contract_state": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "GetCallbackCounter returns the callback counter.", "type": "object", "required": [ "get_callback_counter" ], "properties": { "get_callback_counter": { "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": null, "sudo": null, "responses": { "get_callback_counter": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "CallbackCounter", "description": "CallbackCounter tracks the number of callbacks in store.", "type": "object", "required": [ "error", "success", "timeout" ], "properties": { "error": { "description": "The number of erroneous callbacks.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "success": { "description": "The number of successful callbacks.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "timeout": { "description": "The number of timeout callbacks. The channel is closed after a timeout due to the semantics of ordered channels.", "type": "integer", "format": "uint32", "minimum": 0.0 } }, "additionalProperties": false }, "get_channel": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ChannelState", "description": "ContractChannelState is the state of the IBC application's channel. This application only supports one channel.", "type": "object", "required": [ "channel", "channel_status" ], "properties": { "channel": { "description": "The IBC channel, as defined by cosmwasm.", "allOf": [ { "$ref": "#/definitions/IbcChannel" } ] }, "channel_status": { "description": "The status of the channel.", "allOf": [ { "$ref": "#/definitions/ChannelStatus" } ] } }, "additionalProperties": false, "definitions": { "ChannelStatus": { "description": "ChannelState is the state of the IBC channel.", "type": "string", "enum": [ "STATE_UNINITIALIZED_UNSPECIFIED", "STATE_INIT", "STATE_TRYOPEN", "STATE_OPEN", "STATE_CLOSED" ] }, "IbcChannel": { "description": "IbcChannel defines all information on a channel. This is generally used in the hand-shake process, but can be queried directly.", "type": "object", "required": [ "connection_id", "counterparty_endpoint", "endpoint", "order", "version" ], "properties": { "connection_id": { "description": "The connection upon which this channel was created. If this is a multi-hop channel, we only expose the first hop.", "type": "string" }, "counterparty_endpoint": { "$ref": "#/definitions/IbcEndpoint" }, "endpoint": { "$ref": "#/definitions/IbcEndpoint" }, "order": { "$ref": "#/definitions/IbcOrder" }, "version": { "description": "Note: in ibcv3 this may be \"\", in the IbcOpenChannel handshake messages", "type": "string" } } }, "IbcEndpoint": { "type": "object", "required": [ "channel_id", "port_id" ], "properties": { "channel_id": { "type": "string" }, "port_id": { "type": "string" } } }, "IbcOrder": { "description": "IbcOrder defines if a channel is ORDERED or UNORDERED Values come from https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/core/channel/v1/channel.proto#L69-L80 Naming comes from the protobuf files and go translations.", "type": "string", "enum": [ "ORDER_UNORDERED", "ORDER_ORDERED" ] } } }, "get_contract_state": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ContractState", "description": "ContractState is the state of the IBC application.", "type": "object", "required": [ "admin" ], "properties": { "admin": { "description": "The address of the admin of the IBC application.", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "allow_channel_open_init": { "description": "If true, the IBC application will accept `MsgChannelOpenInit` messages.", "default": false, "type": "boolean" }, "ica_info": { "description": "The Interchain Account (ICA) info needed to send packets. This is set during the handshake.", "anyOf": [ { "$ref": "#/definitions/IcaInfo" }, { "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" }, "IcaInfo": { "description": "IcaInfo is the ICA address and channel ID.", "type": "object", "required": [ "channel_id", "encoding", "ica_address" ], "properties": { "channel_id": { "type": "string" }, "encoding": { "$ref": "#/definitions/TxEncoding" }, "ica_address": { "type": "string" } }, "additionalProperties": false }, "TxEncoding": { "description": "Encoding is the encoding of the transactions sent to the ICA host.", "oneOf": [ { "description": "Protobuf is the protobuf serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3" ] }, { "description": "Proto3Json is the json serialization of the CosmosSDK's Any.", "type": "string", "enum": [ "proto3json" ] } ] } } }, "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" } } } } }