Skip to content

Commit fe4d1ae

Browse files
committed
refactor(anvil): remove TypedTransactionRequest
- Use macro generated typed tx enum
1 parent 9facbce commit fe4d1ae

File tree

1 file changed

+1
-10
lines changed
  • crates/anvil/core/src/eth/transaction

1 file changed

+1
-10
lines changed

crates/anvil/core/src/eth/transaction/mod.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,6 @@ pub fn has_optimism_fields(other: &OtherFields) -> bool {
186186
&& other.contains_key("isSystemTx")
187187
}
188188

189-
#[derive(Clone, Debug, PartialEq, Eq)]
190-
pub enum TypedTransactionRequest {
191-
Legacy(TxLegacy),
192-
EIP2930(TxEip2930),
193-
EIP1559(TxEip1559),
194-
EIP7702(TxEip7702),
195-
EIP4844(TxEip4844Variant),
196-
Deposit(TxDeposit),
197-
}
198-
199189
/// A wrapper for [TypedTransaction] that allows impersonating accounts.
200190
///
201191
/// This is a helper that carries the `impersonated` sender so that the right hash
@@ -585,6 +575,7 @@ impl PendingTransaction {
585575
#[envelope(
586576
alloy_consensus = alloy_consensus,
587577
tx_type_name = TxType,
578+
typed = TypedTransactionRequest,
588579
serde_cfg(all()),
589580
)]
590581
pub enum TypedTransaction {

0 commit comments

Comments
 (0)