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

Refactor 'UnmarshalPacketData' in interchain accounts #4224

Closed
3 tasks
srdtrk opened this issue Aug 2, 2023 · 0 comments · Fixed by #4232
Closed
3 tasks

Refactor 'UnmarshalPacketData' in interchain accounts #4224

srdtrk opened this issue Aug 2, 2023 · 0 comments · Fixed by #4232

Comments

@srdtrk
Copy link
Member

srdtrk commented Aug 2, 2023

Summary

UnmarshalPacketData explicitly deserializes packet data from bytes to a concrete type. This logic should be moved to types and other parts of the code can just call this logic in icahost and icacontroller (including UnmarshalPacketData).

Problem Definition

UnmarshalPacketData allows middlewares higher in the stack to request the module to deserialize the packet data. This logic can be used to refactor other parts of the code if it is moved to types. We also have the long term goal of making ModuleCdc private and just expose the serialization and deserialization functions to the public API. We would eventually do this for all apps but we first implement this in interchain accounts.

Proposal

  1. Move UnmarshalPacketData's logic to types.
  2. Refactor other areas of the interchain accounts code to use this function when possible.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

1 participant