-
Notifications
You must be signed in to change notification settings - Fork 1
feat(jd): new converter function for chain family #647
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
🦋 Changeset detectedLatest commit: 2762ba0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Maps JD proto ChainType to the chain selector family string. This is useful when users are using JD client received a response for node chain config where the type is a JD proto ChainType which is an integer , to make it useful, users would have to perform the [conversion themselves. ](https://github.com/smartcontractkit/chainlink/blob/0f6fe00217300ef6f8543abb40e6acc367c64c82/deployment/common/view/nops.go#L376-L394) Seems to make sense to have it in a single place for this mapping logic.
eb44fca to
2762ba0
Compare
|
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 introduces a utility function ChainTypeToFamily that converts JD proto ChainType enum values to chain selector family strings, eliminating the need for users to perform this conversion manually in multiple places.
- Adds
ChainTypeToFamilyconverter function with comprehensive error handling - Includes test coverage for all supported chain types and error cases
- Adds changeset documenting the new feature
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| offchain/jd/chain_type.go | Implements the ChainTypeToFamily converter function with switch-case mapping for all supported chain types |
| offchain/jd/chain_type_test.go | Provides comprehensive test coverage for all chain types including error cases |
| .changeset/sour-knives-join.md | Documents the new feature for release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "chainlink-deployments-framework": minor | ||
| --- | ||
|
|
||
| feat(jd): new mapper function for chain family |
Copilot
AI
Dec 31, 2025
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.
Corrected terminology from 'mapper' to 'converter' to match the PR title and description.
| feat(jd): new mapper function for chain family | |
| feat(jd): new converter function for chain family |




Maps JD proto ChainType to the chain selector family string.
This is useful when users are using JD client received a response for node chain config where the type is a JD proto ChainType which is an integer , to make it useful, users would have to perform the conversion themselves. Seems to make sense to have it in a single place for this mapping logic.