-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: add From derive for ICS26 messages #938
Conversation
Add derive_more::From to MsgEnvelope and encapsulated enums so that it’s easier to construct those objects without having to spell out their names or variants.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #938 +/- ##
==========================================
+ Coverage 67.65% 67.73% +0.07%
==========================================
Files 130 130
Lines 16415 16397 -18
==========================================
Hits 11106 11106
+ Misses 5309 5291 -18
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR. That's fine with us, but before we go:
Could you provide us with the specific location where you have constructed the message in this manner?
To provide some context, historically, the conversion flow for nearly all use cases has involved decoding an incoming IBC message from a proto/raw message and subsequently crafting the corresponding domain IBC message type. (So, this newly derived From
shouldn't be needed) Hence, any information that helps us coming up with a more versatile entry point is appreciated.
So far I’ve needed those specific conversion function in unit tests where I craft the messages by hand. Having said that, my current smart contract code (written for Solana using Anchor) expects the message to be borsh-serialised (which is what Anchor uses). |
Add derive_more::From to MsgEnvelope and encapsulated enums so that it’s easier to construct those objects without having to spell out their names or variants.
Add derive_more::From to MsgEnvelope and encapsulated enums so that
it’s easier to construct those objects without having to spell out
their names or variants.
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.