Skip to content

Commit

Permalink
Add more env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Oct 16, 2024
1 parent 08cfefd commit 2d36ef9
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@
def main() -> None:
# valid chain names: mainnet, xdai, arbitrum_one
chain_name = os.getenv("CHAIN_NAME")
process_imbalances = os.getenv("PROCESS_IMBALANCES", True)
process_prices = os.getenv("PROCESS_PRICES", False)
process_fees = os.getenv("PROCESS_FEES", False)

if chain_name is None:
logger.error("CHAIN_NAME environment variable is not set.")
return

process_imbalances = True
process_fees = False
process_prices = True

if chain_name == "arbitrum_one":
process_imbalances = False
process_prices = False

if chain_name == "xdai":
process_prices = False

processor = TransactionProcessor(
chain_name, process_imbalances, process_fees, process_prices
)

processor.run()


Expand Down

0 comments on commit 2d36ef9

Please sign in to comment.