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

extract upgrade in MsgExecLegacyContent #70

Open
MattKetmo opened this issue May 10, 2024 · 0 comments
Open

extract upgrade in MsgExecLegacyContent #70

MattKetmo opened this issue May 10, 2024 · 0 comments
Labels
feature New feature or request

Comments

@MattKetmo
Copy link
Member

MattKetmo commented May 10, 2024

Currently, only upgrade embedded in SoftwareUpgradeProposal and MsgSoftwareUpgrade are detected.

switch content.TypeUrl {
case "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal":
var upgrade types.SoftwareUpgradeProposal
err := cdc.Unmarshal(content.Value, &upgrade)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal software upgrade proposal: %w", err)
}
return &upgrade.Plan, nil
case "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade":
var upgrade types.MsgSoftwareUpgrade
err := cdc.Unmarshal(content.Value, &upgrade)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal software upgrade proposal: %w", err)
}
return &upgrade.Plan, nil
}

But it can also happen via a MsgExecLegacyContent.

Examples:

@MattKetmo MattKetmo added the bug Something isn't working label May 10, 2024
@MattKetmo MattKetmo added feature New feature or request and removed bug Something isn't working labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant