Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
👋 yashnevatia, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
There was a problem hiding this comment.
Pull request overview
This PR adds Aptos blockchain support to chainlink-common, following the established pattern for other chains (EVM, Solana, TON). The changes introduce AptosService with core RPC methods for interacting with the Aptos blockchain.
Changes:
- Added
AptosServiceinterface with methods for account balance, view functions, events, transactions, and transaction submission - Implemented gRPC client/server layer with proto definitions and type converters
- Added comprehensive test coverage for Aptos service methods
- Generated mocks and updated mockery configuration
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/types/relayer.go | Added AptosService interface and UnimplementedAptosService |
| pkg/types/chains/aptos/aptos.go | Core Aptos type definitions (addresses, transactions, events, type tags) |
| pkg/chains/aptos/*.go | Proto definitions, generated code, and helper converters |
| pkg/loop/internal/relayer/aptos.go | gRPC client/server implementation for Aptos |
| pkg/loop/internal/relayerset/aptos.go | RelayerSet integration for Aptos |
| pkg/loop/internal/relayerset/relayerset_test.go | Comprehensive test coverage for Aptos service methods |
| pkg/types/mocks/aptos_service.go | Generated mock for AptosService interface |
| pkg/capabilities/v2/chain-capabilities/aptos/* | Capability framework integration for Aptos |
| go.mod, go.sum | Updated chainlink-protos dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nadahalli
left a comment
There was a problem hiding this comment.
The confidential-http MODE_NODE to MODE_DON change included via the proto bump is handled separately in #1843. That PR can be merged independently; this PR can rebase on top of it once merged.
Left a few inline comments on the Aptos-specific code.
| } | ||
|
|
||
| reply, err := aptosService.AccountAPTBalance(ctx, aptos.AccountAPTBalanceRequest{ | ||
| Address: aptos.AccountAddress(req.Address), |
There was a problem hiding this comment.
aptos.AccountAddress(req.Address) will panic if req.Address is not exactly 32 bytes. ConvertViewPayloadFromProto already validates address length before conversion; this should do the same.
| return nil, fmt.Errorf("generic type tag missing generic value") | ||
| } | ||
| impl = typeaptos.GenericTag{ | ||
| Index: uint16(genericValue.Index), |
There was a problem hiding this comment.
uint16(genericValue.Index) silently truncates if Index > 65535. Unlikely in practice but the narrowing is implicit.
| }, | ||
| }, | ||
| // { | ||
| // name: "EventsByHandle", |
There was a problem hiding this comment.
Commented-out test. If it's not ready, might be cleaner to remove it entirely and add it back when the TODO is resolved.
Requires
Supports