Repository navigation
feat(cosmwasm): surface contract set_data on ExecuteResult - #1974
Open
gomesalexandre wants to merge 1 commit into
Open
gomesalexandre wants to merge 1 commit into
gomesalexandre wants to merge 1 commit into
Conversation
ExecuteResult only exposed events, dropping the binary data a contract returns via Response::set_data (cosmos#1648). Add a `data: readonly Uint8Array[]` field decoded from the tx's MsgExecuteContractResponse msgResponses, one entry per instruction in order. Empty for Cosmos SDK < 0.46, which does not expose message responses. Verified the decode round-trips the data; extended the execute and executeMultiple specs to assert one data entry per instruction. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
PR author is not in the allowed authors list. |
This branch has not been deployed
This file contains hidden or 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
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.
closes #1648
what
ExecuteResultonly surfaced events, so the binary data a contract returns viaResponse::set_data(...)was dropped. Adds adatafield toExecuteResult:one entry per instruction, decoded from the transaction's
MsgExecuteContractResponsemessage responses inexecuteMultiple(whichexecutedelegates to). Empty for chains on Cosmos SDK < 0.46, which do not expose message responses.receipts
The decode surfaces the bytes (standalone, against the repo's
cosmjs-types):tsctypechecks the package (thedatafield andMsgExecuteContractResponse.decode(...).datacompile).executeandexecuteMultiplespecs to assert onedataentry per instruction (these run against the wasmd integration harness in CI).Follow-up worth considering: a test contract that actually calls
set_datawould let the integration suite assert the returned bytes end to end.