paradigmxyz / mev-share-rs

Rust client library for Flashbots MEV-share
Apache License 2.0
178 stars 30 forks source link

Add support for `Bundle` inside `BundleItem` #44

Open ghost opened 11 months ago

ghost commented 11 months ago

What's the reason that mev-share-rs doesn't support using Bundle as a BundleItem?

I see that MEV-Share supports this.

pub enum BundleItem {
    /// The hash of either a transaction or bundle we are trying to backrun.
    Hash {
        /// Tx hash.
        hash: TxHash,
    },
    /// A new signed transaction.
    #[serde(rename_all = "camelCase")]
    Tx {
        /// Bytes of the signed transaction.
        tx: Bytes,
        /// If true, the transaction can revert without the bundle being considered invalid.
        can_revert: bool,
    },
}
SkandaBhat commented 1 month ago

@mattsse This should be implemented in alloy too, correct? mev_simBundle requires this: https://github.com/flashbots/mev-share/blob/main/specs/bundles/v0.1.md

mattsse commented 1 month ago

yeah I think we could actually move all of these types into the alloy mev crate:

https://github.com/paradigmxyz/mev-share-rs/blob/main/crates/mev-share-sse/src/types.rs

SkandaBhat commented 1 month ago

Bundle has been added to BundleItem on alloy: https://github.com/alloy-rs/alloy/pull/1418 Should it be added in this repo as well? @mattsse