Skip to content

Add cap server client#2049

Open
ilija42 wants to merge 2 commits into
mainfrom
feature/stellar-cre
Open

Add cap server client#2049
ilija42 wants to merge 2 commits into
mainfrom
feature/stellar-cre

Conversation

@ilija42
Copy link
Copy Markdown
Contributor

@ilija42 ilija42 commented May 12, 2026

Requires

Supports

Copilot AI review requested due to automatic review settings May 12, 2026 10:20
@ilija42 ilija42 requested review from a team as code owners May 12, 2026 10:20
@ilija42 ilija42 changed the title Feature/stellar cre Add cap server client May 12, 2026
@product-security-plaid-production product-security-plaid-production Bot requested review from archseer and chudilka1 and removed request for archseer May 12, 2026 10:21
@github-actions
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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 introduces new Stellar CRE chain-capability bindings (generated protobuf + server wrapper) and supporting proto/domain conversion + validation helpers, and extends the Stellar domain client interface.

Changes:

  • Added SimulateTransaction to the pkg/types/chains/stellar.Client interface.
  • Added generated Stellar chain-capability proto/server code under pkg/capabilities/v2/chain-capabilities/stellar/.
  • Added proto helper conversions/validators (with tests) for Stellar chain-capability messages; bumped chainlink-protos/cre/go dependency.

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/types/chains/stellar/stellar.go Extends Stellar domain client interface with SimulateTransaction.
pkg/capabilities/v2/chain-capabilities/stellar/server/client_server_gen.go Generated capability server wrapper for Stellar methods (GetLatestLedger/ReadContract/WriteReport).
pkg/capabilities/v2/chain-capabilities/stellar/proto_helpers.go Adds proto↔domain conversion helpers and request validation.
pkg/capabilities/v2/chain-capabilities/stellar/proto_helpers_test.go Adds unit tests for conversions and validators.
pkg/capabilities/v2/chain-capabilities/stellar/generate.go Adds go:generate entry for Stellar capability codegen.
pkg/capabilities/v2/chain-capabilities/stellar/client.pb.go Generated protobuf bindings for Stellar CRE client capability.
go.mod Bumps github.com/smartcontractkit/chainlink-protos/cre/go version.
go.sum Updates checksums for the bumped dependency version.
Files not reviewed (2)
  • pkg/capabilities/v2/chain-capabilities/stellar/client.pb.go: Language not supported
  • pkg/capabilities/v2/chain-capabilities/stellar/server/client_server_gen.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 6 to +8
// Both methods map 1:1 to the Stellar RPC API.
type Client interface {
SimulateTransaction(context.Context, string, []byte) ([]byte, error)
}

// ConvertGetLatestLedgerResponseToProto converts the domain GetLatestLedgerResponse to a proto.
// Hash must be a valid lowercase hex string; XDR fields must be valid standard base64.
// domain type. Hash is returned as lowercase hex; XDR fields are returned as standard base64.
func ConvertGetLatestLedgerResponseFromProto(p *GetLatestLedgerResponse) (stellartypes.GetLatestLedgerResponse, error) {
if p == nil {
return stellartypes.GetLatestLedgerResponse{}, errors.New("GetLatestLedgerResponse is nil")
// ValidateReadContractRequest checks that required fields are present.
func ValidateReadContractRequest(req *ReadContractRequest) error {
if req == nil {
return errors.New("ReadContractRequest is nil")
// ValidateWriteReportRequest checks that required fields are present.
func ValidateWriteReportRequest(req *WriteReportRequest) error {
if req == nil {
return errors.New("WriteReportRequest is nil")
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