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

Allow legacy and upstream message types #530

Closed
wants to merge 1 commit into from

Conversation

StrathCole
Copy link
Collaborator

This pull request introduces several changes to enhance backward compatibility and improve test coverage in the codebase. The primary focus is on adding wrapper types for backward compatibility and implementing a new test case for message compatibility.

Backward compatibility improvements:

  • custom/auth/types/codec.go: Added wrapper types LegacyStdTx, LegacyBaseAccount, and LegacyModuleAccount for backward compatibility and registered them with the codec.
  • custom/authz/types/codec.go: Introduced wrapper types such as LegacyMsgGrant, LegacyMsgRevoke, LegacyMsgExec, and LegacyGenericAuthorization for backward compatibility and registered them with the codec.
  • custom/bank/types/codec.go: Added wrapper types LegacyMsgSend, LegacyMsgMultiSend, and LegacySendAuthorization for backward compatibility and registered them with the codec.
  • custom/crisis/types/codec.go: Created a wrapper type LegacyMsgVerifyInvariant for backward compatibility and registered it with the codec.
  • custom/distribution/types/codec.go: Implemented wrapper types such as LegacyMsgSetWithdrawAddress, LegacyMsgFundCommunityPool, LegacyMsgWithdrawDelegatorReward, LegacyMsgWithdrawValidatorCommission, and LegacyCommunityPoolSpendProposal for backward compatibility and registered them with the codec.

New test case:

  • custom/auth/ante/fee_test.go: Added a new test case TestLegacyAndUpstreamMsgSendCompatibility to ensure compatibility between legacy and upstream message formats.

These changes ensure that the system remains compatible with older message formats while enhancing the overall test coverage.

@StrathCole StrathCole requested a review from Copilot November 18, 2024 10:35

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 13 changed files in this pull request and generated no suggestions.

Files not reviewed (8)
  • tests/e2e/scripts/add_burn_tax_exemption_address_proposal.json: Language not supported
  • custom/staking/types/codec.go: Evaluated as low risk
  • custom/distribution/types/codec.go: Evaluated as low risk
  • custom/auth/types/codec.go: Evaluated as low risk
  • custom/slashing/types/codec.go: Evaluated as low risk
  • custom/feegrant/types/codec.go: Evaluated as low risk
  • custom/crisis/types/codec.go: Evaluated as low risk
  • custom/authz/types/codec.go: Evaluated as low risk
@StrathCole
Copy link
Collaborator Author

Tested and doesn't work this way.

@StrathCole StrathCole closed this Nov 21, 2024
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.

1 participant