Skip to content

Commit

Permalink
Add serde derives for GasPrices
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Mar 5, 2024
1 parent d2ec71f commit 9eb48ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/core/component/fee/src/gas.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::{iter::Sum, ops::Add};

use serde::{Deserialize, Serialize};

use penumbra_num::Amount;
use penumbra_proto::{core::component::fee::v1 as pb, DomainType};

Expand Down Expand Up @@ -49,7 +51,8 @@ impl Sum for Gas {
/// These prices have an implicit denominator of 1,000 relative to the base unit
/// of the staking token, so gas price 1,000 times 1 unit of gas is 1 base unit
/// of staking token.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)]
#[serde(try_from = "pb::GasPrices", into = "pb::GasPrices")]
pub struct GasPrices {
pub block_space_price: u64,
pub compact_block_space_price: u64,
Expand Down

0 comments on commit 9eb48ba

Please sign in to comment.