Skip to content

Commit 6b5029d

Browse files
committed
Add docs to msg_responses
1 parent 425c6ba commit 6b5029d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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)