From 9fd98903ecbe02d892dfd86ede20ec55203fe434 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 14:46:34 +0100 Subject: [PATCH 1/3] docs: provide a list of all built-in capabilities --- docs/CAPABILITIES-BUILT-IN.md | 17 +++++++++++++++++ docs/CAPABILITIES.md | 11 +---------- 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 docs/CAPABILITIES-BUILT-IN.md diff --git a/docs/CAPABILITIES-BUILT-IN.md b/docs/CAPABILITIES-BUILT-IN.md new file mode 100644 index 0000000000..c3e425e554 --- /dev/null +++ b/docs/CAPABILITIES-BUILT-IN.md @@ -0,0 +1,17 @@ +# Built-in capabilities + +Since capabilities can be created between contract and environment, we don't +know them all in the VM. This is a list of all built-in capabilities, but chains +might define others. + +- `iterator` is for storage backends that allow range queries. Not all types of + databases do that. There are trees that don't allow it and Secret Network does + not support iterators for other technical reasons. +- `stargate` is for messages and queries that came with the Cosmos SDK upgrade + "Stargate". It primarily includes protobuf messages and IBC support. +- `staking` is for chains with the Cosmos SDK staking module. There are Cosmos + chains that don't use this (e.g. Tgrade). +- `cosmwasm_1_1` enables the `BankQuery::Supply` query. Only chains running + CosmWasm `1.1.0` or higher support this query. +- `cosmwasm_1_2` enables the `GovMsg::VoteWeighted` message. Only chains running + CosmWasm `1.2.0` or higher support this query. diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 2679f5dd7c..0886d15b64 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -83,16 +83,7 @@ underscores. ## Common capabilities -Here is a list of capabilities created in the past. Since capabilities can be -created between contract and environment, we don't know them all in the VM. - -- `iterator` is for storage backends that allow range queries. Not all types of - databases do that. There are trees that don't allow it and Secret Network does - not support iterators for other technical reasons. -- `stargate` is for messages and queries that came with the Cosmos SDK upgrade - "Stargate". It primarily includes protobuf messages and IBC support. -- `staking` is for chains with the Cosmos SDK staking module. There are Cosmos - chains that don't use this (e.g. Tgrade). +Here is a list of all [built-in capabilities](CAPABILITIES-BUILT-IN.md). ## What's a good capability? From 6cbfcaa6d457862e19e4e227e031430db574ac82 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 14:48:43 +0100 Subject: [PATCH 2/3] typo --- docs/CAPABILITIES-BUILT-IN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CAPABILITIES-BUILT-IN.md b/docs/CAPABILITIES-BUILT-IN.md index c3e425e554..f0cabc280b 100644 --- a/docs/CAPABILITIES-BUILT-IN.md +++ b/docs/CAPABILITIES-BUILT-IN.md @@ -12,6 +12,6 @@ might define others. - `staking` is for chains with the Cosmos SDK staking module. There are Cosmos chains that don't use this (e.g. Tgrade). - `cosmwasm_1_1` enables the `BankQuery::Supply` query. Only chains running - CosmWasm `1.1.0` or higher support this query. + CosmWasm `1.1.0` or higher support this. - `cosmwasm_1_2` enables the `GovMsg::VoteWeighted` message. Only chains running - CosmWasm `1.2.0` or higher support this query. + CosmWasm `1.2.0` or higher support this. From 0f4468a3f153da726c42343fbf1722c857487c13 Mon Sep 17 00:00:00 2001 From: Tomasz Kurcz Date: Tue, 22 Nov 2022 15:16:54 +0100 Subject: [PATCH 3/3] Update docs/CAPABILITIES.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- docs/CAPABILITIES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 0886d15b64..e647274c85 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -81,7 +81,7 @@ function name in Rust and other CosmWasm smart contract languages such as Go. By convention, the name should be short and all lower ASCII alphanumerical plus underscores. -## Common capabilities +## Built-in capabilities Here is a list of all [built-in capabilities](CAPABILITIES-BUILT-IN.md).