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

Handle both stargate and any CosmosMsg variant #468

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Handle both stargate and any CosmosMsg variant #468

merged 3 commits into from
Nov 16, 2023

Conversation

chipshort
Copy link
Collaborator

Companion to CosmWasm/cosmwasm#1926

Unfortunately I did not find a succinct way to do this in Go.
The other option would be to keep both variants in the struct, make them private and add a Stargate / Any function that differentiates them. But that would also need changes in wasmd.

types/msg.go Outdated Show resolved Hide resolved
@webmaster128
Copy link
Member

That's the way! We take the burden on us to make the lifes of our users easier (wasmd in this case).

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

types/msg.go Show resolved Hide resolved
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, thanks!

@webmaster128 webmaster128 added this to the 2.0.0 milestone Nov 16, 2023
@chipshort chipshort merged commit 5af85d0 into main Nov 16, 2023
13 checks passed
@chipshort chipshort deleted the any-msg branch November 16, 2023 12:48
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

Successfully merging this pull request may close these issues.

2 participants