-
Notifications
You must be signed in to change notification settings - Fork 1k
derive Serialize for PosParams, OwnedPosParams, GovernanceParameters #3702
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
Conversation
this would enable our client library `@fadroma/namada` to automatically convert the response from `/vp/pos/pos_params` without having to explicitly list every field (see https://github.com/hackbg/fadroma/blob/e7d5d551f818a6441ef54309a2517792b03ee7d3/packages/namada/src/decode.rs#L201-L223)
this would enable @fadroma/namada to automatically serialize the response from `/vp/governance/parameters` to JSON without having to explicitly list each field (see https://github.com/hackbg/fadroma/blob/e7d5d551f818a6441ef54309a2517792b03ee7d3/packages/namada/src/decode.rs#L201-L223)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3702 +/- ##
=======================================
Coverage 68.01% 68.02%
=======================================
Files 330 330
Lines 116209 116209
=======================================
+ Hits 79041 79051 +10
+ Misses 37168 37158 -10 ☔ View full report in Codecov by Sentry. |
|
can you run |
|
ah nice catch about the changelog docs, but it would be better to split them into another PR. Could you drop |
|
@Fraccaman fixed? |
Hi! 🙇 This PR enables deriving the
Serializetrait for three of the structs that we expose through our bleeding-edge client library, @fadroma/namada.Right now we decode these by manually building
js_sys::Objectinstances, but this requires us to explicitly name each field, hence it is not future-proof against the struct fields changing. As we migrate towards automatic JSON serialization usingserde_json, we've found that not all SDK structs deriveserde::Serialize. Hence, this 🙏