From 1d496ab0d4306aad345ba1c36e50ef21d8b65c8c Mon Sep 17 00:00:00 2001 From: Shubh Agarwal Date: Thu, 22 Aug 2024 20:54:42 -0400 Subject: [PATCH] fix tx hash error --- requirements.txt | 2 +- src/helpers/blockchain_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7c078ab..02d760e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ requests==2.31.0 -web3>=6.0.0 +web3==7.0.0 pandas==2.2.1 SQLAlchemy==2.0.28 psycopg2==2.9.9 diff --git a/src/helpers/blockchain_data.py b/src/helpers/blockchain_data.py index 11c66ee..2c152ea 100644 --- a/src/helpers/blockchain_data.py +++ b/src/helpers/blockchain_data.py @@ -46,7 +46,7 @@ def get_tx_hashes_blocks( block = self.web3.eth.get_block(block_number, full_transactions=True) for tx in block.transactions: # type: ignore[attr-defined] if tx.to and tx.to.lower() == SETTLEMENT_CONTRACT_ADDRESS.lower(): - tx_hashes_blocks.append((tx.hash.hex(), block_number)) + tx_hashes_blocks.append((tx.hash.to_0x_hex(), block_number)) return tx_hashes_blocks def get_auction_id(self, tx_hash: str) -> int: