Skip to content

Commit

Permalink
Merge pull request #2032 from CosmWasm/2009-msg_responses-docs
Browse files Browse the repository at this point in the history
Add docs to `msg_responses`
  • Loading branch information
chipshort authored Feb 27, 2024
2 parents 425c6ba + 96f6a65 commit 453f297
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
}
},
"msg_responses": {
"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",
"default": [],
"type": "array",
"items": {
Expand Down
1 change: 1 addition & 0 deletions contracts/reflect/schema/reflect.json
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,7 @@
}
},
"msg_responses": {
"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",
"default": [],
"type": "array",
"items": {
Expand Down
7 changes: 7 additions & 0 deletions packages/std/src/results/submessages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@ pub struct SubMsgResponse {
pub events: Vec<Event>,
#[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<Binary>,
/// 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`.
///
/// [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
#[serde(default)]
pub msg_responses: Vec<MsgResponse>,
}
Expand Down

0 comments on commit 453f297

Please sign in to comment.