Skip to content

Commit

Permalink
fix core
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Apr 3, 2024
1 parent 9e544f9 commit b88616d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crates/astria-core/src/sequencer/v1/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::{
},
};

#[cfg(feature = "serde")]
use serde::Serialize;

/// The default sequencer asset base denomination.
Expand Down Expand Up @@ -120,7 +121,8 @@ impl From<String> for Denom {
}

/// Asset ID, which is the hash of the denomination trace.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize))]
pub struct Id([u8; 32]);

impl Id {
Expand Down
4 changes: 3 additions & 1 deletion crates/astria-core/src/sequencer/v1/block/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::collections::HashMap;

use indexmap::IndexMap;
#[cfg(feature = "serde")]
use serde::Serialize;
use sha2::Sha256;
use transaction::SignedTransaction;
Expand Down Expand Up @@ -1239,7 +1240,8 @@ impl FilteredSequencerBlockError {
///
/// A [`Deposit`] is constructed whenever a [`BridgeLockAction`] is executed
/// and stored as part of the block's events.
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Deposit {
// the address on the sequencer to which the funds were sent to.
bridge_address: Address,
Expand Down
4 changes: 3 additions & 1 deletion crates/astria-core/src/sequencer/v1/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use indexmap::IndexMap;
#[cfg(feature = "serde")]
use serde::Serialize;
use sha2::{
Digest as _,
Expand Down Expand Up @@ -39,7 +40,8 @@ use self::block::RollupTransactions;
pub const ADDRESS_LEN: usize = 20;
pub const ROLLUP_ID_LEN: usize = 32;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Address([u8; ADDRESS_LEN]);

impl Address {
Expand Down

0 comments on commit b88616d

Please sign in to comment.