Skip to content

feat: finalize *tokenless* HubPool CCTP messages #2270

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

grasphoper
Copy link
Contributor

@grasphoper grasphoper commented May 24, 2025

Current implementation of CCTP finalizer is only tracking DepositForBurn events, and thus is not considering other types of CCTP messages. CCTP can send tokenless messages via MessageTransmitter contract, which emits MessageSent(bytes message) event.

We use HubPool events TokensRelayed and MessageRelayed to find relevant tx hashes to search for such MessageTransmitter MessageSent events in addition to all DepositForBurn events.

Signed-off-by: Ihor Farion <[email protected]>
Signed-off-by: Ihor Farion <[email protected]>
Signed-off-by: Ihor Farion <[email protected]>
@grasphoper grasphoper changed the title feat: finalize *tokenless* HubPool CCTP messages in addition to all DepositForBurn messages feat: finalize *tokenless* HubPool CCTP messages May 24, 2025
@grasphoper grasphoper marked this pull request as ready for review May 28, 2025 16:02
@grasphoper
Copy link
Contributor Author

Tested the following:

  • equality between new code and old code in finding CCTP DepositForBurn events
  • v1 crosschain transfer: send, finalize
  • v1 crosschain message relay: send, finalize
  • v2 crosschain transfer: send, finalize
  • v2 crosschain message relay: send, finalize

@grasphoper grasphoper requested a review from pxrl May 28, 2025 20:21
Signed-off-by: Ihor Farion <[email protected]>
@grasphoper grasphoper requested a review from pxrl May 28, 2025 22:40
@grasphoper
Copy link
Contributor Author

grasphoper commented Jun 3, 2025

@pxrl Did my best to simplify the loop we were talking about. It still is a big chunk of code, but I created one extra fn for readability getRelevantCCTPEventsFromReceipt (and for less indentations) and tried to structure the code a bit better. Underlying logic is the same though

272d1b9 + c6fadd5

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.

2 participants