From 0fdf364fad1127e8c34e1fc57dca26c0a362bdb9 Mon Sep 17 00:00:00 2001 From: Nicholas Welch Date: Wed, 22 May 2024 10:23:20 +1000 Subject: [PATCH] update constants, add gas price, add tax token --- fastlane_bot/config/constants.py | 2 ++ fastlane_bot/config/network.py | 4 ++++ fastlane_bot/helpers/txhelpers.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fastlane_bot/config/constants.py b/fastlane_bot/config/constants.py index ad855d546..af4c1ed65 100644 --- a/fastlane_bot/config/constants.py +++ b/fastlane_bot/config/constants.py @@ -16,6 +16,7 @@ "coinbase_base": 0, "fantom": 0.0003, "mantle": 0, + "telos": 0, } ETHEREUM = "ethereum" @@ -46,4 +47,5 @@ "mantle": 0, "linea": 0, "sei": 0, + "telos": 0, } diff --git a/fastlane_bot/config/network.py b/fastlane_bot/config/network.py index b8b1d1b0d..b6cf9fb8b 100644 --- a/fastlane_bot/config/network.py +++ b/fastlane_bot/config/network.py @@ -872,6 +872,10 @@ class _ConfigNetworkTelos(ConfigNetwork): # Add any exchanges unique to the chain here CHAIN_SPECIFIC_EXCHANGES = [] + TAX_TOKENS = set([ + "0x3E51e37350356B2D3ad84bD8146e48ac63E371a8", # BABYZAP + ]) + class _ConfigNetworkTenderly(ConfigNetwork): """ Fastlane bot config -- network [Ethereum Tenderly] diff --git a/fastlane_bot/helpers/txhelpers.py b/fastlane_bot/helpers/txhelpers.py index 0e5c6ee82..2d78046e6 100644 --- a/fastlane_bot/helpers/txhelpers.py +++ b/fastlane_bot/helpers/txhelpers.py @@ -113,7 +113,7 @@ def validate_and_submit_transaction( if self.cfg.SUPPORTS_EIP1559: gas_cost_wei = tx["gas"] * tx["maxFeePerGas"] else: - gas_cost_wei = tx["gas"] + gas_cost_wei = tx["gas"] * tx["gasPrice"] if self.cfg.network.GAS_ORACLE_ADDRESS: gas_cost_wei += self.cfg.GAS_ORACLE_CONTRACT.caller.getL1Fee(raw_tx)