Skip to content

Commit 453f297

Browse files
authored
Merge pull request #2032 from CosmWasm/2009-msg_responses-docs
Add docs to `msg_responses`
2 parents 425c6ba + 96f6a65 commit 453f297

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

contracts/reflect/schema/raw/response_to_sub_msg_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
}
117117
},
118118
"msg_responses": {
119+
"description": "The responses from the messages emitted by the submessage. In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message]. However, wasmd allows chains to translate a single contract message into multiple SDK messages. In that case all the MsgResponses from each are concatenated into this flattened `Vec`.\n\n[MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109 [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023",
119120
"default": [],
120121
"type": "array",
121122
"items": {

contracts/reflect/schema/reflect.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,6 +2041,7 @@
20412041
}
20422042
},
20432043
"msg_responses": {
2044+
"description": "The responses from the messages emitted by the submessage. In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message]. However, wasmd allows chains to translate a single contract message into multiple SDK messages. In that case all the MsgResponses from each are concatenated into this flattened `Vec`.\n\n[MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109 [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023",
20442045
"default": [],
20452046
"type": "array",
20462047
"items": {

packages/std/src/results/submessages.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ pub struct SubMsgResponse {
269269
pub events: Vec<Event>,
270270
#[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."]
271271
pub data: Option<Binary>,
272+
/// The responses from the messages emitted by the submessage.
273+
/// In most cases, this is equivalent to the Cosmos SDK's [MsgResponses], which usually contains a [single message].
274+
/// However, wasmd allows chains to translate a single contract message into multiple SDK messages.
275+
/// In that case all the MsgResponses from each are concatenated into this flattened `Vec`.
276+
///
277+
/// [MsgResponses]: https://github.com/cosmos/cosmos-sdk/blob/316750cc8cd8b3296fa233f4da2e39cbcdc34517/proto/cosmos/base/abci/v1beta1/abci.proto#L106-L109
278+
/// [single message]: https://github.com/cosmos/cosmos-sdk/blob/v0.50.4/baseapp/baseapp.go#L1020-L1023
272279
#[serde(default)]
273280
pub msg_responses: Vec<MsgResponse>,
274281
}

0 commit comments

Comments
 (0)