mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make alloy impls feature gated (#7747)
This commit is contained in:
@ -291,7 +291,7 @@ alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f
|
|||||||
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8", default-features = false, features = [
|
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8", default-features = false, features = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
] }
|
] }
|
||||||
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "188c4f8" }
|
||||||
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
||||||
alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
||||||
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "188c4f8" }
|
||||||
@ -321,6 +321,7 @@ itertools = "0.12"
|
|||||||
parking_lot = "0.12"
|
parking_lot = "0.12"
|
||||||
# Needed for `metrics-macro` to resolve the crate using `::metrics` notation
|
# Needed for `metrics-macro` to resolve the crate using `::metrics` notation
|
||||||
metrics = "0.21.1"
|
metrics = "0.21.1"
|
||||||
|
modular-bitfield = "0.11.2"
|
||||||
hex-literal = "0.4"
|
hex-literal = "0.4"
|
||||||
once_cell = "1.17"
|
once_cell = "1.17"
|
||||||
syn = "2.0"
|
syn = "2.0"
|
||||||
|
|||||||
@ -40,7 +40,7 @@ byteorder = "1"
|
|||||||
clap = { workspace = true, features = ["derive"], optional = true }
|
clap = { workspace = true, features = ["derive"], optional = true }
|
||||||
derive_more.workspace = true
|
derive_more.workspace = true
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
modular-bitfield = "0.11.2"
|
modular-bitfield.workspace = true
|
||||||
once_cell.workspace = true
|
once_cell.workspace = true
|
||||||
rayon.workspace = true
|
rayon.workspace = true
|
||||||
serde_with.workspace = true
|
serde_with.workspace = true
|
||||||
|
|||||||
@ -1104,7 +1104,7 @@ impl Compact for TransactionSignedNoHash {
|
|||||||
to_compact_ztd_unaware(self, buf)
|
to_compact_ztd_unaware(self, buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_compact(mut buf: &[u8], _len: usize) -> (Self, &[u8]) {
|
fn from_compact(buf: &[u8], _len: usize) -> (Self, &[u8]) {
|
||||||
from_compact_zstd_unaware(buf, _len)
|
from_compact_zstd_unaware(buf, _len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,15 +13,16 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
reth-codecs-derive = { path = "./derive", default-features = false }
|
reth-codecs-derive = { path = "./derive", default-features = false }
|
||||||
|
|
||||||
alloy-eips.workspace = true
|
alloy-eips = { workspace = true, optional = true }
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
|
||||||
bytes.workspace = true
|
bytes.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
alloy-eips = { workspace = true, features = ["arbitrary", "serde"] }
|
alloy-eips = { workspace = true, default-features = false, features = ["arbitrary", "serde"] }
|
||||||
alloy-primitives = { workspace = true, features = ["arbitrary", "serde"] }
|
alloy-primitives = { workspace = true, features = ["arbitrary", "serde"] }
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
modular-bitfield = "0.11.2"
|
modular-bitfield.workspace = true
|
||||||
test-fuzz.workspace = true
|
test-fuzz.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ proptest.workspace = true
|
|||||||
proptest-derive.workspace = true
|
proptest-derive.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std", "alloy"]
|
||||||
std = ["alloy-primitives/std", "bytes/std"]
|
std = ["alloy-primitives/std", "bytes/std"]
|
||||||
|
alloy = ["alloy-eips"]
|
||||||
optimism = ["reth-codecs-derive/optimism"]
|
optimism = ["reth-codecs-derive/optimism"]
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
//! Compact codec.
|
//! Compact codec.
|
||||||
|
//!
|
||||||
|
//! ## Feature Flags
|
||||||
|
//!
|
||||||
|
//! - `alloy`: [Compact] implementation for various alloy types.
|
||||||
|
|
||||||
#![doc(
|
#![doc(
|
||||||
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
|
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
|
||||||
@ -16,6 +20,7 @@ pub use reth_codecs_derive::*;
|
|||||||
use alloy_primitives::{Address, Bloom, Bytes, B256, B512, U256};
|
use alloy_primitives::{Address, Bloom, Bytes, B256, B512, U256};
|
||||||
use bytes::Buf;
|
use bytes::Buf;
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "alloy"))]
|
||||||
mod alloy;
|
mod alloy;
|
||||||
|
|
||||||
/// Trait that implements the `Compact` codec.
|
/// Trait that implements the `Compact` codec.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ reth-tracing.workspace = true
|
|||||||
# codecs
|
# codecs
|
||||||
serde = { workspace = true, default-features = false }
|
serde = { workspace = true, default-features = false }
|
||||||
parity-scale-codec = { version = "3.2.1", features = ["bytes"] }
|
parity-scale-codec = { version = "3.2.1", features = ["bytes"] }
|
||||||
modular-bitfield = "0.11.2"
|
modular-bitfield.workspace = true
|
||||||
|
|
||||||
# metrics
|
# metrics
|
||||||
reth-metrics.workspace = true
|
reth-metrics.workspace = true
|
||||||
|
|||||||
Reference in New Issue
Block a user