diff --git a/src/daemon.py b/src/daemon.py index 33f9f2e..ac863ff 100644 --- a/src/daemon.py +++ b/src/daemon.py @@ -75,7 +75,7 @@ def get_finalized_block_number(web3: Web3) -> int: def fetch_transaction_hashes( read_db_connection: Engine, start_block: int, end_block: int ) -> List[str]: - """Fetch transaction hashes beginning from start_block to end_block. """ + """Fetch transaction hashes beginning from start_block to end_block.""" query = f""" SELECT tx_hash, auction_id FROM settlements @@ -132,7 +132,9 @@ def process_transactions(chain_name: str) -> None: token_address, imbalance, ) - logger.info("Token: %s, Imbalance: %s", token_address, imbalance) + logger.info( + "Token: %s, Imbalance: %s", token_address, imbalance + ) except ValueError as e: logger.error("ValueError: %s", e) unprocessed_txs.append(tx) diff --git a/src/imbalances_script.py b/src/imbalances_script.py index 1523f56..4b8420c 100644 --- a/src/imbalances_script.py +++ b/src/imbalances_script.py @@ -68,7 +68,6 @@ def find_chain_with_tx(tx_hash: str) -> Tuple[str, Web3]: raise ValueError(f"Transaction hash {tx_hash} not found on any chain.") - def _to_int(value: str | int) -> int: """Convert hex string or integer to integer.""" try: @@ -324,7 +323,7 @@ def compute_imbalances(self, tx_hash: str) -> Dict[str, int]: def main() -> None: - """ main function for finding imbalance for a single tx hash. """ + """main function for finding imbalance for a single tx hash.""" tx_hash = input("Enter transaction hash: ") chain_name, web3 = find_chain_with_tx(tx_hash) rt = RawTokenImbalances(web3, chain_name)