{ "contract_name": "dao-pre-propose-approval-single", "contract_version": "2.6.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "extension", "submission_policy" ], "properties": { "deposit_info": { "description": "Information about the deposit requirements for this module. None if no deposit.", "anyOf": [ { "$ref": "#/definitions/UncheckedDepositInfo" }, { "type": "null" } ] }, "extension": { "description": "Extension for instantiation. The default implementation will do nothing with this data.", "allOf": [ { "$ref": "#/definitions/InstantiateExt" } ] }, "submission_policy": { "description": "The policy dictating who is allowed to submit proposals.", "allOf": [ { "$ref": "#/definitions/PreProposeSubmissionPolicy" } ] } }, "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" }, "DepositRefundPolicy": { "oneOf": [ { "description": "Deposits should always be refunded.", "type": "string", "enum": [ "always" ] }, { "description": "Deposits should only be refunded for passed proposals.", "type": "string", "enum": [ "only_passed" ] }, { "description": "Deposits should never be refunded.", "type": "string", "enum": [ "never" ] } ] }, "DepositToken": { "description": "Information about the token to use for proposal deposits.", "oneOf": [ { "description": "Use a specific token address as the deposit token.", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "$ref": "#/definitions/UncheckedDenom" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Use the token native denom or cw20 contract address of the associated DAO's voting module. NOTE: in order to retrieve the token automatically via this variant, the voting module must either (1) use a native token and implement the `Denom {}` query type defined by `dao_dao_macros::native_token_query` OR (2) use a cw20 token and implement the `TokenContract {}` query type defined by `dao_dao_macros::cw20_token_query`. Failing to implement correctly will cause this option to fail to instantiate.", "type": "object", "required": [ "voting_module_token" ], "properties": { "voting_module_token": { "type": "object", "required": [ "token_type" ], "properties": { "token_type": { "$ref": "#/definitions/VotingModuleTokenType" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "InstantiateExt": { "type": "object", "required": [ "approver" ], "properties": { "approver": { "type": "string" } }, "additionalProperties": false }, "PreProposeSubmissionPolicy": { "description": "The policy configured in a pre-propose module that determines who can submit proposals. This is the preferred way to restrict proposal creation (as opposed to the ProposalCreationPolicy above) since pre-propose modules support other features, such as proposal deposits.", "oneOf": [ { "description": "Anyone may create proposals, except for those in the denylist.", "type": "object", "required": [ "anyone" ], "properties": { "anyone": { "type": "object", "required": [ "denylist" ], "properties": { "denylist": { "description": "Addresses that may not create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Specific people may create proposals.", "type": "object", "required": [ "specific" ], "properties": { "specific": { "type": "object", "required": [ "allowlist", "dao_members", "denylist" ], "properties": { "allowlist": { "description": "Addresses that may create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } }, "dao_members": { "description": "Whether or not DAO members may create proposals.", "type": "boolean" }, "denylist": { "description": "Addresses that may not create proposals, overriding other settings.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" }, "UncheckedDenom": { "description": "A denom that has not been checked to confirm it points to a valid asset.", "oneOf": [ { "description": "A native (bank module) asset.", "type": "object", "required": [ "native" ], "properties": { "native": { "type": "string" } }, "additionalProperties": false }, { "description": "A cw20 asset.", "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "type": "string" } }, "additionalProperties": false } ] }, "UncheckedDepositInfo": { "description": "Information about the deposit required to create a proposal.", "type": "object", "required": [ "amount", "denom", "refund_policy" ], "properties": { "amount": { "description": "The number of tokens that must be deposited to create a proposal. Must be a positive, non-zero number.", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "denom": { "description": "The address of the token to be used for proposal deposits.", "allOf": [ { "$ref": "#/definitions/DepositToken" } ] }, "refund_policy": { "description": "The policy used for refunding deposits on proposal completion.", "allOf": [ { "$ref": "#/definitions/DepositRefundPolicy" } ] } }, "additionalProperties": false }, "VotingModuleTokenType": { "type": "string", "enum": [ "native", "cw20" ] } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "description": "Creates a new proposal in the pre-propose module. MSG will be serialized and used as the proposal creation message.", "type": "object", "required": [ "propose" ], "properties": { "propose": { "type": "object", "required": [ "msg" ], "properties": { "msg": { "$ref": "#/definitions/ProposeMessage" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Updates the configuration of this module. This will completely override the existing configuration. This new configuration will only apply to proposals created after the config is updated. Only the DAO may execute this message.", "type": "object", "required": [ "update_config" ], "properties": { "update_config": { "type": "object", "properties": { "deposit_info": { "description": "If None, will remove the deposit. Backwards compatible.", "anyOf": [ { "$ref": "#/definitions/UncheckedDepositInfo" }, { "type": "null" } ] }, "submission_policy": { "description": "If None, will leave the submission policy in the config as-is.", "anyOf": [ { "$ref": "#/definitions/PreProposeSubmissionPolicy" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Perform more granular submission policy updates to allow for atomic operations that don't override others.", "type": "object", "required": [ "update_submission_policy" ], "properties": { "update_submission_policy": { "type": "object", "properties": { "allowlist_add": { "description": "If using specific policy, optionally add to the allowlist.", "type": [ "array", "null" ], "items": { "type": "string" } }, "allowlist_remove": { "description": "If using specific policy, optionally remove from the allowlist.", "type": [ "array", "null" ], "items": { "type": "string" } }, "denylist_add": { "description": "Optionally add to the denylist. Works for any submission policy.", "type": [ "array", "null" ], "items": { "type": "string" } }, "denylist_remove": { "description": "Optionally remove from denylist. Works for any submission policy.", "type": [ "array", "null" ], "items": { "type": "string" } }, "set_dao_members": { "description": "If using specific policy, optionally update the `dao_members` flag.", "type": [ "boolean", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Withdraws funds inside of this contract to the message sender. The contracts entire balance for the specifed DENOM is withdrawn to the message sender. Only the DAO may call this method.\n\nThis is intended only as an escape hatch in the event of a critical bug in this contract or it's proposal module. Withdrawing funds will cause future attempts to return proposal deposits to fail their transactions as the contract will have insufficent balance to return them. In the case of `cw-proposal-single` this transaction failure will cause the module to remove the pre-propose module from its proposal hook receivers.\n\nMore likely than not, this should NEVER BE CALLED unless a bug in this contract or the proposal module it is associated with has caused it to stop receiving proposal hook messages, or if a critical security vulnerability has been found that allows an attacker to drain proposal deposits.", "type": "object", "required": [ "withdraw" ], "properties": { "withdraw": { "type": "object", "properties": { "denom": { "description": "The denom to withdraw funds for. If no denom is specified, the denomination currently configured for proposal deposits will be used.\n\nYou may want to specify a denomination here if you are withdrawing funds that were previously accepted for proposal deposits but are not longer used due to an `UpdateConfig` message being executed on the contract.", "anyOf": [ { "$ref": "#/definitions/UncheckedDenom" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Extension message. Contracts that extend this one should put their custom execute logic here. The default implementation will do nothing if this variant is executed.", "type": "object", "required": [ "extension" ], "properties": { "extension": { "type": "object", "required": [ "msg" ], "properties": { "msg": { "$ref": "#/definitions/ApprovalExecuteExt" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Adds a proposal submitted hook. Fires when a new proposal is submitted to the pre-propose contract. Only the DAO may call this method.", "type": "object", "required": [ "add_proposal_submitted_hook" ], "properties": { "add_proposal_submitted_hook": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Removes a proposal submitted hook. Only the DAO may call this method.", "type": "object", "required": [ "remove_proposal_submitted_hook" ], "properties": { "remove_proposal_submitted_hook": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Handles proposal hook fired by the associated proposal module when a proposal is completed (ie executed or rejected). By default, the base contract will return deposits proposals, when they are closed, when proposals are executed, or, if it is refunding failed.", "type": "object", "required": [ "proposal_completed_hook" ], "properties": { "proposal_completed_hook": { "type": "object", "required": [ "new_status", "proposal_id" ], "properties": { "new_status": { "$ref": "#/definitions/Status" }, "proposal_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "ApprovalExecuteExt": { "oneOf": [ { "description": "Approve a proposal, only callable by approver", "type": "object", "required": [ "approve" ], "properties": { "approve": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Reject a proposal, only callable by approver", "type": "object", "required": [ "reject" ], "properties": { "reject": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Updates the approver, can only be called the current approver", "type": "object", "required": [ "update_approver" ], "properties": { "update_approver": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "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" }, "Coin": { "type": "object", "required": [ "amount", "denom" ], "properties": { "amount": { "$ref": "#/definitions/Uint128" }, "denom": { "type": "string" } } }, "CosmosMsg_for_Empty": { "oneOf": [ { "type": "object", "required": [ "bank" ], "properties": { "bank": { "$ref": "#/definitions/BankMsg" } }, "additionalProperties": false }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "$ref": "#/definitions/Empty" } }, "additionalProperties": false }, { "type": "object", "required": [ "staking" ], "properties": { "staking": { "$ref": "#/definitions/StakingMsg" } }, "additionalProperties": false }, { "type": "object", "required": [ "distribution" ], "properties": { "distribution": { "$ref": "#/definitions/DistributionMsg" } }, "additionalProperties": false }, { "description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", "type": "object", "required": [ "stargate" ], "properties": { "stargate": { "type": "object", "required": [ "type_url", "value" ], "properties": { "type_url": { "type": "string" }, "value": { "$ref": "#/definitions/Binary" } } } }, "additionalProperties": false }, { "type": "object", "required": [ "ibc" ], "properties": { "ibc": { "$ref": "#/definitions/IbcMsg" } }, "additionalProperties": false }, { "type": "object", "required": [ "wasm" ], "properties": { "wasm": { "$ref": "#/definitions/WasmMsg" } }, "additionalProperties": false }, { "type": "object", "required": [ "gov" ], "properties": { "gov": { "$ref": "#/definitions/GovMsg" } }, "additionalProperties": false } ] }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" }, "DepositRefundPolicy": { "oneOf": [ { "description": "Deposits should always be refunded.", "type": "string", "enum": [ "always" ] }, { "description": "Deposits should only be refunded for passed proposals.", "type": "string", "enum": [ "only_passed" ] }, { "description": "Deposits should never be refunded.", "type": "string", "enum": [ "never" ] } ] }, "DepositToken": { "description": "Information about the token to use for proposal deposits.", "oneOf": [ { "description": "Use a specific token address as the deposit token.", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "$ref": "#/definitions/UncheckedDenom" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Use the token native denom or cw20 contract address of the associated DAO's voting module. NOTE: in order to retrieve the token automatically via this variant, the voting module must either (1) use a native token and implement the `Denom {}` query type defined by `dao_dao_macros::native_token_query` OR (2) use a cw20 token and implement the `TokenContract {}` query type defined by `dao_dao_macros::cw20_token_query`. Failing to implement correctly will cause this option to fail to instantiate.", "type": "object", "required": [ "voting_module_token" ], "properties": { "voting_module_token": { "type": "object", "required": [ "token_type" ], "properties": { "token_type": { "$ref": "#/definitions/VotingModuleTokenType" } }, "additionalProperties": false } }, "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" }, "Expiration": { "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ "at_height" ], "properties": { "at_height": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, { "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ "at_time" ], "properties": { "at_time": { "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ "never" ], "properties": { "never": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ { "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", "type": "object", "required": [ "vote" ], "properties": { "vote": { "type": "object", "required": [ "proposal_id", "vote" ], "properties": { "proposal_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "vote": { "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", "allOf": [ { "$ref": "#/definitions/VoteOption" } ] } } } }, "additionalProperties": false }, { "description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.", "type": "object", "required": [ "vote_weighted" ], "properties": { "vote_weighted": { "type": "object", "required": [ "options", "proposal_id" ], "properties": { "options": { "type": "array", "items": { "$ref": "#/definitions/WeightedVoteOption" } }, "proposal_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } } } }, "additionalProperties": false } ] }, "IbcMsg": { "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", "oneOf": [ { "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", "type": "object", "required": [ "transfer" ], "properties": { "transfer": { "type": "object", "required": [ "amount", "channel_id", "timeout", "to_address" ], "properties": { "amount": { "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", "allOf": [ { "$ref": "#/definitions/Coin" } ] }, "channel_id": { "description": "existing channel to send the tokens over", "type": "string" }, "timeout": { "description": "when packet times out, measured on remote chain", "allOf": [ { "$ref": "#/definitions/IbcTimeout" } ] }, "to_address": { "description": "address on the remote chain to receive these tokens", "type": "string" } } } }, "additionalProperties": false }, { "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", "type": "object", "required": [ "send_packet" ], "properties": { "send_packet": { "type": "object", "required": [ "channel_id", "data", "timeout" ], "properties": { "channel_id": { "type": "string" }, "data": { "$ref": "#/definitions/Binary" }, "timeout": { "description": "when packet times out, measured on remote chain", "allOf": [ { "$ref": "#/definitions/IbcTimeout" } ] } } } }, "additionalProperties": false }, { "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", "type": "object", "required": [ "close_channel" ], "properties": { "close_channel": { "type": "object", "required": [ "channel_id" ], "properties": { "channel_id": { "type": "string" } } } }, "additionalProperties": false } ] }, "IbcTimeout": { "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", "type": "object", "properties": { "block": { "anyOf": [ { "$ref": "#/definitions/IbcTimeoutBlock" }, { "type": "null" } ] }, "timestamp": { "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] } } }, "IbcTimeoutBlock": { "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", "type": "object", "required": [ "height", "revision" ], "properties": { "height": { "description": "block height after which the packet times out. the height within the given revision", "type": "integer", "format": "uint64", "minimum": 0.0 }, "revision": { "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", "type": "integer", "format": "uint64", "minimum": 0.0 } } }, "PreProposeSubmissionPolicy": { "description": "The policy configured in a pre-propose module that determines who can submit proposals. This is the preferred way to restrict proposal creation (as opposed to the ProposalCreationPolicy above) since pre-propose modules support other features, such as proposal deposits.", "oneOf": [ { "description": "Anyone may create proposals, except for those in the denylist.", "type": "object", "required": [ "anyone" ], "properties": { "anyone": { "type": "object", "required": [ "denylist" ], "properties": { "denylist": { "description": "Addresses that may not create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Specific people may create proposals.", "type": "object", "required": [ "specific" ], "properties": { "specific": { "type": "object", "required": [ "allowlist", "dao_members", "denylist" ], "properties": { "allowlist": { "description": "Addresses that may create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } }, "dao_members": { "description": "Whether or not DAO members may create proposals.", "type": "boolean" }, "denylist": { "description": "Addresses that may not create proposals, overriding other settings.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "ProposeMessage": { "oneOf": [ { "description": "The propose message used to make a proposal to this module. Note that this is identical to the propose message used by dao-proposal-single, except that it omits the `proposer` field which it fills in for the sender.", "type": "object", "required": [ "propose" ], "properties": { "propose": { "type": "object", "required": [ "description", "msgs", "title" ], "properties": { "description": { "type": "string" }, "msgs": { "type": "array", "items": { "$ref": "#/definitions/CosmosMsg_for_Empty" } }, "title": { "type": "string" }, "vote": { "anyOf": [ { "$ref": "#/definitions/SingleChoiceAutoVote" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "SingleChoiceAutoVote": { "type": "object", "required": [ "vote" ], "properties": { "rationale": { "description": "An optional rationale for why this vote was cast. This can be updated, set, or removed later by the address casting the vote.", "type": [ "string", "null" ] }, "vote": { "description": "The proposer's position on the proposal.", "allOf": [ { "$ref": "#/definitions/Vote" } ] } }, "additionalProperties": false }, "StakingMsg": { "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto", "oneOf": [ { "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "delegate" ], "properties": { "delegate": { "type": "object", "required": [ "amount", "validator" ], "properties": { "amount": { "$ref": "#/definitions/Coin" }, "validator": { "type": "string" } } } }, "additionalProperties": false }, { "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 } ] }, "Status": { "oneOf": [ { "description": "The proposal is open for voting.", "type": "string", "enum": [ "open" ] }, { "description": "The proposal has been rejected.", "type": "string", "enum": [ "rejected" ] }, { "description": "The proposal has been passed but has not been executed.", "type": "string", "enum": [ "passed" ] }, { "description": "The proposal has been passed and executed.", "type": "string", "enum": [ "executed" ] }, { "description": "The proposal has failed or expired and has been closed. A proposal deposit refund has been issued if applicable.", "type": "string", "enum": [ "closed" ] }, { "description": "The proposal's execution failed.", "type": "string", "enum": [ "execution_failed" ] }, { "description": "The proposal is timelocked. Only the configured vetoer can execute or veto until the timelock expires.", "type": "object", "required": [ "veto_timelock" ], "properties": { "veto_timelock": { "type": "object", "required": [ "expiration" ], "properties": { "expiration": { "$ref": "#/definitions/Expiration" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "The proposal has been vetoed.", "type": "string", "enum": [ "vetoed" ] } ] }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" }, "UncheckedDenom": { "description": "A denom that has not been checked to confirm it points to a valid asset.", "oneOf": [ { "description": "A native (bank module) asset.", "type": "object", "required": [ "native" ], "properties": { "native": { "type": "string" } }, "additionalProperties": false }, { "description": "A cw20 asset.", "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "type": "string" } }, "additionalProperties": false } ] }, "UncheckedDepositInfo": { "description": "Information about the deposit required to create a proposal.", "type": "object", "required": [ "amount", "denom", "refund_policy" ], "properties": { "amount": { "description": "The number of tokens that must be deposited to create a proposal. Must be a positive, non-zero number.", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "denom": { "description": "The address of the token to be used for proposal deposits.", "allOf": [ { "$ref": "#/definitions/DepositToken" } ] }, "refund_policy": { "description": "The policy used for refunding deposits on proposal completion.", "allOf": [ { "$ref": "#/definitions/DepositRefundPolicy" } ] } }, "additionalProperties": false }, "Vote": { "oneOf": [ { "description": "Marks support for the proposal.", "type": "string", "enum": [ "yes" ] }, { "description": "Marks opposition to the proposal.", "type": "string", "enum": [ "no" ] }, { "description": "Marks participation but does not count towards the ratio of support / opposed.", "type": "string", "enum": [ "abstain" ] } ] }, "VoteOption": { "type": "string", "enum": [ "yes", "no", "abstain", "no_with_veto" ] }, "VotingModuleTokenType": { "type": "string", "enum": [ "native", "cw20" ] }, "WasmMsg": { "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", "oneOf": [ { "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", "type": "object", "required": [ "execute" ], "properties": { "execute": { "type": "object", "required": [ "contract_addr", "funds", "msg" ], "properties": { "contract_addr": { "type": "string" }, "funds": { "type": "array", "items": { "$ref": "#/definitions/Coin" } }, "msg": { "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", "allOf": [ { "$ref": "#/definitions/Binary" } ] } } } }, "additionalProperties": false }, { "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", "type": "object", "required": [ "instantiate" ], "properties": { "instantiate": { "type": "object", "required": [ "code_id", "funds", "label", "msg" ], "properties": { "admin": { "type": [ "string", "null" ] }, "code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "funds": { "type": "array", "items": { "$ref": "#/definitions/Coin" } }, "label": { "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$ref": "#/definitions/Binary" } ] } } } }, "additionalProperties": false }, { "description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.", "type": "object", "required": [ "instantiate2" ], "properties": { "instantiate2": { "type": "object", "required": [ "code_id", "funds", "label", "msg", "salt" ], "properties": { "admin": { "type": [ "string", "null" ] }, "code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "funds": { "type": "array", "items": { "$ref": "#/definitions/Coin" } }, "label": { "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", "type": "string" }, "msg": { "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", "allOf": [ { "$ref": "#/definitions/Binary" } ] }, "salt": { "$ref": "#/definitions/Binary" } } } }, "additionalProperties": false }, { "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", "type": "object", "required": [ "migrate" ], "properties": { "migrate": { "type": "object", "required": [ "contract_addr", "msg", "new_code_id" ], "properties": { "contract_addr": { "type": "string" }, "msg": { "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", "allOf": [ { "$ref": "#/definitions/Binary" } ] }, "new_code_id": { "description": "the code_id of the new logic to place in the given contract", "type": "integer", "format": "uint64", "minimum": 0.0 } } } }, "additionalProperties": false }, { "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", "type": "object", "required": [ "update_admin" ], "properties": { "update_admin": { "type": "object", "required": [ "admin", "contract_addr" ], "properties": { "admin": { "type": "string" }, "contract_addr": { "type": "string" } } } }, "additionalProperties": false }, { "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", "type": "object", "required": [ "clear_admin" ], "properties": { "clear_admin": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "type": "string" } } } }, "additionalProperties": false } ] }, "WeightedVoteOption": { "type": "object", "required": [ "option", "weight" ], "properties": { "option": { "$ref": "#/definitions/VoteOption" }, "weight": { "$ref": "#/definitions/Decimal" } } } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "description": "Gets the proposal module that this pre propose module is associated with. Returns `Addr`.", "type": "object", "required": [ "proposal_module" ], "properties": { "proposal_module": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Gets the DAO (dao-dao-core) module this contract is associated with. Returns `Addr`.", "type": "object", "required": [ "dao" ], "properties": { "dao": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns contract version info.", "type": "object", "required": [ "info" ], "properties": { "info": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Gets the module's configuration.", "type": "object", "required": [ "config" ], "properties": { "config": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Gets the deposit info for the proposal identified by PROPOSAL_ID.", "type": "object", "required": [ "deposit_info" ], "properties": { "deposit_info": { "type": "object", "required": [ "proposal_id" ], "properties": { "proposal_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns whether or not the address can submit proposals.", "type": "object", "required": [ "can_propose" ], "properties": { "can_propose": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of proposal submitted hooks.", "type": "object", "required": [ "proposal_submitted_hooks" ], "properties": { "proposal_submitted_hooks": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Extension for queries. The default implementation will do nothing if queried for will return `Binary::default()`.", "type": "object", "required": [ "query_extension" ], "properties": { "query_extension": { "type": "object", "required": [ "msg" ], "properties": { "msg": { "$ref": "#/definitions/QueryExt" } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "QueryExt": { "oneOf": [ { "description": "List the approver address", "type": "object", "required": [ "approver" ], "properties": { "approver": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Return whether or not the proposal is pending", "type": "object", "required": [ "is_pending" ], "properties": { "is_pending": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "A proposal, pending or completed.", "type": "object", "required": [ "proposal" ], "properties": { "proposal": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "A pending proposal", "type": "object", "required": [ "pending_proposal" ], "properties": { "pending_proposal": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "List of proposals awaiting approval", "type": "object", "required": [ "pending_proposals" ], "properties": { "pending_proposals": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "reverse_pending_proposals" ], "properties": { "reverse_pending_proposals": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_before": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "A completed proposal", "type": "object", "required": [ "completed_proposal" ], "properties": { "completed_proposal": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "List of completed proposals", "type": "object", "required": [ "completed_proposals" ], "properties": { "completed_proposals": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "reverse_completed_proposals" ], "properties": { "reverse_completed_proposals": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_before": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "The completed approval ID for a created proposal ID.", "type": "object", "required": [ "completed_proposal_id_for_created_proposal_id" ], "properties": { "completed_proposal_id_for_created_proposal_id": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false } ] } } }, "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", "oneOf": [ { "type": "object", "required": [ "from_under_v250" ], "properties": { "from_under_v250": { "type": "object", "properties": { "policy": { "description": "Optionally set a new submission policy with more granular controls. If not set, the current policy will remain.", "anyOf": [ { "$ref": "#/definitions/PreProposeSubmissionPolicy" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "extension" ], "properties": { "extension": { "type": "object", "required": [ "msg" ], "properties": { "msg": { "$ref": "#/definitions/Empty" } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "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" }, "PreProposeSubmissionPolicy": { "description": "The policy configured in a pre-propose module that determines who can submit proposals. This is the preferred way to restrict proposal creation (as opposed to the ProposalCreationPolicy above) since pre-propose modules support other features, such as proposal deposits.", "oneOf": [ { "description": "Anyone may create proposals, except for those in the denylist.", "type": "object", "required": [ "anyone" ], "properties": { "anyone": { "type": "object", "required": [ "denylist" ], "properties": { "denylist": { "description": "Addresses that may not create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Specific people may create proposals.", "type": "object", "required": [ "specific" ], "properties": { "specific": { "type": "object", "required": [ "allowlist", "dao_members", "denylist" ], "properties": { "allowlist": { "description": "Addresses that may create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } }, "dao_members": { "description": "Whether or not DAO members may create proposals.", "type": "boolean" }, "denylist": { "description": "Addresses that may not create proposals, overriding other settings.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false } ] } } }, "sudo": null, "responses": { "can_propose": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Boolean", "type": "boolean" }, "config": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", "type": "object", "required": [ "submission_policy" ], "properties": { "deposit_info": { "description": "Information about the deposit required to create a proposal. If `None`, no deposit is required.", "anyOf": [ { "$ref": "#/definitions/CheckedDepositInfo" }, { "type": "null" } ] }, "submission_policy": { "description": "The policy dictating who is allowed to submit proposals.", "allOf": [ { "$ref": "#/definitions/PreProposeSubmissionPolicy" } ] } }, "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" }, "CheckedDenom": { "description": "A denom that has been checked to point to a valid asset. This enum should never be constructed literally and should always be built by calling `into_checked` on an `UncheckedDenom` instance.", "oneOf": [ { "description": "A native (bank module) asset.", "type": "object", "required": [ "native" ], "properties": { "native": { "type": "string" } }, "additionalProperties": false }, { "description": "A cw20 asset.", "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } ] }, "CheckedDepositInfo": { "description": "Counterpart to the `DepositInfo` struct which has been processed. This type should never be constructed literally and should always by built by calling `into_checked` on a `DepositInfo` instance.", "type": "object", "required": [ "amount", "denom", "refund_policy" ], "properties": { "amount": { "description": "The number of tokens that must be deposited to create a proposal. This is validated to be non-zero if this struct is constructed by converted via the `into_checked` method on `DepositInfo`.", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "denom": { "description": "The address of the cw20 token to be used for proposal deposits.", "allOf": [ { "$ref": "#/definitions/CheckedDenom" } ] }, "refund_policy": { "description": "The policy used for refunding proposal deposits.", "allOf": [ { "$ref": "#/definitions/DepositRefundPolicy" } ] } }, "additionalProperties": false }, "DepositRefundPolicy": { "oneOf": [ { "description": "Deposits should always be refunded.", "type": "string", "enum": [ "always" ] }, { "description": "Deposits should only be refunded for passed proposals.", "type": "string", "enum": [ "only_passed" ] }, { "description": "Deposits should never be refunded.", "type": "string", "enum": [ "never" ] } ] }, "PreProposeSubmissionPolicy": { "description": "The policy configured in a pre-propose module that determines who can submit proposals. This is the preferred way to restrict proposal creation (as opposed to the ProposalCreationPolicy above) since pre-propose modules support other features, such as proposal deposits.", "oneOf": [ { "description": "Anyone may create proposals, except for those in the denylist.", "type": "object", "required": [ "anyone" ], "properties": { "anyone": { "type": "object", "required": [ "denylist" ], "properties": { "denylist": { "description": "Addresses that may not create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Specific people may create proposals.", "type": "object", "required": [ "specific" ], "properties": { "specific": { "type": "object", "required": [ "allowlist", "dao_members", "denylist" ], "properties": { "allowlist": { "description": "Addresses that may create proposals.", "type": "array", "items": { "$ref": "#/definitions/Addr" } }, "dao_members": { "description": "Whether or not DAO members may create proposals.", "type": "boolean" }, "denylist": { "description": "Addresses that may not create proposals, overriding other settings.", "type": "array", "items": { "$ref": "#/definitions/Addr" } } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "dao": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Addr", "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "deposit_info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "DepositInfoResponse", "type": "object", "required": [ "proposer" ], "properties": { "deposit_info": { "description": "The deposit that has been paid for the specified proposal.", "anyOf": [ { "$ref": "#/definitions/CheckedDepositInfo" }, { "type": "null" } ] }, "proposer": { "description": "The address that created the proposal.", "allOf": [ { "$ref": "#/definitions/Addr" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "CheckedDenom": { "description": "A denom that has been checked to point to a valid asset. This enum should never be constructed literally and should always be built by calling `into_checked` on an `UncheckedDenom` instance.", "oneOf": [ { "description": "A native (bank module) asset.", "type": "object", "required": [ "native" ], "properties": { "native": { "type": "string" } }, "additionalProperties": false }, { "description": "A cw20 asset.", "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } ] }, "CheckedDepositInfo": { "description": "Counterpart to the `DepositInfo` struct which has been processed. This type should never be constructed literally and should always by built by calling `into_checked` on a `DepositInfo` instance.", "type": "object", "required": [ "amount", "denom", "refund_policy" ], "properties": { "amount": { "description": "The number of tokens that must be deposited to create a proposal. This is validated to be non-zero if this struct is constructed by converted via the `into_checked` method on `DepositInfo`.", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "denom": { "description": "The address of the cw20 token to be used for proposal deposits.", "allOf": [ { "$ref": "#/definitions/CheckedDenom" } ] }, "refund_policy": { "description": "The policy used for refunding proposal deposits.", "allOf": [ { "$ref": "#/definitions/DepositRefundPolicy" } ] } }, "additionalProperties": false }, "DepositRefundPolicy": { "oneOf": [ { "description": "Deposits should always be refunded.", "type": "string", "enum": [ "always" ] }, { "description": "Deposits should only be refunded for passed proposals.", "type": "string", "enum": [ "only_passed" ] }, { "description": "Deposits should never be refunded.", "type": "string", "enum": [ "never" ] } ] }, "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" } } }, "info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InfoResponse", "type": "object", "required": [ "info" ], "properties": { "info": { "$ref": "#/definitions/ContractVersion" } }, "additionalProperties": false, "definitions": { "ContractVersion": { "type": "object", "required": [ "contract", "version" ], "properties": { "contract": { "description": "contract is the crate name of the implementing contract, eg. `crate:cw20-base` we will use other prefixes for other languages, and their standard global namespacing", "type": "string" }, "version": { "description": "version is any string that this implementation knows. It may be simple counter \"1\", \"2\". or semantic version on release tags \"v0.7.0\", or some custom feature flag list. the only code that needs to understand the version parsing is code that knows how to migrate from the given contract (and is tied to it's implementation somehow)", "type": "string" } }, "additionalProperties": false } } }, "proposal_module": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Addr", "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "proposal_submitted_hooks": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "HooksResponse", "type": "object", "required": [ "hooks" ], "properties": { "hooks": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "query_extension": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "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" } } }