Skip to content

Conversation

@NikolasHaimerl
Copy link
Contributor

@NikolasHaimerl NikolasHaimerl commented Nov 18, 2025

Add FallbackHyperEVMFlowCompleted events from the OFT flow to the indexer.
Useful links: https://hyperevmscan.io/tx/0x05ccdbd44e8ffbed8f057762f40dee73fb218049347705d88f839dfe3c368c52#eventlog#5

Adds two generic functions to remove duplicate code:

  • formatAndSaveEvents and getEventsFromTransactionReceipts

…HyperEVMFlowCompleted tracking

- Extract `getEventsFromTransactionReceipts` and `formatAndSaveEvents` into reusable generic utilities in `eventProcessing.ts`
- Refactor `hyperEvmExecutor.ts` to export formatting functions instead of processing logic
- Add `FallbackHyperEVMFlowCompleted` event tracking to OFT indexer alongside existing `SimpleTransferFlowCompleted` events
- Replace duplicate event extraction methods in `CCTPIndexerDataHandler` with generic utilities
- Update `EventDecoder` methods to use static references for consistency
- Add integration test coverage for `FallbackHyperEVMFlowCompleted` event processing
@NikolasHaimerl NikolasHaimerl changed the base branch from master to nikolas/track-SimpleTransferCompleted-OFT November 18, 2025 15:54
blocksTimestamps,
),
formatAndSaveSimpleTransferFlowCompletedEvents(
formatAndSaveEvents(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make this change for all the other format functions too, but I wanted to keep the PR reviewable and limit it to the hyperEVMexecutor contract.

"0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036";
const eventAbi = ["event MessageSent (bytes message)"];
let events: MessageSentLog[] = this.decodeTransactionReceiptLogs(
let events: MessageSentLog[] = EventDecoder.decodeTransactionReceiptLogs(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are necessary due to typescript compiler errors. The class is not defined if the static methods are called without initializing the class.

Copy link
Contributor

@amateima amateima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big plus for the refactoring! Simple changes but very effective 👍

Comment on lines +211 to +215
fallbackHyperEVMFlowCompletedEvents = getEventsFromTransactionReceipts(
transactionReceipts,
dstOftHandlerAddress,
EventDecoder.decodeFallbackHyperEVMFlowCompletedEvents,
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This operation should be limited to HyperEVM only, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so, the OFTdstHandler only exists on hyperEVM right now AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants