From c21a87ffcfc76aaa7e00583525ece1ea840fddfb Mon Sep 17 00:00:00 2001 From: refcell Date: Sat, 19 Oct 2024 11:20:01 -0400 Subject: [PATCH] chore: Dependency Updates (#177) ### Description Dependency updates --- Cargo.toml | 40 +++++++++++---------- crates/consensus/src/transaction/deposit.rs | 4 --- crates/genesis/src/lib.rs | 2 +- crates/protocol/src/lib.rs | 2 +- crates/rpc-types-engine/src/envelope.rs | 5 ++- crates/rpc-types-engine/src/lib.rs | 2 +- crates/rpc-types/Cargo.toml | 14 ++++---- crates/rpc-types/src/lib.rs | 2 +- 8 files changed, 36 insertions(+), 35 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a6765b28..ac2ec4fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,30 +35,32 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [workspace.dependencies] -# Alloy -op-alloy-rpc-jsonrpsee = { version = "0.5.0", path = "crates/rpc-jsonrpsee" } -op-alloy-rpc-types = { version = "0.5.0", path = "crates/rpc-types" } -op-alloy-rpc-types-engine = { version = "0.5.0", path = "crates/rpc-types-engine" } -op-alloy-consensus = { version = "0.5.0", path = "crates/consensus", default-features = false } +# Workspace op-alloy-genesis = { version = "0.5.0", path = "crates/genesis", default-features = false } op-alloy-protocol = { version = "0.5.0", path = "crates/protocol", default-features = false } +op-alloy-consensus = { version = "0.5.0", path = "crates/consensus", default-features = false } +op-alloy-rpc-types = { version = "0.5.0", path = "crates/rpc-types", default-features = false } +op-alloy-rpc-jsonrpsee = { version = "0.5.0", path = "crates/rpc-jsonrpsee", default-features = false } +op-alloy-rpc-types-engine = { version = "0.5.0", path = "crates/rpc-types-engine", default-features = false } + +# Alloy +alloy-eips = { version = "0.5.2", default-features = false } +alloy-serde = { version = "0.5.2", default-features = false } +alloy-signer = { version = "0.5.2", default-features = false } +alloy-network = { version = "0.5.2", default-features = false } +alloy-provider = { version = "0.5.2", default-features = false } +alloy-transport = { version = "0.5.2", default-features = false } +alloy-consensus = { version = "0.5.2", default-features = false } +alloy-rpc-types-eth = { version = "0.5.2", default-features = false } +alloy-rpc-types-engine = { version = "0.5.2", default-features = false } +alloy-network-primitives = { version = "0.5.2", default-features = false } +# Alloy RLP alloy-rlp = { version = "0.3", default-features = false } -alloy-primitives = { version = "0.8", default-features = false } -alloy-sol-types = { version = "0.8", default-features = false } -alloy = { version = "0.5.0" } -alloy-consensus = { version = "0.5.0", default-features = false } -alloy-network = { version = "0.5.0", default-features = false } -alloy-network-primitives = { version = "0.5.0", default-features = false } -alloy-rpc-types = { version = "0.5.0" } -alloy-rpc-types-engine = { version = "0.5.0", default-features = false } -alloy-rpc-types-eth = { version = "0.5.0", default-features = false } -alloy-eips = { version = "0.5.0", default-features = false } -alloy-serde = { version = "0.5.0", default-features = false } -alloy-signer = { version = "0.5.0", default-features = false } -alloy-provider = { version = "0.5.0", default-features = false } -alloy-transport = { version = "0.5.0", default-features = false } +# Alloy Core +alloy-sol-types = { version = "0.8", default-features = false } +alloy-primitives = { version = "0.8", default-features = false } # Serde serde_repr = "0.1" diff --git a/crates/consensus/src/transaction/deposit.rs b/crates/consensus/src/transaction/deposit.rs index dab5efff..fd3015c6 100644 --- a/crates/consensus/src/transaction/deposit.rs +++ b/crates/consensus/src/transaction/deposit.rs @@ -193,10 +193,6 @@ impl Transaction for TxDeposit { 0 } - fn to(&self) -> Option
{ - self.to.into() - } - fn kind(&self) -> TxKind { self.to } diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index 38c2ff51..ef8d7e95 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -5,7 +5,7 @@ )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] -#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(not(any(test, feature = "std")), no_std)] extern crate alloc; diff --git a/crates/protocol/src/lib.rs b/crates/protocol/src/lib.rs index 1a7575a0..0a233f34 100644 --- a/crates/protocol/src/lib.rs +++ b/crates/protocol/src/lib.rs @@ -5,7 +5,7 @@ )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] -#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(not(any(test, feature = "std")), no_std)] extern crate alloc; diff --git a/crates/rpc-types-engine/src/envelope.rs b/crates/rpc-types-engine/src/envelope.rs index df7d410b..f437f046 100644 --- a/crates/rpc-types-engine/src/envelope.rs +++ b/crates/rpc-types-engine/src/envelope.rs @@ -147,7 +147,7 @@ impl PayloadHash { #[cfg(test)] mod tests { use super::*; - use alloy_primitives::{b256, hex}; + use alloy_primitives::b256; #[test] fn test_signature_message() { @@ -171,6 +171,7 @@ mod tests { #[test] #[cfg(feature = "std")] fn decode_payload_v1() { + use alloy_primitives::hex; let data = hex::decode("0xbd04f043128457c6ccf35128497167442bcc0f8cce78cda8b366e6a12e526d938d1e4c1046acffffbfc542a7e212bb7d80d3a4b2f84f7b196d935398a24eb84c519789b401000000fe0300fe0300fe0300fe0300fe0300fe0300a203000c4a8fd56621ad04fc0101067601008ce60be0005b220117c32c0f3b394b346c2aa42cfa8157cd41f891aa0bec485a62fc010000").unwrap(); let payload_envelop = OpNetworkPayloadEnvelope::decode_v1(&data).unwrap(); assert_eq!(1725271882, payload_envelop.payload.timestamp()); @@ -179,6 +180,7 @@ mod tests { #[test] #[cfg(feature = "std")] fn decode_payload_v2() { + use alloy_primitives::hex; let data = hex::decode("0xc104f0433805080eb36c0b130a7cc1dc74c3f721af4e249aa6f61bb89d1557143e971bb738a3f3b98df7c457e74048e9d2d7e5cd82bb45e3760467e2270e9db86d1271a700000000fe0300fe0300fe0300fe0300fe0300fe0300a203000c6b89d46525ad000205067201009cda69cb5b9b73fc4eb2458b37d37f04ff507fe6c9cd2ab704a05ea9dae3cd61760002000000020000").unwrap(); let payload_envelop = OpNetworkPayloadEnvelope::decode_v2(&data).unwrap(); assert_eq!(1708427627, payload_envelop.payload.timestamp()); @@ -187,6 +189,7 @@ mod tests { #[test] #[cfg(feature = "std")] fn decode_payload_v3() { + use alloy_primitives::hex; let data = hex::decode("0xf104f0434442b9eb38b259f5b23826e6b623e829d2fb878dac70187a1aecf42a3f9bedfd29793d1fcb5822324be0d3e12340a95855553a65d64b83e5579dffb31470df5d010000006a03000412346a1d00fe0100fe0100fe0100fe0100fe0100fe01004201000cc588d465219504100201067601007cfece77b89685f60e3663b6e0faf2de0734674eb91339700c4858c773a8ff921e014401043e0100").unwrap(); let payload_envelop = OpNetworkPayloadEnvelope::decode_v3(&data).unwrap(); assert_eq!(1708427461, payload_envelop.payload.timestamp()); diff --git a/crates/rpc-types-engine/src/lib.rs b/crates/rpc-types-engine/src/lib.rs index 9ab498f8..a116627f 100644 --- a/crates/rpc-types-engine/src/lib.rs +++ b/crates/rpc-types-engine/src/lib.rs @@ -5,7 +5,7 @@ )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] -#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(not(any(test, feature = "std")), no_std)] extern crate alloc; diff --git a/crates/rpc-types/Cargo.toml b/crates/rpc-types/Cargo.toml index 3e2ccca3..c449cf01 100644 --- a/crates/rpc-types/Cargo.toml +++ b/crates/rpc-types/Cargo.toml @@ -19,26 +19,26 @@ workspace = true op-alloy-consensus = { workspace = true, features = ["serde"] } # Alloy -alloy-primitives = { workspace = true, features = ["map", "rlp", "serde"] } -alloy-rpc-types-eth = { workspace = true, features = ["serde"] } alloy-serde.workspace = true alloy-consensus.workspace = true alloy-network-primitives.workspace = true alloy-eips = { workspace = true, features = ["serde"] } +alloy-rpc-types-eth = { workspace = true, features = ["serde"] } +alloy-primitives = { workspace = true, features = ["map", "rlp", "serde"] } # Serde +serde_json.workspace = true serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } [dev-dependencies] -alloy-primitives = { workspace = true, features = ["arbitrary"] } -alloy-consensus = { workspace = true, features = ["arbitrary"] } -alloy-rpc-types = { workspace = true, features = ["arbitrary"] } -arbitrary = { workspace = true, features = ["derive"] } rand.workspace = true +arbitrary = { workspace = true, features = ["derive"] } +alloy-consensus = { workspace = true, features = ["arbitrary"] } +alloy-primitives = { workspace = true, features = ["arbitrary"] } +alloy-rpc-types-eth = { workspace = true, features = ["arbitrary"] } [features] default = ["std"] diff --git a/crates/rpc-types/src/lib.rs b/crates/rpc-types/src/lib.rs index c0a46f31..30931976 100644 --- a/crates/rpc-types/src/lib.rs +++ b/crates/rpc-types/src/lib.rs @@ -5,7 +5,7 @@ )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] -#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(not(any(test, feature = "std")), no_std)] extern crate alloc;