foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.19k stars 1.7k forks source link

Feature: Support for sending Flashbots bundles from forge scripts #4947

Open ape-dev-cs opened 1 year ago

ape-dev-cs commented 1 year ago

Component

Forge

Describe the feature you would like

I'd like to be able to easily send flashbots bundles within forge scripts for use-cases involving transactions that cannot hit public mempools for security reasons (e.g. MEV-able transactions, whitehat rescues, etc).

Doing this natively from a forge script obviates the need for me to use Hardhat for use-cases like this, or for me to write custom TypeScript/Rust code for each instance.

Additional context

I have a draft/WIP PR for this here: https://github.com/foundry-rs/foundry/pull/4948

zerosnacks commented 3 months ago

Supportive of this, collecting some feedback on how people are currently doing private transactions / bundles (with Foundry), particularly for rescue operations and MEV-able transactions.

@ape-dev-cs are you still interested in working on this?

zerosnacks commented 2 months ago

One important note that was raised by users was that any proposed solution should also cover the use case of sending private transactions on L2s by directly interacting with the sequencer RPC.