Skip to content

Conversation

@ashwinrava
Copy link
Member

Changes:

  • Made CCTP bridge strategy pick the right finalizer address (EVM vs Solana) before encoding the destination caller.
  • Added tests to test/api/_bridges/cctp/strategy.test.ts.

Testing: I tested locally by creating a deposit transaction from the swap API (without marker to avoid the prod finalizer from picking it up) and ran the finalizer code locally to confirm the mint works as expected.

@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
app-frontend-v3 Ready Ready Preview Comment Dec 8, 2025 4:26pm
sepolia-frontend-v3 Ready Ready Preview Comment Dec 8, 2025 4:26pm

export const DEFAULT_CCTP_ACROSS_FINALIZER_ADDRESS =
"0x72adB07A487f38321b6665c02D289C413610B081";

const CCTP_FINALIZER_ADDRESS_OVERRIDES: Record<number, string> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an override or should we simply have a chainId to address mapping for the finalizer?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm so I'm following the same override pattern that we do for getCctpTokenMessengerAddress and getCctpMessageTransmitterAddress: https://github.com/across-protocol/frontend/blob/master/api/_bridges/cctp/utils/constants.ts#L52-L73

I think we don't need a full mapping because all the EVM chain ids will use the same address so we'd have a bunch of redundant entries. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this case is better if we use chainIsSvm() check to decide which address to return. Wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea I also think just adding DEFAULT_CCTP_ACROSS_FINALIZER_ADDRESS_SVM should be sufficient for now

dohaki
dohaki previously approved these changes Dec 5, 2025
Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Just one nit about the ongoing conversation

export const DEFAULT_CCTP_ACROSS_FINALIZER_ADDRESS =
"0x72adB07A487f38321b6665c02D289C413610B081";

const CCTP_FINALIZER_ADDRESS_OVERRIDES: Record<number, string> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yea I also think just adding DEFAULT_CCTP_ACROSS_FINALIZER_ADDRESS_SVM should be sufficient for now

Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

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

LGTM! Is the SVM finalizer in prod already though? We should probably enable this in the API after the finalizer is ready right?

@ashwinrava
Copy link
Member Author

LGTM! Is the SVM finalizer in prod already though? We should probably enable this in the API after the finalizer is ready right?

Yup I'll merge them in order. Going to push the finalizer changes first to my release branch and if everything looks good, I'll merge this.

Copy link
Contributor

@melisaguevara melisaguevara left a comment

Choose a reason for hiding this comment

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

lgtm!!

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.

Before merging this we should test the entire flow with the indexer and finalizer bot

@ashwinrava
Copy link
Member Author

Before merging this we should test the entire flow with the indexer and finalizer bot

Yeah I tested it end to end: swap API -> indexer -> finalizer and it's working well.

Here is one finalize transaction for example.

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.

6 participants