From 8f34fc8a4a88ea8673adadae56962783e6cc9471 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 19 Jul 2024 17:32:53 -0400 Subject: [PATCH] made burning lp tokens optional --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index c22664f..1fa8e4f 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,7 @@ load_dotenv() secret = os.getenv('SECRET') wallet_address = os.getenv('WALLET_ADDRESS') burn_address = os.getenv('BURN_ADDRESS') -if not wallet_address or not burn_address or not secret or secret == 'changeme': +if not wallet_address or not secret or secret == 'changeme': print("Setup your .env file") sys.exit() os.makedirs(log_dir := "./data/logs/", exist_ok=True) @@ -153,6 +153,10 @@ def main(): else: logging.info("Added LP for {} and FRENS ({})".format(token_symbol, tx_hash.hex())) + # skip if no intention to send/burn lp tokens + if wallet_address == burn_address or not burn_address: + continue + # transfer lp tokens to burn address for log in tx_receipt['logs']: if log['topics'][0].hex() != '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef':