diff --git a/src/common/execution.py b/src/common/execution.py index 0f20e8e6..7b2c6ed1 100644 --- a/src/common/execution.py +++ b/src/common/execution.py @@ -167,8 +167,8 @@ async def get_tx_params() -> TxParams: return tx_params -async def check_gas_price() -> bool: - if settings.max_priority_fee_per_gas_gwei: +async def check_gas_price(custom_priority_fee: bool = False) -> bool: + if custom_priority_fee: # custom gas-price logic tx_params = await get_tx_params() max_fee_per_gas = Wei(int(tx_params['maxFeePerGas'])) diff --git a/src/harvest/execution.py b/src/harvest/execution.py index 5d84b608..55688e4b 100644 --- a/src/harvest/execution.py +++ b/src/harvest/execution.py @@ -5,7 +5,6 @@ from src.common.clients import execution_client from src.common.contracts import vault_contract -from src.common.execution import get_tx_params from src.common.typings import HarvestParams from src.common.utils import format_error from src.config.networks import ETH_NETWORKS @@ -20,7 +19,6 @@ async def submit_harvest_transaction(harvest_params: HarvestParams) -> HexStr | logger.info('Submitting harvest transaction...') try: - tx_params = await get_tx_params() tx = await vault_contract.functions.updateState( ( harvest_params.rewards_root, @@ -28,7 +26,7 @@ async def submit_harvest_transaction(harvest_params: HarvestParams) -> HexStr | harvest_params.unlocked_mev_reward, harvest_params.proof, ) - ).transact(tx_params) + ).transact() except Exception as e: logger.error('Failed to harvest: %s', format_error(e)) if settings.verbose: