diff --git a/fastlane_bot/config/network.py b/fastlane_bot/config/network.py index f893d4380..57b37f040 100644 --- a/fastlane_bot/config/network.py +++ b/fastlane_bot/config/network.py @@ -285,9 +285,12 @@ class ConfigNetwork(ConfigBase): # HOOKS ####################################################################################### @staticmethod - def gas_strategy(web3): + def gas_strategy(web3, max_priority_fee_supported=True): gas_price = web3.eth.gas_price # send `eth_gasPrice` request - max_priority_fee = web3.eth.max_priority_fee # send `eth_maxPriorityFeePerGas` request + max_priority_fee = 0 + if max_priority_fee_supported: + max_priority_fee = web3.eth.max_priority_fee # send `eth_maxPriorityFeePerGas` request + return { "maxFeePerGas": gas_price + max_priority_fee, "maxPriorityFeePerGas": max_priority_fee diff --git a/fastlane_bot/helpers/txhelpers.py b/fastlane_bot/helpers/txhelpers.py index 0fdf166fc..d7a557b6a 100644 --- a/fastlane_bot/helpers/txhelpers.py +++ b/fastlane_bot/helpers/txhelpers.py @@ -174,7 +174,7 @@ def _update_transaction(self, tx: dict): if tx["gas"] > result["gasUsed"] and "error" not in result: tx["gas"] = result["gasUsed"] tx["accessList"] = loads(self.cfg.w3.to_json(result["accessList"])) - tx.update(self.cfg.network.gas_strategy(self.cfg.w3)) + tx.update(self.cfg.network.gas_strategy(self.cfg.w3, self.cfg.network == self.cfg.NETWORK_SEI)) def _sign_transaction(self, tx: dict) -> str: return self.cfg.w3.eth.account.sign_transaction(tx, self.cfg.ETH_PRIVATE_KEY_BE_CAREFUL).rawTransaction.hex()