Skip to content

Flashbot error handling issue #102

@siddharth0a

Description

@siddharth0a

Flashbot error handling issue

TLDR

There are two issues in the example/simple.py code:

  1. The network check before simulation is incorrect.
  2. Error handling is missing when canceling bundles.

Problem:

  1. Before simulation, the code checks if network == "mainnet". However, when printed, the network value is Network.Mainnet. So it doesn't do simulation for the bundle. The check should be updated to network == Network.Mainnet.
    if network == "mainnet":
Image
  1. When sending a bundle and waiting for receipts, if the transaction is not included in the target block, it throws a TransactionNotFound error. In this exception block, the code attempts to cancel the bundle without proper error handling. If an error occurs while canceling an invalid bundle, it is not handled correctly.
Image

Solution:

  1. Update the network check to use network == Network.Mainnet.
  2. Add appropriate error handling for the bundle cancellation process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions