Skip to content

Commit

Permalink
fix cargo hack error
Browse files Browse the repository at this point in the history
  • Loading branch information
moricho committed Nov 30, 2024
1 parent 6a567b0 commit 32c5dbd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions crates/consensus-any/src/transaction/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ impl From<TxType> for AnyTxType {
}

/// Transaction envelope for a catch-all network.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(untagged)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(untagged))]
#[doc(alias = "AnyTransactionEnvelope")]
pub enum AnyTxEnvelope {
/// An Ethereum transaction.
Expand Down
5 changes: 3 additions & 2 deletions crates/consensus-any/src/transaction/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization};
use alloy_primitives::{Bytes, ChainId, B256, U256};

/// Unsigned transaction type for a catch-all network.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(untagged)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(untagged))]
#[doc(alias = "AnyTypedTx")]
pub enum AnyTypedTransaction {
/// An Ethereum transaction.
Expand Down
5 changes: 3 additions & 2 deletions crates/consensus-any/src/transaction/unknown/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ use alloy_eips::{eip2930::AccessList, eip7702::SignedAuthorization};
use alloy_primitives::{Bytes, ChainId, TxKind, B256, U256};

/// A transaction envelope from an unknown network.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[doc(alias = "UnknownTransactionEnvelope")]
pub struct UnknownTxEnvelope {
/// Transaction hash.
pub hash: B256,

/// Transaction type.
#[serde(flatten)]
#[cfg_attr(feature = "serde", serde(flatten))]
pub inner: UnknownTypedTransaction,
}

Expand Down
9 changes: 5 additions & 4 deletions crates/consensus-any/src/transaction/unknown/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ pub struct DeserMemo {
}

/// A typed transaction of an unknown Network
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[doc(alias = "UnknownTypedTx")]
pub struct UnknownTypedTransaction {
#[serde(rename = "type")]
#[cfg_attr(feature = "serde", serde(rename = "type"))]
/// Transaction type.
pub ty: AnyTxType,

/// Additional fields.
#[serde(flatten)]
#[cfg_attr(feature = "serde", serde(flatten))]
pub fields: OtherFields,

/// Memoization for deserialization.
#[serde(skip, default)]
#[cfg_attr(feature = "serde", serde(skip, default))]
pub memo: DeserMemo,
}

Expand Down

0 comments on commit 32c5dbd

Please sign in to comment.