Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhagarwal03 committed Jul 4, 2024
1 parent 4fde33b commit 25596c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/imbalances_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 25596c1

Please sign in to comment.