{ "contract_name": "croncat-tasks", "contract_version": "1.0.3", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "chain_name", "croncat_agents_key", "croncat_manager_key", "pause_admin" ], "properties": { "chain_name": { "description": "Chain name to add prefix to the task_hash", "type": "string" }, "croncat_agents_key": { "description": "Name of the key for raw querying Agents address from the factory", "type": "array", "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "croncat_manager_key": { "description": "Name of the key for raw querying Manager address from the factory", "type": "array", "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "gas_action_fee": { "description": "Gas needed to cover single non-wasm task's Action", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_base_fee": { "description": "Gas needed to cover proxy call without any action", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_limit": { "description": "Gas limit, to make sure task won't lock contract", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_query_fee": { "description": "Gas needed to cover single query", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "pause_admin": { "description": "A multisig admin whose sole responsibility is to pause the contract in event of emergency. Must be a different contract address than DAO, cannot be a regular keypair Does not have the ability to unpause, must rely on the DAO to assess the situation and act accordingly", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "slot_granularity_time": { "description": "Time in nanos for each bucket of tasks", "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "version": { "description": "Assigned by Factory, denotes the version of this contract (CW2 spec) & used as the task verion as well.", "type": [ "string", "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" } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "type": "object", "required": [ "update_config" ], "properties": { "update_config": { "$ref": "#/definitions/UpdateConfigMsg" } }, "additionalProperties": false }, { "description": "Allows any user or contract to pay for future txns based on a specific schedule contract, function id & other settings. When the task runs out of balance the task is no longer executed, any additional funds will be returned to task owner.", "type": "object", "required": [ "create_task" ], "properties": { "create_task": { "type": "object", "required": [ "task" ], "properties": { "task": { "$ref": "#/definitions/TaskRequest" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Deletes a task in its entirety, returning any remaining balance to task owner.", "type": "object", "required": [ "remove_task" ], "properties": { "remove_task": { "type": "object", "required": [ "task_hash" ], "properties": { "task_hash": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Remove task, used by the manager if task reached it's stop condition", "type": "object", "required": [ "remove_task_by_manager" ], "properties": { "remove_task_by_manager": { "$ref": "#/definitions/TasksRemoveTaskByManager" } }, "additionalProperties": false }, { "description": "Try to reschedule a task, if possible, used by the manager", "type": "object", "required": [ "reschedule_task" ], "properties": { "reschedule_task": { "$ref": "#/definitions/TasksRescheduleTask" } }, "additionalProperties": false }, { "description": "Pauses all operations for this contract, can only be done by pause_admin", "type": "object", "required": [ "pause_contract" ], "properties": { "pause_contract": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "unpauses all operations for this contract, can only be unpaused by owner_addr", "type": "object", "required": [ "unpause_contract" ], "properties": { "unpause_contract": { "type": "object", "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.0 }, "msg": { "description": "Supported CosmosMsgs only!", "allOf": [ { "$ref": "#/definitions/CosmosMsg_for_Empty" } ] } }, "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 }, "Cw20Coin": { "type": "object", "required": [ "address", "amount" ], "properties": { "address": { "type": "string" }, "amount": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false }, "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 } ] }, "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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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 }, "TasksRemoveTaskByManager": { "type": "object", "required": [ "task_hash" ], "properties": { "task_hash": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 } } }, "additionalProperties": false }, "TasksRescheduleTask": { "type": "object", "required": [ "task_hash" ], "properties": { "task_hash": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 } } }, "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 }, "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" }, "UpdateConfigMsg": { "type": "object", "properties": { "croncat_agents_key": { "type": [ "array", "null" ], "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "croncat_factory_addr": { "type": [ "string", "null" ] }, "croncat_manager_key": { "type": [ "array", "null" ], "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "gas_action_fee": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_base_fee": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "gas_query_fee": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "slot_granularity_time": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "config" ], "properties": { "config": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Helper for query responses on versioned contracts", "type": "object", "required": [ "paused" ], "properties": { "paused": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get the total amount of tasks", "type": "object", "required": [ "tasks_total" ], "properties": { "tasks_total": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "returns the total task count & last task creation timestamp for agent nomination checks", "type": "object", "required": [ "current_task_info" ], "properties": { "current_task_info": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get next task to be done", "type": "object", "required": [ "current_task" ], "properties": { "current_task": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get task by the task hash", "type": "object", "required": [ "task" ], "properties": { "task": { "type": "object", "required": [ "task_hash" ], "properties": { "task_hash": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get list of all tasks", "type": "object", "required": [ "tasks" ], "properties": { "tasks": { "type": "object", "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "evented_ids" ], "properties": { "evented_ids": { "type": "object", "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "evented_hashes" ], "properties": { "evented_hashes": { "type": "object", "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "id": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get list of event driven tasks", "type": "object", "required": [ "evented_tasks" ], "properties": { "evented_tasks": { "type": "object", "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "start": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get tasks created by the given address", "type": "object", "required": [ "tasks_by_owner" ], "properties": { "tasks_by_owner": { "type": "object", "required": [ "owner_addr" ], "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "owner_addr": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Simulate task_hash by the given task", "type": "object", "required": [ "task_hash" ], "properties": { "task_hash": { "type": "object", "required": [ "task" ], "properties": { "task": { "$ref": "#/definitions/Task" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get slot hashes by given slot", "type": "object", "required": [ "slot_hashes" ], "properties": { "slot_hashes": { "type": "object", "properties": { "slot": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Get active slots", "type": "object", "required": [ "slot_ids" ], "properties": { "slot_ids": { "type": "object", "properties": { "from_index": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "limit": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "slot_tasks_total" ], "properties": { "slot_tasks_total": { "type": "object", "properties": { "offset": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "Task": { "type": "object", "required": [ "actions", "amount_for_one_task", "boundary", "interval", "owner_addr", "queries", "stop_on_fail", "transforms", "version" ], "properties": { "actions": { "description": "The cosmos message to call, if time or rules are met", "type": "array", "items": { "$ref": "#/definitions/Action_for_Empty" } }, "amount_for_one_task": { "$ref": "#/definitions/AmountForOneTask" }, "boundary": { "$ref": "#/definitions/Boundary" }, "interval": { "description": "Scheduling definitions", "allOf": [ { "$ref": "#/definitions/Interval" } ] }, "owner_addr": { "description": "Entity responsible for this task, can change task details", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "queries": { "description": "A prioritized list of messages that can be chained decision matrix required to complete before task action Rules MUST return the ResolverResponse type", "type": "array", "items": { "$ref": "#/definitions/CosmosQuery_for_WasmQuery" } }, "stop_on_fail": { "description": "Defines if this task can continue until balance runs out", "type": "boolean" }, "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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "migrate": null, "sudo": null, "responses": { "config": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", "type": "object", "required": [ "chain_name", "croncat_agents_key", "croncat_factory_addr", "croncat_manager_key", "gas_action_fee", "gas_base_fee", "gas_limit", "gas_query_fee", "owner_addr", "pause_admin", "slot_granularity_time", "version" ], "properties": { "chain_name": { "description": "Chain name to add prefix to the task_hash", "type": "string" }, "croncat_agents_key": { "description": "Name of the key for raw querying Agents address from the factory", "type": "array", "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "croncat_factory_addr": { "description": "Address of the factory contract", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "croncat_manager_key": { "description": "Name of the key for raw querying Manager address from the factory", "type": "array", "items": [ { "type": "string" }, { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } ], "maxItems": 2, "minItems": 2 }, "gas_action_fee": { "description": "Gas needed to cover single non-wasm task's Action", "type": "integer", "format": "uint64", "minimum": 0.0 }, "gas_base_fee": { "description": "Gas needed to cover proxy call without any action", "type": "integer", "format": "uint64", "minimum": 0.0 }, "gas_limit": { "description": "Gas limit, to make sure task won't lock contract", "type": "integer", "format": "uint64", "minimum": 0.0 }, "gas_query_fee": { "description": "Gas needed to cover single query", "type": "integer", "format": "uint64", "minimum": 0.0 }, "owner_addr": { "description": "Address of the contract owner", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "pause_admin": { "description": "A multisig admin whose sole responsibility is to pause the contract in event of emergency. Must be a different contract address than DAO, cannot be a regular keypair Does not have the ability to unpause, must rely on the DAO to assess the situation and act accordingly", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "slot_granularity_time": { "description": "Time in nanos for each bucket of tasks", "type": "integer", "format": "uint64", "minimum": 0.0 }, "version": { "description": "Assigned by Factory, denotes the version of this contract (CW2 spec) & used as the task verion as well.", "type": "string" } }, "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" } } }, "current_task": { "$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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "current_task_info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "CurrentTaskInfoResponse", "type": "object", "required": [ "last_created_task", "total" ], "properties": { "last_created_task": { "$ref": "#/definitions/Timestamp" }, "total": { "$ref": "#/definitions/Uint64" } }, "additionalProperties": false, "definitions": { "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" } } }, "evented_hashes": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_String", "type": "array", "items": { "type": "string" } }, "evented_ids": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_uint64", "type": "array", "items": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "evented_tasks": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_TaskInfo", "type": "array", "items": { "$ref": "#/definitions/TaskInfo" }, "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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "paused": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Boolean", "type": "boolean" }, "slot_hashes": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "SlotHashesResponse", "type": "object", "required": [ "block_id", "block_task_hash", "time_id", "time_task_hash" ], "properties": { "block_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "block_task_hash": { "type": "array", "items": { "type": "string" } }, "time_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "time_task_hash": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "slot_ids": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "SlotIdsResponse", "type": "object", "required": [ "block_ids", "time_ids" ], "properties": { "block_ids": { "type": "array", "items": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "time_ids": { "type": "array", "items": { "type": "integer", "format": "uint64", "minimum": 0.0 } } }, "additionalProperties": false }, "slot_tasks_total": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "SlotTasksTotalResponse", "type": "object", "required": [ "block_tasks", "cron_tasks", "evented_tasks" ], "properties": { "block_tasks": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "cron_tasks": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "evented_tasks": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "task": { "$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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "task_hash": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "String", "type": "string" }, "tasks": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_TaskInfo", "type": "array", "items": { "$ref": "#/definitions/TaskInfo" }, "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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "tasks_by_owner": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_TaskInfo", "type": "array", "items": { "$ref": "#/definitions/TaskInfo" }, "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.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.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.0 }, "gas_price": { "$ref": "#/definitions/GasPrice" }, "treasury_fee": { "type": "integer", "format": "uint16", "minimum": 0.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 }, "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 } ] }, "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.0 }, "gas_adjustment_numerator": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "numerator": { "type": "integer", "format": "uint64", "minimum": 0.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.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 } ] }, "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": "exisiting 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 (eg. after reseting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.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.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.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 }, "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-readbale label for the contract", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$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 } ] } } }, "tasks_total": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "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" } } }