Skip to content

Commit

Permalink
Resolve black formatter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
odysseus0 committed Jul 20, 2024
1 parent 804360b commit eb517e0
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions flashbots/flashbots.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def __init__(self, w3: Web3, signed_tx: HexBytes, max_block_number: int):
def wait(self) -> bool:
"""Waits up to max block number, returns `True` if/when tx has been mined.
If tx has not been mined by the time the current block > max_block_number, returns `False`."""
If tx has not been mined by the time the current block > max_block_number, returns `False`.
"""
while True:
try:
self.w3.eth.get_transaction(self.tx["hash"])
Expand Down Expand Up @@ -220,12 +221,12 @@ def send_raw_bundle_munger(
"blockNumber": hex(target_block_number),
"minTimestamp": opts["minTimestamp"] if "minTimestamp" in opts else 0,
"maxTimestamp": opts["maxTimestamp"] if "maxTimestamp" in opts else 0,
"revertingTxHashes": opts["revertingTxHashes"]
if "revertingTxHashes" in opts
else [],
"replacementUuid": opts["replacementUuid"]
if "replacementUuid" in opts
else None,
"revertingTxHashes": (
opts["revertingTxHashes"] if "revertingTxHashes" in opts else []
),
"replacementUuid": (
opts["replacementUuid"] if "replacementUuid" in opts else None
),
}
]

Expand Down Expand Up @@ -400,7 +401,8 @@ def send_private_transaction_munger(
) -> Any:
"""Sends a single transaction to Flashbots.
If `max_block_number` is set, Flashbots will try to submit the transaction in every block <= that block (max 25 blocks from present)."""
If `max_block_number` is set, Flashbots will try to submit the transaction in every block <= that block (max 25 blocks from present).
"""
signed_transaction: str
if "signed_transaction" in transaction:
signed_transaction = transaction["signed_transaction"]
Expand Down Expand Up @@ -438,7 +440,8 @@ def cancel_private_transaction_munger(
) -> bool:
"""Stops a private transaction from being sent to miners by Flashbots.
Note: if a transaction has already been received by a miner, it may still be mined. This simply stops further submissions."""
Note: if a transaction has already been received by a miner, it may still be mined. This simply stops further submissions.
"""
params = {
"txHash": tx_hash,
}
Expand Down

0 comments on commit eb517e0

Please sign in to comment.