From 55ee0663f245060447200d6d91b4b54381ac0faf Mon Sep 17 00:00:00 2001 From: msizov Date: Wed, 15 May 2024 18:26:41 +0700 Subject: [PATCH] add evmos genesis block for archive detection (#477) --- .../upstream/ethereum/EthereumArchiveBlockNumberReader.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumArchiveBlockNumberReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumArchiveBlockNumberReader.kt index 4756b7815..445d1181a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumArchiveBlockNumberReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumArchiveBlockNumberReader.kt @@ -11,6 +11,8 @@ import kotlin.math.max private const val ARBITRUM_NITRO_BLOCK = "0x152DD47" // 22207815 private const val OPTIMISM_BEDROCK_BLOCK = "0x645C277" // 105235063 +private const val EVMOS_GENESIS_BLOCK = "0xe54d" // 58701 + private const val EARLIEST_BLOCK = "0x2710" // 10000 class EthereumArchiveBlockNumberReader( @@ -31,6 +33,7 @@ class EthereumArchiveBlockNumberReader( return when (chain) { Chain.ARBITRUM__MAINNET -> ARBITRUM_NITRO_BLOCK Chain.OPTIMISM__MAINNET -> OPTIMISM_BEDROCK_BLOCK + Chain.EVMOS__MAINNET -> EVMOS_GENESIS_BLOCK else -> EARLIEST_BLOCK }.run { Mono.just(this) } }