-
Notifications
You must be signed in to change notification settings - Fork 15
[CRE-491] Move EVM relay read files from core #341
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
Conversation
✅ API Diff Results - No breaking changes |
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 moves EVM relay read-related files from the chainlink core repository to chainlink-evm as part of dependency refactoring work.
Changes:
- Adds batch calling infrastructure with dynamic limit retry logic for EVM RPC calls
- Introduces bindings registry system for managing contract readers and event bindings
- Implements multi-event type querying capabilities
- Adds CCIP v1.6.0 gobindings (onramp/offramp) for optimized event decoding
- Includes comprehensive error handling and filtering mechanisms
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/read/batch.go | Implements batch caller with dynamic retry and parallel execution support |
| pkg/read/bindings.go | Provides bindings registry for managing contract readers and addresses |
| pkg/read/contract.go | Manages contract-level bindings and filter registration |
| pkg/read/event.go | Core event binding implementation with log decoding and filtering |
| pkg/read/method.go | Method binding for contract read operations |
| pkg/read/multieventtype.go | Multi-event type query support with validation |
| pkg/read/filter.go | Synced filter management for log poller registration |
| pkg/read/errors.go | Custom error types for read operations |
| pkg/read/lookup.go | Read identifier lookup utilities |
| pkg/read/bindings/offramp/offramp.go | CCIP v1.6.0 offramp gobindings |
| pkg/read/bindings/onramp/onramp.go | CCIP v1.6.0 onramp gobindings |
| pkg/read/mocks/*.go | Generated mock implementations |
| pkg/read/*_test.go | Test coverage for batch caller, bindings, events, and multi-event types |
| go.mod | Adds chainlink-protos/cre/go and golang.org/x/sync dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func Test_DecodeHardcodedType(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| t.Run("decode hardcoded type offramp CoommitReportAccess success", func(t *testing.T) { |
Copilot
AI
Jan 26, 2026
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 spelling of 'CoommitReportAccess' to 'CommitReportAccess'.
| t.Run("decode hardcoded type offramp CoommitReportAccess success", func(t *testing.T) { | |
| t.Run("decode hardcoded type offramp CommitReportAccess success", func(t *testing.T) { |
| require.True(t, bytes.Equal(fixtLog.Message.FeeToken.Bytes(), out.Message.FeeToken[:])) | ||
| require.Len(t, out.Message.TokenAmounts, len(fixtLog.Message.TokenAmounts)) | ||
| }) | ||
| t.Run("decode hardcoded tupe offramp ExecutionStateChange success", func(t *testing.T) { |
Copilot
AI
Jan 26, 2026
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 spelling of 'tupe' to 'type'.
| t.Run("decode hardcoded tupe offramp ExecutionStateChange success", func(t *testing.T) { | |
| t.Run("decode hardcoded type offramp ExecutionStateChange success", func(t *testing.T) { |
| func convertOnRampCCIPMessage(m onramp.InternalEVM2AnyRampMessage) ccipocr3.Message { | ||
| var out ccipocr3.Message | ||
|
|
||
| // header population. NOTE OnRamp and MsgHash will be populater by the CR caller |
Copilot
AI
Jan 26, 2026
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 spelling of 'populater' to 'populated'.
| // header population. NOTE OnRamp and MsgHash will be populater by the CR caller | |
| // header population. NOTE OnRamp and MsgHash will be populated by the CR caller |
Supports smartcontractkit/chainlink#20929