Skip to content

Conversation

@sparrowDom
Copy link
Member

Add defender action to relay messages between mainnet and base

* fix unit test

* add more unit tests

* add more unit tests

* prettier

* add some more unit tests

* add thorough unit test support
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.37%. Comparing base (5e9ca5a) to head (19f4931).
⚠️ Report is 1 commits behind head on shah/cross-chain-strategy-cctpv2.

Additional details and impacted files
@@                         Coverage Diff                          @@
##           shah/cross-chain-strategy-cctpv2    #2770      +/-   ##
====================================================================
- Coverage                             44.54%   44.37%   -0.17%     
====================================================================
  Files                                   133      133              
  Lines                                  6145     6145              
  Branches                               1643     1643              
====================================================================
- Hits                                   2737     2727      -10     
- Misses                                 3404     3414      +10     
  Partials                                  4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

resolvedToBlock = overrideBlock;
} else {
const latestBlock = await provider.getBlockNumber();
resolvedFromBlock = Math.max(latestBlock - 10000, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Re: 10000, As of now, Ethereum does 7200 blocks per day. This could change in future. This also changes for other networks, so perhaps could make it a editable variable or constant at the top of the file?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point done here: 57b2942

@sparrowDom
Copy link
Member Author

@shahthepro I did another change where the configuration for the cross chain is separated into a config file. This way it should be much easier to add support for additional network pairs: ef2b043

Copy link
Collaborator

@shahthepro shahthepro left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 696 to 699
addresses.base.CrossChainRemoteStrategy =
"0x1743658b284a843b47f555343dbb628d46d0c254";
addresses.mainnet.CrossChainMasterStrategy =
"0x1743658b284a843b47f555343dbb628d46d0c254";
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: We should remove these before merging this in, this will definitely change when we do the actual deploy

Copy link
Member Author

Choose a reason for hiding this comment

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

good point removed here: 167d3ad

@sparrowDom sparrowDom merged commit d524c60 into shah/cross-chain-strategy-cctpv2 Jan 28, 2026
@sparrowDom sparrowDom deleted the sparrowDom/cctpDefenderAction branch January 28, 2026 08:49
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