Skip to content

Commit

Permalink
feature gate Compact derive
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
  • Loading branch information
greged93 committed Nov 28, 2024
1 parent 3173693 commit 675c027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/scroll/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ poseidon-bn254 = { workspace = true, features = ["bn254"] }

# required by reth-codecs
bytes.workspace = true
modular-bitfield.workspace = true
modular-bitfield = { workspace = true, optional = true }
serde.workspace = true

# misc
Expand Down Expand Up @@ -61,6 +61,7 @@ arbitrary = [
reth-codec = [
"dep:reth-codecs",
"dep:reth-codecs-derive",
"modular-bitfield",
"std"
]
serde = [
Expand Down
4 changes: 2 additions & 2 deletions crates/scroll/primitives/src/account_extension.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use crate::{hash_code, POSEIDON_EMPTY};
use alloy_primitives::B256;
use reth_codecs::Compact;
use serde::{Deserialize, Serialize};

/// The extension for a Scroll account's representation in storage.
///
/// The extension is used in order to maintain backwards compatibility if more fields need to be
/// added to the account (see [reth codecs](reth_codecs::test_utils) for details).
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize, Compact)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "reth-codec", derive(reth_codecs::Compact))]
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
pub struct AccountExtension {
/// Size in bytes of the account's bytecode.
Expand Down

0 comments on commit 675c027

Please sign in to comment.