Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request significantly refactors the network configuration system for the Hardhat-based CCIP project. The main improvements include consolidating all network configuration data into a single TypeScript source of truth, removing the legacy
config.json, and auto-generating types and Hardhat network configs directly from this unified configuration. The documentation and developer workflow are also updated to reflect these changes, making it much easier to add and maintain supported networks.Network Configuration Refactor and Type Safety Improvements:
configDataobject inconfig/networks.ts, replacing the previousconfig.jsonfile and eliminating the need for manual synchronization between multiple sources. [1] [2]configData, ensuring type safety and reducing maintenance overhead. TheChainsandEVMChainstypes are now derived from the keys and structure ofconfigData. [1] [2]isValidChain,isEVMChain,validateNetworkName) are added to improve type safety and error handling when working with network names throughout the codebase.Developer Experience and Documentation Updates:
Codebase Cleanup and Task Improvements:
config.jsonhave been removed, and the codebase now imports configuration and types directly from the newconfig/networks.tsandconfig/types.tsfiles. [1] [2] [3] [4]validateNetworkNamefunction to ensure only supported networks are used, improving reliability and error messages for developers. [1] [2]Summary of Most Important Changes:
Network configuration architecture:
config.jsonto a singleconfigDataobject inconfig/networks.ts, with auto-generated types for network names and EVM chains. [1] [2] [3]configData, ensuring consistency and reducing duplication.Type safety and developer tooling:
isValidChain,isEVMChain) and a network name validator (validateNetworkName) to enforce correct usage of network names and improve error handling.Documentation and onboarding:
These changes modernize the network configuration workflow, improve maintainability, and make it easier and safer for developers to add and use new networks in the project.