Skip to content

Commit

Permalink
chore: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Sep 20, 2024
1 parent 004a0ba commit 718aee5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions crates/rpc-types-eth/src/sidecars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@

use alloy_eips::eip4844::BlobTransactionSidecar;
use alloy_primitives::B256;
use serde::{Deserialize, Serialize};

/// Block sidecar representation
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct BlockSidecar {
/// Transaction sidecar.
#[serde(default)]
#[cfg_attr(feature = "serde", serde(default))]
pub blob_sidecar: BlobTransactionSidecar,
/// Block hash.
#[serde(default)]
#[cfg_attr(feature = "serde", serde(default))]
pub block_hash: B256,
/// Block number.
#[serde(default, with = "alloy_serde::quantity")]
#[cfg_attr(feature = "serde", serde(default, with = "alloy_serde::quantity"))]
pub block_number: u64,
/// Transaction hash.
#[serde(default)]
#[cfg_attr(feature = "serde", serde(default))]
pub tx_hash: B256,
/// Transaction index.
#[serde(default, with = "alloy_serde::quantity")]
#[cfg_attr(feature = "serde", serde(default, with = "alloy_serde::quantity"))]
pub tx_index: u64,
}

#[test]
#[cfg(feature = "serde")]
fn test_block_sidecar() {
let block_sidecar = BlockSidecar {
blob_sidecar: BlobTransactionSidecar::default(),
Expand Down

0 comments on commit 718aee5

Please sign in to comment.