-
Notifications
You must be signed in to change notification settings - Fork 411
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
Add MsgInstantiateContractResponse.data #385
Comments
Ah, so we can have both fields, sender address and contract data in the same response. Yes, this makes sense. 👍 for being able to return structured data |
Good 💡 The field is easy to add. As a note: |
How does this work for other message types that are executed as part of a gov proposal? |
Hmmm... it makes sense to return it as a hex/base64 encoded attribute as well. The types allow you to pass in bytes but much code blindly converts to and from string, so let's keep it utf8 |
This does not sound like a winning strategy. With the Stargate upgrade it is encouraged to store a serialized protobuf response in there, which is definitely not UTF8. |
@webmaster128 do you have found an example or doc you can point me too? |
@webmaster128 @alpe Please read the discussion from here on: cosmos/cosmos-sdk#8624 (comment) There was quite some discussion about using raw bytes in events |
Thanks for the link! They ended up with hex encoded protobuf: cosmos/cosmos-sdk@cb28f10#diff-d2a466b18c54af68dfa1c635b309ebb1c5fe10f9c23fc99d89dcc83c95638ac6R103 Next question would be to always store the data or only for operations not triggered by a client (gov/contracts) ? |
I'd take the simpler route |
MsgExecuteContractResponse and MsgMigrateContractResponse have a contract defined
data
field. MsgInstantiateContractResponse does not have this for historic reasons (we returned the raw contract address before).Now that we can easily return structured proto messages, it would be good to add
MsgInstantiateContractResponse.data
for consistency.The text was updated successfully, but these errors were encountered: