Skip to content

Commit

Permalink
minor rename
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Aug 21, 2024
1 parent be76322 commit e8a4698
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# relevant addresses
SETTLEMENT_CONTRACT_ADDRESS = "0x9008D19f58AAbD9eD0D60971565AA8510560ab41"
COW_DAO_MEV_BLOCKER_KICKBACKS_ADDRESS = "0xCe91228789B57DEb45e66Ca10Ff648385fE7093b"
COPIUM_MEV_BlOCKER_KICKBACKS_ADDRESS = "0x008300082C3000009e63680088f8c7f4D3ff2E87"
COPIUM_CAPITAL_MEV_BLOCKER_KICKBACKS_ADDRESS = "0x008300082C3000009e63680088f8c7f4D3ff2E87"

# requests
REQUEST_TIMEOUT = 5
Expand Down
12 changes: 7 additions & 5 deletions src/monitoring_tests/mev_blocker_kickbacks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from src.apis.web3api import Web3API
from src.constants import (
COW_DAO_MEV_BLOCKER_KICKBACKS_ADDRESS,
COPIUM_MEV_BLOCKER_KICKBACKS_ADDRESS,
COPIUM_CAPITAL_MEV_BLOCKER_KICKBACKS_ADDRESS,
KICKBACKS_ALERT_THRESHOLD,
)

Expand All @@ -35,14 +35,16 @@ def run(self, tx_hash: str) -> bool:
cow_dao_total_eth_kickbacks = self.web3_api.get_eth_transfers_by_block_range(
block_number, block_number, COW_DAO_MEV_BLOCKER_KICKBACKS_ADDRESS
)
copium_total_eth_kickbacks = self.web3_api.get_eth_transfers_by_block_range(
block_number, block_number, COPIUM_MEV_BLOCKER_KICKBACKS_ADDRESS
copium_capital_total_eth_kickbacks = (
self.web3_api.get_eth_transfers_by_block_range(
block_number, block_number, COPIUM_CAPITAL_MEV_BLOCKER_KICKBACKS_ADDRESS
)
)
eth_kickbacks = None
if cow_dao_total_eth_kickbacks is not None:
eth_kickbacks = cow_dao_total_eth_kickbacks
if copium_total_eth_kickbacks is not None:
eth_kickbacks = copium_total_eth_kickbacks
if copium_capital_total_eth_kickbacks is not None:
eth_kickbacks = copium_capital_total_eth_kickbacks

if eth_kickbacks is None:
return False
Expand Down

0 comments on commit e8a4698

Please sign in to comment.