diff --git a/Cargo.lock b/Cargo.lock index 25de8ff3..7a273e30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1195,6 +1195,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cwd-drop-security-subdao-pre-propose" +version = "0.2.2" +dependencies = [ + "cosmwasm-schema 1.5.5", + "cosmwasm-std 1.5.2", + "cw-denom", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cwd-interface", + "cwd-pre-propose-base", + "cwd-voting", + "neutron-drop-security-subdao-pre-propose", + "neutron-sdk 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "neutron-subdao-core", + "neutron-subdao-proposal-single", + "neutron-subdao-timelock-single", + "schemars", + "serde", +] + [[package]] name = "cwd-hooks" version = "0.2.0" @@ -2202,6 +2225,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "neutron-drop-security-subdao-pre-propose" +version = "0.1.0" +dependencies = [ + "cosmwasm-std 1.5.2", + "cw-utils 1.0.3", + "cwd-interface", + "cwd-pre-propose-base", + "cwd-voting", + "neutron-sdk 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schemars", + "serde", +] + [[package]] name = "neutron-lockdrop-vault" version = "0.1.0" diff --git a/Makefile b/Makefile index 9b99a985..8e673004 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ fmt: @cargo fmt -- --check check_contracts: - @cargo install cosmwasm-check --locked + @cargo install cosmwasm-check --locked --version 2.0.4 @cosmwasm-check --available-capabilities iterator,staking,stargate,neutron artifacts/*.wasm compile: diff --git a/contracts/dao/neutron-chain-manager/schema/neutron-chain-manager.json b/contracts/dao/neutron-chain-manager/schema/neutron-chain-manager.json index 9498e026..c56c7de9 100644 --- a/contracts/dao/neutron-chain-manager/schema/neutron-chain-manager.json +++ b/contracts/dao/neutron-chain-manager/schema/neutron-chain-manager.json @@ -439,31 +439,8 @@ "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)", + "description": "This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "deprecated": true, "type": "object", "required": [ "stargate" @@ -909,57 +886,8 @@ } ] }, - "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 - } - ] - }, "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), }, ], })) } ```", + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ { "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", @@ -971,22 +899,22 @@ "vote": { "type": "object", "required": [ - "proposal_id", - "vote" + "option", + "proposal_id" ], "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 .", + "option": { + "description": "The vote option.\n\nThis used to be called \"vote\", but was changed for consistency with Cosmos SDK.", "allOf": [ { "$ref": "#/definitions/VoteOption" } ] + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 } } } @@ -1058,6 +986,13 @@ "description": "existing channel to send the tokens over", "type": "string" }, + "memo": { + "description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.", + "type": [ + "string", + "null" + ] + }, "timeout": { "description": "when packet times out, measured on remote chain", "allOf": [ @@ -1982,11 +1917,11 @@ { "type": "object", "required": [ - "update_params_permission" + "update_cron_params_permission" ], "properties": { - "update_params_permission": { - "$ref": "#/definitions/UpdateParamsPermission" + "update_cron_params_permission": { + "$ref": "#/definitions/CronUpdateParamsPermission" } }, "additionalProperties": false @@ -1994,11 +1929,11 @@ { "type": "object", "required": [ - "cron_permission" + "update_tokenfactory_params_permission" ], "properties": { - "cron_permission": { - "$ref": "#/definitions/CronPermission" + "update_tokenfactory_params_permission": { + "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" } }, "additionalProperties": false @@ -2006,11 +1941,11 @@ { "type": "object", "required": [ - "tokenfactory_permission" + "cron_permission" ], "properties": { - "tokenfactory_permission": { - "$ref": "#/definitions/TokenfactoryPermission" + "cron_permission": { + "$ref": "#/definitions/CronPermission" } }, "additionalProperties": false @@ -2165,90 +2100,6 @@ } } }, - "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 - } - ] - }, "StrategyMsg": { "oneOf": [ { @@ -2315,30 +2166,6 @@ } ] }, - "TokenfactoryPermission": { - "type": "object", - "required": [ - "denom_creation_fee", - "denom_creation_gas_consume", - "fee_collector_address", - "whitelisted_hooks" - ], - "properties": { - "denom_creation_fee": { - "type": "boolean" - }, - "denom_creation_gas_consume": { - "type": "boolean" - }, - "fee_collector_address": { - "type": "boolean" - }, - "whitelisted_hooks": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "TokenfactoryUpdateParamsPermission": { "type": "object", "required": [ @@ -2429,34 +2256,6 @@ } } }, - "UpdateParamsPermission": { - "oneOf": [ - { - "type": "object", - "required": [ - "cron_update_params_permission" - ], - "properties": { - "cron_update_params_permission": { - "$ref": "#/definitions/CronUpdateParamsPermission" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "tokenfactory_update_params_permission" - ], - "properties": { - "tokenfactory_update_params_permission": { - "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" - } - }, - "additionalProperties": false - } - ] - }, "UpgradeProposal": { "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "deprecated": true, @@ -2795,11 +2594,11 @@ { "type": "object", "required": [ - "update_params_permission" + "update_cron_params_permission" ], "properties": { - "update_params_permission": { - "$ref": "#/definitions/UpdateParamsPermission" + "update_cron_params_permission": { + "$ref": "#/definitions/CronUpdateParamsPermission" } }, "additionalProperties": false @@ -2807,11 +2606,11 @@ { "type": "object", "required": [ - "cron_permission" + "update_tokenfactory_params_permission" ], "properties": { - "cron_permission": { - "$ref": "#/definitions/CronPermission" + "update_tokenfactory_params_permission": { + "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" } }, "additionalProperties": false @@ -2819,11 +2618,11 @@ { "type": "object", "required": [ - "tokenfactory_permission" + "cron_permission" ], "properties": { - "tokenfactory_permission": { - "$ref": "#/definitions/TokenfactoryPermission" + "cron_permission": { + "$ref": "#/definitions/CronPermission" } }, "additionalProperties": false @@ -2855,30 +2654,6 @@ } ] }, - "TokenfactoryPermission": { - "type": "object", - "required": [ - "denom_creation_fee", - "denom_creation_gas_consume", - "fee_collector_address", - "whitelisted_hooks" - ], - "properties": { - "denom_creation_fee": { - "type": "boolean" - }, - "denom_creation_gas_consume": { - "type": "boolean" - }, - "fee_collector_address": { - "type": "boolean" - }, - "whitelisted_hooks": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "TokenfactoryUpdateParamsPermission": { "type": "object", "required": [ @@ -2902,34 +2677,6 @@ } }, "additionalProperties": false - }, - "UpdateParamsPermission": { - "oneOf": [ - { - "type": "object", - "required": [ - "cron_update_params_permission" - ], - "properties": { - "cron_update_params_permission": { - "$ref": "#/definitions/CronUpdateParamsPermission" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "tokenfactory_update_params_permission" - ], - "properties": { - "tokenfactory_update_params_permission": { - "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" - } - }, - "additionalProperties": false - } - ] } } } diff --git a/contracts/dao/neutron-chain-manager/schema/raw/execute.json b/contracts/dao/neutron-chain-manager/schema/raw/execute.json index e84f3de6..1e56ecf3 100644 --- a/contracts/dao/neutron-chain-manager/schema/raw/execute.json +++ b/contracts/dao/neutron-chain-manager/schema/raw/execute.json @@ -410,31 +410,8 @@ "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)", + "description": "This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)", + "deprecated": true, "type": "object", "required": [ "stargate" @@ -880,57 +857,8 @@ } ] }, - "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 - } - ] - }, "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), }, ], })) } ```", + "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ { "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", @@ -942,22 +870,22 @@ "vote": { "type": "object", "required": [ - "proposal_id", - "vote" + "option", + "proposal_id" ], "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 .", + "option": { + "description": "The vote option.\n\nThis used to be called \"vote\", but was changed for consistency with Cosmos SDK.", "allOf": [ { "$ref": "#/definitions/VoteOption" } ] + }, + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 } } } @@ -1029,6 +957,13 @@ "description": "existing channel to send the tokens over", "type": "string" }, + "memo": { + "description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.", + "type": [ + "string", + "null" + ] + }, "timeout": { "description": "when packet times out, measured on remote chain", "allOf": [ @@ -1953,11 +1888,11 @@ { "type": "object", "required": [ - "update_params_permission" + "update_cron_params_permission" ], "properties": { - "update_params_permission": { - "$ref": "#/definitions/UpdateParamsPermission" + "update_cron_params_permission": { + "$ref": "#/definitions/CronUpdateParamsPermission" } }, "additionalProperties": false @@ -1965,11 +1900,11 @@ { "type": "object", "required": [ - "cron_permission" + "update_tokenfactory_params_permission" ], "properties": { - "cron_permission": { - "$ref": "#/definitions/CronPermission" + "update_tokenfactory_params_permission": { + "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" } }, "additionalProperties": false @@ -1977,11 +1912,11 @@ { "type": "object", "required": [ - "tokenfactory_permission" + "cron_permission" ], "properties": { - "tokenfactory_permission": { - "$ref": "#/definitions/TokenfactoryPermission" + "cron_permission": { + "$ref": "#/definitions/CronPermission" } }, "additionalProperties": false @@ -2136,90 +2071,6 @@ } } }, - "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 - } - ] - }, "StrategyMsg": { "oneOf": [ { @@ -2286,30 +2137,6 @@ } ] }, - "TokenfactoryPermission": { - "type": "object", - "required": [ - "denom_creation_fee", - "denom_creation_gas_consume", - "fee_collector_address", - "whitelisted_hooks" - ], - "properties": { - "denom_creation_fee": { - "type": "boolean" - }, - "denom_creation_gas_consume": { - "type": "boolean" - }, - "fee_collector_address": { - "type": "boolean" - }, - "whitelisted_hooks": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "TokenfactoryUpdateParamsPermission": { "type": "object", "required": [ @@ -2400,34 +2227,6 @@ } } }, - "UpdateParamsPermission": { - "oneOf": [ - { - "type": "object", - "required": [ - "cron_update_params_permission" - ], - "properties": { - "cron_update_params_permission": { - "$ref": "#/definitions/CronUpdateParamsPermission" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "tokenfactory_update_params_permission" - ], - "properties": { - "tokenfactory_update_params_permission": { - "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" - } - }, - "additionalProperties": false - } - ] - }, "UpgradeProposal": { "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "deprecated": true, diff --git a/contracts/dao/neutron-chain-manager/schema/raw/response_to_strategies.json b/contracts/dao/neutron-chain-manager/schema/raw/response_to_strategies.json index 36d64aa3..375faa36 100644 --- a/contracts/dao/neutron-chain-manager/schema/raw/response_to_strategies.json +++ b/contracts/dao/neutron-chain-manager/schema/raw/response_to_strategies.json @@ -86,11 +86,11 @@ { "type": "object", "required": [ - "update_params_permission" + "update_cron_params_permission" ], "properties": { - "update_params_permission": { - "$ref": "#/definitions/UpdateParamsPermission" + "update_cron_params_permission": { + "$ref": "#/definitions/CronUpdateParamsPermission" } }, "additionalProperties": false @@ -98,11 +98,11 @@ { "type": "object", "required": [ - "cron_permission" + "update_tokenfactory_params_permission" ], "properties": { - "cron_permission": { - "$ref": "#/definitions/CronPermission" + "update_tokenfactory_params_permission": { + "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" } }, "additionalProperties": false @@ -110,11 +110,11 @@ { "type": "object", "required": [ - "tokenfactory_permission" + "cron_permission" ], "properties": { - "tokenfactory_permission": { - "$ref": "#/definitions/TokenfactoryPermission" + "cron_permission": { + "$ref": "#/definitions/CronPermission" } }, "additionalProperties": false @@ -146,30 +146,6 @@ } ] }, - "TokenfactoryPermission": { - "type": "object", - "required": [ - "denom_creation_fee", - "denom_creation_gas_consume", - "fee_collector_address", - "whitelisted_hooks" - ], - "properties": { - "denom_creation_fee": { - "type": "boolean" - }, - "denom_creation_gas_consume": { - "type": "boolean" - }, - "fee_collector_address": { - "type": "boolean" - }, - "whitelisted_hooks": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "TokenfactoryUpdateParamsPermission": { "type": "object", "required": [ @@ -193,34 +169,6 @@ } }, "additionalProperties": false - }, - "UpdateParamsPermission": { - "oneOf": [ - { - "type": "object", - "required": [ - "cron_update_params_permission" - ], - "properties": { - "cron_update_params_permission": { - "$ref": "#/definitions/CronUpdateParamsPermission" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "tokenfactory_update_params_permission" - ], - "properties": { - "tokenfactory_update_params_permission": { - "$ref": "#/definitions/TokenfactoryUpdateParamsPermission" - } - }, - "additionalProperties": false - } - ] } } } diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/.cargo/config b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/.cargo/config new file mode 100644 index 00000000..76196933 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/.cargo/config @@ -0,0 +1,4 @@ +[alias] +wasm = "build --release --target wasm32-unknown-unknown" +unit-test = "test --lib" +schema = "run --example cwd-drop-security-subdao-pre-propose_schema" diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/Cargo.toml b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/Cargo.toml new file mode 100644 index 00000000..9592d84e --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "cwd-drop-security-subdao-pre-propose" +version = "0.2.2" +authors = ["Sergey Ratiashvili "] +edition = "2021" +repository = "https://github.com/DA0-DA0/dao-contracts" +description = "A DAO DAO pre-propose module for subdao for DROP protocol non-timelocked pause/unpause." + +[lib] +crate-type = ["cdylib", "rlib"] + +[features] +# for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces"] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[dependencies] +cosmwasm-std = { version = "1.3.0" } +cw2 = "1.1.0" +cw-storage-plus = "1.1.0" +cw-utils = { version = "1.0.1" } +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } +cwd-voting = { path = "../../../../packages/cwd-voting" } +neutron-sdk = "0.10.0" +neutron-subdao-core = { path = "../../../../packages/neutron-subdao-core" } +neutron-subdao-timelock-single = { path = "../../../../packages/neutron-subdao-timelock-single" } +neutron-subdao-proposal-single = { path = "../../../../packages/neutron-subdao-proposal-single" } +neutron-drop-security-subdao-pre-propose = { path = "../../../../packages/neutron-drop-security-subdao-pre-propose" } +schemars = "0.8.8" +cwd-interface = { path = "../../../../packages/cwd-interface" } + +[dev-dependencies] +cosmwasm-schema = "1.3.0" +cw-utils = { version = "1.0.1" } +cw20 = "1.1.0" +cwd-voting = { path = "../../../../packages/cwd-voting" } +cw-denom = { path = "../../../../packages/cw-denom" } +cwd-interface = { path = "../../../../packages/cwd-interface" } diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/README.md b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/README.md new file mode 100644 index 00000000..e9ee96cd --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/README.md @@ -0,0 +1,4 @@ +# DROP security subdao pre proposal module contract + +This is a subdao module that manages pause/unpause action for DROP protocol without timelock. + diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/examples/cwd-drop-security-subdao-pre-propose_schema.rs b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/examples/cwd-drop-security-subdao-pre-propose_schema.rs new file mode 100644 index 00000000..fe67ae3a --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/examples/cwd-drop-security-subdao-pre-propose_schema.rs @@ -0,0 +1,13 @@ +use cosmwasm_std::Empty; + +use cosmwasm_schema::write_api; +use cwd_pre_propose_base::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use neutron_drop_security_subdao_pre_propose::types::ProposeMessage; + +fn main() { + write_api! { + instantiate: InstantiateMsg, + query: QueryMsg, + execute: ExecuteMsg, + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/cwd-drop-security-subdao-pre-propose.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/cwd-drop-security-subdao-pre-propose.json new file mode 100644 index 00000000..bf2ba529 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/cwd-drop-security-subdao-pre-propose.json @@ -0,0 +1,3085 @@ +{ + "contract_name": "cwd-drop-security-subdao-pre-propose", + "contract_version": "0.2.2", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "open_proposal_submission" + ], + "properties": { + "deposit_info": { + "description": "Information about the deposit requirements for this module. None if no deposit.", + "anyOf": [ + { + "$ref": "#/definitions/UncheckedDepositInfo" + }, + { + "type": "null" + } + ] + }, + "open_proposal_submission": { + "description": "If false, only members (addresses with voting power) may create proposals in the DAO. Otherwise, any address may create a proposal so long as they pay the deposit.", + "type": "boolean" + } + }, + "definitions": { + "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 + }, + { + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `cwd_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "type": "object", + "required": [ + "voting_module_token" + ], + "properties": { + "voting_module_token": { + "type": "object" + } + }, + "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" + } + ] + } + } + } + } + }, + "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 + }, + { + "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", + "required": [ + "open_proposal_submission" + ], + "properties": { + "deposit_info": { + "anyOf": [ + { + "$ref": "#/definitions/UncheckedDepositInfo" + }, + { + "type": "null" + } + ] + }, + "open_proposal_submission": { + "type": "boolean" + } + } + } + }, + "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 + }, + { + "description": "Handles proposal hook fired by the associated proposal module when a proposal is created. 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_created_hook" + ], + "properties": { + "proposal_created_hook": { + "type": "object", + "required": [ + "proposal_id", + "proposer" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "proposer": { + "type": "string" + } + } + } + }, + "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 + } + ], + "definitions": { + "AdminProposal": { + "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", + "oneOf": [ + { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", + "type": "object", + "required": [ + "param_change_proposal" + ], + "properties": { + "param_change_proposal": { + "$ref": "#/definitions/ParamChangeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to upgrade IBC client", + "type": "object", + "required": [ + "upgrade_proposal" + ], + "properties": { + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to update IBC client", + "type": "object", + "required": [ + "client_update_proposal" + ], + "properties": { + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to execute CosmosMsg.", + "type": "object", + "required": [ + "proposal_execute_message" + ], + "properties": { + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, + "type": "object", + "required": [ + "software_upgrade_proposal" + ], + "properties": { + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, + "type": "object", + "required": [ + "pin_codes_proposal" + ], + "properties": { + "pin_codes_proposal": { + "$ref": "#/definitions/PinCodesProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, + "type": "object", + "required": [ + "unpin_codes_proposal" + ], + "properties": { + "unpin_codes_proposal": { + "$ref": "#/definitions/UnpinCodesProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, + "type": "object", + "required": [ + "sudo_contract_proposal" + ], + "properties": { + "sudo_contract_proposal": { + "$ref": "#/definitions/SudoContractProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, + "type": "object", + "required": [ + "update_admin_proposal" + ], + "properties": { + "update_admin_proposal": { + "$ref": "#/definitions/UpdateAdminProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, + "type": "object", + "required": [ + "clear_admin_proposal" + ], + "properties": { + "clear_admin_proposal": { + "$ref": "#/definitions/ClearAdminProposal" + } + }, + "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" + }, + "CancelSoftwareUpgradeProposal": { + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, + "type": "object", + "required": [ + "description", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "ClearAdminProposal": { + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract admin will be removed.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "ClientUpdateProposal": { + "description": "ClientUpdateProposal defines the struct for client update proposal.", + "type": "object", + "required": [ + "description", + "subject_client_id", + "substitute_client_id", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "subject_client_id": { + "description": "*subject_client_id** is a subject client id.", + "type": "string" + }, + "substitute_client_id": { + "description": "*substitute_client_id** is a substitute client id.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_NeutronMsg": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/NeutronMsg" + } + }, + "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 + } + ] + }, + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "DepositOption": { + "type": "object", + "required": [ + "disable_swap" + ], + "properties": { + "disable_swap": { + "type": "boolean" + } + } + }, + "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 + }, + { + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `cwd_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "type": "object", + "required": [ + "voting_module_token" + ], + "properties": { + "voting_module_token": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "DexMsg": { + "oneOf": [ + { + "description": "Deposit provides liquidity to a specific trading pair by depositing tokens at a specific price into one or both sides of the pair in “a liquidity pool”", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "fees", + "options", + "receiver", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "amounts_a": { + "description": "Amounts of tokenA to deposit", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "amounts_b": { + "description": "Amounts of tokenB to deposit", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "fees": { + "description": "Fees to use for each deposit", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "options": { + "description": "Additional deposit options", + "type": "array", + "items": { + "$ref": "#/definitions/DepositOption" + } + }, + "receiver": { + "description": "The account to which PoolShares will be issued", + "type": "string" + }, + "tick_indexes_a_to_b": { + "description": "Tick indexes to deposit at defined in terms of TokenA to TokenB (ie. TokenA is on the left)", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "description": "Denom for one side of the deposit", + "type": "string" + }, + "token_b": { + "description": "Denom for the opposing side of the deposit", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw is used to redeem PoolShares for the user’s pro-rata portion of tokens within a liquidity pool. Users can withdraw from a pool at any time", + "type": "object", + "required": [ + "withdrawal" + ], + "properties": { + "withdrawal": { + "type": "object", + "required": [ + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "fees": { + "description": "Fee for the target LiquidityPools", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "receiver": { + "description": "The account to which the tokens are credited", + "type": "string" + }, + "shares_to_remove": { + "description": "Amount of shares to remove from each pool", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "tick_indexes_a_to_b": { + "description": "Tick indexes of the target LiquidityPools defined in terms of TokenA to TokenB (ie. TokenA is on the left)", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "description": "Denom for one side of the deposit", + "type": "string" + }, + "token_b": { + "description": "Denom for the opposing side of the deposit", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "PlaceLimitOrder provides the primary mechanism for trading on the Duality Dex. Limit orders can provide liquidity to the Dex (“Maker Limit Orders”) and/or can be used to trade against preexisting liquidity (“Taker Limit Orders”)", + "type": "object", + "required": [ + "place_limit_order" + ], + "properties": { + "place_limit_order": { + "type": "object", + "required": [ + "amount_in", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "amount_in": { + "description": "Amount of TokenIn to be traded", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "expiration_time": { + "description": "Expiration time for order. Only valid for GOOD_TIL_TIME limit orders", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "max_amount_out": { + "description": "Maximum amount of TokenB can be bought. For everything except JUST_IN_TIME OrderType", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "order_type": { + "description": "Type of limit order to be used. Must be one of: GOOD_TIL_CANCELLED, FILL_OR_KILL, IMMEDIATE_OR_CANCEL, JUST_IN_TIME, or GOOD_TIL_TIME", + "allOf": [ + { + "$ref": "#/definitions/LimitOrderType" + } + ] + }, + "receiver": { + "description": "Account to which TokenOut is credited or that will be allowed to withdraw or cancel a maker order", + "type": "string" + }, + "tick_index_in_to_out": { + "description": "Limit tick for a limit order, specified in terms of TokenIn to TokenOut", + "type": "integer", + "format": "int64" + }, + "token_in": { + "description": "Token being “sold”", + "type": "string" + }, + "token_out": { + "description": "Token being “bought”", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "WithdrawFilledLimitOrder. Once a limit order has been filled – either partially or in its entirety, it can be withdrawn at any time. Withdrawing from a limit order credits all available proceeds to the user. Withdraw can be called on a limit order multiple times as new proceeds become available", + "type": "object", + "required": [ + "withdraw_filled_limit_order" + ], + "properties": { + "withdraw_filled_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "description": "TrancheKey for the target limit order", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "CancelLimitOrder. Standard Taker limit orders (Good-til-cancelled & Good-til-Time) can be canceled at any time if they have not been completely filled", + "type": "object", + "required": [ + "cancel_limit_order" + ], + "properties": { + "cancel_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "description": "TrancheKey for the target limit order", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "MultiHopSwap provides a swapping mechanism to achieve better prices by routing through a series of pools", + "type": "object", + "required": [ + "multi_hop_swap" + ], + "properties": { + "multi_hop_swap": { + "type": "object", + "required": [ + "amount_in", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_in": { + "description": "Amount of TokenIn to swap", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "exit_limit_price": { + "description": "Minimum price that that must be satisfied for a route to succeed", + "allOf": [ + { + "$ref": "#/definitions/PrecDec" + } + ] + }, + "pick_best_route": { + "description": "If true all routes are run and the route with the best price is used", + "type": "boolean" + }, + "receiver": { + "description": "Account to which TokenOut is credited", + "type": "string" + }, + "routes": { + "description": "Array of possible routes", + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + } + } + }, + "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 + } + ] + }, + "IbcFee": { + "description": "IbcFee defines struct for fees that refund the relayer for `SudoMsg` messages submission. Unused fee kind will be returned back to message sender. Please refer to these links for more information: IBC transaction structure - General mechanics of fee payments - ", + "type": "object", + "required": [ + "ack_fee", + "recv_fee", + "timeout_fee" + ], + "properties": { + "ack_fee": { + "description": "*ack_fee** is an amount of coins to refund relayer for submitting ack message for a particular IBC packet.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "recv_fee": { + "description": "**recv_fee** currently is used for compatibility with ICS-29 interface only and must be set to zero (i.e. 0untrn), because Neutron's fee module can't refund relayer for submission of Recv IBC packets due to compatibility with target chains.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "timeout_fee": { + "description": "*timeout_fee** amount of coins to refund relayer for submitting timeout message for a particular IBC packet.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + }, + "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 + } + } + }, + "KVKey": { + "description": "Describes a KV key for which you want to get value from the storage on remote chain", + "type": "object", + "required": [ + "key", + "path" + ], + "properties": { + "key": { + "description": "*key** is a key you want to read from the storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "*path** is a path to the storage (storage prefix) where you want to read value by key (usually name of cosmos-packages module: 'staking', 'bank', etc.)", + "type": "string" + } + } + }, + "LimitOrderType": { + "oneOf": [ + { + "description": "Good-til-Cancelled limit orders are hybrid maker and taker limit orders. They will attempt to trade the supplied AmountIn at the TickIndex or better. However, if they total AmountIn cannot be traded at the limit price they are remaining amount will be placed as a maker limit order. The proceeds from the taker portion are deposited into the user’s account immediately, however, the proceeds from the maker portion must be explicitly withdrawn via WithdrawLimitOrder.", + "type": "string", + "enum": [ + "GOOD_TIL_CANCELLED" + ] + }, + { + "description": "Fill-or-Kill limit orders are taker limit orders that either successfully swap 100% of the supplied AmountIn or return an error. If there is insufficient liquidity to complete the trade at or above the supplied TickIndex a Fill-or-Kill order will return an error `codespace: dex, code: 1134` (https://github.com/neutron-org/neutron/blob/main/x/dex/types/errors.go#L107 ErrGoodTilOrderWithoutExpiration).", + "type": "string", + "enum": [ + "FILL_OR_KILL" + ] + }, + { + "description": "Immediate-or-Cancel limit orders are taker orders that will swap as much as of the AmountIn as possible given available liquidity above the supplied TickIndex. Unlike Fill-or-Kill orders they will still successfully complete even if they are only able to partially trade through the AmountIn at the TickIndex or better.", + "type": "string", + "enum": [ + "IMMEDIATE_OR_CANCEL" + ] + }, + { + "description": "Just-in-Time limit orders are an advanced maker limit order that provides tradeable liquidity for exactly one block. At the end of the same block in which the Just-in-Time order was submitted the order is canceled and any untraded portion will no longer be usable as active liquidity.", + "type": "string", + "enum": [ + "JUST_IN_TIME" + ] + }, + { + "description": "Good-til-Time limit order function exactly the same as Good-til-Cancelled limit orders first trying to trade as a taker limit order and then placing any remaining amount as a maker limit order. However, the maker portion of the limit order has a specified ExpirationTime. After the ExpirationTime the order will be cancelled and can no longer be traded against. When withdrawing a Good-til-Time limit order the user will receive both the successfully traded portion of the limit order (TokenOut) as well as any remaining untraded amount (TokenIn).", + "type": "string", + "enum": [ + "GOOD_TIL_TIME" + ] + } + ] + }, + "MsgExecuteContract": { + "description": "MsgExecuteContract defines a call to the contract execution", + "type": "object", + "required": [ + "contract", + "msg" + ], + "properties": { + "contract": { + "description": "*contract** is a contract address that will be called", + "type": "string" + }, + "msg": { + "description": "*msg** is a contract call message", + "type": "string" + } + } + }, + "MultiHopRoute": { + "type": "object", + "required": [ + "hops" + ], + "properties": { + "hops": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NeutronMsg": { + "description": "A number of Custom messages that can call into the Neutron bindings.", + "oneOf": [ + { + "description": "RegisterInterchainAccount registers an interchain account on remote chain.", + "type": "object", + "required": [ + "register_interchain_account" + ], + "properties": { + "register_interchain_account": { + "type": "object", + "required": [ + "connection_id", + "interchain_account_id" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "interchain_account_id": { + "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", + "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + }, + { + "description": "SubmitTx starts the process of executing any Cosmos-SDK *msgs* on remote chain.", + "type": "object", + "required": [ + "submit_tx" + ], + "properties": { + "submit_tx": { + "type": "object", + "required": [ + "connection_id", + "fee", + "interchain_account_id", + "memo", + "msgs", + "timeout" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "fee": { + "description": "**fee** is an ibc fee for the transaction.", + "allOf": [ + { + "$ref": "#/definitions/IbcFee" + } + ] + }, + "interchain_account_id": { + "description": "*interchain_account_id** is an identifier of your interchain account from which you want to execute msgs.", + "type": "string" + }, + "memo": { + "description": "*memo** is a memo you want to attach to your interchain transaction.It behaves like a memo in usual Cosmos transaction.", + "type": "string" + }, + "msgs": { + "description": "*msgs** is a list of protobuf encoded Cosmos-SDK messages you want to execute on remote chain.", + "type": "array", + "items": { + "$ref": "#/definitions/ProtobufAny" + } + }, + "timeout": { + "description": "*timeout** is a timeout in seconds after which the packet times out.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RegisterInterchainQuery registers an interchain query.", + "type": "object", + "required": [ + "register_interchain_query" + ], + "properties": { + "register_interchain_query": { + "type": "object", + "required": [ + "connection_id", + "keys", + "query_type", + "transactions_filter", + "update_period" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "keys": { + "description": "*keys** is the KV-storage keys for which we want to get values from remote chain.", + "type": "array", + "items": { + "$ref": "#/definitions/KVKey" + } + }, + "query_type": { + "description": "*query_type** is a query type identifier ('tx' or 'kv' for now).", + "type": "string" + }, + "transactions_filter": { + "description": "*transactions_filter** is the filter for transaction search ICQ.", + "type": "string" + }, + "update_period": { + "description": "*update_period** is used to say how often the query must be updated.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RegisterInterchainQuery updates an interchain query.", + "type": "object", + "required": [ + "update_interchain_query" + ], + "properties": { + "update_interchain_query": { + "type": "object", + "required": [ + "query_id" + ], + "properties": { + "new_keys": { + "description": "*new_keys** is the new query keys to retrive.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/KVKey" + } + }, + "new_transactions_filter": { + "description": "*new_transactions_filter** is a new transactions filter of the query.", + "type": [ + "string", + "null" + ] + }, + "new_update_period": { + "description": "*new_update_period** is a new update period of the query.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "query_id": { + "description": "*query_id** is the ID of the query we want to update.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RemoveInterchainQuery removes as interchain query.", + "type": "object", + "required": [ + "remove_interchain_query" + ], + "properties": { + "remove_interchain_query": { + "type": "object", + "required": [ + "query_id" + ], + "properties": { + "query_id": { + "description": "*query_id** is ID of the query we want to remove.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "IbcTransfer sends a fungible token packet over IBC.", + "type": "object", + "required": [ + "ibc_transfer" + ], + "properties": { + "ibc_transfer": { + "type": "object", + "required": [ + "fee", + "memo", + "receiver", + "sender", + "source_channel", + "source_port", + "timeout_height", + "timeout_timestamp", + "token" + ], + "properties": { + "fee": { + "$ref": "#/definitions/IbcFee" + }, + "memo": { + "type": "string" + }, + "receiver": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "source_channel": { + "type": "string" + }, + "source_port": { + "type": "string" + }, + "timeout_height": { + "$ref": "#/definitions/RequestPacketTimeoutHeight" + }, + "timeout_timestamp": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "token": { + "$ref": "#/definitions/Coin" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "SubmitAdminProposal sends a proposal to neutron's Admin module. This type of messages can be only executed by Neutron DAO.", + "type": "object", + "required": [ + "submit_admin_proposal" + ], + "properties": { + "submit_admin_proposal": { + "type": "object", + "required": [ + "admin_proposal" + ], + "properties": { + "admin_proposal": { + "$ref": "#/definitions/AdminProposal" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can create denoms, namespaced under the contract's address. A contract may create any number of independent sub-denoms.", + "type": "object", + "required": [ + "create_denom" + ], + "properties": { + "create_denom": { + "type": "object", + "required": [ + "subdenom" + ], + "properties": { + "subdenom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can change the admin of a denom that they are the admin of.", + "type": "object", + "required": [ + "change_admin" + ], + "properties": { + "change_admin": { + "type": "object", + "required": [ + "denom", + "new_admin_address" + ], + "properties": { + "denom": { + "type": "string" + }, + "new_admin_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can mint native tokens for an existing factory denom that they are the admin of.", + "type": "object", + "required": [ + "mint_tokens" + ], + "properties": { + "mint_tokens": { + "type": "object", + "required": [ + "amount", + "denom", + "mint_to_address" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + }, + "mint_to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can burn native tokens for an existing factory denom that they are the admin of. Currently, the burn from address must be the admin contract.", + "type": "object", + "required": [ + "burn_tokens" + ], + "properties": { + "burn_tokens": { + "type": "object", + "required": [ + "amount", + "burn_from_address", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "burn_from_address": { + "description": "Must be set to `\"\"` for now", + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactoryMessage Contracts can force specified `amount` of an existing factory denom that they are admin of to a `transfer_to_address` from a `transfer_from_address`.", + "type": "object", + "required": [ + "force_transfer" + ], + "properties": { + "force_transfer": { + "type": "object", + "required": [ + "amount", + "denom", + "transfer_from_address", + "transfer_to_address" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + }, + "transfer_from_address": { + "type": "string" + }, + "transfer_to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactoryMessage Contracts can set a metadata for of an existing factory denom that they are admin of.", + "type": "object", + "required": [ + "set_denom_metadata" + ], + "properties": { + "set_denom_metadata": { + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "description": "*base** represents the base denom (should be the DenomUnit with exponent = 0).", + "type": "string" + }, + "denom_units": { + "description": "*denom_units** represents the list of DenomUnit's for a given coin", + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "description": "*description** description of a token", + "type": "string" + }, + "display": { + "description": "**display** indicates the suggested denom that should be displayed in clients.", + "type": "string" + }, + "name": { + "description": "*name** defines the name of the token (eg: Cosmos Atom)", + "type": "string" + }, + "symbol": { + "description": "**symbol** is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display.", + "type": "string" + }, + "uri": { + "description": "*uri** to a document (on or off-chain) that contains additional information. Optional.", + "type": "string" + }, + "uri_hash": { + "description": "**uri_hash** is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", + "type": "object", + "required": [ + "add_schedule" + ], + "properties": { + "add_schedule": { + "type": "object", + "required": [ + "msgs", + "name", + "period" + ], + "properties": { + "msgs": { + "description": "list of cosmwasm messages to be executed", + "type": "array", + "items": { + "$ref": "#/definitions/MsgExecuteContract" + } + }, + "name": { + "description": "Name of a new schedule. Needed to be able to `RemoveSchedule` and to log information about it", + "type": "string" + }, + "period": { + "description": "period in blocks with which `msgs` will be executed", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RemoveSchedule removes the schedule with a given `name`. [Permissioned - DAO or Security DAO only]", + "type": "object", + "required": [ + "remove_schedule" + ], + "properties": { + "remove_schedule": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Dex messages", + "type": "object", + "required": [ + "dex" + ], + "properties": { + "dex": { + "$ref": "#/definitions/DexMsg" + } + }, + "additionalProperties": false + } + ] + }, + "ParamChange": { + "description": "ParamChange defines the struct for parameter change request.", + "type": "object", + "required": [ + "key", + "subspace", + "value" + ], + "properties": { + "key": { + "description": "*key** is a name of parameter. Unique for subspace.", + "type": "string" + }, + "subspace": { + "description": "*subspace** is a key of module to which the parameter to change belongs. Unique for each module.", + "type": "string" + }, + "value": { + "description": "*value** is a new value for given parameter. Non unique.", + "type": "string" + } + } + }, + "ParamChangeProposal": { + "description": "ParamChangeProposal defines the struct for single parameter change proposal.", + "type": "object", + "required": [ + "description", + "param_changes", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "param_changes": { + "description": "*param_changes** is a vector of params to be changed. Non unique.", + "type": "array", + "items": { + "$ref": "#/definitions/ParamChange" + } + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "PinCodesProposal": { + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, + "type": "object", + "required": [ + "code_ids", + "description", + "title" + ], + "properties": { + "code_ids": { + "description": "*code_ids** is an array of codes to be pined.", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Plan": { + "description": "Plan defines the struct for planned upgrade.", + "type": "object", + "required": [ + "height", + "info", + "name" + ], + "properties": { + "height": { + "description": "*height** is a height at which the upgrade must be performed", + "type": "integer", + "format": "int64" + }, + "info": { + "description": "*info** is any application specific upgrade info to be included on-chain", + "type": "string" + }, + "name": { + "description": "*name** is a name for the upgrade", + "type": "string" + } + } + }, + "PrecDec": { + "type": "object", + "required": [ + "i" + ], + "properties": { + "i": { + "type": "string" + } + } + }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, + "ProposeMessage": { + "oneOf": [ + { + "type": "object", + "required": [ + "propose" + ], + "properties": { + "propose": { + "type": "object", + "required": [ + "description", + "msgs", + "title" + ], + "properties": { + "description": { + "type": "string" + }, + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_NeutronMsg" + } + }, + "title": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ProtobufAny": { + "description": "Type for wrapping any protobuf message", + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "description": "*type_url** describes the type of the serialized message", + "type": "string" + }, + "value": { + "description": "*value** must be a valid serialized protocol buffer of the above specified type", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + }, + "RequestPacketTimeoutHeight": { + "type": "object", + "properties": { + "revision_height": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "revision_number": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "SoftwareUpgradeProposal": { + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, + "type": "object", + "required": [ + "description", + "plan", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "plan": { + "description": "*plan** is a plan of upgrade.", + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "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" + ] + } + ] + }, + "SudoContractProposal": { + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "msg", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract to be executed.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "msg": { + "description": "**msg*** is a sudo message.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + } + ] + } + } + }, + "UnpinCodesProposal": { + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, + "type": "object", + "required": [ + "code_ids", + "description", + "title" + ], + "properties": { + "code_ids": { + "description": "*code_ids** is an array of codes to be unpined.", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "UpdateAdminProposal": { + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "new_admin", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract to update admin.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "new_admin": { + "description": "**new_admin*** is an address of new admin", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "UpgradeProposal": { + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", + "type": "object", + "required": [ + "description", + "plan", + "title", + "upgraded_client_state" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "plan": { + "description": "*plan** is a plan of upgrade.", + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + }, + "upgraded_client_state": { + "description": "*upgraded_client_state** is an upgraded client state.", + "allOf": [ + { + "$ref": "#/definitions/ProtobufAny" + } + ] + } + } + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "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 + } + ] + } + } + }, + "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 (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "type": "object", + "required": [ + "dao" + ], + "properties": { + "dao": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Gets the module's configuration. Returns `state::Config`.", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Gets the deposit info for the proposal identified by PROPOSAL_ID. Returns `DepositInfoResponse`.", + "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": "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/Empty" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "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" + } + } + }, + "migrate": null, + "sudo": null, + "responses": { + "config": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Config", + "type": "object", + "required": [ + "open_proposal_submission" + ], + "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" + } + ] + }, + "open_proposal_submission": { + "description": "If false, only members (addresses with voting power) may create proposals in the DAO. Otherwise, any address may create a proposal so long as they pay the deposit.", + "type": "boolean" + } + }, + "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" + } + ] + } + } + }, + "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" + } + } + }, + "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" + } + ] + } + }, + "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" + } + ] + } + } + }, + "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" + } + } + }, + "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" + }, + "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" + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/execute.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/execute.json new file mode 100644 index 00000000..3a849e7e --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/execute.json @@ -0,0 +1,2540 @@ +{ + "$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 + }, + { + "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", + "required": [ + "open_proposal_submission" + ], + "properties": { + "deposit_info": { + "anyOf": [ + { + "$ref": "#/definitions/UncheckedDepositInfo" + }, + { + "type": "null" + } + ] + }, + "open_proposal_submission": { + "type": "boolean" + } + } + } + }, + "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 + }, + { + "description": "Handles proposal hook fired by the associated proposal module when a proposal is created. 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_created_hook" + ], + "properties": { + "proposal_created_hook": { + "type": "object", + "required": [ + "proposal_id", + "proposer" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "proposer": { + "type": "string" + } + } + } + }, + "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 + } + ], + "definitions": { + "AdminProposal": { + "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", + "oneOf": [ + { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", + "type": "object", + "required": [ + "param_change_proposal" + ], + "properties": { + "param_change_proposal": { + "$ref": "#/definitions/ParamChangeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to upgrade IBC client", + "type": "object", + "required": [ + "upgrade_proposal" + ], + "properties": { + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to update IBC client", + "type": "object", + "required": [ + "client_update_proposal" + ], + "properties": { + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Proposal to execute CosmosMsg.", + "type": "object", + "required": [ + "proposal_execute_message" + ], + "properties": { + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, + "type": "object", + "required": [ + "software_upgrade_proposal" + ], + "properties": { + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, + "type": "object", + "required": [ + "pin_codes_proposal" + ], + "properties": { + "pin_codes_proposal": { + "$ref": "#/definitions/PinCodesProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, + "type": "object", + "required": [ + "unpin_codes_proposal" + ], + "properties": { + "unpin_codes_proposal": { + "$ref": "#/definitions/UnpinCodesProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, + "type": "object", + "required": [ + "sudo_contract_proposal" + ], + "properties": { + "sudo_contract_proposal": { + "$ref": "#/definitions/SudoContractProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, + "type": "object", + "required": [ + "update_admin_proposal" + ], + "properties": { + "update_admin_proposal": { + "$ref": "#/definitions/UpdateAdminProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, + "type": "object", + "required": [ + "clear_admin_proposal" + ], + "properties": { + "clear_admin_proposal": { + "$ref": "#/definitions/ClearAdminProposal" + } + }, + "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" + }, + "CancelSoftwareUpgradeProposal": { + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, + "type": "object", + "required": [ + "description", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "ClearAdminProposal": { + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract admin will be removed.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "ClientUpdateProposal": { + "description": "ClientUpdateProposal defines the struct for client update proposal.", + "type": "object", + "required": [ + "description", + "subject_client_id", + "substitute_client_id", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "subject_client_id": { + "description": "*subject_client_id** is a subject client id.", + "type": "string" + }, + "substitute_client_id": { + "description": "*substitute_client_id** is a substitute client id.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CosmosMsg_for_NeutronMsg": { + "oneOf": [ + { + "type": "object", + "required": [ + "bank" + ], + "properties": { + "bank": { + "$ref": "#/definitions/BankMsg" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "$ref": "#/definitions/NeutronMsg" + } + }, + "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 + } + ] + }, + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + "DepositOption": { + "type": "object", + "required": [ + "disable_swap" + ], + "properties": { + "disable_swap": { + "type": "boolean" + } + } + }, + "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 + }, + { + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `cwd_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "type": "object", + "required": [ + "voting_module_token" + ], + "properties": { + "voting_module_token": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "DexMsg": { + "oneOf": [ + { + "description": "Deposit provides liquidity to a specific trading pair by depositing tokens at a specific price into one or both sides of the pair in “a liquidity pool”", + "type": "object", + "required": [ + "deposit" + ], + "properties": { + "deposit": { + "type": "object", + "required": [ + "amounts_a", + "amounts_b", + "fees", + "options", + "receiver", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "amounts_a": { + "description": "Amounts of tokenA to deposit", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "amounts_b": { + "description": "Amounts of tokenB to deposit", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "fees": { + "description": "Fees to use for each deposit", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "options": { + "description": "Additional deposit options", + "type": "array", + "items": { + "$ref": "#/definitions/DepositOption" + } + }, + "receiver": { + "description": "The account to which PoolShares will be issued", + "type": "string" + }, + "tick_indexes_a_to_b": { + "description": "Tick indexes to deposit at defined in terms of TokenA to TokenB (ie. TokenA is on the left)", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "description": "Denom for one side of the deposit", + "type": "string" + }, + "token_b": { + "description": "Denom for the opposing side of the deposit", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Withdraw is used to redeem PoolShares for the user’s pro-rata portion of tokens within a liquidity pool. Users can withdraw from a pool at any time", + "type": "object", + "required": [ + "withdrawal" + ], + "properties": { + "withdrawal": { + "type": "object", + "required": [ + "fees", + "receiver", + "shares_to_remove", + "tick_indexes_a_to_b", + "token_a", + "token_b" + ], + "properties": { + "fees": { + "description": "Fee for the target LiquidityPools", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "receiver": { + "description": "The account to which the tokens are credited", + "type": "string" + }, + "shares_to_remove": { + "description": "Amount of shares to remove from each pool", + "type": "array", + "items": { + "$ref": "#/definitions/Uint128" + } + }, + "tick_indexes_a_to_b": { + "description": "Tick indexes of the target LiquidityPools defined in terms of TokenA to TokenB (ie. TokenA is on the left)", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "token_a": { + "description": "Denom for one side of the deposit", + "type": "string" + }, + "token_b": { + "description": "Denom for the opposing side of the deposit", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "PlaceLimitOrder provides the primary mechanism for trading on the Duality Dex. Limit orders can provide liquidity to the Dex (“Maker Limit Orders”) and/or can be used to trade against preexisting liquidity (“Taker Limit Orders”)", + "type": "object", + "required": [ + "place_limit_order" + ], + "properties": { + "place_limit_order": { + "type": "object", + "required": [ + "amount_in", + "order_type", + "receiver", + "tick_index_in_to_out", + "token_in", + "token_out" + ], + "properties": { + "amount_in": { + "description": "Amount of TokenIn to be traded", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "expiration_time": { + "description": "Expiration time for order. Only valid for GOOD_TIL_TIME limit orders", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "max_amount_out": { + "description": "Maximum amount of TokenB can be bought. For everything except JUST_IN_TIME OrderType", + "anyOf": [ + { + "$ref": "#/definitions/Uint128" + }, + { + "type": "null" + } + ] + }, + "order_type": { + "description": "Type of limit order to be used. Must be one of: GOOD_TIL_CANCELLED, FILL_OR_KILL, IMMEDIATE_OR_CANCEL, JUST_IN_TIME, or GOOD_TIL_TIME", + "allOf": [ + { + "$ref": "#/definitions/LimitOrderType" + } + ] + }, + "receiver": { + "description": "Account to which TokenOut is credited or that will be allowed to withdraw or cancel a maker order", + "type": "string" + }, + "tick_index_in_to_out": { + "description": "Limit tick for a limit order, specified in terms of TokenIn to TokenOut", + "type": "integer", + "format": "int64" + }, + "token_in": { + "description": "Token being “sold”", + "type": "string" + }, + "token_out": { + "description": "Token being “bought”", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "WithdrawFilledLimitOrder. Once a limit order has been filled – either partially or in its entirety, it can be withdrawn at any time. Withdrawing from a limit order credits all available proceeds to the user. Withdraw can be called on a limit order multiple times as new proceeds become available", + "type": "object", + "required": [ + "withdraw_filled_limit_order" + ], + "properties": { + "withdraw_filled_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "description": "TrancheKey for the target limit order", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "CancelLimitOrder. Standard Taker limit orders (Good-til-cancelled & Good-til-Time) can be canceled at any time if they have not been completely filled", + "type": "object", + "required": [ + "cancel_limit_order" + ], + "properties": { + "cancel_limit_order": { + "type": "object", + "required": [ + "tranche_key" + ], + "properties": { + "tranche_key": { + "description": "TrancheKey for the target limit order", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "MultiHopSwap provides a swapping mechanism to achieve better prices by routing through a series of pools", + "type": "object", + "required": [ + "multi_hop_swap" + ], + "properties": { + "multi_hop_swap": { + "type": "object", + "required": [ + "amount_in", + "exit_limit_price", + "pick_best_route", + "receiver", + "routes" + ], + "properties": { + "amount_in": { + "description": "Amount of TokenIn to swap", + "allOf": [ + { + "$ref": "#/definitions/Uint128" + } + ] + }, + "exit_limit_price": { + "description": "Minimum price that that must be satisfied for a route to succeed", + "allOf": [ + { + "$ref": "#/definitions/PrecDec" + } + ] + }, + "pick_best_route": { + "description": "If true all routes are run and the route with the best price is used", + "type": "boolean" + }, + "receiver": { + "description": "Account to which TokenOut is credited", + "type": "string" + }, + "routes": { + "description": "Array of possible routes", + "type": "array", + "items": { + "$ref": "#/definitions/MultiHopRoute" + } + } + } + } + }, + "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 + } + ] + }, + "IbcFee": { + "description": "IbcFee defines struct for fees that refund the relayer for `SudoMsg` messages submission. Unused fee kind will be returned back to message sender. Please refer to these links for more information: IBC transaction structure - General mechanics of fee payments - ", + "type": "object", + "required": [ + "ack_fee", + "recv_fee", + "timeout_fee" + ], + "properties": { + "ack_fee": { + "description": "*ack_fee** is an amount of coins to refund relayer for submitting ack message for a particular IBC packet.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "recv_fee": { + "description": "**recv_fee** currently is used for compatibility with ICS-29 interface only and must be set to zero (i.e. 0untrn), because Neutron's fee module can't refund relayer for submission of Recv IBC packets due to compatibility with target chains.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "timeout_fee": { + "description": "*timeout_fee** amount of coins to refund relayer for submitting timeout message for a particular IBC packet.", + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + } + } + }, + "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 + } + } + }, + "KVKey": { + "description": "Describes a KV key for which you want to get value from the storage on remote chain", + "type": "object", + "required": [ + "key", + "path" + ], + "properties": { + "key": { + "description": "*key** is a key you want to read from the storage", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "path": { + "description": "*path** is a path to the storage (storage prefix) where you want to read value by key (usually name of cosmos-packages module: 'staking', 'bank', etc.)", + "type": "string" + } + } + }, + "LimitOrderType": { + "oneOf": [ + { + "description": "Good-til-Cancelled limit orders are hybrid maker and taker limit orders. They will attempt to trade the supplied AmountIn at the TickIndex or better. However, if they total AmountIn cannot be traded at the limit price they are remaining amount will be placed as a maker limit order. The proceeds from the taker portion are deposited into the user’s account immediately, however, the proceeds from the maker portion must be explicitly withdrawn via WithdrawLimitOrder.", + "type": "string", + "enum": [ + "GOOD_TIL_CANCELLED" + ] + }, + { + "description": "Fill-or-Kill limit orders are taker limit orders that either successfully swap 100% of the supplied AmountIn or return an error. If there is insufficient liquidity to complete the trade at or above the supplied TickIndex a Fill-or-Kill order will return an error `codespace: dex, code: 1134` (https://github.com/neutron-org/neutron/blob/main/x/dex/types/errors.go#L107 ErrGoodTilOrderWithoutExpiration).", + "type": "string", + "enum": [ + "FILL_OR_KILL" + ] + }, + { + "description": "Immediate-or-Cancel limit orders are taker orders that will swap as much as of the AmountIn as possible given available liquidity above the supplied TickIndex. Unlike Fill-or-Kill orders they will still successfully complete even if they are only able to partially trade through the AmountIn at the TickIndex or better.", + "type": "string", + "enum": [ + "IMMEDIATE_OR_CANCEL" + ] + }, + { + "description": "Just-in-Time limit orders are an advanced maker limit order that provides tradeable liquidity for exactly one block. At the end of the same block in which the Just-in-Time order was submitted the order is canceled and any untraded portion will no longer be usable as active liquidity.", + "type": "string", + "enum": [ + "JUST_IN_TIME" + ] + }, + { + "description": "Good-til-Time limit order function exactly the same as Good-til-Cancelled limit orders first trying to trade as a taker limit order and then placing any remaining amount as a maker limit order. However, the maker portion of the limit order has a specified ExpirationTime. After the ExpirationTime the order will be cancelled and can no longer be traded against. When withdrawing a Good-til-Time limit order the user will receive both the successfully traded portion of the limit order (TokenOut) as well as any remaining untraded amount (TokenIn).", + "type": "string", + "enum": [ + "GOOD_TIL_TIME" + ] + } + ] + }, + "MsgExecuteContract": { + "description": "MsgExecuteContract defines a call to the contract execution", + "type": "object", + "required": [ + "contract", + "msg" + ], + "properties": { + "contract": { + "description": "*contract** is a contract address that will be called", + "type": "string" + }, + "msg": { + "description": "*msg** is a contract call message", + "type": "string" + } + } + }, + "MultiHopRoute": { + "type": "object", + "required": [ + "hops" + ], + "properties": { + "hops": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NeutronMsg": { + "description": "A number of Custom messages that can call into the Neutron bindings.", + "oneOf": [ + { + "description": "RegisterInterchainAccount registers an interchain account on remote chain.", + "type": "object", + "required": [ + "register_interchain_account" + ], + "properties": { + "register_interchain_account": { + "type": "object", + "required": [ + "connection_id", + "interchain_account_id" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "interchain_account_id": { + "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", + "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } + } + } + } + }, + "additionalProperties": false + }, + { + "description": "SubmitTx starts the process of executing any Cosmos-SDK *msgs* on remote chain.", + "type": "object", + "required": [ + "submit_tx" + ], + "properties": { + "submit_tx": { + "type": "object", + "required": [ + "connection_id", + "fee", + "interchain_account_id", + "memo", + "msgs", + "timeout" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "fee": { + "description": "**fee** is an ibc fee for the transaction.", + "allOf": [ + { + "$ref": "#/definitions/IbcFee" + } + ] + }, + "interchain_account_id": { + "description": "*interchain_account_id** is an identifier of your interchain account from which you want to execute msgs.", + "type": "string" + }, + "memo": { + "description": "*memo** is a memo you want to attach to your interchain transaction.It behaves like a memo in usual Cosmos transaction.", + "type": "string" + }, + "msgs": { + "description": "*msgs** is a list of protobuf encoded Cosmos-SDK messages you want to execute on remote chain.", + "type": "array", + "items": { + "$ref": "#/definitions/ProtobufAny" + } + }, + "timeout": { + "description": "*timeout** is a timeout in seconds after which the packet times out.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RegisterInterchainQuery registers an interchain query.", + "type": "object", + "required": [ + "register_interchain_query" + ], + "properties": { + "register_interchain_query": { + "type": "object", + "required": [ + "connection_id", + "keys", + "query_type", + "transactions_filter", + "update_period" + ], + "properties": { + "connection_id": { + "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain.", + "type": "string" + }, + "keys": { + "description": "*keys** is the KV-storage keys for which we want to get values from remote chain.", + "type": "array", + "items": { + "$ref": "#/definitions/KVKey" + } + }, + "query_type": { + "description": "*query_type** is a query type identifier ('tx' or 'kv' for now).", + "type": "string" + }, + "transactions_filter": { + "description": "*transactions_filter** is the filter for transaction search ICQ.", + "type": "string" + }, + "update_period": { + "description": "*update_period** is used to say how often the query must be updated.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RegisterInterchainQuery updates an interchain query.", + "type": "object", + "required": [ + "update_interchain_query" + ], + "properties": { + "update_interchain_query": { + "type": "object", + "required": [ + "query_id" + ], + "properties": { + "new_keys": { + "description": "*new_keys** is the new query keys to retrive.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/KVKey" + } + }, + "new_transactions_filter": { + "description": "*new_transactions_filter** is a new transactions filter of the query.", + "type": [ + "string", + "null" + ] + }, + "new_update_period": { + "description": "*new_update_period** is a new update period of the query.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "query_id": { + "description": "*query_id** is the ID of the query we want to update.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RemoveInterchainQuery removes as interchain query.", + "type": "object", + "required": [ + "remove_interchain_query" + ], + "properties": { + "remove_interchain_query": { + "type": "object", + "required": [ + "query_id" + ], + "properties": { + "query_id": { + "description": "*query_id** is ID of the query we want to remove.", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "IbcTransfer sends a fungible token packet over IBC.", + "type": "object", + "required": [ + "ibc_transfer" + ], + "properties": { + "ibc_transfer": { + "type": "object", + "required": [ + "fee", + "memo", + "receiver", + "sender", + "source_channel", + "source_port", + "timeout_height", + "timeout_timestamp", + "token" + ], + "properties": { + "fee": { + "$ref": "#/definitions/IbcFee" + }, + "memo": { + "type": "string" + }, + "receiver": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "source_channel": { + "type": "string" + }, + "source_port": { + "type": "string" + }, + "timeout_height": { + "$ref": "#/definitions/RequestPacketTimeoutHeight" + }, + "timeout_timestamp": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "token": { + "$ref": "#/definitions/Coin" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "SubmitAdminProposal sends a proposal to neutron's Admin module. This type of messages can be only executed by Neutron DAO.", + "type": "object", + "required": [ + "submit_admin_proposal" + ], + "properties": { + "submit_admin_proposal": { + "type": "object", + "required": [ + "admin_proposal" + ], + "properties": { + "admin_proposal": { + "$ref": "#/definitions/AdminProposal" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can create denoms, namespaced under the contract's address. A contract may create any number of independent sub-denoms.", + "type": "object", + "required": [ + "create_denom" + ], + "properties": { + "create_denom": { + "type": "object", + "required": [ + "subdenom" + ], + "properties": { + "subdenom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can change the admin of a denom that they are the admin of.", + "type": "object", + "required": [ + "change_admin" + ], + "properties": { + "change_admin": { + "type": "object", + "required": [ + "denom", + "new_admin_address" + ], + "properties": { + "denom": { + "type": "string" + }, + "new_admin_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can mint native tokens for an existing factory denom that they are the admin of.", + "type": "object", + "required": [ + "mint_tokens" + ], + "properties": { + "mint_tokens": { + "type": "object", + "required": [ + "amount", + "denom", + "mint_to_address" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + }, + "mint_to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can burn native tokens for an existing factory denom that they are the admin of. Currently, the burn from address must be the admin contract.", + "type": "object", + "required": [ + "burn_tokens" + ], + "properties": { + "burn_tokens": { + "type": "object", + "required": [ + "amount", + "burn_from_address", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "burn_from_address": { + "description": "Must be set to `\"\"` for now", + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactoryMessage Contracts can force specified `amount` of an existing factory denom that they are admin of to a `transfer_to_address` from a `transfer_from_address`.", + "type": "object", + "required": [ + "force_transfer" + ], + "properties": { + "force_transfer": { + "type": "object", + "required": [ + "amount", + "denom", + "transfer_from_address", + "transfer_to_address" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + }, + "transfer_from_address": { + "type": "string" + }, + "transfer_to_address": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "TokenFactoryMessage Contracts can set a metadata for of an existing factory denom that they are admin of.", + "type": "object", + "required": [ + "set_denom_metadata" + ], + "properties": { + "set_denom_metadata": { + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "description": "*base** represents the base denom (should be the DenomUnit with exponent = 0).", + "type": "string" + }, + "denom_units": { + "description": "*denom_units** represents the list of DenomUnit's for a given coin", + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "description": "*description** description of a token", + "type": "string" + }, + "display": { + "description": "**display** indicates the suggested denom that should be displayed in clients.", + "type": "string" + }, + "name": { + "description": "*name** defines the name of the token (eg: Cosmos Atom)", + "type": "string" + }, + "symbol": { + "description": "**symbol** is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display.", + "type": "string" + }, + "uri": { + "description": "*uri** to a document (on or off-chain) that contains additional information. Optional.", + "type": "string" + }, + "uri_hash": { + "description": "**uri_hash** is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional.", + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", + "type": "object", + "required": [ + "add_schedule" + ], + "properties": { + "add_schedule": { + "type": "object", + "required": [ + "msgs", + "name", + "period" + ], + "properties": { + "msgs": { + "description": "list of cosmwasm messages to be executed", + "type": "array", + "items": { + "$ref": "#/definitions/MsgExecuteContract" + } + }, + "name": { + "description": "Name of a new schedule. Needed to be able to `RemoveSchedule` and to log information about it", + "type": "string" + }, + "period": { + "description": "period in blocks with which `msgs` will be executed", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "RemoveSchedule removes the schedule with a given `name`. [Permissioned - DAO or Security DAO only]", + "type": "object", + "required": [ + "remove_schedule" + ], + "properties": { + "remove_schedule": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Dex messages", + "type": "object", + "required": [ + "dex" + ], + "properties": { + "dex": { + "$ref": "#/definitions/DexMsg" + } + }, + "additionalProperties": false + } + ] + }, + "ParamChange": { + "description": "ParamChange defines the struct for parameter change request.", + "type": "object", + "required": [ + "key", + "subspace", + "value" + ], + "properties": { + "key": { + "description": "*key** is a name of parameter. Unique for subspace.", + "type": "string" + }, + "subspace": { + "description": "*subspace** is a key of module to which the parameter to change belongs. Unique for each module.", + "type": "string" + }, + "value": { + "description": "*value** is a new value for given parameter. Non unique.", + "type": "string" + } + } + }, + "ParamChangeProposal": { + "description": "ParamChangeProposal defines the struct for single parameter change proposal.", + "type": "object", + "required": [ + "description", + "param_changes", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "param_changes": { + "description": "*param_changes** is a vector of params to be changed. Non unique.", + "type": "array", + "items": { + "$ref": "#/definitions/ParamChange" + } + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "PinCodesProposal": { + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, + "type": "object", + "required": [ + "code_ids", + "description", + "title" + ], + "properties": { + "code_ids": { + "description": "*code_ids** is an array of codes to be pined.", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Plan": { + "description": "Plan defines the struct for planned upgrade.", + "type": "object", + "required": [ + "height", + "info", + "name" + ], + "properties": { + "height": { + "description": "*height** is a height at which the upgrade must be performed", + "type": "integer", + "format": "int64" + }, + "info": { + "description": "*info** is any application specific upgrade info to be included on-chain", + "type": "string" + }, + "name": { + "description": "*name** is a name for the upgrade", + "type": "string" + } + } + }, + "PrecDec": { + "type": "object", + "required": [ + "i" + ], + "properties": { + "i": { + "type": "string" + } + } + }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, + "ProposeMessage": { + "oneOf": [ + { + "type": "object", + "required": [ + "propose" + ], + "properties": { + "propose": { + "type": "object", + "required": [ + "description", + "msgs", + "title" + ], + "properties": { + "description": { + "type": "string" + }, + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/CosmosMsg_for_NeutronMsg" + } + }, + "title": { + "type": "string" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "ProtobufAny": { + "description": "Type for wrapping any protobuf message", + "type": "object", + "required": [ + "type_url", + "value" + ], + "properties": { + "type_url": { + "description": "*type_url** describes the type of the serialized message", + "type": "string" + }, + "value": { + "description": "*value** must be a valid serialized protocol buffer of the above specified type", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + }, + "RequestPacketTimeoutHeight": { + "type": "object", + "properties": { + "revision_height": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "revision_number": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "SoftwareUpgradeProposal": { + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, + "type": "object", + "required": [ + "description", + "plan", + "title" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal. Non unique.", + "type": "string" + }, + "plan": { + "description": "*plan** is a plan of upgrade.", + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal. Non unique.", + "type": "string" + } + } + }, + "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" + ] + } + ] + }, + "SudoContractProposal": { + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "msg", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract to be executed.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "msg": { + "description": "**msg*** is a sudo message.", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "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" + } + ] + } + } + }, + "UnpinCodesProposal": { + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, + "type": "object", + "required": [ + "code_ids", + "description", + "title" + ], + "properties": { + "code_ids": { + "description": "*code_ids** is an array of codes to be unpined.", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "UpdateAdminProposal": { + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, + "type": "object", + "required": [ + "contract", + "description", + "new_admin", + "title" + ], + "properties": { + "contract": { + "description": "*contract** is an address of contract to update admin.", + "type": "string" + }, + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "new_admin": { + "description": "**new_admin*** is an address of new admin", + "type": "string" + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + } + } + }, + "UpgradeProposal": { + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", + "type": "object", + "required": [ + "description", + "plan", + "title", + "upgraded_client_state" + ], + "properties": { + "description": { + "description": "*description** is a text description of proposal.", + "type": "string" + }, + "plan": { + "description": "*plan** is a plan of upgrade.", + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + }, + "title": { + "description": "*title** is a text title of proposal.", + "type": "string" + }, + "upgraded_client_state": { + "description": "*upgraded_client_state** is an upgraded client state.", + "allOf": [ + { + "$ref": "#/definitions/ProtobufAny" + } + ] + } + } + }, + "VoteOption": { + "type": "string", + "enum": [ + "yes", + "no", + "abstain", + "no_with_veto" + ] + }, + "WasmMsg": { + "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", + "oneOf": [ + { + "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "execute" + ], + "properties": { + "execute": { + "type": "object", + "required": [ + "contract_addr", + "funds", + "msg" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "msg": { + "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", + "type": "object", + "required": [ + "instantiate" + ], + "properties": { + "instantiate": { + "type": "object", + "required": [ + "code_id", + "funds", + "label", + "msg" + ], + "properties": { + "admin": { + "type": [ + "string", + "null" + ] + }, + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "funds": { + "type": "array", + "items": { + "$ref": "#/definitions/Coin" + } + }, + "label": { + "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", + "type": "string" + }, + "msg": { + "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", + "allOf": [ + { + "$ref": "#/definitions/Binary" + } + ] + } + } + } + }, + "additionalProperties": false + }, + { + "description": "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 + } + ] + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/instantiate.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/instantiate.json new file mode 100644 index 00000000..cae0ab79 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/instantiate.json @@ -0,0 +1,161 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "open_proposal_submission" + ], + "properties": { + "deposit_info": { + "description": "Information about the deposit requirements for this module. None if no deposit.", + "anyOf": [ + { + "$ref": "#/definitions/UncheckedDepositInfo" + }, + { + "type": "null" + } + ] + }, + "open_proposal_submission": { + "description": "If false, only members (addresses with voting power) may create proposals in the DAO. Otherwise, any address may create a proposal so long as they pay the deposit.", + "type": "boolean" + } + }, + "definitions": { + "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 + }, + { + "description": "Use the token address of the associated DAO's voting module. NOTE: in order to use the token address of the voting module the voting module must (1) use a cw20 token and (2) implement the `TokenContract {}` query type defined by `cwd_macros::token_query`. Failing to implement that and using this option will cause instantiation to fail.", + "type": "object", + "required": [ + "voting_module_token" + ], + "properties": { + "voting_module_token": { + "type": "object" + } + }, + "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" + } + ] + } + } + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/query.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/query.json new file mode 100644 index 00000000..4a69bb14 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/query.json @@ -0,0 +1,100 @@ +{ + "$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 (cw-dao-core) module this contract is associated with. Returns `Addr`.", + "type": "object", + "required": [ + "dao" + ], + "properties": { + "dao": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Gets the module's configuration. Returns `state::Config`.", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Gets the deposit info for the proposal identified by PROPOSAL_ID. Returns `DepositInfoResponse`.", + "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": "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/Empty" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Empty": { + "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", + "type": "object" + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_config.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_config.json new file mode 100644 index 00000000..aebb6dd7 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_config.json @@ -0,0 +1,127 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Config", + "type": "object", + "required": [ + "open_proposal_submission" + ], + "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" + } + ] + }, + "open_proposal_submission": { + "description": "If false, only members (addresses with voting power) may create proposals in the DAO. Otherwise, any address may create a proposal so long as they pay the deposit.", + "type": "boolean" + } + }, + "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" + } + ] + } + } + }, + "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" + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_dao.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_dao.json new file mode 100644 index 00000000..4c7f1934 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_dao.json @@ -0,0 +1,6 @@ +{ + "$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" +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_deposit_info.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_deposit_info.json new file mode 100644 index 00000000..76590d23 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_deposit_info.json @@ -0,0 +1,130 @@ +{ + "$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" + } + ] + } + }, + "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" + } + ] + } + } + }, + "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" + } + } +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_proposal_module.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_proposal_module.json new file mode 100644 index 00000000..4c7f1934 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_proposal_module.json @@ -0,0 +1,6 @@ +{ + "$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" +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_query_extension.json b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_query_extension.json new file mode 100644 index 00000000..a46573aa --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/schema/raw/response_to_query_extension.json @@ -0,0 +1,6 @@ +{ + "$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" +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/contract.rs b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/contract.rs new file mode 100644 index 00000000..21d609a9 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/contract.rs @@ -0,0 +1,137 @@ +#[cfg(not(feature = "library"))] +use cosmwasm_std::entry_point; +use cosmwasm_std::{ + from_json, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Response, StdResult, + WasmMsg, +}; +use cw2::set_contract_version; +use neutron_sdk::bindings::msg::NeutronMsg; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +use cwd_pre_propose_base::{ + error::PreProposeError, + msg::{ExecuteMsg as ExecuteBase, InstantiateMsg as InstantiateBase, QueryMsg as QueryBase}, + state::PreProposeContract, +}; +use neutron_drop_security_subdao_pre_propose::msg::{ + ExecuteMsgPause, ExecuteMsgUnpause, MigrateMsg, +}; +use neutron_drop_security_subdao_pre_propose::types::ProposeMessage; +pub type InstantiateMsg = InstantiateBase; +pub type ExecuteMsg = ExecuteBase; +pub type QueryMsg = QueryBase; + +pub(crate) const CONTRACT_NAME: &str = "crates.io:cwd-drop-security-subdao-pre-propose"; +pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +/// Internal version of the propose message that includes the +/// `proposer` field. The module will fill this in based on the sender +/// of the external message. +#[derive(Serialize, JsonSchema, Deserialize, Debug, Clone)] +#[serde(rename_all = "snake_case")] +enum ProposeMessageInternal { + Propose { + title: String, + description: String, + msgs: Vec>, + proposer: Option, + }, +} + +type PrePropose = PreProposeContract; + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn instantiate( + mut deps: DepsMut, + env: Env, + info: MessageInfo, + msg: InstantiateMsg, +) -> Result { + let resp = PrePropose::default().instantiate(deps.branch(), env, info, msg)?; + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(resp) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn execute( + deps: DepsMut, + env: Env, + info: MessageInfo, + msg: ExecuteMsg, +) -> Result { + // We don't want to expose the `proposer` field on the propose + // message externally as that is to be set by this module. Here, + // we transform an external message which omits that field into an + // internal message which sets it. + type ExecuteInternal = ExecuteBase; + let internalized = match msg { + ExecuteMsg::Propose { + msg: + ProposeMessage::Propose { + title, + description, + msgs, + }, + } => { + for msg in &msgs { + match msg { + CosmosMsg::Wasm(WasmMsg::Execute { msg, funds, .. }) => { + if (from_json::(msg).is_err() + && from_json::(msg).is_err()) + || !funds.is_empty() + { + return Err(PreProposeError::MalformedProposal {}); + } + } + _ => return Err(PreProposeError::MalformedProposal {}), + } + } + + ExecuteInternal::Propose { + msg: ProposeMessageInternal::Propose { + // Fill in proposer based on message sender. + proposer: Some(info.sender.to_string()), + title, + description, + msgs, + }, + } + } + ExecuteMsg::Withdraw { denom } => ExecuteInternal::Withdraw { denom }, + ExecuteMsg::UpdateConfig { + deposit_info, + open_proposal_submission, + } => ExecuteInternal::UpdateConfig { + deposit_info, + open_proposal_submission, + }, + ExecuteMsg::ProposalCreatedHook { + proposal_id, + proposer, + } => ExecuteInternal::ProposalCreatedHook { + proposal_id, + proposer, + }, + ExecuteMsg::ProposalCompletedHook { + proposal_id, + new_status, + } => ExecuteInternal::ProposalCompletedHook { + proposal_id, + new_status, + }, + }; + + PrePropose::default().execute(deps, env, info, internalized) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { + PrePropose::default().query(deps, env, msg) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(Response::default()) +} diff --git a/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/lib.rs b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/lib.rs new file mode 100644 index 00000000..2943dbb5 --- /dev/null +++ b/contracts/subdaos/pre-propose/cwd-drop-security-subdao-pre-propose/src/lib.rs @@ -0,0 +1 @@ +pub mod contract; diff --git a/contracts/tokenomics/reserve/schema/neutron-reserve.json b/contracts/tokenomics/reserve/schema/neutron-reserve.json index 1b1917e3..e7367431 100644 --- a/contracts/tokenomics/reserve/schema/neutron-reserve.json +++ b/contracts/tokenomics/reserve/schema/neutron-reserve.json @@ -1,6 +1,6 @@ { "contract_name": "neutron-reserve", - "contract_version": "0.1.2", + "contract_version": "0.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/packages/neutron-drop-security-subdao-pre-propose/Cargo.toml b/packages/neutron-drop-security-subdao-pre-propose/Cargo.toml new file mode 100644 index 00000000..2f082d49 --- /dev/null +++ b/packages/neutron-drop-security-subdao-pre-propose/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "neutron-drop-security-subdao-pre-propose" +version = "0.1.0" +authors = ["Sergey Ratiashvivli "] +edition = "2021" +license = "Apache-2.0" +repository = "https://github.com/neutron/neutron-dao" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cwd-pre-propose-base = { version = "*", path = "../cwd-pre-propose-base" } +cw-utils = { version = "1.0.1" } +schemars = "0.8.8" +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +cosmwasm-std = { version = "1.3.0" } +neutron-sdk = "0.10.0" +cwd-voting = { path = "../cwd-voting" } +cwd-interface = { path = "../cwd-interface" } diff --git a/packages/neutron-drop-security-subdao-pre-propose/src/lib.rs b/packages/neutron-drop-security-subdao-pre-propose/src/lib.rs new file mode 100644 index 00000000..c413ff51 --- /dev/null +++ b/packages/neutron-drop-security-subdao-pre-propose/src/lib.rs @@ -0,0 +1,2 @@ +pub mod msg; +pub mod types; diff --git a/packages/neutron-drop-security-subdao-pre-propose/src/msg.rs b/packages/neutron-drop-security-subdao-pre-propose/src/msg.rs new file mode 100644 index 00000000..12eb8354 --- /dev/null +++ b/packages/neutron-drop-security-subdao-pre-propose/src/msg.rs @@ -0,0 +1,19 @@ +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct MigrateMsg {} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ExecuteMsgPause { + /// Pauses the DROP instance + Pause {}, +} +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum ExecuteMsgUnpause { + /// Unpauses the DROP instance + Unpause {}, +} diff --git a/packages/neutron-drop-security-subdao-pre-propose/src/types.rs b/packages/neutron-drop-security-subdao-pre-propose/src/types.rs new file mode 100644 index 00000000..9f23d592 --- /dev/null +++ b/packages/neutron-drop-security-subdao-pre-propose/src/types.rs @@ -0,0 +1,14 @@ +use cosmwasm_std::CosmosMsg; +use neutron_sdk::bindings::msg::NeutronMsg; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, JsonSchema, Deserialize, Debug, Clone)] +#[serde(rename_all = "snake_case")] +pub enum ProposeMessage { + Propose { + title: String, + description: String, + msgs: Vec>, + }, +}