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

use types.MetadataFromVersion in 29-fee callback handlers #4101

Closed
1 of 4 tasks
damiannolan opened this issue Jul 17, 2023 · 4 comments · Fixed by #4290
Closed
1 of 4 tasks

use types.MetadataFromVersion in 29-fee callback handlers #4101

damiannolan opened this issue Jul 17, 2023 · 4 comments · Fixed by #4290
Assignees
Labels
29-fee good first issue Good for newcomers type: code hygiene Clean up code but without changing functionality or interfaces type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.

Comments

@damiannolan
Copy link
Member

damiannolan commented Jul 17, 2023

Pre-requisite:

Summary

Fee middleware Metadata can be parsed from the channel version string using a new helper:

metadata, err := types.MetadataFromVersion(version)
if err != nil {
  // handle err
}

We can make use of this in app callbacks within 29-fee such as ChanOpenInit, ChanOpenTry etc..
Essentially replacing the usage of:

var metadata types.Metadata
if err := types.ModuleCdc.UnmarshalJSON([]byte(version), metadata); err != nil {
  // handle err
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@damiannolan damiannolan added type: code hygiene Clean up code but without changing functionality or interfaces 29-fee type: refactor Architecture, code or CI improvements that may or may not tackle technical debt. labels Jul 17, 2023
@crodriguezvega crodriguezvega added the good first issue Good for newcomers label Jul 17, 2023
@stackman27
Copy link
Contributor

@crodriguezvega can i be assigned to this

@crodriguezvega
Copy link
Contributor

Yes, absolutely. Thank you, @stackman27!

@stackman27
Copy link
Contributor

Also would appreciate any other good first issues to work on. Anything that helps me understand different parts of ibc better :))

@crodriguezvega
Copy link
Contributor

Also would appreciate any other good first issues to work on. Anything that helps me understand different parts of ibc better :))

Sure thing. We'll find you some nice ones. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
29-fee good first issue Good for newcomers type: code hygiene Clean up code but without changing functionality or interfaces type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

3 participants