-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Implement DVN config script #107
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: main
Are you sure you want to change the base?
Conversation
This reverts commit 3434427.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
=======================================
Coverage 83.92% 83.92%
=======================================
Files 4 4
Lines 112 112
Branches 7 7
=======================================
Hits 94 94
Misses 17 17
Partials 1 1 ☔ View full report in Codecov by Sentry. |
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.
Pull Request Overview
This PR adds LayerZero configuration support for bridge setup, including executor and ULN (Universal Layer Network) configurations. The changes enable setting security parameters (DVNs, confirmations) and executor settings for cross-chain messaging.
- Adds new
LzConfigstruct and functions to read/set LayerZero configurations - Updates bridge configuration script to include executor and ULN config setup
- Adds test coverage for the new configuration functions
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/units/bridges/layerZero/IexecLayerZeroBridgeConfigureScript.t.sol | Adds test for setExecutorAndUlnConfigIfNeeded and helper function to build mock LZ configs |
| src/RLCCrosschainToken.sol | Removes unused import IAccessControl |
| script/utils/LayerZeroUtils.sol | Adds functions to get/set/log bridge LZ configs; changes function visibility from public to internal |
| script/lib/ConfigLib.sol | Adds LzConfig struct and readLzConfig function; refactors VM constant and config file path |
| script/bridges/layerZero/IexecLayerZeroBridge.s.sol | Updates configure script to accept and use LZ configs for executor and ULN setup |
| docs/LayerZeroSetup.md | Adds new documentation file with production checklist links |
| config/config.json | Adds LayerZero configuration parameters (libraries, executor, DVNs) for all chains |
| README.md | Adds link to production setup documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function setExecutorAndUlnConfigIfNeeded(LzConfig memory srcChainLzConfig, LzConfig memory dstChainLzConfig) | ||
| public | ||
| returns (bool) | ||
| { |
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.
TODO check if the config is needed.
| * @param srcChainConfig The LayerZero configuration parameters for the source chain. | ||
| * @param dstChainConfig The LayerZero configuration parameters for the destination chain. | ||
| */ | ||
| function setBridgeLzConfig(LzConfig memory srcChainConfig, LzConfig memory dstChainConfig) internal { |
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.
| function setBridgeLzConfig(LzConfig memory srcChainConfig, LzConfig memory dstChainConfig) internal { | |
| function setBridgeLzExecutorAndDvnConfig(LzConfig memory srcChainConfig, LzConfig memory dstChainConfig) internal { |
| vm.stopPrank(); | ||
| } | ||
|
|
||
| // TODO implement other tests. |
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.
Add tests for "ifNeeded" part.
No description provided.