feat(exex): derive serde ser/deser for ExExNotification (#8963)

This commit is contained in:
Alexey Shekhirin
2024-06-20 11:33:53 +01:00
committed by GitHub
parent 8b6ca877d6
commit 554e8b1913
18 changed files with 48 additions and 12 deletions

View File

@ -18,10 +18,13 @@ reth-trie.workspace = true
revm.workspace = true
serde = { workspace = true, optional = true }
[dev-dependencies]
reth-primitives = { workspace = true, features = ["test-utils"] }
alloy-primitives.workspace = true
alloy-eips.workspace = true
[features]
optimism = ["dep:reth-chainspec"]
optimism = ["dep:reth-chainspec"]
serde = ["dep:serde", "reth-trie/serde", "revm/serde"]

View File

@ -21,6 +21,7 @@ use std::{borrow::Cow, collections::BTreeMap, fmt, ops::RangeInclusive};
///
/// A chain of blocks should not be empty.
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Chain {
/// All blocks in this chain.
blocks: BTreeMap<BlockNumber, SealedBlockWithSenders>,

View File

@ -14,6 +14,7 @@ use std::collections::HashMap;
/// The `ExecutionOutcome` structure aggregates the state changes over an arbitrary number of
/// blocks, capturing the resulting state, receipts, and requests following the execution.
#[derive(Default, Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ExecutionOutcome {
/// Bundle state with reverts.
pub bundle: BundleState,