-
Notifications
You must be signed in to change notification settings - Fork 99
Sparrow dom/cctp defender action #2770
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
Sparrow dom/cctp defender action #2770
Conversation
* fix unit test * add more unit tests * add more unit tests * prettier * add some more unit tests * add thorough unit test support
…' into sparrowDom/cctpDefenderAction
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
contracts/tasks/crossChain.js
Outdated
| resolvedToBlock = overrideBlock; | ||
| } else { | ||
| const latestBlock = await provider.getBlockNumber(); | ||
| resolvedFromBlock = Math.max(latestBlock - 10000, 0); |
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.
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?
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.
good point done here: 57b2942
… support multiple networks and relaying directions
|
@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 |
shahthepro
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.
LGTM
contracts/utils/addresses.js
Outdated
| addresses.base.CrossChainRemoteStrategy = | ||
| "0x1743658b284a843b47f555343dbb628d46d0c254"; | ||
| addresses.mainnet.CrossChainMasterStrategy = | ||
| "0x1743658b284a843b47f555343dbb628d46d0c254"; |
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.
nit: We should remove these before merging this in, this will definitely change when we do the actual deploy
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.
good point removed here: 167d3ad
Add defender action to relay messages between mainnet and base