-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor view function from binding pkg #429
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?
Refactor view function from binding pkg #429
Conversation
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 refactors view-related functions from binding packages to separate view packages, enabling future optimization for auto-generated go bindings while avoiding circular dependencies. The changes include moving OnRampAddressMap, DestChainConfigMap, and SourceChainConfigMap to dedicated view packages under pkg/ccip/view/, updating references across the codebase, and bumping various dependency versions.
Key Changes:
- Created new view packages (
pkg/ccip/view/router,pkg/ccip/view/onramp,pkg/ccip/view/offramp) with extracted fetch logic - Updated import paths and references in deployment and chainaccessor packages
- Upgraded dependency versions including golang.org/x modules and chainlink-related packages
Reviewed changes
Copilot reviewed 16 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/ccip/view/router/onramp_address.go | New file containing extracted OnRampAddressMap type and Fetch method from router bindings |
| pkg/ccip/view/onramp/dest_chain_config.go | New file containing extracted DestChainConfigMap type and Fetch method from onramp bindings |
| pkg/ccip/view/offramp/source_chain_config.go | New file containing extracted SourceChainConfigMap type and Fetch method from offramp bindings |
| pkg/ccip/bindings/router/router.go | Removed OnRampAddressMap and related constants |
| pkg/ccip/bindings/onramp/onramp.go | Removed DestChainConfigMap and DestChainsGetter constant |
| pkg/ccip/bindings/offramp/offramp.go | Removed SourceChainConfigMap and SourceChainsGetter constant |
| pkg/ccip/chainaccessor/config.go | Updated import to use new offrampview package |
| deployment/view/router/router.go | Updated import to use new routerview package |
| deployment/view/onramp/onramp.go | Updated import to use new onrampview package |
| deployment/view/offramp/offramp.go | Updated import to use new offrampview package |
| go.mod | Updated multiple dependency versions |
| deployment/go.mod | Updated golang.org/x/sync and golang.org/x/sys versions |
| staging-monitor/go.mod | Updated golang.org/x/sync and golang.org/x/sys versions |
| integration-tests/go.mod | Updated deployment package version and multiple golang.org/x dependencies |
| go.md | Added chainlink-protos/linking-service/go dependency reference |
| cmd/chainlink-ton/lock.nix | Updated hash for chainlink-ton |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Jira
Moving the view related data type to a separate package to allow future optimization for go bindings (auto-generation). Not moved to chainlink-ton/deployment/view to avoid circular dependency between cl-ton and cl-ton/deployment