Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions config/indexer-config-hyper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
chain_id: 999

export_tokens_and_transfers_job:
filter_token_address:
- "0xe6829d9a7ee3040e1276fa75293bde931859e8fa"


export_transactions_and_logs_job:
use_receipt_from_blocks_rpc: True


uniswap_v3_job:
# empty means no filter. only work in price job
pool_address:
- '0x765975e3f795ce8607497818b72493569faec961'

# works in price\token job
jobs:
- type: uniswapv3 # uniswapv3`
factory_address: '0xb1c0fa0b789320044a6f623cfe5ebda9562602e3'
position_token_address: '0x6eda206207c09e5428f281761ddc0d300851fbc8'


export_staked_transferred_balance_job:
TRANSFERRED_CONTRACTS_DICT:
# hypurr:
# - "0x64df7b4da81a26a59417857f508b39370138d95e"
morphobeat:
- "0x68e37de8d93d3496ae143f2e900490f6280c57cd"
token_address:
# cmeth
- "0xe6829d9a7ee3040e1276fa75293bde931859e8fa"
2 changes: 2 additions & 0 deletions hemera/common/utils/exception_control.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import sys
import time
import traceback

from werkzeug.exceptions import HTTPException
Expand Down Expand Up @@ -123,6 +124,7 @@ def decode_response_error(error):
elif code == -32700 or code == -32600 or code == -32602:
raise FastShutdownError(message)
elif (-32000 > code >= -32099) or code == -32603:
time.sleep(5)
raise RetriableError(message)
else:
return None
Expand Down
7 changes: 7 additions & 0 deletions hemera/indexer/controller/scheduler/job_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,17 @@ def run_jobs(self, start_block, end_block):
self.logger.info(f"{message}")

def job_with_retires(self, job, start_block, end_block):
sleep_time = self.config.get('control_sleep', 0.2)
for retry in range(JOB_RETRIES + 1):
if retry >0:
retry_sleep_time = retry * 5
self.logger.info(f"sleep {retry_sleep_time}s")
time.sleep(retry_sleep_time)
try:
self.logger.info(f"Task run {job.__class__.__name__}")
job.run(start_block=start_block, end_block=end_block)
self.logger.info(f"sleep {sleep_time} s")
time.sleep(sleep_time)

if self.metrics and retry > 0:
self.metrics.update_job_processing_retry(job_name=job.__class__.__name__, retry=retry)
Expand Down
2 changes: 1 addition & 1 deletion hemera/indexer/executors/batch_work_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
max_workers,
job_name="BatchWorkExecutor",
retry_exceptions=RETRY_EXCEPTIONS,
max_retries=5,
max_retries=2,
):
self.batch_size = starting_batch_size
self.max_batch_size = starting_batch_size
Expand Down
1 change: 1 addition & 0 deletions hemera/indexer/utils/multicall_hemera/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def get_all_networks(cls) -> Dict[int, "NetworkConfig"]:
MONAD_TESTNET = NetworkConfig(10143, "MonadalTestnet", 251449)
SONIC = NetworkConfig(146, "Sonic", 60)
SONIC_TESTNET = NetworkConfig(57054, "SonicTestnet", 1100)
HYPER = NetworkConfig(999, "HyperEVM", 13051)


def get_multicall_network(chain_id: int) -> NetworkConfig:
Expand Down
Loading