Skip to content

Comments

Aptos server#1842

Open
yashnevatia wants to merge 12 commits intomainfrom
aptos-server
Open

Aptos server#1842
yashnevatia wants to merge 12 commits intomainfrom
aptos-server

Conversation

@yashnevatia
Copy link
Contributor

Requires

Supports

yashnevatia and others added 9 commits February 13, 2026 14:07
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>
@github-actions
Copy link

👋 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!

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

⚠️ API Diff Results - Breaking changes detected

📦 Module: github-com-smartcontractkit-chainlink-common

🔴 Breaking Changes (2)

pkg/types.Relayer (1)
  • Aptos — ➕ Added
pkg/types/core.Relayer (1)
  • Aptos — ➕ Added

📄 View full apidiff report

Copy link
Contributor

Copilot AI left a 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 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 AptosService interface 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.

Copy link
Contributor

@nadahalli nadahalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uint16(genericValue.Index) silently truncates if Index > 65535. Unlikely in practice but the narrowing is implicit.

},
},
// {
// name: "EventsByHandle",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out test. If it's not ready, might be cleaner to remove it entirely and add it back when the TODO is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants