Skip to content

Commit

Permalink
Del custom priority fee from harvest tx
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Mar 4, 2024
1 parent d6e43cb commit 0312fe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/common/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down
4 changes: 1 addition & 3 deletions src/harvest/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,15 +19,14 @@ 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,
harvest_params.reward,
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:
Expand Down

0 comments on commit 0312fe4

Please sign in to comment.