diff --git a/contracts/reflect/schema/raw/response_to_sub_msg_result.json b/contracts/reflect/schema/raw/response_to_sub_msg_result.json index fa421b99f..3cdcf41dd 100644 --- a/contracts/reflect/schema/raw/response_to_sub_msg_result.json +++ b/contracts/reflect/schema/raw/response_to_sub_msg_result.json @@ -96,7 +96,7 @@ "additionalProperties": false }, "SubMsgResponse": { - "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "description": "The information we get back from a successful sub message execution", "type": "object", "required": [ "events" @@ -114,6 +114,7 @@ ] }, "events": { + "description": "The Cosmos SDK events emitted by the submessage.\n\nThis is only filled if the submessage was itself a [`crate::WasmMsg`]. The reason for this is that events are [not part of consensus] and therefore not guaranteed to be deterministic, so the VM only returns events of wasm messages, which we know are deterministic.\n\n[not part of consensus]: https://github.com/tendermint/tendermint/blob/eed27addecb339cfaeba8fda774e6ab37cdb3774/spec/abci/abci.md#events", "type": "array", "items": { "$ref": "#/definitions/Event" diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index 7d5993456..9a4c0e536 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -2295,7 +2295,7 @@ "additionalProperties": false }, "SubMsgResponse": { - "description": "The information we get back from a successful sub message execution, with full Cosmos SDK events.", + "description": "The information we get back from a successful sub message execution", "type": "object", "required": [ "events" @@ -2313,6 +2313,7 @@ ] }, "events": { + "description": "The Cosmos SDK events emitted by the submessage.\n\nThis is only filled if the submessage was itself a [`crate::WasmMsg`]. The reason for this is that events are [not part of consensus] and therefore not guaranteed to be deterministic, so the VM only returns events of wasm messages, which we know are deterministic.\n\n[not part of consensus]: https://github.com/tendermint/tendermint/blob/eed27addecb339cfaeba8fda774e6ab37cdb3774/spec/abci/abci.md#events", "type": "array", "items": { "$ref": "#/definitions/Event" diff --git a/packages/std/src/results/submessages.rs b/packages/std/src/results/submessages.rs index d3b9175d7..8a1c5221c 100644 --- a/packages/std/src/results/submessages.rs +++ b/packages/std/src/results/submessages.rs @@ -280,10 +280,16 @@ impl From for Result { } } -/// The information we get back from a successful sub message execution, -/// with full Cosmos SDK events. +/// The information we get back from a successful sub message execution #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct SubMsgResponse { + /// The Cosmos SDK events emitted by the submessage. + /// + /// This is only filled if the submessage was itself a [`crate::WasmMsg`]. + /// The reason for this is that events are [not part of consensus] and therefore not guaranteed to be deterministic, + /// so the VM only returns events of wasm messages, which we know are deterministic. + /// + /// [not part of consensus]: https://github.com/tendermint/tendermint/blob/eed27addecb339cfaeba8fda774e6ab37cdb3774/spec/abci/abci.md#events pub events: Vec, #[deprecated = "Deprecated in the Cosmos SDK in favor of msg_responses. If your chain is running on CosmWasm 2.0 or higher, msg_responses will be filled. For older versions, the data field is still needed since msg_responses is empty in those cases."] pub data: Option,