@@ -5,11 +5,9 @@ import { CHAIN_IDs } from "@across-protocol/constants";
55import { formatFromAddressToChainFormat } from "../../utils" ;
66import {
77 BlockRange ,
8- HYPERCORE_FLOW_EXECUTOR_ADDRESS ,
98 SimpleTransferFlowCompletedLog ,
109 ArbitraryActionsExecutedLog ,
1110 FallbackHyperEVMFlowCompletedLog ,
12- ARBITRARY_EVM_FLOW_EXECUTOR_ADDRESS ,
1311} from "../model" ;
1412import { IndexerDataHandler } from "./IndexerDataHandler" ;
1513import { EventDecoder } from "../../web3/EventDecoder" ;
@@ -84,6 +82,12 @@ const TOKEN_MESSENGER_ADDRESS: string =
8482const MESSAGE_TRANSMITTER_ADDRESS : string =
8583 "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275" ;
8684
85+ // TODO: Update this address once the contract is deployed
86+ const SPONSORED_CCTP_DST_PERIPHERY_ADDRESS : { [ key : number ] : string } = {
87+ // Taken from https://hyperevmscan.io/address/0x7B164050BBC8e7ef3253e7db0D74b713Ba3F1c95#code
88+ [ CHAIN_IDs . HYPEREVM ] : "0x7B164050BBC8e7ef3253e7db0D74b713Ba3F1c95" ,
89+ } ;
90+
8791// TODO: Update this address once the contract is deployed
8892const SPONSORED_CCTP_SRC_PERIPHERY_ADDRESS : { [ key : number ] : string } = {
8993 [ CHAIN_IDs . ARBITRUM_SEPOLIA ] : "0x79176E2E91c77b57AC11c6fe2d2Ab2203D87AF85" ,
@@ -160,10 +164,8 @@ export class CCTPIndexerDataHandler implements IndexerDataHandler {
160164 ) : Promise < FetchEventsResult > {
161165 const sponsoredCCTPSrcPeripheryAddress =
162166 SPONSORED_CCTP_SRC_PERIPHERY_ADDRESS [ this . chainId ] ;
163- const hyperEvmExecutorAddress =
164- HYPERCORE_FLOW_EXECUTOR_ADDRESS [ this . chainId ] ;
165- const arbitraryEvmFlowExecutorAddress =
166- ARBITRARY_EVM_FLOW_EXECUTOR_ADDRESS [ this . chainId ] ;
167+ const sponsoredCCTPDstPeripheryAddress =
168+ SPONSORED_CCTP_DST_PERIPHERY_ADDRESS [ this . chainId ] ;
167169
168170 const tokenMessengerContract = new ethers . Contract (
169171 TOKEN_MESSENGER_ADDRESS ,
@@ -268,30 +270,26 @@ export class CCTPIndexerDataHandler implements IndexerDataHandler {
268270
269271 let simpleTransferFlowCompletedEvents : SimpleTransferFlowCompletedLog [ ] =
270272 [ ] ;
271- if ( hyperEvmExecutorAddress ) {
273+ let arbitraryActionsExecutedEvents : ArbitraryActionsExecutedLog [ ] = [ ] ;
274+ let fallbackHyperEVMFlowCompletedEvents : FallbackHyperEVMFlowCompletedLog [ ] =
275+ [ ] ;
276+ if ( sponsoredCCTPDstPeripheryAddress ) {
272277 simpleTransferFlowCompletedEvents =
273278 this . getSimpleTransferFlowCompletedEventsFromTransactionReceipts (
274279 filteredMessageReceivedTxReceipts ,
275- hyperEvmExecutorAddress ,
280+ sponsoredCCTPDstPeripheryAddress ,
276281 ) ;
277- }
278282
279- let arbitraryActionsExecutedEvents : ArbitraryActionsExecutedLog [ ] = [ ] ;
280- if ( arbitraryEvmFlowExecutorAddress ) {
281283 arbitraryActionsExecutedEvents =
282284 this . getArbitraryActionsExecutedEventsFromTransactionReceipts (
283285 filteredMessageReceivedTxReceipts ,
284- arbitraryEvmFlowExecutorAddress ,
286+ sponsoredCCTPDstPeripheryAddress ,
285287 ) ;
286- }
287288
288- let fallbackHyperEVMFlowCompletedEvents : FallbackHyperEVMFlowCompletedLog [ ] =
289- [ ] ;
290- if ( arbitraryEvmFlowExecutorAddress ) {
291289 fallbackHyperEVMFlowCompletedEvents =
292290 this . getFallbackHyperEVMFlowCompletedEventsFromTransactionReceipts (
293291 filteredMessageReceivedTxReceipts ,
294- arbitraryEvmFlowExecutorAddress ,
292+ sponsoredCCTPDstPeripheryAddress ,
295293 ) ;
296294 }
297295
0 commit comments