Skip to content

Commit

Permalink
bump op-alloy
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Dec 12, 2024
1 parent 9cc71a1 commit b65981e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 43 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ alloy-transport-ipc = { version = "0.8.0", default-features = false }
alloy-transport-ws = { version = "0.8.0", default-features = false }

# op
op-alloy-rpc-types = "0.8.0"
op-alloy-rpc-types-engine = "0.8.0"
op-alloy-rpc-jsonrpsee = "0.8.0"
op-alloy-network = "0.8.0"
op-alloy-consensus = "0.8.0"
op-alloy-rpc-types = "0.8.1"
op-alloy-rpc-types-engine = "0.8.1"
op-alloy-rpc-jsonrpsee = "0.8.1"
op-alloy-network = "0.8.1"
op-alloy-consensus = "0.8.1"

# misc
aquamarine = "0.6"
Expand Down
24 changes: 0 additions & 24 deletions crates/optimism/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use reth_primitives_traits::InMemorySize;
))]
pub struct OpReceipt {
/// Receipt type.
#[cfg_attr(feature = "serde", serde(with = "tx_type_serde"))]
pub tx_type: OpTxType,
/// If transaction is executed successfully.
///
Expand Down Expand Up @@ -244,26 +243,3 @@ impl arbitrary::Arbitrary<'_> for OpReceipt {
})
}
}

/// TODO: Remove once <https://github.com/alloy-rs/op-alloy/pull/317> is released.
#[cfg(feature = "serde")]
mod tx_type_serde {
use super::*;
use alloy_primitives::{U64, U8};
use serde::{Deserialize, Serialize};

pub(crate) fn serialize<S>(tx_type: &OpTxType, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
let value: U8 = (*tx_type).into();
value.serialize(serializer)
}

pub(crate) fn deserialize<'de, D>(deserializer: D) -> Result<OpTxType, D::Error>
where
D: serde::Deserializer<'de>,
{
U64::deserialize(deserializer)?.try_into().map_err(serde::de::Error::custom)
}
}

0 comments on commit b65981e

Please sign in to comment.