Skip to content

Commit

Permalink
Add extensive path logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lesigh-3100 committed Jun 25, 2024
1 parent 52a273a commit 28e33c1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fastlane_bot/events/managers/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,19 @@ def get_token_info_from_contract(
tokens_filepath = os.path.normpath(
f"fastlane_bot/data/blockchain_data/{self.cfg.NETWORK}/tokens.csv"
)

self.log_path_exists("fastlane_bot")
self.log_path_exists("fastlane_bot/data")
self.log_path_exists("fastlane_bot/data/blockchain_data")
self.log_path_exists(f"fastlane_bot/data/blockchain_data/{self.cfg.NETWORK}")
self.log_path_exists(f"fastlane_bot/data/blockchain_data/{self.cfg.NETWORK}/tokens.csv")
self.log_path_exists(self.prefix_path)
self.log_path_exists(f"{self.prefix_path}fastlane_bot")
self.log_path_exists(f"{self.prefix_path}fastlane_bot/data")
self.log_path_exists(f"{self.prefix_path}fastlane_bot/data/blockchain_data")
self.log_path_exists(f"{self.prefix_path}fastlane_bot/data/blockchain_data/{self.cfg.NETWORK}")
self.log_path_exists(f"{self.prefix_path}fastlane_bot/data/blockchain_data/{self.cfg.NETWORK}/token_detail")

token_data = pd.read_csv(tokens_filepath)
extra_info = glob(
os.path.normpath(
Expand Down Expand Up @@ -367,6 +380,10 @@ def __init__(self, addr):
def __str__(self):
return self.message

def log_path_exists(self, path):
exists = os.path.exists(os.path.normpath(path))
self.cfg.logger.info(f"Filepath: {path}. Exists: {exists}")

def _get_and_save_token_info_from_contract(
self,
contract: Contract,
Expand Down

0 comments on commit 28e33c1

Please sign in to comment.