Skip to content

Commit

Permalink
derive Serialize for GovernanceParameters
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
egasimus authored Aug 26, 2024
1 parent 704b193 commit 0e88348
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/governance/src/parameters.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use serde::Serialize;
use namada_core::borsh::{BorshDeserialize, BorshSerialize};
use namada_core::token;
use namada_macros::BorshDeserializer;
Expand All @@ -18,6 +19,7 @@ use super::storage::keys as goverance_storage;
BorshSerialize,
BorshDeserialize,
BorshDeserializer,
Serialize,
)]
/// Governance parameter structure
pub struct GovernanceParameters {
Expand Down

0 comments on commit 0e88348

Please sign in to comment.