Skip to content

Commit 7b86e20

Browse files
authored
chore: rename ConditionalOptions (#1825)
1 parent 3059214 commit 7b86e20

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

crates/rpc-types-eth/src/erc4337.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ use alloy_primitives::{
55
Address, BlockNumber, Bytes, B256, U256,
66
};
77

8+
/// Alias for backwards compat
9+
#[deprecated(
10+
since = "0.8.4",
11+
note = "Please use `TransactionConditional` instead of `ConditionalOptions`."
12+
)]
13+
pub type ConditionalOptions = TransactionConditional;
14+
815
/// Options for conditional raw transaction submissions.
9-
// reference for the implementation <https://notes.ethereum.org/@yoav/SkaX2lS9j#>
10-
// See also <https://pkg.go.dev/github.com/aK0nshin/go-ethereum/arbitrum_types#ConditionalOptions>
16+
///
17+
/// TransactionConditional represents the preconditions that determine the inclusion of the
18+
/// transaction, enforced out-of-protocol by the sequencer.
19+
///
20+
/// See also <https://github.com/ethereum-optimism/op-geth/blob/928070c7fc097362ed2d40a4f72889ba91544931/core/types/transaction_conditional.go#L74-L76>.
1121
#[derive(Debug, Clone, Default)]
1222
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1323
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
14-
pub struct ConditionalOptions {
24+
pub struct TransactionConditional {
1525
/// A map of account addresses to their expected storage states.
1626
/// Each account can have a specified storage root or explicit slot-value pairs.
1727
#[cfg_attr(feature = "serde", serde(default))]
@@ -62,7 +72,7 @@ pub struct ConditionalOptions {
6272
pub timestamp_max: Option<u64>,
6373
}
6474

65-
impl ConditionalOptions {
75+
impl TransactionConditional {
6676
/// Computes the aggregate cost of the preconditions; total number of storage lookups required
6777
pub fn cost(&self) -> u64 {
6878
let mut cost = 0;

0 commit comments

Comments
 (0)