Revert "chore(sdk): Add MaybeArbitrary as super trait" (#12809)

This commit is contained in:
Matthias Seitz
2024-11-23 15:54:39 +01:00
committed by GitHub
parent c869c71183
commit 795e29cb5b
10 changed files with 131 additions and 171 deletions

View File

@ -34,13 +34,9 @@ serde = { workspace = true, optional = true }
# misc
derive_more.workspace = true
# test-utils
arbitrary = { workspace = true, features = ["derive"], optional = true }
[dev-dependencies]
reth-codecs = { workspace = true, features = ["test-utils"] }
rstest.workspace = true
arbitrary.workspace = true
[features]
default = ["std", "reth-codec"]
@ -69,13 +65,3 @@ serde = [
"reth-codecs/serde",
"op-alloy-consensus/serde",
]
arbitrary = [
"dep:arbitrary",
"reth-primitives-traits/arbitrary",
"reth-primitives/arbitrary",
"reth-codecs?/arbitrary",
"op-alloy-consensus/arbitrary",
"alloy-consensus/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary",
]

View File

@ -2,11 +2,10 @@
//! `OpTxType` implements `reth_primitives_traits::TxType`.
//! This type is required because a `Compact` impl is needed on the deposit tx type.
use core::fmt::Debug;
use alloy_primitives::{U64, U8};
use alloy_rlp::{Decodable, Encodable, Error};
use bytes::BufMut;
use core::fmt::Debug;
use derive_more::{
derive::{From, Into},
Display,
@ -14,10 +13,8 @@ use derive_more::{
use op_alloy_consensus::OpTxType as AlloyOpTxType;
use reth_primitives_traits::{InMemorySize, TxType};
/// Wrapper type for [`op_alloy_consensus::OpTxType`] to implement
/// [`TxType`] trait.
/// Wrapper type for [`op_alloy_consensus::OpTxType`] to implement [`TxType`] trait.
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Display, Ord, Hash, From, Into)]
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
#[into(u8)]
pub struct OpTxType(AlloyOpTxType);