Skip to content

Commit 69fa90c

Browse files
committed
Add convenience method for reverting transactions
1 parent a3c4d4c commit 69fa90c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

searcher-api-types/src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use alloy_primitives::{BlockNumber, Bytes};
1+
use alloy_primitives::{BlockNumber, Bytes, TxHash};
22
use alloy_rlp::encode;
33
use serde::{Deserialize, Serialize};
44

@@ -63,4 +63,12 @@ impl SendBundleRequest {
6363
.collect(),
6464
}
6565
}
66+
67+
pub fn reverting_tx_hashes(&self) -> Vec<TxHash> {
68+
match self {
69+
SendBundleRequest::Flashbots(_) => vec![],
70+
SendBundleRequest::Beaver(bundle) => bundle.reverting_transaction_hashes.clone(),
71+
SendBundleRequest::Titan(bundle) => bundle.reverting_transaction_hashes.clone(),
72+
}
73+
}
6674
}

0 commit comments

Comments
 (0)