diff --git a/rust/chains/hyperlane-ethereum/src/interchain_gas.rs b/rust/chains/hyperlane-ethereum/src/interchain_gas.rs index 97f14b22be..1722f6f755 100644 --- a/rust/chains/hyperlane-ethereum/src/interchain_gas.rs +++ b/rust/chains/hyperlane-ethereum/src/interchain_gas.rs @@ -10,7 +10,7 @@ use ethers::prelude::Middleware; use hyperlane_core::{ ChainCommunicationError, ChainResult, ContractLocator, HyperlaneAbi, HyperlaneChain, HyperlaneContract, HyperlaneDomain, HyperlaneProvider, Indexer, InterchainGasPaymaster, - InterchainGasPayment, LogMeta, SequenceAwareIndexer, H160, H256, + InterchainGasPayment, KnownHyperlaneDomain, LogMeta, SequenceAwareIndexer, H160, H256, }; use tracing::instrument; @@ -60,6 +60,7 @@ where contract: Arc>, provider: Arc, reorg_period: u32, + domain: HyperlaneDomain, } impl EthereumInterchainGasPaymasterIndexer @@ -75,6 +76,7 @@ where )), provider, reorg_period, + domain: locator.domain.clone(), } } } @@ -91,7 +93,12 @@ where range: RangeInclusive, ) -> ChainResult> { let mut filter = self.contract.gas_payment_filter(); - filter.filter.address = None; + if !matches!( + self.domain, + HyperlaneDomain::Known(KnownHyperlaneDomain::Mumbai) + ) { + filter.filter.address = None; + } let events = filter // let events = self diff --git a/rust/chains/hyperlane-ethereum/src/mailbox.rs b/rust/chains/hyperlane-ethereum/src/mailbox.rs index 40d156108c..8a2f78a273 100644 --- a/rust/chains/hyperlane-ethereum/src/mailbox.rs +++ b/rust/chains/hyperlane-ethereum/src/mailbox.rs @@ -10,6 +10,7 @@ use async_trait::async_trait; use ethers::abi::AbiEncode; use ethers::prelude::Middleware; use ethers_contract::builders::ContractCall; +use hyperlane_core::KnownHyperlaneDomain; use tracing::instrument; use hyperlane_core::{ @@ -85,6 +86,7 @@ where contract: Arc>, provider: Arc, reorg_period: u32, + domain: HyperlaneDomain, } impl EthereumMailboxIndexer @@ -101,6 +103,7 @@ where contract, provider, reorg_period, + domain: locator.domain.clone(), } } @@ -132,7 +135,12 @@ where range: RangeInclusive, ) -> ChainResult> { let mut filter = self.contract.dispatch_filter(); - filter.filter.address = None; + if !matches!( + self.domain, + HyperlaneDomain::Known(KnownHyperlaneDomain::Mumbai) + ) { + filter.filter.address = None; + } let mut events: Vec<(HyperlaneMessage, LogMeta)> = filter // let mut events: Vec<(HyperlaneMessage, LogMeta)> = self // .contract @@ -176,7 +184,12 @@ where #[instrument(err, skip(self))] async fn fetch_logs(&self, range: RangeInclusive) -> ChainResult> { let mut filter = self.contract.process_id_filter(); - filter.filter.address = None; + if !matches!( + self.domain, + HyperlaneDomain::Known(KnownHyperlaneDomain::Mumbai) + ) { + filter.filter.address = None; + } Ok(filter .from_block(*range.start()) diff --git a/rust/chains/hyperlane-ethereum/src/merkle_tree_hook.rs b/rust/chains/hyperlane-ethereum/src/merkle_tree_hook.rs index 9445fe5edb..46530118f2 100644 --- a/rust/chains/hyperlane-ethereum/src/merkle_tree_hook.rs +++ b/rust/chains/hyperlane-ethereum/src/merkle_tree_hook.rs @@ -10,8 +10,8 @@ use tracing::instrument; use hyperlane_core::{ ChainCommunicationError, ChainResult, Checkpoint, ContractLocator, HyperlaneChain, - HyperlaneContract, HyperlaneDomain, HyperlaneProvider, Indexer, LogMeta, MerkleTreeHook, - MerkleTreeInsertion, SequenceAwareIndexer, H256, + HyperlaneContract, HyperlaneDomain, HyperlaneProvider, Indexer, KnownHyperlaneDomain, LogMeta, + MerkleTreeHook, MerkleTreeInsertion, SequenceAwareIndexer, H256, }; use crate::contracts::merkle_tree_hook::{MerkleTreeHook as MerkleTreeHookContract, Tree}; @@ -81,6 +81,7 @@ where contract: Arc>, provider: Arc, reorg_period: u32, + domain: HyperlaneDomain, } impl EthereumMerkleTreeHookIndexer @@ -96,6 +97,7 @@ where )), provider, reorg_period, + domain: locator.domain.clone(), } } } @@ -112,7 +114,13 @@ where range: RangeInclusive, ) -> ChainResult> { let mut filter = self.contract.inserted_into_tree_filter(); - filter.filter.address = None; + if !matches!( + self.domain, + HyperlaneDomain::Known(KnownHyperlaneDomain::Mumbai) + ) { + filter.filter.address = None; + } + let events = filter .from_block(*range.start()) .to_block(*range.end())