-
Notifications
You must be signed in to change notification settings - Fork 351
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
Create dedicated SubMsgResult #1232
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webmaster128
commented
Feb 23, 2022
@@ -100,12 +100,216 @@ pub struct Reply { | |||
/// The ID that the contract set when emitting the `SubMsg`. | |||
/// Use this to identify which submessage triggered the `reply`. | |||
pub id: u64, | |||
pub result: ContractResult<SubMsgExecutionResponse>, | |||
pub result: SubMsgResult, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is the core of this PR.
webmaster128
force-pushed
the
SubMsgResult
branch
2 times, most recently
from
February 25, 2022 08:25
f98ac72
to
b9d825d
Compare
webmaster128
force-pushed
the
SubMsgResult
branch
from
March 1, 2022 09:20
b9d825d
to
006ba5a
Compare
crnch
pushed a commit
to crnch/cw-template
that referenced
this pull request
Mar 13, 2022
Changed API in updated dependencies lead to failing (unit) tests. Fixed by updating crate versions. CosmWasm/cosmwasm#1232 CosmWasm#106
orkunkl
pushed a commit
to CosmWasm/cw-template
that referenced
this pull request
Mar 13, 2022
Changed API in updated dependencies lead to failing (unit) tests. Fixed by updating crate versions. CosmWasm/cosmwasm#1232 #106
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change completents CosmWasm/wasmd#765 in the sense that it makes clear this is the result of an arbitrary Cosmos SDK message execution and not restricted to contract calls.
Once serialized, the new type
SubMsgResult
looks the same asContractResult<SubMsgExecutionResponse>
. However,ContractResult
is documented to be the result of a contract execution. So the way it was used here before is confusing, especially when comparing it with the query resultQuerierResult = SystemResult<ContractResult<Binary>>
where there actually is a contract execution result involved (for some queries).The corresponding wasmvm type is SubcallResult.
This is slightly code breaking, but the JSON interface does not change and
SubMsgResult
has the same methods asContractResult
.