-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use new database layout #75
Conversation
src/helpers/blockchain_data.py
Outdated
@@ -71,3 +74,34 @@ def get_auction_id(self, tx_hash: str) -> int: | |||
# convert bytes to int | |||
auction_id = int.from_bytes(call_data_bytes[-8:], byteorder="big") | |||
return auction_id | |||
|
|||
|
|||
def get_transaction_timestamp(tx_hash: str, web3: Web3) -> tuple[str, int]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason these are not defined as methods of the BlockchainData class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be made a method of that class.
I just moved it around a bit and did not want to have it depend on all the other things for computing imbalances or even a chain name in this blockchain fetcher. Testing was a bit easier if those methods are standalone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The database setup seems to be working more or less now. Testing price fetching currently seems to require api keys. The coingecko price fetcher cannot be set up since the token list cannot be fetched. (The actual price fetching contains special treatment for not having a key, but that part of the code cannot be reached.) |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: pypi/[email protected], pypi/[email protected], pypi/[email protected], pypi/[email protected] |
Pushed a commit that comments out the old code except for the raw token imbalances calculation. The writing in the new tables is also based in the token imbalances token list, as this is more efficient (as we do not need prices for tokens with an imbalances of exactly zero). Merging so as to test for a few hours/days. A folllow-up clean-up PR should follow. Note: all new db tables have been manually created based on the definitions used in this PR. |
This
is a work-in-progressPR for using the database tables. It is not meant for review but more as a record of the current state of the implementation.Current state
(at most) oneALL available prices per tokenNext steps