Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SEMANTICS.md About Sub Messages #1556

Open
loloicci opened this issue Dec 23, 2022 · 0 comments
Open

Update SEMANTICS.md About Sub Messages #1556

loloicci opened this issue Dec 23, 2022 · 0 comments

Comments

@loloicci
Copy link
Contributor

loloicci commented Dec 23, 2022

Although https://github.com/CosmWasm/cosmwasm/blob/main/SEMANTICS.md describe that Response has messages field and submessages field (https://github.com/CosmWasm/cosmwasm/blob/main/SEMANTICS.md#basic-execution), latest cosmwasm's Response does not have mesages field (

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[non_exhaustive]
pub struct Response<T = Empty> {
/// Optional list of messages to pass. These will be executed in order.
/// If the ReplyOn variant matches the result (Always, Success on Ok, Error on Err),
/// the runtime will invoke this contract's `reply` entry point
/// after execution. Otherwise, they act like "fire and forget".
/// Use `SubMsg::new` to create messages with the older "fire and forget" semantics.
pub messages: Vec<SubMsg<T>>,
/// The attributes that will be emitted as part of a "wasm" event.
///
/// More info about events (and their attributes) can be found in [*Cosmos SDK* docs].
///
/// [*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html
pub attributes: Vec<Attribute>,
/// Extra, custom events separate from the main `wasm` one. These will have
/// `wasm-` prepended to the type.
///
/// More info about events can be found in [*Cosmos SDK* docs].
///
/// [*Cosmos SDK* docs]: https://docs.cosmos.network/main/core/events.html
pub events: Vec<Event>,
/// The binary payload to include in the response.
pub data: Option<Binary>,
}
). And, the following sections of SEMANTICS describes the difference between messages and submessages.

And, SubcallResponse in the following section looks like an outdated name. It is SubMsgResponse now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant