-
Notifications
You must be signed in to change notification settings - Fork 2
feat: track fallback hyper evm flow completed oft #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nikolas/track-SimpleTransferCompleted-OFT
Are you sure you want to change the base?
feat: track fallback hyper evm flow completed oft #434
Conversation
…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
…/track-FallbackHyperEVMFlowCompleted-Oft
| blocksTimestamps, | ||
| ), | ||
| formatAndSaveSimpleTransferFlowCompletedEvents( | ||
| formatAndSaveEvents( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
…exer data handlers
…/track-FallbackHyperEVMFlowCompleted-Oft
…/track-FallbackHyperEVMFlowCompleted-Oft
amateima
left a comment
There was a problem hiding this 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 👍
| fallbackHyperEVMFlowCompletedEvents = getEventsFromTransactionReceipts( | ||
| transactionReceipts, | ||
| dstOftHandlerAddress, | ||
| EventDecoder.decodeFallbackHyperEVMFlowCompletedEvents, | ||
| ); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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:
formatAndSaveEventsandgetEventsFromTransactionReceipts