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

Add Wrap/Unwrap Interfaces and implement OnChanOpenInit #7059

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Aug 6, 2024

Description

This PR adds the optional VersionWrapper interface and implementation for ics29.

This PR ended up also implementing OnChanOpenInit in the LegacyIBCModule and updating all implementations to perform the new logic.

closes #7017
closes #6954


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@chatton chatton added priority PRs that need prompt reviews feat: port-router labels Aug 6, 2024
@@ -22,13 +22,13 @@ func (im *LegacyIBCModule) GetCallbacks() []ClassicIBCModule {

// NewLegacyIBCModule creates a new IBCModule given the keeper
func NewLegacyIBCModule(cbs ...ClassicIBCModule) ClassicIBCModule {
return LegacyIBCModule{
return &LegacyIBCModule{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

small tweak since we need the reference type to implement the interface, not the value type.

@chatton chatton marked this pull request as ready for review August 6, 2024 12:27
@chatton chatton changed the title Add version wrap/unwrap interfaces Add Wrap/Unwrap Interfaces and implement OnChanOpenInit Aug 7, 2024
versionBytes, err := types.ModuleCdc.MarshalJSON(&versionMetadata)
if err != nil {
return "", err
if strings.TrimSpace(version) != "" && version != types.Version {
Copy link
Contributor

Choose a reason for hiding this comment

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

these diffs 😍

modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Aug 7, 2024

…andle-backwards-compatibility' of github.com:cosmos/ibc-go into cian/issue#6954-add-version-wrap/unwrap-interfaces-to-handle-backwards-compatibility
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

I added more in-line code docs so hopefully the handler makes sense when reading later

@colin-axner colin-axner merged commit 41c6656 into feat/port-router Aug 7, 2024
23 of 25 checks passed
@colin-axner colin-axner deleted the cian/issue#6954-add-version-wrap/unwrap-interfaces-to-handle-backwards-compatibility branch August 7, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: port-router priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants