From 609e75f88a52a8a5f9d7f12d7e44b4f5be61ff12 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 2 Jun 2026 17:58:28 -0400 Subject: [PATCH 1/5] add field to mark requests as external for solana service (#2066) * add field to mark requests as external for solana service * fix format * update comments --------- Co-authored-by: Silas Lenihan <32529249+silaslenihan@users.noreply.github.com> --- pkg/chains/solana/proto_helpers.go | 39 ++++++-- pkg/chains/solana/proto_helpers_test.go | 67 ++++++++++++++ pkg/chains/solana/solana.pb.go | 58 ++++++++++-- pkg/chains/solana/solana.proto | 4 + pkg/http/limited_transport.go | 90 +++++++++++++++++++ pkg/loop/internal/relayer/solana.go | 10 +-- .../internal/relayerset/relayerset_test.go | 5 +- pkg/loop/internal/relayerset/solana.go | 6 +- pkg/types/chains/solana/solana.go | 10 ++- 9 files changed, 259 insertions(+), 30 deletions(-) create mode 100644 pkg/http/limited_transport.go diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index 608d6b1c5c..0866533473 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -358,6 +358,29 @@ func ConvertGetAccountInfoOptsToProto(o *solana.GetAccountInfoOpts) *GetAccountI } } +func ConvertGetAccountInfoRequestFromProto(p *GetAccountInfoWithOptsRequest) (solana.GetAccountInfoRequest, error) { + if p == nil { + return solana.GetAccountInfoRequest{}, fmt.Errorf("nil GetAccountInfoWithOptsRequest") + } + addr, err := ConvertPublicKeyFromProto(p.GetAccount()) + if err != nil { + return solana.GetAccountInfoRequest{}, err + } + return solana.GetAccountInfoRequest{ + Account: addr, + Opts: ConvertGetAccountInfoOptsFromProto(p.GetOpts()), + IsExternal: p.GetIsExternal(), + }, nil +} + +func ConvertGetAccountInfoRequestToProto(r solana.GetAccountInfoRequest) *GetAccountInfoWithOptsRequest { + return &GetAccountInfoWithOptsRequest{ + Account: r.Account[:], + Opts: ConvertGetAccountInfoOptsToProto(r.Opts), + IsExternal: r.IsExternal, + } +} + func ConvertGetMultipleAccountsOptsFromProto(p *GetMultipleAccountsOpts) *solana.GetMultipleAccountsOpts { if p == nil { return nil @@ -825,11 +848,11 @@ func ConvertGetTransactionRequestFromProto(p *GetTransactionRequest) (solana.Get if err != nil { return solana.GetTransactionRequest{}, err } - return solana.GetTransactionRequest{Signature: sig}, nil + return solana.GetTransactionRequest{Signature: sig, IsExternal: p.GetIsExternal()}, nil } func ConvertGetTransactionRequestToProto(r solana.GetTransactionRequest) *GetTransactionRequest { - return &GetTransactionRequest{Signature: r.Signature[:]} + return &GetTransactionRequest{Signature: r.Signature[:], IsExternal: r.IsExternal} } func ConvertGetBalanceReplyFromProto(p *GetBalanceReply) *solana.GetBalanceReply { @@ -996,8 +1019,9 @@ func ConvertGetMultipleAccountsRequestFromProto(p *GetMultipleAccountsWithOptsRe } accts, _ := ConvertPublicKeysFromProto(p.Accounts) return &solana.GetMultipleAccountsRequest{ - Accounts: accts, - Opts: ConvertGetMultipleAccountsOptsFromProto(p.Opts), + Accounts: accts, + Opts: ConvertGetMultipleAccountsOptsFromProto(p.Opts), + IsExternal: p.GetIsExternal(), } } @@ -1006,8 +1030,9 @@ func ConvertGetMultipleAccountsRequestToProto(r *solana.GetMultipleAccountsReque return nil } return &GetMultipleAccountsWithOptsRequest{ - Accounts: ConvertPublicKeysToProto(r.Accounts), - Opts: ConvertGetMultipleAccountsOptsToProto(r.Opts), + Accounts: ConvertPublicKeysToProto(r.Accounts), + Opts: ConvertGetMultipleAccountsOptsToProto(r.Opts), + IsExternal: r.IsExternal, } } @@ -1150,6 +1175,7 @@ func ConvertSimulateTXRequestFromProto(p *SimulateTXRequest) (solana.SimulateTXR Receiver: recv, EncodedTransaction: p.EncodedTransaction, Opts: ConvertSimulateTXOptsFromProto(p.Opts), + IsExternal: p.GetIsExternal(), }, nil } @@ -1158,6 +1184,7 @@ func ConvertSimulateTXRequestToProto(r solana.SimulateTXRequest) *SimulateTXRequ Receiver: r.Receiver[:], EncodedTransaction: r.EncodedTransaction, Opts: ConvertSimulateTXOptsToProto(r.Opts), + IsExternal: r.IsExternal, } } diff --git a/pkg/chains/solana/proto_helpers_test.go b/pkg/chains/solana/proto_helpers_test.go index 2ecd631c3f..1dba017623 100644 --- a/pkg/chains/solana/proto_helpers_test.go +++ b/pkg/chains/solana/proto_helpers_test.go @@ -386,6 +386,73 @@ func TestGetSignatureStatusesConverters(t *testing.T) { require.Equal(t, conv.ConfirmationStatusType_CONFIRMATION_STATUS_TYPE_CONFIRMED, rep2.Results[0].ConfirmationStatus) } +func TestExternalRequestProtoRoundTrip(t *testing.T) { + t.Run("GetAccountInfoRequest", func(t *testing.T) { + pk := typesolana.PublicKey{} + copy(pk[:], mkBytes(typesolana.PublicKeyLength, 0xAB)) + d := typesolana.GetAccountInfoRequest{ + Account: pk, + Opts: &typesolana.GetAccountInfoOpts{ + Encoding: typesolana.EncodingBase64, + Commitment: typesolana.CommitmentFinalized, + }, + IsExternal: true, + } + pb := conv.ConvertGetAccountInfoRequestToProto(d) + got, err := conv.ConvertGetAccountInfoRequestFromProto(pb) + require.NoError(t, err) + require.Equal(t, d, got) + }) + + t.Run("GetMultipleAccountsRequest", func(t *testing.T) { + d := &typesolana.GetMultipleAccountsRequest{ + Accounts: []typesolana.PublicKey{ + {1}, + func() (pk typesolana.PublicKey) { copy(pk[:], mkBytes(typesolana.PublicKeyLength, 0xCD)); return pk }(), + }, + Opts: &typesolana.GetMultipleAccountsOpts{ + Encoding: typesolana.EncodingJSONParsed, + Commitment: typesolana.CommitmentProcessed, + }, + IsExternal: true, + } + pb := conv.ConvertGetMultipleAccountsRequestToProto(d) + got := conv.ConvertGetMultipleAccountsRequestFromProto(pb) + require.Equal(t, d.Accounts[0], got.Accounts[0]) + require.Equal(t, d.Accounts[1], got.Accounts[1]) + require.Equal(t, d.IsExternal, got.IsExternal) + require.Equal(t, d.Opts, got.Opts) + }) + + t.Run("GetTransactionRequest", func(t *testing.T) { + var sig typesolana.Signature + copy(sig[:], mkBytes(typesolana.SignatureLength, 0xEF)) + d := typesolana.GetTransactionRequest{Signature: sig, IsExternal: true} + pb := conv.ConvertGetTransactionRequestToProto(d) + got, err := conv.ConvertGetTransactionRequestFromProto(pb) + require.NoError(t, err) + require.Equal(t, d, got) + }) + + t.Run("SimulateTXRequest", func(t *testing.T) { + var recv typesolana.PublicKey + copy(recv[:], mkBytes(typesolana.PublicKeyLength, 0x11)) + d := typesolana.SimulateTXRequest{ + Receiver: recv, + EncodedTransaction: "txdata", + Opts: &typesolana.SimulateTXOpts{ + SigVerify: true, + Commitment: typesolana.CommitmentConfirmed, + }, + IsExternal: true, + } + pb := conv.ConvertSimulateTXRequestToProto(d) + got, err := conv.ConvertSimulateTXRequestFromProto(pb) + require.NoError(t, err) + require.Equal(t, d, got) + }) +} + func TestErrorJoinBehavior_PublicKeys(t *testing.T) { in := [][]byte{ mkBytes(typesolana.PublicKeyLength-1, 0x01), diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 86a4362d87..9ca5294269 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -648,6 +648,7 @@ type GetAccountInfoWithOptsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 32-byte Pubkey Opts *GetAccountInfoOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + IsExternal bool `protobuf:"varint,3,opt,name=is_external,json=isExternal,proto3" json:"is_external,omitempty"` // if true, limits like response size limit may be applied unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -696,6 +697,13 @@ func (x *GetAccountInfoWithOptsRequest) GetOpts() *GetAccountInfoOpts { return nil } +func (x *GetAccountInfoWithOptsRequest) GetIsExternal() bool { + if x != nil { + return x.IsExternal + } + return false +} + // Reply for GetBalance. type GetBalanceReply struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1237,6 +1245,7 @@ type GetMultipleAccountsWithOptsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Accounts [][]byte `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // list of 32-byte Pubkeys Opts *GetMultipleAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + IsExternal bool `protobuf:"varint,3,opt,name=is_external,json=isExternal,proto3" json:"is_external,omitempty"` // if true, limits like response size limit may be applied unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1285,6 +1294,13 @@ func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts return nil } +func (x *GetMultipleAccountsWithOptsRequest) GetIsExternal() bool { + if x != nil { + return x.IsExternal + } + return false +} + // Reply for GetSignatureStatuses. type GetSignatureStatusesReply struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2415,7 +2431,8 @@ func (x *GetTransactionReply) GetMeta() *TransactionMeta { // GetTransaction request. type GetTransactionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` // 64-byte signature + IsExternal bool `protobuf:"varint,2,opt,name=is_external,json=isExternal,proto3" json:"is_external,omitempty"` // if true, limits like response size limit may be applied unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2457,6 +2474,13 @@ func (x *GetTransactionRequest) GetSignature() []byte { return nil } +func (x *GetTransactionRequest) GetIsExternal() bool { + if x != nil { + return x.IsExternal + } + return false +} + // RPC read context. type RPCContext struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2646,6 +2670,7 @@ type SimulateTXRequest struct { Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte program id (target) EncodedTransaction string `protobuf:"bytes,2,opt,name=encoded_transaction,json=encodedTransaction,proto3" json:"encoded_transaction,omitempty"` // base64/base58 tx Opts *SimulateTXOpts `protobuf:"bytes,3,opt,name=opts,proto3" json:"opts,omitempty"` + IsExternal bool `protobuf:"varint,4,opt,name=is_external,json=isExternal,proto3" json:"is_external,omitempty"` // if true, limits like response size limit may be applied unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2701,6 +2726,13 @@ func (x *SimulateTXRequest) GetOpts() *SimulateTXOpts { return nil } +func (x *SimulateTXRequest) GetIsExternal() bool { + if x != nil { + return x.IsExternal + } + return false +} + // Accounts to return during simulation. type SimulateTransactionAccountsOpts struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -4083,10 +4115,12 @@ const file_solana_proto_rawDesc = "" + "\vrpc_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + "rpcContext\x12/\n" + "\x05value\x18\x02 \x01(\v2\x14.loop.solana.AccountH\x00R\x05value\x88\x01\x01B\b\n" + - "\x06_value\"n\n" + + "\x06_value\"\x8f\x01\n" + "\x1dGetAccountInfoWithOptsRequest\x12\x18\n" + "\aaccount\x18\x01 \x01(\fR\aaccount\x123\n" + - "\x04opts\x18\x02 \x01(\v2\x1f.loop.solana.GetAccountInfoOptsR\x04opts\"'\n" + + "\x04opts\x18\x02 \x01(\v2\x1f.loop.solana.GetAccountInfoOptsR\x04opts\x12\x1f\n" + + "\vis_external\x18\x03 \x01(\bR\n" + + "isExternal\"'\n" + "\x0fGetBalanceReply\x12\x14\n" + "\x05value\x18\x01 \x01(\x04R\x05value\"d\n" + "\x11GetBalanceRequest\x12\x12\n" + @@ -4132,10 +4166,12 @@ const file_solana_proto_rawDesc = "" + " GetMultipleAccountsWithOptsReply\x128\n" + "\vrpc_context\x18\x01 \x01(\v2\x17.loop.solana.RPCContextR\n" + "rpcContext\x129\n" + - "\x05value\x18\x02 \x03(\v2#.loop.solana.OptionalAccountWrapperR\x05value\"z\n" + + "\x05value\x18\x02 \x03(\v2#.loop.solana.OptionalAccountWrapperR\x05value\"\x9b\x01\n" + "\"GetMultipleAccountsWithOptsRequest\x12\x1a\n" + "\baccounts\x18\x01 \x03(\fR\baccounts\x128\n" + - "\x04opts\x18\x02 \x01(\v2$.loop.solana.GetMultipleAccountsOptsR\x04opts\"^\n" + + "\x04opts\x18\x02 \x01(\v2$.loop.solana.GetMultipleAccountsOptsR\x04opts\x12\x1f\n" + + "\vis_external\x18\x03 \x01(\bR\n" + + "isExternal\"^\n" + "\x19GetSignatureStatusesReply\x12A\n" + "\aresults\x18\x01 \x03(\v2'.loop.solana.GetSignatureStatusesResultR\aresults\"1\n" + "\x1bGetSignatureStatusesRequest\x12\x12\n" + @@ -4225,9 +4261,11 @@ const file_solana_proto_rawDesc = "" + "\x04meta\x18\x04 \x01(\v2\x1c.loop.solana.TransactionMetaH\x02R\x04meta\x88\x01\x01B\r\n" + "\v_block_timeB\x0e\n" + "\f_transactionB\a\n" + - "\x05_meta\"5\n" + + "\x05_meta\"V\n" + "\x15GetTransactionRequest\x12\x1c\n" + - "\tsignature\x18\x01 \x01(\fR\tsignature\" \n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x1f\n" + + "\vis_external\x18\x02 \x01(\bR\n" + + "isExternal\" \n" + "\n" + "RPCContext\x12\x12\n" + "\x04slot\x18\x01 \x01(\x04R\x04slot\"\xf0\x01\n" + @@ -4243,11 +4281,13 @@ const file_solana_proto_rawDesc = "" + "\x03err\x18\x01 \x01(\tR\x03err\x12\x12\n" + "\x04logs\x18\x02 \x03(\tR\x04logs\x120\n" + "\baccounts\x18\x03 \x03(\v2\x14.loop.solana.AccountR\baccounts\x12%\n" + - "\x0eunits_consumed\x18\x04 \x01(\x04R\runitsConsumed\"\x91\x01\n" + + "\x0eunits_consumed\x18\x04 \x01(\x04R\runitsConsumed\"\xb2\x01\n" + "\x11SimulateTXRequest\x12\x1a\n" + "\breceiver\x18\x01 \x01(\fR\breceiver\x12/\n" + "\x13encoded_transaction\x18\x02 \x01(\tR\x12encodedTransaction\x12/\n" + - "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\"v\n" + + "\x04opts\x18\x03 \x01(\v2\x1b.loop.solana.SimulateTXOptsR\x04opts\x12\x1f\n" + + "\vis_external\x18\x04 \x01(\bR\n" + + "isExternal\"v\n" + "\x1fSimulateTransactionAccountsOpts\x125\n" + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12\x1c\n" + "\taddresses\x18\x02 \x03(\fR\taddresses\"\x8e\x01\n" + diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index c629a81dad..39f8f935b3 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -107,6 +107,7 @@ message GetAccountInfoWithOptsReply { message GetAccountInfoWithOptsRequest { bytes account = 1; // 32-byte Pubkey GetAccountInfoOpts opts = 2; + bool is_external = 3; // if true, limits like response size limit may be applied } // Reply for GetBalance. @@ -172,6 +173,7 @@ message GetMultipleAccountsWithOptsReply { message GetMultipleAccountsWithOptsRequest { repeated bytes accounts = 1; // list of 32-byte Pubkeys GetMultipleAccountsOpts opts = 2; + bool is_external = 3; // if true, limits like response size limit may be applied } // Reply for GetSignatureStatuses. @@ -304,6 +306,7 @@ message GetTransactionReply { // GetTransaction request. message GetTransactionRequest { bytes signature = 1; // 64-byte signature + bool is_external = 2; // if true, limits like response size limit may be applied } // RPC read context. @@ -332,6 +335,7 @@ message SimulateTXRequest { bytes receiver = 1; // 32-byte program id (target) string encoded_transaction = 2; // base64/base58 tx SimulateTXOpts opts = 3; + bool is_external = 4; // if true, limits like response size limit may be applied } // Accounts to return during simulation. diff --git a/pkg/http/limited_transport.go b/pkg/http/limited_transport.go new file mode 100644 index 0000000000..365b6f7834 --- /dev/null +++ b/pkg/http/limited_transport.go @@ -0,0 +1,90 @@ +package http + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" +) + +type contextKey string + +const responseLimitCtxKey contextKey = "responseLimitCtxKey" + +// LimitedTransport wraps an http.RoundTripper and limits the size of the response body. Limit is set via context using WithResponseSizeLimit +type LimitedTransport struct { + // RoundTripper is the underlying http.RoundTripper to use for the actual request. + // This will typically be http.DefaultTransport or a custom *http.Transport. + RoundTripper http.RoundTripper +} + +// RoundTrip implements the http.RoundTripper interface for LimitedTransport. +func (t *LimitedTransport) RoundTrip(req *http.Request) (*http.Response, error) { + // Perform the actual HTTP request using the underlying RoundTripper. + resp, err := t.RoundTripper.RoundTrip(req) + if err != nil { + return nil, err + } + + // If the response body is not nil, wrap it with an io.limitReader. + // This will ensure that only up to MaxResponseSize bytes can be read. + respLimit := GetResponseSizeLimit(req.Context()) + if resp.Body != nil && respLimit > 0 { + resp.Body = limitReader(resp.Body, int64(respLimit)) + } + + return resp, nil +} + +// WithResponseSizeLimit - sets a limit on the size of the response body for HTTP requests made with the LimitedTransport. +func WithResponseSizeLimit(ctx context.Context, limit uint32) context.Context { + if limit > 0 { + return context.WithValue(ctx, responseLimitCtxKey, limit) + } + + return ctx +} + +func GetResponseSizeLimit(ctx context.Context) uint32 { + limit, ok := ctx.Value(responseLimitCtxKey).(uint32) + if !ok { + return 0 + } + return limit +} + +var errResponseTooLarge = errors.New("response is too large") + +// limitReader returns a Reader that reads from r +// but stops with EOF after n bytes. +// The underlying implementation is a *limitedReader. +func limitReader(r io.ReadCloser, n int64) *limitedReader { + return &limitedReader{R: r, N: n, Limit: n} +} + +// A limitedReader reads from R but limits the amount of +// data returned to just N bytes. Each call to Read +// updates N to reflect the new amount remaining. +// Read returns EOF when N <= 0 or when the underlying R returns EOF. +type limitedReader struct { + R io.ReadCloser // underlying reader + N int64 // max bytes remaining + Limit int64 // original limit for error reporting +} + +func (l *limitedReader) Read(p []byte) (n int, err error) { + if l.N <= 0 { + return 0, fmt.Errorf("reached read limit of %d bytes: %w", l.Limit, errResponseTooLarge) + } + if int64(len(p)) > l.N { + p = p[0:l.N] + } + n, err = l.R.Read(p) + l.N -= int64(n) + return +} + +func (l *limitedReader) Close() error { + return l.R.Close() +} diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go index 0a3a1e8fae..172d946c1c 100644 --- a/pkg/loop/internal/relayer/solana.go +++ b/pkg/loop/internal/relayer/solana.go @@ -117,10 +117,7 @@ func (sc *SolClient) GetBalance(ctx context.Context, req solana.GetBalanceReques } func (sc *SolClient) GetAccountInfoWithOpts(ctx context.Context, req solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error) { - pReq := &solpb.GetAccountInfoWithOptsRequest{ - Account: req.Account[:], - Opts: solpb.ConvertGetAccountInfoOptsToProto(req.Opts), - } + pReq := solpb.ConvertGetAccountInfoRequestToProto(req) pResp, err := sc.grpcClient.GetAccountInfoWithOpts(ctx, pReq) if err != nil { return nil, net.WrapRPCErr(err) @@ -339,14 +336,11 @@ func (s *solServer) GetBalance(ctx context.Context, req *solpb.GetBalanceRequest } func (s *solServer) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetAccountInfoWithOptsRequest) (*solpb.GetAccountInfoWithOptsReply, error) { - addr, err := solpb.ConvertPublicKeyFromProto(req.GetAccount()) + dReq, err := solpb.ConvertGetAccountInfoRequestFromProto(req) if err != nil { return nil, net.WrapRPCErr(err) } - opts := solpb.ConvertGetAccountInfoOptsFromProto(req.GetOpts()) - - dReq := solana.GetAccountInfoRequest{Account: addr, Opts: opts} dResp, err := s.impl.GetAccountInfoWithOpts(ctx, dReq) if err != nil { return nil, net.WrapRPCErr(err) diff --git a/pkg/loop/internal/relayerset/relayerset_test.go b/pkg/loop/internal/relayerset/relayerset_test.go index 5d02ec0b8b..548521e741 100644 --- a/pkg/loop/internal/relayerset/relayerset_test.go +++ b/pkg/loop/internal/relayerset/relayerset_test.go @@ -645,6 +645,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { Encoding: soltypes.EncodingJSONParsed, Commitment: soltypes.CommitmentFinalized, }, + IsExternal: true, } slot := uint64(22) lamports := uint64(33) @@ -673,6 +674,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { Encoding: soltypes.EncodingBase64, Commitment: soltypes.CommitmentProcessed, }, + IsExternal: true, } slot := uint64(22) lamports := uint64(33) @@ -736,7 +738,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { run: func(t *testing.T, sol types.SolanaService, mockSol *mocks2.SolanaService) { var sig soltypes.Signature copy(sig[:], []byte{1, 2, 3, 4}) - req := soltypes.GetTransactionRequest{Signature: sig} + req := soltypes.GetTransactionRequest{Signature: sig, IsExternal: true} expTime := soltypes.UnixTimeSeconds(11) expFee := uint64(33) expSlot := uint64(17) @@ -808,6 +810,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { Commitment: soltypes.CommitmentProcessed, ReplaceRecentBlockhash: true, }, + IsExternal: true, } mockSol.EXPECT(). SimulateTX(mock.Anything, req). diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go index 06e3facc19..e6dfbf1ca2 100644 --- a/pkg/loop/internal/relayerset/solana.go +++ b/pkg/loop/internal/relayerset/solana.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/net" "github.com/smartcontractkit/chainlink-common/pkg/loop/internal/pb/relayerset" "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" ) // solClient wraps the SolanaRelayerSetClient by attaching a RelayerID to SolClient requests. @@ -214,14 +213,11 @@ func (ss *solServer) GetAccountInfoWithOpts(ctx context.Context, req *solpb.GetA return nil, err } - addr, err := solpb.ConvertPublicKeyFromProto(req.GetAccount()) + dReq, err := solpb.ConvertGetAccountInfoRequestFromProto(req) if err != nil { return nil, net.WrapRPCErr(err) } - opts := solpb.ConvertGetAccountInfoOptsFromProto(req.GetOpts()) - - dReq := solana.GetAccountInfoRequest{Account: addr, Opts: opts} dResp, err := solService.GetAccountInfoWithOpts(ctx, dReq) if err != nil { return nil, net.WrapRPCErr(err) diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index c350a6ff86..2cd91ab520 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -350,6 +350,8 @@ type SimulateTXOpts struct { type GetAccountInfoRequest struct { Account PublicKey Opts *GetAccountInfoOpts + // If true, limits like response size limit may be applied. + IsExternal bool } type GetAccountInfoReply struct { @@ -360,6 +362,8 @@ type GetAccountInfoReply struct { type GetMultipleAccountsRequest struct { Accounts []PublicKey Opts *GetMultipleAccountsOpts + // If true, limits like response size limit may be applied. + IsExternal bool } type GetMultipleAccountsReply struct { @@ -477,6 +481,8 @@ type TransactionResultEnvelope struct { // arguments for solana-rpc GetTransaction call type GetTransactionRequest struct { Signature Signature + // If true, limits like response size limit may be applied. + IsExternal bool } // result of solana-rpc GetTransaction call @@ -517,7 +523,9 @@ type SimulateTXRequest struct { Receiver PublicKey // Encoded EncodedTransaction string - Opts *SimulateTXOpts + Opts *SimulateTXOpts + // If true, limits like response size limit may be applied. + IsExternal bool } type SimulateTXReply struct { From c521c58119c18c4a927347460bc5c90cbceb65cd Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 4 Jun 2026 14:33:25 -0400 Subject: [PATCH 2/5] bump protos --- go.mod | 2 +- go.sum | 2 + .../v2/chain-capabilities/solana/client.pb.go | 772 +++++++++++++----- .../solana/server/client_server_gen.go | 16 + 4 files changed, 592 insertions(+), 200 deletions(-) diff --git a/go.mod b/go.mod index 464a076887..fec0c9baaa 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.100 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260528204832-58c7145c53f8 github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260602131523-5168ac1ba014 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260604171908-6734db2d444f github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260205130626-db2a2aab956b github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 diff --git a/go.sum b/go.sum index 9569e9934c..c31649ef47 100644 --- a/go.sum +++ b/go.sum @@ -264,6 +264,8 @@ github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-09 github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4/go.mod h1:HHGeDUpAsPa0pmOx7wrByCitjQ0mbUxf0R9v+g67uCA= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260602131523-5168ac1ba014 h1:4rxcbbe1qe1yR+HcclvOi/e0CFLcBLfx2fgiWxBMMZ4= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260602131523-5168ac1ba014/go.mod h1:vTFHTCbLui4Vn8fTmAadfE3rdnvfrDwOmMujmW857D0= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260604171908-6734db2d444f h1:t+OoYaXLdH0WHK2pbWKjTSnSQa5JBQD1+gf0yISYfQk= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260604171908-6734db2d444f/go.mod h1:vTFHTCbLui4Vn8fTmAadfE3rdnvfrDwOmMujmW857D0= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b h1:QuI6SmQFK/zyUlVWEf0GMkiUYBPY4lssn26nKSd/bOM= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b/go.mod h1:qSTSwX3cBP3FKQwQacdjArqv0g6QnukjV4XuzO6UyoY= github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260205130626-db2a2aab956b h1:36knUpKHHAZ86K4FGWXtx8i/EQftGdk2bqCoEu/Cha8= diff --git a/pkg/capabilities/v2/chain-capabilities/solana/client.pb.go b/pkg/capabilities/v2/chain-capabilities/solana/client.pb.go index 3120d05d97..96ba715427 100644 --- a/pkg/capabilities/v2/chain-capabilities/solana/client.pb.go +++ b/pkg/capabilities/v2/chain-capabilities/solana/client.pb.go @@ -1365,6 +1365,332 @@ func (x *GetMultipleAccountsWithOptsRequest) GetOpts() *GetMultipleAccountsOpts return nil } +// Memcmp filter for getProgramAccounts. +type RPCFilterMemcmp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // byte offset into account data + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` // data to match (RPC encodes as base58) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RPCFilterMemcmp) Reset() { + *x = RPCFilterMemcmp{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCFilterMemcmp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCFilterMemcmp) ProtoMessage() {} + +func (x *RPCFilterMemcmp) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCFilterMemcmp.ProtoReflect.Descriptor instead. +func (*RPCFilterMemcmp) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{18} +} + +func (x *RPCFilterMemcmp) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *RPCFilterMemcmp) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// Account filter for getProgramAccounts (memcmp or data size). +type RPCFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Memcmp *RPCFilterMemcmp `protobuf:"bytes,1,opt,name=memcmp,proto3" json:"memcmp,omitempty"` + DataSize uint64 `protobuf:"varint,2,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"` // match accounts with this data length + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RPCFilter) Reset() { + *x = RPCFilter{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCFilter) ProtoMessage() {} + +func (x *RPCFilter) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCFilter.ProtoReflect.Descriptor instead. +func (*RPCFilter) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{19} +} + +func (x *RPCFilter) GetMemcmp() *RPCFilterMemcmp { + if x != nil { + return x.Memcmp + } + return nil +} + +func (x *RPCFilter) GetDataSize() uint64 { + if x != nil { + return x.DataSize + } + return 0 +} + +// Options for GetProgramAccounts. +type GetProgramAccountsOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=capabilities.blockchain.solana.v1alpha.EncodingType" json:"encoding,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=capabilities.blockchain.solana.v1alpha.CommitmentType" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + Filters []*RPCFilter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsOpts) Reset() { + *x = GetProgramAccountsOpts{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsOpts) ProtoMessage() {} + +func (x *GetProgramAccountsOpts) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsOpts.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsOpts) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{20} +} + +func (x *GetProgramAccountsOpts) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_TYPE_NONE +} + +func (x *GetProgramAccountsOpts) GetCommitment() CommitmentType { + if x != nil { + return x.Commitment + } + return CommitmentType_COMMITMENT_TYPE_NONE +} + +func (x *GetProgramAccountsOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil +} + +func (x *GetProgramAccountsOpts) GetFilters() []*RPCFilter { + if x != nil { + return x.Filters + } + return nil +} + +// Program-owned account with its pubkey. +type KeyedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // 32-byte Pubkey + Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *KeyedAccount) Reset() { + *x = KeyedAccount{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *KeyedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyedAccount) ProtoMessage() {} + +func (x *KeyedAccount) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyedAccount.ProtoReflect.Descriptor instead. +func (*KeyedAccount) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{21} +} + +func (x *KeyedAccount) GetPubkey() []byte { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *KeyedAccount) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +// Reply for GetProgramAccounts. +type GetProgramAccountsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value []*KeyedAccount `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsReply) Reset() { + *x = GetProgramAccountsReply{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsReply) ProtoMessage() {} + +func (x *GetProgramAccountsReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsReply.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{22} +} + +func (x *GetProgramAccountsReply) GetValue() []*KeyedAccount { + if x != nil { + return x.Value + } + return nil +} + +// Request for GetProgramAccounts. +type GetProgramAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Program []byte `protobuf:"bytes,1,opt,name=program,proto3" json:"program,omitempty"` // 32-byte program Pubkey + Opts *GetProgramAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsRequest) Reset() { + *x = GetProgramAccountsRequest{} + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsRequest) ProtoMessage() {} + +func (x *GetProgramAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsRequest.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{23} +} + +func (x *GetProgramAccountsRequest) GetProgram() []byte { + if x != nil { + return x.Program + } + return nil +} + +func (x *GetProgramAccountsRequest) GetOpts() *GetProgramAccountsOpts { + if x != nil { + return x.Opts + } + return nil +} + // Reply for GetSignatureStatuses. type GetSignatureStatusesReply struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1375,7 +1701,7 @@ type GetSignatureStatusesReply struct { func (x *GetSignatureStatusesReply) Reset() { *x = GetSignatureStatusesReply{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[18] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1387,7 +1713,7 @@ func (x *GetSignatureStatusesReply) String() string { func (*GetSignatureStatusesReply) ProtoMessage() {} func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[18] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1400,7 +1726,7 @@ func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{18} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{24} } func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { @@ -1420,7 +1746,7 @@ type GetSignatureStatusesRequest struct { func (x *GetSignatureStatusesRequest) Reset() { *x = GetSignatureStatusesRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[19] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1432,7 +1758,7 @@ func (x *GetSignatureStatusesRequest) String() string { func (*GetSignatureStatusesRequest) ProtoMessage() {} func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[19] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1445,7 +1771,7 @@ func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{19} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{25} } func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { @@ -1468,7 +1794,7 @@ type GetSignatureStatusesResult struct { func (x *GetSignatureStatusesResult) Reset() { *x = GetSignatureStatusesResult{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[20] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1480,7 +1806,7 @@ func (x *GetSignatureStatusesResult) String() string { func (*GetSignatureStatusesResult) ProtoMessage() {} func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[20] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1493,7 +1819,7 @@ func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{20} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{26} } func (x *GetSignatureStatusesResult) GetSlot() uint64 { @@ -1534,7 +1860,7 @@ type GetSlotHeightReply struct { func (x *GetSlotHeightReply) Reset() { *x = GetSlotHeightReply{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[21] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1546,7 +1872,7 @@ func (x *GetSlotHeightReply) String() string { func (*GetSlotHeightReply) ProtoMessage() {} func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[21] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1559,7 +1885,7 @@ func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{21} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{27} } func (x *GetSlotHeightReply) GetHeight() uint64 { @@ -1578,7 +1904,7 @@ type GetSlotHeightRequest struct { func (x *GetSlotHeightRequest) Reset() { *x = GetSlotHeightRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[22] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1590,7 +1916,7 @@ func (x *GetSlotHeightRequest) String() string { func (*GetSlotHeightRequest) ProtoMessage() {} func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[22] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1603,7 +1929,7 @@ func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{22} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{28} } func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { @@ -1625,7 +1951,7 @@ type MessageHeader struct { func (x *MessageHeader) Reset() { *x = MessageHeader{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[23] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1637,7 +1963,7 @@ func (x *MessageHeader) String() string { func (*MessageHeader) ProtoMessage() {} func (x *MessageHeader) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[23] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1650,7 +1976,7 @@ func (x *MessageHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead. func (*MessageHeader) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{23} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{29} } func (x *MessageHeader) GetNumRequiredSignatures() uint32 { @@ -1687,7 +2013,7 @@ type ParsedMessage struct { func (x *ParsedMessage) Reset() { *x = ParsedMessage{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[24] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1699,7 +2025,7 @@ func (x *ParsedMessage) String() string { func (*ParsedMessage) ProtoMessage() {} func (x *ParsedMessage) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[24] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1712,7 +2038,7 @@ func (x *ParsedMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ParsedMessage.ProtoReflect.Descriptor instead. func (*ParsedMessage) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{24} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{30} } func (x *ParsedMessage) GetRecentBlockhash() []byte { @@ -1754,7 +2080,7 @@ type ParsedTransaction struct { func (x *ParsedTransaction) Reset() { *x = ParsedTransaction{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[25] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1766,7 +2092,7 @@ func (x *ParsedTransaction) String() string { func (*ParsedTransaction) ProtoMessage() {} func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[25] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1779,7 +2105,7 @@ func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use ParsedTransaction.ProtoReflect.Descriptor instead. func (*ParsedTransaction) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{25} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{31} } func (x *ParsedTransaction) GetSignatures() [][]byte { @@ -1808,7 +2134,7 @@ type UiTokenAmount struct { func (x *UiTokenAmount) Reset() { *x = UiTokenAmount{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[26] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1820,7 +2146,7 @@ func (x *UiTokenAmount) String() string { func (*UiTokenAmount) ProtoMessage() {} func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[26] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1833,7 +2159,7 @@ func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { // Deprecated: Use UiTokenAmount.ProtoReflect.Descriptor instead. func (*UiTokenAmount) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{26} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{32} } func (x *UiTokenAmount) GetAmount() string { @@ -1871,7 +2197,7 @@ type TokenBalance struct { func (x *TokenBalance) Reset() { *x = TokenBalance{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[27] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1883,7 +2209,7 @@ func (x *TokenBalance) String() string { func (*TokenBalance) ProtoMessage() {} func (x *TokenBalance) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[27] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1896,7 +2222,7 @@ func (x *TokenBalance) ProtoReflect() protoreflect.Message { // Deprecated: Use TokenBalance.ProtoReflect.Descriptor instead. func (*TokenBalance) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{27} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{33} } func (x *TokenBalance) GetAccountIndex() uint32 { @@ -1945,7 +2271,7 @@ type InnerInstruction struct { func (x *InnerInstruction) Reset() { *x = InnerInstruction{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[28] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1957,7 +2283,7 @@ func (x *InnerInstruction) String() string { func (*InnerInstruction) ProtoMessage() {} func (x *InnerInstruction) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[28] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1970,7 +2296,7 @@ func (x *InnerInstruction) ProtoReflect() protoreflect.Message { // Deprecated: Use InnerInstruction.ProtoReflect.Descriptor instead. func (*InnerInstruction) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{28} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{34} } func (x *InnerInstruction) GetIndex() uint32 { @@ -1998,7 +2324,7 @@ type LoadedAddresses struct { func (x *LoadedAddresses) Reset() { *x = LoadedAddresses{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[29] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2010,7 +2336,7 @@ func (x *LoadedAddresses) String() string { func (*LoadedAddresses) ProtoMessage() {} func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[29] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2023,7 +2349,7 @@ func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { // Deprecated: Use LoadedAddresses.ProtoReflect.Descriptor instead. func (*LoadedAddresses) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{29} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{35} } func (x *LoadedAddresses) GetReadonly() [][]byte { @@ -2053,7 +2379,7 @@ type CompiledInstruction struct { func (x *CompiledInstruction) Reset() { *x = CompiledInstruction{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[30] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2065,7 +2391,7 @@ func (x *CompiledInstruction) String() string { func (*CompiledInstruction) ProtoMessage() {} func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[30] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2078,7 +2404,7 @@ func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { // Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead. func (*CompiledInstruction) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{30} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{36} } func (x *CompiledInstruction) GetProgramIdIndex() uint32 { @@ -2120,7 +2446,7 @@ type Data struct { func (x *Data) Reset() { *x = Data{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[31] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2132,7 +2458,7 @@ func (x *Data) String() string { func (*Data) ProtoMessage() {} func (x *Data) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[31] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2145,7 +2471,7 @@ func (x *Data) ProtoReflect() protoreflect.Message { // Deprecated: Use Data.ProtoReflect.Descriptor instead. func (*Data) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{31} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{37} } func (x *Data) GetContent() []byte { @@ -2173,7 +2499,7 @@ type ReturnData struct { func (x *ReturnData) Reset() { *x = ReturnData{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[32] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2185,7 +2511,7 @@ func (x *ReturnData) String() string { func (*ReturnData) ProtoMessage() {} func (x *ReturnData) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[32] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2198,7 +2524,7 @@ func (x *ReturnData) ProtoReflect() protoreflect.Message { // Deprecated: Use ReturnData.ProtoReflect.Descriptor instead. func (*ReturnData) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{32} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{38} } func (x *ReturnData) GetProgramId() []byte { @@ -2235,7 +2561,7 @@ type TransactionMeta struct { func (x *TransactionMeta) Reset() { *x = TransactionMeta{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[33] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2247,7 +2573,7 @@ func (x *TransactionMeta) String() string { func (*TransactionMeta) ProtoMessage() {} func (x *TransactionMeta) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[33] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2260,7 +2586,7 @@ func (x *TransactionMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionMeta.ProtoReflect.Descriptor instead. func (*TransactionMeta) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{33} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{39} } func (x *TransactionMeta) GetErrJson() string { @@ -2354,7 +2680,7 @@ type TransactionEnvelope struct { func (x *TransactionEnvelope) Reset() { *x = TransactionEnvelope{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[34] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2366,7 +2692,7 @@ func (x *TransactionEnvelope) String() string { func (*TransactionEnvelope) ProtoMessage() {} func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[34] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2379,7 +2705,7 @@ func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionEnvelope.ProtoReflect.Descriptor instead. func (*TransactionEnvelope) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{34} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{40} } func (x *TransactionEnvelope) GetTransaction() isTransactionEnvelope_Transaction { @@ -2436,7 +2762,7 @@ type GetTransactionReply struct { func (x *GetTransactionReply) Reset() { *x = GetTransactionReply{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[35] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2448,7 +2774,7 @@ func (x *GetTransactionReply) String() string { func (*GetTransactionReply) ProtoMessage() {} func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[35] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2461,7 +2787,7 @@ func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. func (*GetTransactionReply) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{35} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{41} } func (x *GetTransactionReply) GetSlot() uint64 { @@ -2502,7 +2828,7 @@ type GetTransactionRequest struct { func (x *GetTransactionRequest) Reset() { *x = GetTransactionRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[36] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2514,7 +2840,7 @@ func (x *GetTransactionRequest) String() string { func (*GetTransactionRequest) ProtoMessage() {} func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[36] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2527,7 +2853,7 @@ func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. func (*GetTransactionRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{36} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{42} } func (x *GetTransactionRequest) GetSignature() []byte { @@ -2550,7 +2876,7 @@ type SimulateTXOpts struct { func (x *SimulateTXOpts) Reset() { *x = SimulateTXOpts{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[37] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2562,7 +2888,7 @@ func (x *SimulateTXOpts) String() string { func (*SimulateTXOpts) ProtoMessage() {} func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[37] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2575,7 +2901,7 @@ func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. func (*SimulateTXOpts) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{37} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{43} } func (x *SimulateTXOpts) GetSigVerify() bool { @@ -2619,7 +2945,7 @@ type SimulateTXReply struct { func (x *SimulateTXReply) Reset() { *x = SimulateTXReply{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[38] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2631,7 +2957,7 @@ func (x *SimulateTXReply) String() string { func (*SimulateTXReply) ProtoMessage() {} func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[38] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2644,7 +2970,7 @@ func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. func (*SimulateTXReply) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{38} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{44} } func (x *SimulateTXReply) GetErr() string { @@ -2687,7 +3013,7 @@ type SimulateTXRequest struct { func (x *SimulateTXRequest) Reset() { *x = SimulateTXRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[39] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2699,7 +3025,7 @@ func (x *SimulateTXRequest) String() string { func (*SimulateTXRequest) ProtoMessage() {} func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[39] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2712,7 +3038,7 @@ func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. func (*SimulateTXRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{39} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{45} } func (x *SimulateTXRequest) GetReceiver() []byte { @@ -2747,7 +3073,7 @@ type SimulateTransactionAccountsOpts struct { func (x *SimulateTransactionAccountsOpts) Reset() { *x = SimulateTransactionAccountsOpts{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[40] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2759,7 +3085,7 @@ func (x *SimulateTransactionAccountsOpts) String() string { func (*SimulateTransactionAccountsOpts) ProtoMessage() {} func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[40] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2772,7 +3098,7 @@ func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{40} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{46} } func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { @@ -2799,7 +3125,7 @@ type ValueComparator struct { func (x *ValueComparator) Reset() { *x = ValueComparator{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[41] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2811,7 +3137,7 @@ func (x *ValueComparator) String() string { func (*ValueComparator) ProtoMessage() {} func (x *ValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[41] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2824,7 +3150,7 @@ func (x *ValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use ValueComparator.ProtoReflect.Descriptor instead. func (*ValueComparator) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{41} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{47} } func (x *ValueComparator) GetValue() []byte { @@ -2851,7 +3177,7 @@ type SubkeyConfig struct { func (x *SubkeyConfig) Reset() { *x = SubkeyConfig{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[42] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2863,7 +3189,7 @@ func (x *SubkeyConfig) String() string { func (*SubkeyConfig) ProtoMessage() {} func (x *SubkeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[42] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2876,7 +3202,7 @@ func (x *SubkeyConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use SubkeyConfig.ProtoReflect.Descriptor instead. func (*SubkeyConfig) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{42} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{48} } func (x *SubkeyConfig) GetPath() []string { @@ -2903,7 +3229,7 @@ type CPIFilterConfig struct { func (x *CPIFilterConfig) Reset() { *x = CPIFilterConfig{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[43] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2915,7 +3241,7 @@ func (x *CPIFilterConfig) String() string { func (*CPIFilterConfig) ProtoMessage() {} func (x *CPIFilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[43] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2928,7 +3254,7 @@ func (x *CPIFilterConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use CPIFilterConfig.ProtoReflect.Descriptor instead. func (*CPIFilterConfig) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{43} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{49} } func (x *CPIFilterConfig) GetDestAddress() []byte { @@ -2953,13 +3279,14 @@ type FilterLogTriggerRequest struct { ContractIdlJson []byte `protobuf:"bytes,4,opt,name=contract_idl_json,json=contractIdlJson,proto3" json:"contract_idl_json,omitempty"` Subkeys []*SubkeyConfig `protobuf:"bytes,5,rep,name=subkeys,proto3" json:"subkeys,omitempty"` CpiFilterConfig *CPIFilterConfig `protobuf:"bytes,6,opt,name=cpi_filter_config,json=cpiFilterConfig,proto3,oneof" json:"cpi_filter_config,omitempty"` + IncludeReverted bool `protobuf:"varint,7,opt,name=include_reverted,json=includeReverted,proto3" json:"include_reverted,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FilterLogTriggerRequest) Reset() { *x = FilterLogTriggerRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[44] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2971,7 +3298,7 @@ func (x *FilterLogTriggerRequest) String() string { func (*FilterLogTriggerRequest) ProtoMessage() {} func (x *FilterLogTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[44] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2984,7 +3311,7 @@ func (x *FilterLogTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterLogTriggerRequest.ProtoReflect.Descriptor instead. func (*FilterLogTriggerRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{44} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{50} } func (x *FilterLogTriggerRequest) GetName() string { @@ -3029,6 +3356,13 @@ func (x *FilterLogTriggerRequest) GetCpiFilterConfig() *CPIFilterConfig { return nil } +func (x *FilterLogTriggerRequest) GetIncludeReverted() bool { + if x != nil { + return x.IncludeReverted + } + return false +} + type Log struct { state protoimpl.MessageState `protogen:"open.v1"` ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Chain identifier @@ -3048,7 +3382,7 @@ type Log struct { func (x *Log) Reset() { *x = Log{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[45] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3060,7 +3394,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[45] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3073,7 +3407,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{45} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{51} } func (x *Log) GetChainId() string { @@ -3164,7 +3498,7 @@ type AccountMeta struct { func (x *AccountMeta) Reset() { *x = AccountMeta{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[46] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3176,7 +3510,7 @@ func (x *AccountMeta) String() string { func (*AccountMeta) ProtoMessage() {} func (x *AccountMeta) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[46] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3189,7 +3523,7 @@ func (x *AccountMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountMeta.ProtoReflect.Descriptor instead. func (*AccountMeta) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{46} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{52} } func (x *AccountMeta) GetPublicKey() []byte { @@ -3218,7 +3552,7 @@ type WriteReportRequest struct { func (x *WriteReportRequest) Reset() { *x = WriteReportRequest{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[47] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3230,7 +3564,7 @@ func (x *WriteReportRequest) String() string { func (*WriteReportRequest) ProtoMessage() {} func (x *WriteReportRequest) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[47] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3243,7 +3577,7 @@ func (x *WriteReportRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteReportRequest.ProtoReflect.Descriptor instead. func (*WriteReportRequest) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{47} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{53} } func (x *WriteReportRequest) GetRemainingAccounts() []*AccountMeta { @@ -3287,7 +3621,7 @@ type WriteReportReply struct { func (x *WriteReportReply) Reset() { *x = WriteReportReply{} - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[48] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3299,7 +3633,7 @@ func (x *WriteReportReply) String() string { func (*WriteReportReply) ProtoMessage() {} func (x *WriteReportReply) ProtoReflect() protoreflect.Message { - mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[48] + mi := &file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3312,7 +3646,7 @@ func (x *WriteReportReply) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteReportReply.ProtoReflect.Descriptor instead. func (*WriteReportReply) Descriptor() ([]byte, []int) { - return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{48} + return file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP(), []int{54} } func (x *WriteReportReply) GetTxStatus() TxStatus { @@ -3435,7 +3769,29 @@ const file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc = "" + "\x05value\x18\x02 \x03(\v2>.capabilities.blockchain.solana.v1alpha.OptionalAccountWrapperR\x05value\"\x95\x01\n" + "\"GetMultipleAccountsWithOptsRequest\x12\x1a\n" + "\baccounts\x18\x01 \x03(\fR\baccounts\x12S\n" + - "\x04opts\x18\x02 \x01(\v2?.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOptsR\x04opts\"y\n" + + "\x04opts\x18\x02 \x01(\v2?.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOptsR\x04opts\"?\n" + + "\x0fRPCFilterMemcmp\x12\x16\n" + + "\x06offset\x18\x01 \x01(\x04R\x06offset\x12\x14\n" + + "\x05bytes\x18\x02 \x01(\fR\x05bytes\"y\n" + + "\tRPCFilter\x12O\n" + + "\x06memcmp\x18\x01 \x01(\v27.capabilities.blockchain.solana.v1alpha.RPCFilterMemcmpR\x06memcmp\x12\x1b\n" + + "\tdata_size\x18\x02 \x01(\x04R\bdataSize\"\xe1\x02\n" + + "\x16GetProgramAccountsOpts\x12P\n" + + "\bencoding\x18\x01 \x01(\x0e24.capabilities.blockchain.solana.v1alpha.EncodingTypeR\bencoding\x12V\n" + + "\n" + + "commitment\x18\x02 \x01(\x0e26.capabilities.blockchain.solana.v1alpha.CommitmentTypeR\n" + + "commitment\x12P\n" + + "\n" + + "data_slice\x18\x03 \x01(\v21.capabilities.blockchain.solana.v1alpha.DataSliceR\tdataSlice\x12K\n" + + "\afilters\x18\x04 \x03(\v21.capabilities.blockchain.solana.v1alpha.RPCFilterR\afilters\"q\n" + + "\fKeyedAccount\x12\x16\n" + + "\x06pubkey\x18\x01 \x01(\fR\x06pubkey\x12I\n" + + "\aaccount\x18\x02 \x01(\v2/.capabilities.blockchain.solana.v1alpha.AccountR\aaccount\"e\n" + + "\x17GetProgramAccountsReply\x12J\n" + + "\x05value\x18\x01 \x03(\v24.capabilities.blockchain.solana.v1alpha.KeyedAccountR\x05value\"\x89\x01\n" + + "\x19GetProgramAccountsRequest\x12\x18\n" + + "\aprogram\x18\x01 \x01(\fR\aprogram\x12R\n" + + "\x04opts\x18\x02 \x01(\v2>.capabilities.blockchain.solana.v1alpha.GetProgramAccountsOptsR\x04opts\"y\n" + "\x19GetSignatureStatusesReply\x12\\\n" + "\aresults\x18\x01 \x03(\v2B.capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResultR\aresults\"1\n" + "\x1bGetSignatureStatusesRequest\x12\x12\n" + @@ -3557,7 +3913,7 @@ const file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc = "" + "\x0fCPIFilterConfig\x12!\n" + "\fdest_address\x18\x01 \x01(\fR\vdestAddress\x12\x1f\n" + "\vmethod_name\x18\x02 \x01(\fR\n" + - "methodName\"\xe2\x02\n" + + "methodName\"\x8d\x03\n" + "\x17FilterLogTriggerRequest\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + "\aaddress\x18\x02 \x01(\fR\aaddress\x12\x1d\n" + @@ -3565,7 +3921,8 @@ const file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc = "" + "event_name\x18\x03 \x01(\tR\teventName\x12*\n" + "\x11contract_idl_json\x18\x04 \x01(\fR\x0fcontractIdlJson\x12N\n" + "\asubkeys\x18\x05 \x03(\v24.capabilities.blockchain.solana.v1alpha.SubkeyConfigR\asubkeys\x12h\n" + - "\x11cpi_filter_config\x18\x06 \x01(\v27.capabilities.blockchain.solana.v1alpha.CPIFilterConfigH\x00R\x0fcpiFilterConfig\x88\x01\x01B\x14\n" + + "\x11cpi_filter_config\x18\x06 \x01(\v27.capabilities.blockchain.solana.v1alpha.CPIFilterConfigH\x00R\x0fcpiFilterConfig\x88\x01\x01\x12)\n" + + "\x10include_reverted\x18\a \x01(\bR\x0fincludeRevertedB\x14\n" + "\x12_cpi_filter_config\"\xd4\x02\n" + "\x03Log\x12\x19\n" + "\bchain_id\x18\x01 \x01(\tR\achainId\x12\x1b\n" + @@ -3633,14 +3990,15 @@ const file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc = "" + "\x17COMPARISON_OPERATOR_LTE\x10\x05*\x82\x01\n" + "\x1fReceiverContractExecutionStatus\x12.\n" + "*RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS\x10\x00\x12/\n" + - "+RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED\x10\x012\x80\f\n" + + "+RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED\x10\x012\x9b\r\n" + "\x06Client\x12\xa4\x01\n" + "\x16GetAccountInfoWithOpts\x12E.capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest\x1aC.capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply\x12\x80\x01\n" + "\n" + "GetBalance\x129.capabilities.blockchain.solana.v1alpha.GetBalanceRequest\x1a7.capabilities.blockchain.solana.v1alpha.GetBalanceReply\x12z\n" + "\bGetBlock\x127.capabilities.blockchain.solana.v1alpha.GetBlockRequest\x1a5.capabilities.blockchain.solana.v1alpha.GetBlockReply\x12\x92\x01\n" + "\x10GetFeeForMessage\x12?.capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest\x1a=.capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply\x12\xb3\x01\n" + - "\x1bGetMultipleAccountsWithOpts\x12J.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest\x1aH.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply\x12\x9e\x01\n" + + "\x1bGetMultipleAccountsWithOpts\x12J.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest\x1aH.capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply\x12\x98\x01\n" + + "\x12GetProgramAccounts\x12A.capabilities.blockchain.solana.v1alpha.GetProgramAccountsRequest\x1a?.capabilities.blockchain.solana.v1alpha.GetProgramAccountsReply\x12\x9e\x01\n" + "\x14GetSignatureStatuses\x12C.capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest\x1aA.capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply\x12\x89\x01\n" + "\rGetSlotHeight\x12<.capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest\x1a:.capabilities.blockchain.solana.v1alpha.GetSlotHeightReply\x12\x8c\x01\n" + "\x0eGetTransaction\x12=.capabilities.blockchain.solana.v1alpha.GetTransactionRequest\x1a;.capabilities.blockchain.solana.v1alpha.GetTransactionReply\x12|\n" + @@ -3664,7 +4022,7 @@ func file_capabilities_blockchain_solana_v1alpha_client_proto_rawDescGZIP() []by } var file_capabilities_blockchain_solana_v1alpha_client_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_capabilities_blockchain_solana_v1alpha_client_proto_goTypes = []any{ (EncodingType)(0), // 0: capabilities.blockchain.solana.v1alpha.EncodingType (CommitmentType)(0), // 1: capabilities.blockchain.solana.v1alpha.CommitmentType @@ -3690,43 +4048,49 @@ var file_capabilities_blockchain_solana_v1alpha_client_proto_goTypes = []any{ (*OptionalAccountWrapper)(nil), // 21: capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper (*GetMultipleAccountsWithOptsReply)(nil), // 22: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply (*GetMultipleAccountsWithOptsRequest)(nil), // 23: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest - (*GetSignatureStatusesReply)(nil), // 24: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply - (*GetSignatureStatusesRequest)(nil), // 25: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest - (*GetSignatureStatusesResult)(nil), // 26: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult - (*GetSlotHeightReply)(nil), // 27: capabilities.blockchain.solana.v1alpha.GetSlotHeightReply - (*GetSlotHeightRequest)(nil), // 28: capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest - (*MessageHeader)(nil), // 29: capabilities.blockchain.solana.v1alpha.MessageHeader - (*ParsedMessage)(nil), // 30: capabilities.blockchain.solana.v1alpha.ParsedMessage - (*ParsedTransaction)(nil), // 31: capabilities.blockchain.solana.v1alpha.ParsedTransaction - (*UiTokenAmount)(nil), // 32: capabilities.blockchain.solana.v1alpha.UiTokenAmount - (*TokenBalance)(nil), // 33: capabilities.blockchain.solana.v1alpha.TokenBalance - (*InnerInstruction)(nil), // 34: capabilities.blockchain.solana.v1alpha.InnerInstruction - (*LoadedAddresses)(nil), // 35: capabilities.blockchain.solana.v1alpha.LoadedAddresses - (*CompiledInstruction)(nil), // 36: capabilities.blockchain.solana.v1alpha.CompiledInstruction - (*Data)(nil), // 37: capabilities.blockchain.solana.v1alpha.Data - (*ReturnData)(nil), // 38: capabilities.blockchain.solana.v1alpha.ReturnData - (*TransactionMeta)(nil), // 39: capabilities.blockchain.solana.v1alpha.TransactionMeta - (*TransactionEnvelope)(nil), // 40: capabilities.blockchain.solana.v1alpha.TransactionEnvelope - (*GetTransactionReply)(nil), // 41: capabilities.blockchain.solana.v1alpha.GetTransactionReply - (*GetTransactionRequest)(nil), // 42: capabilities.blockchain.solana.v1alpha.GetTransactionRequest - (*SimulateTXOpts)(nil), // 43: capabilities.blockchain.solana.v1alpha.SimulateTXOpts - (*SimulateTXReply)(nil), // 44: capabilities.blockchain.solana.v1alpha.SimulateTXReply - (*SimulateTXRequest)(nil), // 45: capabilities.blockchain.solana.v1alpha.SimulateTXRequest - (*SimulateTransactionAccountsOpts)(nil), // 46: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts - (*ValueComparator)(nil), // 47: capabilities.blockchain.solana.v1alpha.ValueComparator - (*SubkeyConfig)(nil), // 48: capabilities.blockchain.solana.v1alpha.SubkeyConfig - (*CPIFilterConfig)(nil), // 49: capabilities.blockchain.solana.v1alpha.CPIFilterConfig - (*FilterLogTriggerRequest)(nil), // 50: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest - (*Log)(nil), // 51: capabilities.blockchain.solana.v1alpha.Log - (*AccountMeta)(nil), // 52: capabilities.blockchain.solana.v1alpha.AccountMeta - (*WriteReportRequest)(nil), // 53: capabilities.blockchain.solana.v1alpha.WriteReportRequest - (*WriteReportReply)(nil), // 54: capabilities.blockchain.solana.v1alpha.WriteReportReply - (*pb.BigInt)(nil), // 55: values.v1.BigInt - (*sdk.ReportResponse)(nil), // 56: sdk.v1alpha.ReportResponse + (*RPCFilterMemcmp)(nil), // 24: capabilities.blockchain.solana.v1alpha.RPCFilterMemcmp + (*RPCFilter)(nil), // 25: capabilities.blockchain.solana.v1alpha.RPCFilter + (*GetProgramAccountsOpts)(nil), // 26: capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts + (*KeyedAccount)(nil), // 27: capabilities.blockchain.solana.v1alpha.KeyedAccount + (*GetProgramAccountsReply)(nil), // 28: capabilities.blockchain.solana.v1alpha.GetProgramAccountsReply + (*GetProgramAccountsRequest)(nil), // 29: capabilities.blockchain.solana.v1alpha.GetProgramAccountsRequest + (*GetSignatureStatusesReply)(nil), // 30: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply + (*GetSignatureStatusesRequest)(nil), // 31: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest + (*GetSignatureStatusesResult)(nil), // 32: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult + (*GetSlotHeightReply)(nil), // 33: capabilities.blockchain.solana.v1alpha.GetSlotHeightReply + (*GetSlotHeightRequest)(nil), // 34: capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest + (*MessageHeader)(nil), // 35: capabilities.blockchain.solana.v1alpha.MessageHeader + (*ParsedMessage)(nil), // 36: capabilities.blockchain.solana.v1alpha.ParsedMessage + (*ParsedTransaction)(nil), // 37: capabilities.blockchain.solana.v1alpha.ParsedTransaction + (*UiTokenAmount)(nil), // 38: capabilities.blockchain.solana.v1alpha.UiTokenAmount + (*TokenBalance)(nil), // 39: capabilities.blockchain.solana.v1alpha.TokenBalance + (*InnerInstruction)(nil), // 40: capabilities.blockchain.solana.v1alpha.InnerInstruction + (*LoadedAddresses)(nil), // 41: capabilities.blockchain.solana.v1alpha.LoadedAddresses + (*CompiledInstruction)(nil), // 42: capabilities.blockchain.solana.v1alpha.CompiledInstruction + (*Data)(nil), // 43: capabilities.blockchain.solana.v1alpha.Data + (*ReturnData)(nil), // 44: capabilities.blockchain.solana.v1alpha.ReturnData + (*TransactionMeta)(nil), // 45: capabilities.blockchain.solana.v1alpha.TransactionMeta + (*TransactionEnvelope)(nil), // 46: capabilities.blockchain.solana.v1alpha.TransactionEnvelope + (*GetTransactionReply)(nil), // 47: capabilities.blockchain.solana.v1alpha.GetTransactionReply + (*GetTransactionRequest)(nil), // 48: capabilities.blockchain.solana.v1alpha.GetTransactionRequest + (*SimulateTXOpts)(nil), // 49: capabilities.blockchain.solana.v1alpha.SimulateTXOpts + (*SimulateTXReply)(nil), // 50: capabilities.blockchain.solana.v1alpha.SimulateTXReply + (*SimulateTXRequest)(nil), // 51: capabilities.blockchain.solana.v1alpha.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 52: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts + (*ValueComparator)(nil), // 53: capabilities.blockchain.solana.v1alpha.ValueComparator + (*SubkeyConfig)(nil), // 54: capabilities.blockchain.solana.v1alpha.SubkeyConfig + (*CPIFilterConfig)(nil), // 55: capabilities.blockchain.solana.v1alpha.CPIFilterConfig + (*FilterLogTriggerRequest)(nil), // 56: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest + (*Log)(nil), // 57: capabilities.blockchain.solana.v1alpha.Log + (*AccountMeta)(nil), // 58: capabilities.blockchain.solana.v1alpha.AccountMeta + (*WriteReportRequest)(nil), // 59: capabilities.blockchain.solana.v1alpha.WriteReportRequest + (*WriteReportReply)(nil), // 60: capabilities.blockchain.solana.v1alpha.WriteReportReply + (*pb.BigInt)(nil), // 61: values.v1.BigInt + (*sdk.ReportResponse)(nil), // 62: sdk.v1alpha.ReportResponse } var file_capabilities_blockchain_solana_v1alpha_client_proto_depIdxs = []int32{ 8, // 0: capabilities.blockchain.solana.v1alpha.Account.data:type_name -> capabilities.blockchain.solana.v1alpha.DataBytesOrJSON - 55, // 1: capabilities.blockchain.solana.v1alpha.Account.rent_epoch:type_name -> values.v1.BigInt + 61, // 1: capabilities.blockchain.solana.v1alpha.Account.rent_epoch:type_name -> values.v1.BigInt 0, // 2: capabilities.blockchain.solana.v1alpha.DataBytesOrJSON.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType 0, // 3: capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType 1, // 4: capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType @@ -3743,63 +4107,73 @@ var file_capabilities_blockchain_solana_v1alpha_client_proto_depIdxs = []int32{ 6, // 15: capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper.account:type_name -> capabilities.blockchain.solana.v1alpha.Account 21, // 16: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply.value:type_name -> capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper 20, // 17: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest.opts:type_name -> capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts - 26, // 18: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply.results:type_name -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult - 2, // 19: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult.confirmation_status:type_name -> capabilities.blockchain.solana.v1alpha.ConfirmationStatusType - 1, // 20: capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType - 29, // 21: capabilities.blockchain.solana.v1alpha.ParsedMessage.header:type_name -> capabilities.blockchain.solana.v1alpha.MessageHeader - 36, // 22: capabilities.blockchain.solana.v1alpha.ParsedMessage.instructions:type_name -> capabilities.blockchain.solana.v1alpha.CompiledInstruction - 30, // 23: capabilities.blockchain.solana.v1alpha.ParsedTransaction.message:type_name -> capabilities.blockchain.solana.v1alpha.ParsedMessage - 32, // 24: capabilities.blockchain.solana.v1alpha.TokenBalance.ui:type_name -> capabilities.blockchain.solana.v1alpha.UiTokenAmount - 36, // 25: capabilities.blockchain.solana.v1alpha.InnerInstruction.instructions:type_name -> capabilities.blockchain.solana.v1alpha.CompiledInstruction - 0, // 26: capabilities.blockchain.solana.v1alpha.Data.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType - 37, // 27: capabilities.blockchain.solana.v1alpha.ReturnData.data:type_name -> capabilities.blockchain.solana.v1alpha.Data - 33, // 28: capabilities.blockchain.solana.v1alpha.TransactionMeta.pre_token_balances:type_name -> capabilities.blockchain.solana.v1alpha.TokenBalance - 33, // 29: capabilities.blockchain.solana.v1alpha.TransactionMeta.post_token_balances:type_name -> capabilities.blockchain.solana.v1alpha.TokenBalance - 34, // 30: capabilities.blockchain.solana.v1alpha.TransactionMeta.inner_instructions:type_name -> capabilities.blockchain.solana.v1alpha.InnerInstruction - 35, // 31: capabilities.blockchain.solana.v1alpha.TransactionMeta.loaded_addresses:type_name -> capabilities.blockchain.solana.v1alpha.LoadedAddresses - 38, // 32: capabilities.blockchain.solana.v1alpha.TransactionMeta.return_data:type_name -> capabilities.blockchain.solana.v1alpha.ReturnData - 31, // 33: capabilities.blockchain.solana.v1alpha.TransactionEnvelope.parsed:type_name -> capabilities.blockchain.solana.v1alpha.ParsedTransaction - 40, // 34: capabilities.blockchain.solana.v1alpha.GetTransactionReply.transaction:type_name -> capabilities.blockchain.solana.v1alpha.TransactionEnvelope - 39, // 35: capabilities.blockchain.solana.v1alpha.GetTransactionReply.meta:type_name -> capabilities.blockchain.solana.v1alpha.TransactionMeta - 1, // 36: capabilities.blockchain.solana.v1alpha.SimulateTXOpts.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType - 46, // 37: capabilities.blockchain.solana.v1alpha.SimulateTXOpts.accounts:type_name -> capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts - 6, // 38: capabilities.blockchain.solana.v1alpha.SimulateTXReply.accounts:type_name -> capabilities.blockchain.solana.v1alpha.Account - 43, // 39: capabilities.blockchain.solana.v1alpha.SimulateTXRequest.opts:type_name -> capabilities.blockchain.solana.v1alpha.SimulateTXOpts - 0, // 40: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType - 4, // 41: capabilities.blockchain.solana.v1alpha.ValueComparator.operator:type_name -> capabilities.blockchain.solana.v1alpha.ComparisonOperator - 47, // 42: capabilities.blockchain.solana.v1alpha.SubkeyConfig.comparers:type_name -> capabilities.blockchain.solana.v1alpha.ValueComparator - 48, // 43: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest.subkeys:type_name -> capabilities.blockchain.solana.v1alpha.SubkeyConfig - 49, // 44: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest.cpi_filter_config:type_name -> capabilities.blockchain.solana.v1alpha.CPIFilterConfig - 52, // 45: capabilities.blockchain.solana.v1alpha.WriteReportRequest.remaining_accounts:type_name -> capabilities.blockchain.solana.v1alpha.AccountMeta - 7, // 46: capabilities.blockchain.solana.v1alpha.WriteReportRequest.compute_config:type_name -> capabilities.blockchain.solana.v1alpha.ComputeConfig - 56, // 47: capabilities.blockchain.solana.v1alpha.WriteReportRequest.report:type_name -> sdk.v1alpha.ReportResponse - 3, // 48: capabilities.blockchain.solana.v1alpha.WriteReportReply.tx_status:type_name -> capabilities.blockchain.solana.v1alpha.TxStatus - 5, // 49: capabilities.blockchain.solana.v1alpha.WriteReportReply.receiver_contract_execution_status:type_name -> capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus - 12, // 50: capabilities.blockchain.solana.v1alpha.Client.GetAccountInfoWithOpts:input_type -> capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest - 14, // 51: capabilities.blockchain.solana.v1alpha.Client.GetBalance:input_type -> capabilities.blockchain.solana.v1alpha.GetBalanceRequest - 17, // 52: capabilities.blockchain.solana.v1alpha.Client.GetBlock:input_type -> capabilities.blockchain.solana.v1alpha.GetBlockRequest - 19, // 53: capabilities.blockchain.solana.v1alpha.Client.GetFeeForMessage:input_type -> capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest - 23, // 54: capabilities.blockchain.solana.v1alpha.Client.GetMultipleAccountsWithOpts:input_type -> capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest - 25, // 55: capabilities.blockchain.solana.v1alpha.Client.GetSignatureStatuses:input_type -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest - 28, // 56: capabilities.blockchain.solana.v1alpha.Client.GetSlotHeight:input_type -> capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest - 42, // 57: capabilities.blockchain.solana.v1alpha.Client.GetTransaction:input_type -> capabilities.blockchain.solana.v1alpha.GetTransactionRequest - 50, // 58: capabilities.blockchain.solana.v1alpha.Client.LogTrigger:input_type -> capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest - 53, // 59: capabilities.blockchain.solana.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.solana.v1alpha.WriteReportRequest - 11, // 60: capabilities.blockchain.solana.v1alpha.Client.GetAccountInfoWithOpts:output_type -> capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply - 13, // 61: capabilities.blockchain.solana.v1alpha.Client.GetBalance:output_type -> capabilities.blockchain.solana.v1alpha.GetBalanceReply - 16, // 62: capabilities.blockchain.solana.v1alpha.Client.GetBlock:output_type -> capabilities.blockchain.solana.v1alpha.GetBlockReply - 18, // 63: capabilities.blockchain.solana.v1alpha.Client.GetFeeForMessage:output_type -> capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply - 22, // 64: capabilities.blockchain.solana.v1alpha.Client.GetMultipleAccountsWithOpts:output_type -> capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply - 24, // 65: capabilities.blockchain.solana.v1alpha.Client.GetSignatureStatuses:output_type -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply - 27, // 66: capabilities.blockchain.solana.v1alpha.Client.GetSlotHeight:output_type -> capabilities.blockchain.solana.v1alpha.GetSlotHeightReply - 41, // 67: capabilities.blockchain.solana.v1alpha.Client.GetTransaction:output_type -> capabilities.blockchain.solana.v1alpha.GetTransactionReply - 51, // 68: capabilities.blockchain.solana.v1alpha.Client.LogTrigger:output_type -> capabilities.blockchain.solana.v1alpha.Log - 54, // 69: capabilities.blockchain.solana.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.solana.v1alpha.WriteReportReply - 60, // [60:70] is the sub-list for method output_type - 50, // [50:60] is the sub-list for method input_type - 50, // [50:50] is the sub-list for extension type_name - 50, // [50:50] is the sub-list for extension extendee - 0, // [0:50] is the sub-list for field type_name + 24, // 18: capabilities.blockchain.solana.v1alpha.RPCFilter.memcmp:type_name -> capabilities.blockchain.solana.v1alpha.RPCFilterMemcmp + 0, // 19: capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType + 1, // 20: capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType + 9, // 21: capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts.data_slice:type_name -> capabilities.blockchain.solana.v1alpha.DataSlice + 25, // 22: capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts.filters:type_name -> capabilities.blockchain.solana.v1alpha.RPCFilter + 6, // 23: capabilities.blockchain.solana.v1alpha.KeyedAccount.account:type_name -> capabilities.blockchain.solana.v1alpha.Account + 27, // 24: capabilities.blockchain.solana.v1alpha.GetProgramAccountsReply.value:type_name -> capabilities.blockchain.solana.v1alpha.KeyedAccount + 26, // 25: capabilities.blockchain.solana.v1alpha.GetProgramAccountsRequest.opts:type_name -> capabilities.blockchain.solana.v1alpha.GetProgramAccountsOpts + 32, // 26: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply.results:type_name -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult + 2, // 27: capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult.confirmation_status:type_name -> capabilities.blockchain.solana.v1alpha.ConfirmationStatusType + 1, // 28: capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType + 35, // 29: capabilities.blockchain.solana.v1alpha.ParsedMessage.header:type_name -> capabilities.blockchain.solana.v1alpha.MessageHeader + 42, // 30: capabilities.blockchain.solana.v1alpha.ParsedMessage.instructions:type_name -> capabilities.blockchain.solana.v1alpha.CompiledInstruction + 36, // 31: capabilities.blockchain.solana.v1alpha.ParsedTransaction.message:type_name -> capabilities.blockchain.solana.v1alpha.ParsedMessage + 38, // 32: capabilities.blockchain.solana.v1alpha.TokenBalance.ui:type_name -> capabilities.blockchain.solana.v1alpha.UiTokenAmount + 42, // 33: capabilities.blockchain.solana.v1alpha.InnerInstruction.instructions:type_name -> capabilities.blockchain.solana.v1alpha.CompiledInstruction + 0, // 34: capabilities.blockchain.solana.v1alpha.Data.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType + 43, // 35: capabilities.blockchain.solana.v1alpha.ReturnData.data:type_name -> capabilities.blockchain.solana.v1alpha.Data + 39, // 36: capabilities.blockchain.solana.v1alpha.TransactionMeta.pre_token_balances:type_name -> capabilities.blockchain.solana.v1alpha.TokenBalance + 39, // 37: capabilities.blockchain.solana.v1alpha.TransactionMeta.post_token_balances:type_name -> capabilities.blockchain.solana.v1alpha.TokenBalance + 40, // 38: capabilities.blockchain.solana.v1alpha.TransactionMeta.inner_instructions:type_name -> capabilities.blockchain.solana.v1alpha.InnerInstruction + 41, // 39: capabilities.blockchain.solana.v1alpha.TransactionMeta.loaded_addresses:type_name -> capabilities.blockchain.solana.v1alpha.LoadedAddresses + 44, // 40: capabilities.blockchain.solana.v1alpha.TransactionMeta.return_data:type_name -> capabilities.blockchain.solana.v1alpha.ReturnData + 37, // 41: capabilities.blockchain.solana.v1alpha.TransactionEnvelope.parsed:type_name -> capabilities.blockchain.solana.v1alpha.ParsedTransaction + 46, // 42: capabilities.blockchain.solana.v1alpha.GetTransactionReply.transaction:type_name -> capabilities.blockchain.solana.v1alpha.TransactionEnvelope + 45, // 43: capabilities.blockchain.solana.v1alpha.GetTransactionReply.meta:type_name -> capabilities.blockchain.solana.v1alpha.TransactionMeta + 1, // 44: capabilities.blockchain.solana.v1alpha.SimulateTXOpts.commitment:type_name -> capabilities.blockchain.solana.v1alpha.CommitmentType + 52, // 45: capabilities.blockchain.solana.v1alpha.SimulateTXOpts.accounts:type_name -> capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts + 6, // 46: capabilities.blockchain.solana.v1alpha.SimulateTXReply.accounts:type_name -> capabilities.blockchain.solana.v1alpha.Account + 49, // 47: capabilities.blockchain.solana.v1alpha.SimulateTXRequest.opts:type_name -> capabilities.blockchain.solana.v1alpha.SimulateTXOpts + 0, // 48: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts.encoding:type_name -> capabilities.blockchain.solana.v1alpha.EncodingType + 4, // 49: capabilities.blockchain.solana.v1alpha.ValueComparator.operator:type_name -> capabilities.blockchain.solana.v1alpha.ComparisonOperator + 53, // 50: capabilities.blockchain.solana.v1alpha.SubkeyConfig.comparers:type_name -> capabilities.blockchain.solana.v1alpha.ValueComparator + 54, // 51: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest.subkeys:type_name -> capabilities.blockchain.solana.v1alpha.SubkeyConfig + 55, // 52: capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest.cpi_filter_config:type_name -> capabilities.blockchain.solana.v1alpha.CPIFilterConfig + 58, // 53: capabilities.blockchain.solana.v1alpha.WriteReportRequest.remaining_accounts:type_name -> capabilities.blockchain.solana.v1alpha.AccountMeta + 7, // 54: capabilities.blockchain.solana.v1alpha.WriteReportRequest.compute_config:type_name -> capabilities.blockchain.solana.v1alpha.ComputeConfig + 62, // 55: capabilities.blockchain.solana.v1alpha.WriteReportRequest.report:type_name -> sdk.v1alpha.ReportResponse + 3, // 56: capabilities.blockchain.solana.v1alpha.WriteReportReply.tx_status:type_name -> capabilities.blockchain.solana.v1alpha.TxStatus + 5, // 57: capabilities.blockchain.solana.v1alpha.WriteReportReply.receiver_contract_execution_status:type_name -> capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus + 12, // 58: capabilities.blockchain.solana.v1alpha.Client.GetAccountInfoWithOpts:input_type -> capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest + 14, // 59: capabilities.blockchain.solana.v1alpha.Client.GetBalance:input_type -> capabilities.blockchain.solana.v1alpha.GetBalanceRequest + 17, // 60: capabilities.blockchain.solana.v1alpha.Client.GetBlock:input_type -> capabilities.blockchain.solana.v1alpha.GetBlockRequest + 19, // 61: capabilities.blockchain.solana.v1alpha.Client.GetFeeForMessage:input_type -> capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest + 23, // 62: capabilities.blockchain.solana.v1alpha.Client.GetMultipleAccountsWithOpts:input_type -> capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest + 29, // 63: capabilities.blockchain.solana.v1alpha.Client.GetProgramAccounts:input_type -> capabilities.blockchain.solana.v1alpha.GetProgramAccountsRequest + 31, // 64: capabilities.blockchain.solana.v1alpha.Client.GetSignatureStatuses:input_type -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest + 34, // 65: capabilities.blockchain.solana.v1alpha.Client.GetSlotHeight:input_type -> capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest + 48, // 66: capabilities.blockchain.solana.v1alpha.Client.GetTransaction:input_type -> capabilities.blockchain.solana.v1alpha.GetTransactionRequest + 56, // 67: capabilities.blockchain.solana.v1alpha.Client.LogTrigger:input_type -> capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest + 59, // 68: capabilities.blockchain.solana.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.solana.v1alpha.WriteReportRequest + 11, // 69: capabilities.blockchain.solana.v1alpha.Client.GetAccountInfoWithOpts:output_type -> capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply + 13, // 70: capabilities.blockchain.solana.v1alpha.Client.GetBalance:output_type -> capabilities.blockchain.solana.v1alpha.GetBalanceReply + 16, // 71: capabilities.blockchain.solana.v1alpha.Client.GetBlock:output_type -> capabilities.blockchain.solana.v1alpha.GetBlockReply + 18, // 72: capabilities.blockchain.solana.v1alpha.Client.GetFeeForMessage:output_type -> capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply + 22, // 73: capabilities.blockchain.solana.v1alpha.Client.GetMultipleAccountsWithOpts:output_type -> capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply + 28, // 74: capabilities.blockchain.solana.v1alpha.Client.GetProgramAccounts:output_type -> capabilities.blockchain.solana.v1alpha.GetProgramAccountsReply + 30, // 75: capabilities.blockchain.solana.v1alpha.Client.GetSignatureStatuses:output_type -> capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply + 33, // 76: capabilities.blockchain.solana.v1alpha.Client.GetSlotHeight:output_type -> capabilities.blockchain.solana.v1alpha.GetSlotHeightReply + 47, // 77: capabilities.blockchain.solana.v1alpha.Client.GetTransaction:output_type -> capabilities.blockchain.solana.v1alpha.GetTransactionReply + 57, // 78: capabilities.blockchain.solana.v1alpha.Client.LogTrigger:output_type -> capabilities.blockchain.solana.v1alpha.Log + 60, // 79: capabilities.blockchain.solana.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.solana.v1alpha.WriteReportReply + 69, // [69:80] is the sub-list for method output_type + 58, // [58:69] is the sub-list for method input_type + 58, // [58:58] is the sub-list for extension type_name + 58, // [58:58] is the sub-list for extension extendee + 0, // [0:58] is the sub-list for field type_name } func init() { file_capabilities_blockchain_solana_v1alpha_client_proto_init() } @@ -3814,25 +4188,25 @@ func file_capabilities_blockchain_solana_v1alpha_client_proto_init() { file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[5].OneofWrappers = []any{} file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[10].OneofWrappers = []any{} file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[15].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[20].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[27].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[26].OneofWrappers = []any{} file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[33].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[34].OneofWrappers = []any{ + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[39].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[40].OneofWrappers = []any{ (*TransactionEnvelope_Raw)(nil), (*TransactionEnvelope_Parsed)(nil), } - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[35].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[44].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[45].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[47].OneofWrappers = []any{} - file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[48].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[41].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[50].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[51].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[53].OneofWrappers = []any{} + file_capabilities_blockchain_solana_v1alpha_client_proto_msgTypes[54].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc), len(file_capabilities_blockchain_solana_v1alpha_client_proto_rawDesc)), NumEnums: 6, - NumMessages: 49, + NumMessages: 55, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/capabilities/v2/chain-capabilities/solana/server/client_server_gen.go b/pkg/capabilities/v2/chain-capabilities/solana/server/client_server_gen.go index 60aa9699e8..39f4767eb1 100644 --- a/pkg/capabilities/v2/chain-capabilities/solana/server/client_server_gen.go +++ b/pkg/capabilities/v2/chain-capabilities/solana/server/client_server_gen.go @@ -30,6 +30,8 @@ type ClientCapability interface { GetMultipleAccountsWithOpts(ctx context.Context, metadata capabilities.RequestMetadata, input *solana.GetMultipleAccountsWithOptsRequest) (*capabilities.ResponseAndMetadata[*solana.GetMultipleAccountsWithOptsReply], caperrors.Error) + GetProgramAccounts(ctx context.Context, metadata capabilities.RequestMetadata, input *solana.GetProgramAccountsRequest) (*capabilities.ResponseAndMetadata[*solana.GetProgramAccountsReply], caperrors.Error) + GetSignatureStatuses(ctx context.Context, metadata capabilities.RequestMetadata, input *solana.GetSignatureStatusesRequest) (*capabilities.ResponseAndMetadata[*solana.GetSignatureStatusesReply], caperrors.Error) GetSlotHeight(ctx context.Context, metadata capabilities.RequestMetadata, input *solana.GetSlotHeightRequest) (*capabilities.ResponseAndMetadata[*solana.GetSlotHeightReply], caperrors.Error) @@ -239,6 +241,20 @@ func (c *clientCapability) Execute(ctx context.Context, request capabilities.Cap return output.Response, output.ResponseMetadata, output.OCRAttestation, err } return capabilities.Execute(ctx, request, input, config, wrapped) + case "GetProgramAccounts": + input := &solana.GetProgramAccountsRequest{} + config := &emptypb.Empty{} + wrapped := func(ctx context.Context, metadata capabilities.RequestMetadata, input *solana.GetProgramAccountsRequest, _ *emptypb.Empty) (*solana.GetProgramAccountsReply, capabilities.ResponseMetadata, *capabilities.OCRAttestation, error) { + output, err := c.ClientCapability.GetProgramAccounts(ctx, metadata, input) + if err != nil { + return nil, capabilities.ResponseMetadata{}, nil, err + } + if output == nil { + return nil, capabilities.ResponseMetadata{}, nil, fmt.Errorf("output and error is nil for method GetProgramAccounts(..) (if output is nil error must be present)") + } + return output.Response, output.ResponseMetadata, output.OCRAttestation, err + } + return capabilities.Execute(ctx, request, input, config, wrapped) case "GetSignatureStatuses": input := &solana.GetSignatureStatusesRequest{} config := &emptypb.Empty{} From 1169e6d1676e6bdbb2c11471696eaea8d8435407 Mon Sep 17 00:00:00 2001 From: Vladimir Shchukin Date: Thu, 4 Jun 2026 14:33:44 -0400 Subject: [PATCH 3/5] make tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index c31649ef47..ea4321915f 100644 --- a/go.sum +++ b/go.sum @@ -262,8 +262,6 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.202605282 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20260528204832-58c7145c53f8/go.mod h1:HmUyH2oD9m+GRpKq7q3vuRnm1F2Uczf/Nd1v3ipMSK8= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 h1:GCzrxDWn3b7jFfEA+WiYRi8CKoegsayiDoJBCjYkneE= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4/go.mod h1:HHGeDUpAsPa0pmOx7wrByCitjQ0mbUxf0R9v+g67uCA= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260602131523-5168ac1ba014 h1:4rxcbbe1qe1yR+HcclvOi/e0CFLcBLfx2fgiWxBMMZ4= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260602131523-5168ac1ba014/go.mod h1:vTFHTCbLui4Vn8fTmAadfE3rdnvfrDwOmMujmW857D0= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260604171908-6734db2d444f h1:t+OoYaXLdH0WHK2pbWKjTSnSQa5JBQD1+gf0yISYfQk= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260604171908-6734db2d444f/go.mod h1:vTFHTCbLui4Vn8fTmAadfE3rdnvfrDwOmMujmW857D0= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b h1:QuI6SmQFK/zyUlVWEf0GMkiUYBPY4lssn26nKSd/bOM= From a45c84668cb616a04211e9eaf12a1c0f1c165dc5 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Thu, 4 Jun 2026 14:53:35 -0400 Subject: [PATCH 4/5] Plex 2406/pipe get program accounts (#2126) * pipe get program accounts * add nil check test cases * add mustEmbedUnimplementedClient * handle nil filters * fix tests * run generate * fix mocks --- pkg/chains/solana/proto_helpers.go | 175 ++++ pkg/chains/solana/proto_helpers_test.go | 156 +++ pkg/chains/solana/solana.pb.go | 926 ++++++++++++------ pkg/chains/solana/solana.proto | 39 + pkg/chains/solana/solana_grpc.pb.go | 38 + pkg/loop/internal/relayer/relayer.go | 2 +- pkg/loop/internal/relayer/solana.go | 30 + .../internal/relayerset/relayerset_test.go | 2 +- pkg/loop/internal/relayerset/solana.go | 23 + pkg/types/chains/solana/solana.go | 65 +- .../chains/solana/unimplemented_client.go | 60 ++ pkg/types/mocks/solana_service.go | 91 ++ pkg/types/mocks/solana_service_shim.go | 26 + pkg/types/relayer.go | 34 +- 14 files changed, 1358 insertions(+), 309 deletions(-) create mode 100644 pkg/types/chains/solana/unimplemented_client.go create mode 100644 pkg/types/mocks/solana_service_shim.go diff --git a/pkg/chains/solana/proto_helpers.go b/pkg/chains/solana/proto_helpers.go index 0866533473..25e64aee24 100644 --- a/pkg/chains/solana/proto_helpers.go +++ b/pkg/chains/solana/proto_helpers.go @@ -1067,6 +1067,181 @@ func ConvertGetMultipleAccountsReplyToProto(r *solana.GetMultipleAccountsReply) } } +func ConvertRPCFilterMemcmpFromProto(p *RPCFilterMemcmp) *solana.RPCFilterMemcmp { + if p == nil { + return nil + } + return &solana.RPCFilterMemcmp{ + Offset: p.Offset, + Bytes: p.Bytes, + } +} + +func ConvertRPCFilterMemcmpToProto(m *solana.RPCFilterMemcmp) *RPCFilterMemcmp { + if m == nil { + return nil + } + return &RPCFilterMemcmp{ + Offset: m.Offset, + Bytes: m.Bytes, + } +} + +func ConvertRPCFilterFromProto(p *RPCFilter) solana.RPCFilter { + if p == nil { + return solana.RPCFilter{} + } + return solana.RPCFilter{ + Memcmp: ConvertRPCFilterMemcmpFromProto(p.Memcmp), + DataSize: p.DataSize, + } +} + +func ConvertRPCFilterToProto(f solana.RPCFilter) (*RPCFilter, error) { + if f.Memcmp == nil && f.DataSize == 0 { + return nil, fmt.Errorf("empty RPC filter: must set memcmp or dataSize") + } + return &RPCFilter{ + Memcmp: ConvertRPCFilterMemcmpToProto(f.Memcmp), + DataSize: f.DataSize, + }, nil +} + +func ConvertRPCFiltersFromProto(filters []*RPCFilter) []solana.RPCFilter { + if len(filters) == 0 { + return nil + } + out := make([]solana.RPCFilter, 0, len(filters)) + for _, f := range filters { + out = append(out, ConvertRPCFilterFromProto(f)) + } + return out +} + +func ConvertRPCFiltersToProto(filters []solana.RPCFilter) ([]*RPCFilter, error) { + if len(filters) == 0 { + return nil, nil + } + out := make([]*RPCFilter, 0, len(filters)) + for i, f := range filters { + pf, err := ConvertRPCFilterToProto(f) + if err != nil { + return nil, fmt.Errorf("filter[%d]: %w", i, err) + } + out = append(out, pf) + } + return out, nil +} + +func ConvertGetProgramAccountsOptsFromProto(p *GetProgramAccountsOpts) *solana.GetProgramAccountsOpts { + if p == nil { + return nil + } + return &solana.GetProgramAccountsOpts{ + Encoding: ConvertEncodingTypeFromProto(p.Encoding), + Commitment: ConvertCommitmentFromProto(p.Commitment), + DataSlice: ConvertDataSliceFromProto(p.DataSlice), + Filters: ConvertRPCFiltersFromProto(p.Filters), + } +} + +func ConvertGetProgramAccountsOptsToProto(o *solana.GetProgramAccountsOpts) (*GetProgramAccountsOpts, error) { + if o == nil { + return nil, nil + } + filters, err := ConvertRPCFiltersToProto(o.Filters) + if err != nil { + return nil, err + } + return &GetProgramAccountsOpts{ + Encoding: ConvertEncodingTypeToProto(o.Encoding), + Commitment: ConvertCommitmentToProto(o.Commitment), + DataSlice: ConvertDataSliceToProto(o.DataSlice), + Filters: filters, + }, nil +} + +func ConvertKeyedAccountFromProto(p *KeyedAccount) (*solana.KeyedAccount, error) { + if p == nil { + return nil, nil + } + pubkey, err := ConvertPublicKeyFromProto(p.GetPubkey()) + if err != nil { + return nil, err + } + acc, err := ConvertAccountFromProto(p.Account) + if err != nil { + return nil, err + } + return &solana.KeyedAccount{ + Pubkey: pubkey, + Account: acc, + }, nil +} + +func ConvertKeyedAccountToProto(k *solana.KeyedAccount) *KeyedAccount { + if k == nil { + return nil + } + return &KeyedAccount{ + Pubkey: k.Pubkey[:], + Account: ConvertAccountToProto(k.Account), + } +} + +func ConvertGetProgramAccountsRequestFromProto(p *GetProgramAccountsRequest) (solana.GetProgramAccountsRequest, error) { + if p == nil { + return solana.GetProgramAccountsRequest{}, fmt.Errorf("nil GetProgramAccountsRequest") + } + program, err := ConvertPublicKeyFromProto(p.GetProgram()) + if err != nil { + return solana.GetProgramAccountsRequest{}, err + } + return solana.GetProgramAccountsRequest{ + Program: program, + Opts: ConvertGetProgramAccountsOptsFromProto(p.GetOpts()), + IsExternal: p.GetIsExternal(), + }, nil +} + +func ConvertGetProgramAccountsRequestToProto(r solana.GetProgramAccountsRequest) (*GetProgramAccountsRequest, error) { + opts, err := ConvertGetProgramAccountsOptsToProto(r.Opts) + if err != nil { + return nil, err + } + return &GetProgramAccountsRequest{ + Program: r.Program[:], + Opts: opts, + IsExternal: r.IsExternal, + }, nil +} + +func ConvertGetProgramAccountsReplyFromProto(p *GetProgramAccountsReply) (*solana.GetProgramAccountsReply, error) { + if p == nil { + return nil, nil + } + val := make([]*solana.KeyedAccount, 0, len(p.Value)) + for _, ka := range p.Value { + acc, err := ConvertKeyedAccountFromProto(ka) + if err != nil { + return nil, err + } + val = append(val, acc) + } + return &solana.GetProgramAccountsReply{Value: val}, nil +} + +func ConvertGetProgramAccountsReplyToProto(r *solana.GetProgramAccountsReply) *GetProgramAccountsReply { + if r == nil { + return nil + } + val := make([]*KeyedAccount, 0, len(r.Value)) + for _, ka := range r.Value { + val = append(val, ConvertKeyedAccountToProto(ka)) + } + return &GetProgramAccountsReply{Value: val} +} + func ConvertGetSignatureStatusesRequestFromProto(p *GetSignatureStatusesRequest) (*solana.GetSignatureStatusesRequest, error) { if p == nil { return nil, nil diff --git a/pkg/chains/solana/proto_helpers_test.go b/pkg/chains/solana/proto_helpers_test.go index 1dba017623..f3b9593684 100644 --- a/pkg/chains/solana/proto_helpers_test.go +++ b/pkg/chains/solana/proto_helpers_test.go @@ -424,6 +424,45 @@ func TestExternalRequestProtoRoundTrip(t *testing.T) { require.Equal(t, d.Opts, got.Opts) }) + t.Run("GetProgramAccountsRequest", func(t *testing.T) { + program := typesolana.PublicKey{} + copy(program[:], mkBytes(typesolana.PublicKeyLength, 0x42)) + d := typesolana.GetProgramAccountsRequest{ + Program: program, + Opts: &typesolana.GetProgramAccountsOpts{ + Encoding: typesolana.EncodingBase64, + Commitment: typesolana.CommitmentFinalized, + Filters: []typesolana.RPCFilter{ + {DataSize: 165}, + { + Memcmp: &typesolana.RPCFilterMemcmp{ + Offset: 0, + Bytes: []byte{1, 2, 3}, + }, + }, + }, + }, + IsExternal: true, + } + pb, err := conv.ConvertGetProgramAccountsRequestToProto(d) + require.NoError(t, err) + got, err := conv.ConvertGetProgramAccountsRequestFromProto(pb) + require.NoError(t, err) + require.Equal(t, d, got) + }) + + t.Run("GetProgramAccountsRequest nil opts roundtrip", func(t *testing.T) { + program := typesolana.PublicKey{} + copy(program[:], mkBytes(typesolana.PublicKeyLength, 0x42)) + d := typesolana.GetProgramAccountsRequest{Program: program} + pb, err := conv.ConvertGetProgramAccountsRequestToProto(d) + require.NoError(t, err) + got, err := conv.ConvertGetProgramAccountsRequestFromProto(pb) + require.NoError(t, err) + require.Equal(t, d.Program, got.Program) + require.Nil(t, got.Opts) + }) + t.Run("GetTransactionRequest", func(t *testing.T) { var sig typesolana.Signature copy(sig[:], mkBytes(typesolana.SignatureLength, 0xEF)) @@ -453,6 +492,123 @@ func TestExternalRequestProtoRoundTrip(t *testing.T) { }) } +func TestGetProgramAccountsProtoConvertersNil(t *testing.T) { + t.Run("ConvertGetProgramAccountsRequestFromProto nil request", func(t *testing.T) { + got, err := conv.ConvertGetProgramAccountsRequestFromProto(nil) + require.Error(t, err) + require.Contains(t, err.Error(), "nil GetProgramAccountsRequest") + require.Equal(t, typesolana.GetProgramAccountsRequest{}, got) + }) + + t.Run("ConvertGetProgramAccountsRequestFromProto nil program", func(t *testing.T) { + got, err := conv.ConvertGetProgramAccountsRequestFromProto(&conv.GetProgramAccountsRequest{}) + require.Error(t, err) + require.Contains(t, err.Error(), "address can't be nil") + require.Equal(t, typesolana.GetProgramAccountsRequest{}, got) + }) + + t.Run("ConvertGetProgramAccountsOptsFromProto nil", func(t *testing.T) { + require.Nil(t, conv.ConvertGetProgramAccountsOptsFromProto(nil)) + }) + + t.Run("ConvertGetProgramAccountsOptsToProto nil", func(t *testing.T) { + got, err := conv.ConvertGetProgramAccountsOptsToProto(nil) + require.NoError(t, err) + require.Nil(t, got) + }) + + t.Run("ConvertGetProgramAccountsReplyFromProto nil", func(t *testing.T) { + got, err := conv.ConvertGetProgramAccountsReplyFromProto(nil) + require.NoError(t, err) + require.Nil(t, got) + }) + + t.Run("ConvertGetProgramAccountsReplyToProto nil", func(t *testing.T) { + require.Nil(t, conv.ConvertGetProgramAccountsReplyToProto(nil)) + }) + + t.Run("ConvertGetProgramAccountsReplyFromProto nil keyed account entry", func(t *testing.T) { + got, err := conv.ConvertGetProgramAccountsReplyFromProto(&conv.GetProgramAccountsReply{ + Value: []*conv.KeyedAccount{nil}, + }) + require.NoError(t, err) + require.Len(t, got.Value, 1) + require.Nil(t, got.Value[0]) + }) + + t.Run("ConvertKeyedAccountFromProto nil", func(t *testing.T) { + got, err := conv.ConvertKeyedAccountFromProto(nil) + require.NoError(t, err) + require.Nil(t, got) + }) + + t.Run("ConvertKeyedAccountFromProto nil pubkey", func(t *testing.T) { + got, err := conv.ConvertKeyedAccountFromProto(&conv.KeyedAccount{Account: &conv.Account{}}) + require.Error(t, err) + require.Nil(t, got) + require.Contains(t, err.Error(), "address can't be nil") + }) + + t.Run("ConvertKeyedAccountToProto nil", func(t *testing.T) { + require.Nil(t, conv.ConvertKeyedAccountToProto(nil)) + }) + + t.Run("ConvertRPCFilterMemcmpFromProto nil", func(t *testing.T) { + require.Nil(t, conv.ConvertRPCFilterMemcmpFromProto(nil)) + }) + + t.Run("ConvertRPCFilterMemcmpToProto nil", func(t *testing.T) { + require.Nil(t, conv.ConvertRPCFilterMemcmpToProto(nil)) + }) + + t.Run("ConvertRPCFilterFromProto nil", func(t *testing.T) { + require.Equal(t, typesolana.RPCFilter{}, conv.ConvertRPCFilterFromProto(nil)) + }) + + t.Run("ConvertRPCFilterToProto empty", func(t *testing.T) { + got, err := conv.ConvertRPCFilterToProto(typesolana.RPCFilter{}) + require.Error(t, err) + require.Nil(t, got) + require.Contains(t, err.Error(), "empty RPC filter") + }) + + t.Run("ConvertRPCFiltersFromProto nil and empty", func(t *testing.T) { + require.Nil(t, conv.ConvertRPCFiltersFromProto(nil)) + require.Nil(t, conv.ConvertRPCFiltersFromProto([]*conv.RPCFilter{})) + }) + + t.Run("ConvertRPCFiltersToProto nil and empty", func(t *testing.T) { + got, err := conv.ConvertRPCFiltersToProto(nil) + require.NoError(t, err) + require.Nil(t, got) + got, err = conv.ConvertRPCFiltersToProto([]typesolana.RPCFilter{}) + require.NoError(t, err) + require.Nil(t, got) + }) + + t.Run("ConvertRPCFiltersFromProto skips nil filter entries", func(t *testing.T) { + got := conv.ConvertRPCFiltersFromProto([]*conv.RPCFilter{nil, {DataSize: 8}}) + require.Len(t, got, 2) + require.Equal(t, typesolana.RPCFilter{}, got[0]) + require.Equal(t, uint64(8), got[1].DataSize) + }) + + t.Run("ConvertRPCFiltersToProto rejects empty filter", func(t *testing.T) { + got, err := conv.ConvertRPCFiltersToProto([]typesolana.RPCFilter{{}, {DataSize: 42}}) + require.Error(t, err) + require.Nil(t, got) + require.Contains(t, err.Error(), "filter[0]") + require.Contains(t, err.Error(), "empty RPC filter") + }) + + t.Run("ConvertRPCFiltersToProto valid filters", func(t *testing.T) { + got, err := conv.ConvertRPCFiltersToProto([]typesolana.RPCFilter{{DataSize: 42}}) + require.NoError(t, err) + require.Len(t, got, 1) + require.Equal(t, uint64(42), got[0].DataSize) + }) +} + func TestErrorJoinBehavior_PublicKeys(t *testing.T) { in := [][]byte{ mkBytes(typesolana.PublicKeyLength-1, 0x01), diff --git a/pkg/chains/solana/solana.pb.go b/pkg/chains/solana/solana.pb.go index 9ca5294269..fd46fe7fc8 100644 --- a/pkg/chains/solana/solana.pb.go +++ b/pkg/chains/solana/solana.pb.go @@ -1301,6 +1301,340 @@ func (x *GetMultipleAccountsWithOptsRequest) GetIsExternal() bool { return false } +// Memcmp filter for getProgramAccounts. +type RPCFilterMemcmp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // byte offset into account data + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` // data to match (RPC encodes as base58) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RPCFilterMemcmp) Reset() { + *x = RPCFilterMemcmp{} + mi := &file_solana_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCFilterMemcmp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCFilterMemcmp) ProtoMessage() {} + +func (x *RPCFilterMemcmp) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCFilterMemcmp.ProtoReflect.Descriptor instead. +func (*RPCFilterMemcmp) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{18} +} + +func (x *RPCFilterMemcmp) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *RPCFilterMemcmp) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// Account filter for getProgramAccounts (memcmp or data size). +type RPCFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Memcmp *RPCFilterMemcmp `protobuf:"bytes,1,opt,name=memcmp,proto3" json:"memcmp,omitempty"` + DataSize uint64 `protobuf:"varint,2,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"` // match accounts with this data length + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RPCFilter) Reset() { + *x = RPCFilter{} + mi := &file_solana_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RPCFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCFilter) ProtoMessage() {} + +func (x *RPCFilter) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCFilter.ProtoReflect.Descriptor instead. +func (*RPCFilter) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{19} +} + +func (x *RPCFilter) GetMemcmp() *RPCFilterMemcmp { + if x != nil { + return x.Memcmp + } + return nil +} + +func (x *RPCFilter) GetDataSize() uint64 { + if x != nil { + return x.DataSize + } + return 0 +} + +// Options for GetProgramAccounts. +type GetProgramAccountsOpts struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoding EncodingType `protobuf:"varint,1,opt,name=encoding,proto3,enum=loop.solana.EncodingType" json:"encoding,omitempty"` + Commitment CommitmentType `protobuf:"varint,2,opt,name=commitment,proto3,enum=loop.solana.CommitmentType" json:"commitment,omitempty"` + DataSlice *DataSlice `protobuf:"bytes,3,opt,name=data_slice,json=dataSlice,proto3" json:"data_slice,omitempty"` + Filters []*RPCFilter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsOpts) Reset() { + *x = GetProgramAccountsOpts{} + mi := &file_solana_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsOpts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsOpts) ProtoMessage() {} + +func (x *GetProgramAccountsOpts) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsOpts.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsOpts) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{20} +} + +func (x *GetProgramAccountsOpts) GetEncoding() EncodingType { + if x != nil { + return x.Encoding + } + return EncodingType_ENCODING_TYPE_NONE +} + +func (x *GetProgramAccountsOpts) GetCommitment() CommitmentType { + if x != nil { + return x.Commitment + } + return CommitmentType_COMMITMENT_TYPE_NONE +} + +func (x *GetProgramAccountsOpts) GetDataSlice() *DataSlice { + if x != nil { + return x.DataSlice + } + return nil +} + +func (x *GetProgramAccountsOpts) GetFilters() []*RPCFilter { + if x != nil { + return x.Filters + } + return nil +} + +// Program-owned account with its pubkey. +type KeyedAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // 32-byte Pubkey + Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *KeyedAccount) Reset() { + *x = KeyedAccount{} + mi := &file_solana_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *KeyedAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyedAccount) ProtoMessage() {} + +func (x *KeyedAccount) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyedAccount.ProtoReflect.Descriptor instead. +func (*KeyedAccount) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{21} +} + +func (x *KeyedAccount) GetPubkey() []byte { + if x != nil { + return x.Pubkey + } + return nil +} + +func (x *KeyedAccount) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +// Reply for GetProgramAccounts. +type GetProgramAccountsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value []*KeyedAccount `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsReply) Reset() { + *x = GetProgramAccountsReply{} + mi := &file_solana_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsReply) ProtoMessage() {} + +func (x *GetProgramAccountsReply) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsReply.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsReply) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{22} +} + +func (x *GetProgramAccountsReply) GetValue() []*KeyedAccount { + if x != nil { + return x.Value + } + return nil +} + +// Request for GetProgramAccounts. +type GetProgramAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Program []byte `protobuf:"bytes,1,opt,name=program,proto3" json:"program,omitempty"` // 32-byte program Pubkey + Opts *GetProgramAccountsOpts `protobuf:"bytes,2,opt,name=opts,proto3" json:"opts,omitempty"` + IsExternal bool `protobuf:"varint,3,opt,name=is_external,json=isExternal,proto3" json:"is_external,omitempty"` // if true, limits like response size limit may be applied + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProgramAccountsRequest) Reset() { + *x = GetProgramAccountsRequest{} + mi := &file_solana_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProgramAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProgramAccountsRequest) ProtoMessage() {} + +func (x *GetProgramAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_solana_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProgramAccountsRequest.ProtoReflect.Descriptor instead. +func (*GetProgramAccountsRequest) Descriptor() ([]byte, []int) { + return file_solana_proto_rawDescGZIP(), []int{23} +} + +func (x *GetProgramAccountsRequest) GetProgram() []byte { + if x != nil { + return x.Program + } + return nil +} + +func (x *GetProgramAccountsRequest) GetOpts() *GetProgramAccountsOpts { + if x != nil { + return x.Opts + } + return nil +} + +func (x *GetProgramAccountsRequest) GetIsExternal() bool { + if x != nil { + return x.IsExternal + } + return false +} + // Reply for GetSignatureStatuses. type GetSignatureStatusesReply struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1311,7 +1645,7 @@ type GetSignatureStatusesReply struct { func (x *GetSignatureStatusesReply) Reset() { *x = GetSignatureStatusesReply{} - mi := &file_solana_proto_msgTypes[18] + mi := &file_solana_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1323,7 +1657,7 @@ func (x *GetSignatureStatusesReply) String() string { func (*GetSignatureStatusesReply) ProtoMessage() {} func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[18] + mi := &file_solana_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1336,7 +1670,7 @@ func (x *GetSignatureStatusesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesReply.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{18} + return file_solana_proto_rawDescGZIP(), []int{24} } func (x *GetSignatureStatusesReply) GetResults() []*GetSignatureStatusesResult { @@ -1356,7 +1690,7 @@ type GetSignatureStatusesRequest struct { func (x *GetSignatureStatusesRequest) Reset() { *x = GetSignatureStatusesRequest{} - mi := &file_solana_proto_msgTypes[19] + mi := &file_solana_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1368,7 +1702,7 @@ func (x *GetSignatureStatusesRequest) String() string { func (*GetSignatureStatusesRequest) ProtoMessage() {} func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[19] + mi := &file_solana_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1381,7 +1715,7 @@ func (x *GetSignatureStatusesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesRequest.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{19} + return file_solana_proto_rawDescGZIP(), []int{25} } func (x *GetSignatureStatusesRequest) GetSigs() [][]byte { @@ -1404,7 +1738,7 @@ type GetSignatureStatusesResult struct { func (x *GetSignatureStatusesResult) Reset() { *x = GetSignatureStatusesResult{} - mi := &file_solana_proto_msgTypes[20] + mi := &file_solana_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1416,7 +1750,7 @@ func (x *GetSignatureStatusesResult) String() string { func (*GetSignatureStatusesResult) ProtoMessage() {} func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[20] + mi := &file_solana_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1429,7 +1763,7 @@ func (x *GetSignatureStatusesResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSignatureStatusesResult.ProtoReflect.Descriptor instead. func (*GetSignatureStatusesResult) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{20} + return file_solana_proto_rawDescGZIP(), []int{26} } func (x *GetSignatureStatusesResult) GetSlot() uint64 { @@ -1470,7 +1804,7 @@ type GetSlotHeightReply struct { func (x *GetSlotHeightReply) Reset() { *x = GetSlotHeightReply{} - mi := &file_solana_proto_msgTypes[21] + mi := &file_solana_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1482,7 +1816,7 @@ func (x *GetSlotHeightReply) String() string { func (*GetSlotHeightReply) ProtoMessage() {} func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[21] + mi := &file_solana_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1495,7 +1829,7 @@ func (x *GetSlotHeightReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSlotHeightReply.ProtoReflect.Descriptor instead. func (*GetSlotHeightReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{21} + return file_solana_proto_rawDescGZIP(), []int{27} } func (x *GetSlotHeightReply) GetHeight() uint64 { @@ -1514,7 +1848,7 @@ type GetSlotHeightRequest struct { func (x *GetSlotHeightRequest) Reset() { *x = GetSlotHeightRequest{} - mi := &file_solana_proto_msgTypes[22] + mi := &file_solana_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1526,7 +1860,7 @@ func (x *GetSlotHeightRequest) String() string { func (*GetSlotHeightRequest) ProtoMessage() {} func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[22] + mi := &file_solana_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1539,7 +1873,7 @@ func (x *GetSlotHeightRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSlotHeightRequest.ProtoReflect.Descriptor instead. func (*GetSlotHeightRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{22} + return file_solana_proto_rawDescGZIP(), []int{28} } func (x *GetSlotHeightRequest) GetCommitment() CommitmentType { @@ -1561,7 +1895,7 @@ type MessageHeader struct { func (x *MessageHeader) Reset() { *x = MessageHeader{} - mi := &file_solana_proto_msgTypes[23] + mi := &file_solana_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1573,7 +1907,7 @@ func (x *MessageHeader) String() string { func (*MessageHeader) ProtoMessage() {} func (x *MessageHeader) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[23] + mi := &file_solana_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1586,7 +1920,7 @@ func (x *MessageHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead. func (*MessageHeader) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{23} + return file_solana_proto_rawDescGZIP(), []int{29} } func (x *MessageHeader) GetNumRequiredSignatures() uint32 { @@ -1623,7 +1957,7 @@ type ParsedMessage struct { func (x *ParsedMessage) Reset() { *x = ParsedMessage{} - mi := &file_solana_proto_msgTypes[24] + mi := &file_solana_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1635,7 +1969,7 @@ func (x *ParsedMessage) String() string { func (*ParsedMessage) ProtoMessage() {} func (x *ParsedMessage) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[24] + mi := &file_solana_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1648,7 +1982,7 @@ func (x *ParsedMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ParsedMessage.ProtoReflect.Descriptor instead. func (*ParsedMessage) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{24} + return file_solana_proto_rawDescGZIP(), []int{30} } func (x *ParsedMessage) GetRecentBlockhash() []byte { @@ -1690,7 +2024,7 @@ type ParsedTransaction struct { func (x *ParsedTransaction) Reset() { *x = ParsedTransaction{} - mi := &file_solana_proto_msgTypes[25] + mi := &file_solana_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1702,7 +2036,7 @@ func (x *ParsedTransaction) String() string { func (*ParsedTransaction) ProtoMessage() {} func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[25] + mi := &file_solana_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1715,7 +2049,7 @@ func (x *ParsedTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use ParsedTransaction.ProtoReflect.Descriptor instead. func (*ParsedTransaction) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{25} + return file_solana_proto_rawDescGZIP(), []int{31} } func (x *ParsedTransaction) GetSignatures() [][]byte { @@ -1744,7 +2078,7 @@ type UiTokenAmount struct { func (x *UiTokenAmount) Reset() { *x = UiTokenAmount{} - mi := &file_solana_proto_msgTypes[26] + mi := &file_solana_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1756,7 +2090,7 @@ func (x *UiTokenAmount) String() string { func (*UiTokenAmount) ProtoMessage() {} func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[26] + mi := &file_solana_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1769,7 +2103,7 @@ func (x *UiTokenAmount) ProtoReflect() protoreflect.Message { // Deprecated: Use UiTokenAmount.ProtoReflect.Descriptor instead. func (*UiTokenAmount) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{26} + return file_solana_proto_rawDescGZIP(), []int{32} } func (x *UiTokenAmount) GetAmount() string { @@ -1807,7 +2141,7 @@ type TokenBalance struct { func (x *TokenBalance) Reset() { *x = TokenBalance{} - mi := &file_solana_proto_msgTypes[27] + mi := &file_solana_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1819,7 +2153,7 @@ func (x *TokenBalance) String() string { func (*TokenBalance) ProtoMessage() {} func (x *TokenBalance) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[27] + mi := &file_solana_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1832,7 +2166,7 @@ func (x *TokenBalance) ProtoReflect() protoreflect.Message { // Deprecated: Use TokenBalance.ProtoReflect.Descriptor instead. func (*TokenBalance) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{27} + return file_solana_proto_rawDescGZIP(), []int{33} } func (x *TokenBalance) GetAccountIndex() uint32 { @@ -1881,7 +2215,7 @@ type InnerInstruction struct { func (x *InnerInstruction) Reset() { *x = InnerInstruction{} - mi := &file_solana_proto_msgTypes[28] + mi := &file_solana_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1893,7 +2227,7 @@ func (x *InnerInstruction) String() string { func (*InnerInstruction) ProtoMessage() {} func (x *InnerInstruction) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[28] + mi := &file_solana_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1906,7 +2240,7 @@ func (x *InnerInstruction) ProtoReflect() protoreflect.Message { // Deprecated: Use InnerInstruction.ProtoReflect.Descriptor instead. func (*InnerInstruction) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{28} + return file_solana_proto_rawDescGZIP(), []int{34} } func (x *InnerInstruction) GetIndex() uint32 { @@ -1934,7 +2268,7 @@ type LoadedAddresses struct { func (x *LoadedAddresses) Reset() { *x = LoadedAddresses{} - mi := &file_solana_proto_msgTypes[29] + mi := &file_solana_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1946,7 +2280,7 @@ func (x *LoadedAddresses) String() string { func (*LoadedAddresses) ProtoMessage() {} func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[29] + mi := &file_solana_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1959,7 +2293,7 @@ func (x *LoadedAddresses) ProtoReflect() protoreflect.Message { // Deprecated: Use LoadedAddresses.ProtoReflect.Descriptor instead. func (*LoadedAddresses) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{29} + return file_solana_proto_rawDescGZIP(), []int{35} } func (x *LoadedAddresses) GetReadonly() [][]byte { @@ -1989,7 +2323,7 @@ type CompiledInstruction struct { func (x *CompiledInstruction) Reset() { *x = CompiledInstruction{} - mi := &file_solana_proto_msgTypes[30] + mi := &file_solana_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2001,7 +2335,7 @@ func (x *CompiledInstruction) String() string { func (*CompiledInstruction) ProtoMessage() {} func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[30] + mi := &file_solana_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2014,7 +2348,7 @@ func (x *CompiledInstruction) ProtoReflect() protoreflect.Message { // Deprecated: Use CompiledInstruction.ProtoReflect.Descriptor instead. func (*CompiledInstruction) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{30} + return file_solana_proto_rawDescGZIP(), []int{36} } func (x *CompiledInstruction) GetProgramIdIndex() uint32 { @@ -2056,7 +2390,7 @@ type Data struct { func (x *Data) Reset() { *x = Data{} - mi := &file_solana_proto_msgTypes[31] + mi := &file_solana_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2068,7 +2402,7 @@ func (x *Data) String() string { func (*Data) ProtoMessage() {} func (x *Data) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[31] + mi := &file_solana_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2081,7 +2415,7 @@ func (x *Data) ProtoReflect() protoreflect.Message { // Deprecated: Use Data.ProtoReflect.Descriptor instead. func (*Data) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{31} + return file_solana_proto_rawDescGZIP(), []int{37} } func (x *Data) GetContent() []byte { @@ -2109,7 +2443,7 @@ type ReturnData struct { func (x *ReturnData) Reset() { *x = ReturnData{} - mi := &file_solana_proto_msgTypes[32] + mi := &file_solana_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2121,7 +2455,7 @@ func (x *ReturnData) String() string { func (*ReturnData) ProtoMessage() {} func (x *ReturnData) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[32] + mi := &file_solana_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2134,7 +2468,7 @@ func (x *ReturnData) ProtoReflect() protoreflect.Message { // Deprecated: Use ReturnData.ProtoReflect.Descriptor instead. func (*ReturnData) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{32} + return file_solana_proto_rawDescGZIP(), []int{38} } func (x *ReturnData) GetProgramId() []byte { @@ -2171,7 +2505,7 @@ type TransactionMeta struct { func (x *TransactionMeta) Reset() { *x = TransactionMeta{} - mi := &file_solana_proto_msgTypes[33] + mi := &file_solana_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2183,7 +2517,7 @@ func (x *TransactionMeta) String() string { func (*TransactionMeta) ProtoMessage() {} func (x *TransactionMeta) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[33] + mi := &file_solana_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2196,7 +2530,7 @@ func (x *TransactionMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionMeta.ProtoReflect.Descriptor instead. func (*TransactionMeta) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{33} + return file_solana_proto_rawDescGZIP(), []int{39} } func (x *TransactionMeta) GetErrJson() string { @@ -2290,7 +2624,7 @@ type TransactionEnvelope struct { func (x *TransactionEnvelope) Reset() { *x = TransactionEnvelope{} - mi := &file_solana_proto_msgTypes[34] + mi := &file_solana_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2302,7 +2636,7 @@ func (x *TransactionEnvelope) String() string { func (*TransactionEnvelope) ProtoMessage() {} func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[34] + mi := &file_solana_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2315,7 +2649,7 @@ func (x *TransactionEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionEnvelope.ProtoReflect.Descriptor instead. func (*TransactionEnvelope) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{34} + return file_solana_proto_rawDescGZIP(), []int{40} } func (x *TransactionEnvelope) GetTransaction() isTransactionEnvelope_Transaction { @@ -2372,7 +2706,7 @@ type GetTransactionReply struct { func (x *GetTransactionReply) Reset() { *x = GetTransactionReply{} - mi := &file_solana_proto_msgTypes[35] + mi := &file_solana_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2384,7 +2718,7 @@ func (x *GetTransactionReply) String() string { func (*GetTransactionReply) ProtoMessage() {} func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[35] + mi := &file_solana_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2397,7 +2731,7 @@ func (x *GetTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionReply.ProtoReflect.Descriptor instead. func (*GetTransactionReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{35} + return file_solana_proto_rawDescGZIP(), []int{41} } func (x *GetTransactionReply) GetSlot() uint64 { @@ -2439,7 +2773,7 @@ type GetTransactionRequest struct { func (x *GetTransactionRequest) Reset() { *x = GetTransactionRequest{} - mi := &file_solana_proto_msgTypes[36] + mi := &file_solana_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2451,7 +2785,7 @@ func (x *GetTransactionRequest) String() string { func (*GetTransactionRequest) ProtoMessage() {} func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[36] + mi := &file_solana_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2464,7 +2798,7 @@ func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead. func (*GetTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{36} + return file_solana_proto_rawDescGZIP(), []int{42} } func (x *GetTransactionRequest) GetSignature() []byte { @@ -2491,7 +2825,7 @@ type RPCContext struct { func (x *RPCContext) Reset() { *x = RPCContext{} - mi := &file_solana_proto_msgTypes[37] + mi := &file_solana_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2503,7 +2837,7 @@ func (x *RPCContext) String() string { func (*RPCContext) ProtoMessage() {} func (x *RPCContext) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[37] + mi := &file_solana_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2516,7 +2850,7 @@ func (x *RPCContext) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCContext.ProtoReflect.Descriptor instead. func (*RPCContext) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{37} + return file_solana_proto_rawDescGZIP(), []int{43} } func (x *RPCContext) GetSlot() uint64 { @@ -2539,7 +2873,7 @@ type SimulateTXOpts struct { func (x *SimulateTXOpts) Reset() { *x = SimulateTXOpts{} - mi := &file_solana_proto_msgTypes[38] + mi := &file_solana_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2551,7 +2885,7 @@ func (x *SimulateTXOpts) String() string { func (*SimulateTXOpts) ProtoMessage() {} func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[38] + mi := &file_solana_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2564,7 +2898,7 @@ func (x *SimulateTXOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXOpts.ProtoReflect.Descriptor instead. func (*SimulateTXOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{38} + return file_solana_proto_rawDescGZIP(), []int{44} } func (x *SimulateTXOpts) GetSigVerify() bool { @@ -2608,7 +2942,7 @@ type SimulateTXReply struct { func (x *SimulateTXReply) Reset() { *x = SimulateTXReply{} - mi := &file_solana_proto_msgTypes[39] + mi := &file_solana_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2620,7 +2954,7 @@ func (x *SimulateTXReply) String() string { func (*SimulateTXReply) ProtoMessage() {} func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[39] + mi := &file_solana_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2633,7 +2967,7 @@ func (x *SimulateTXReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXReply.ProtoReflect.Descriptor instead. func (*SimulateTXReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{39} + return file_solana_proto_rawDescGZIP(), []int{45} } func (x *SimulateTXReply) GetErr() string { @@ -2677,7 +3011,7 @@ type SimulateTXRequest struct { func (x *SimulateTXRequest) Reset() { *x = SimulateTXRequest{} - mi := &file_solana_proto_msgTypes[40] + mi := &file_solana_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2689,7 +3023,7 @@ func (x *SimulateTXRequest) String() string { func (*SimulateTXRequest) ProtoMessage() {} func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[40] + mi := &file_solana_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2702,7 +3036,7 @@ func (x *SimulateTXRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTXRequest.ProtoReflect.Descriptor instead. func (*SimulateTXRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{40} + return file_solana_proto_rawDescGZIP(), []int{46} } func (x *SimulateTXRequest) GetReceiver() []byte { @@ -2744,7 +3078,7 @@ type SimulateTransactionAccountsOpts struct { func (x *SimulateTransactionAccountsOpts) Reset() { *x = SimulateTransactionAccountsOpts{} - mi := &file_solana_proto_msgTypes[41] + mi := &file_solana_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2756,7 +3090,7 @@ func (x *SimulateTransactionAccountsOpts) String() string { func (*SimulateTransactionAccountsOpts) ProtoMessage() {} func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[41] + mi := &file_solana_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2769,7 +3103,7 @@ func (x *SimulateTransactionAccountsOpts) ProtoReflect() protoreflect.Message { // Deprecated: Use SimulateTransactionAccountsOpts.ProtoReflect.Descriptor instead. func (*SimulateTransactionAccountsOpts) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{41} + return file_solana_proto_rawDescGZIP(), []int{47} } func (x *SimulateTransactionAccountsOpts) GetEncoding() EncodingType { @@ -2798,7 +3132,7 @@ type SubmitTransactionReply struct { func (x *SubmitTransactionReply) Reset() { *x = SubmitTransactionReply{} - mi := &file_solana_proto_msgTypes[42] + mi := &file_solana_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2810,7 +3144,7 @@ func (x *SubmitTransactionReply) String() string { func (*SubmitTransactionReply) ProtoMessage() {} func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[42] + mi := &file_solana_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +3157,7 @@ func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionReply.ProtoReflect.Descriptor instead. func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{42} + return file_solana_proto_rawDescGZIP(), []int{48} } func (x *SubmitTransactionReply) GetSignature() []byte { @@ -2859,7 +3193,7 @@ type SubmitTransactionRequest struct { func (x *SubmitTransactionRequest) Reset() { *x = SubmitTransactionRequest{} - mi := &file_solana_proto_msgTypes[43] + mi := &file_solana_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2871,7 +3205,7 @@ func (x *SubmitTransactionRequest) String() string { func (*SubmitTransactionRequest) ProtoMessage() {} func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[43] + mi := &file_solana_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2884,7 +3218,7 @@ func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{43} + return file_solana_proto_rawDescGZIP(), []int{49} } func (x *SubmitTransactionRequest) GetCfg() *ComputeConfig { @@ -2919,7 +3253,7 @@ type EventSig struct { func (x *EventSig) Reset() { *x = EventSig{} - mi := &file_solana_proto_msgTypes[44] + mi := &file_solana_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2931,7 +3265,7 @@ func (x *EventSig) String() string { func (*EventSig) ProtoMessage() {} func (x *EventSig) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[44] + mi := &file_solana_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2944,7 +3278,7 @@ func (x *EventSig) ProtoReflect() protoreflect.Message { // Deprecated: Use EventSig.ProtoReflect.Descriptor instead. func (*EventSig) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{44} + return file_solana_proto_rawDescGZIP(), []int{50} } func (x *EventSig) GetTopic() uint64 { @@ -2972,7 +3306,7 @@ type IndexedValueComparator struct { func (x *IndexedValueComparator) Reset() { *x = IndexedValueComparator{} - mi := &file_solana_proto_msgTypes[45] + mi := &file_solana_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2984,7 +3318,7 @@ func (x *IndexedValueComparator) String() string { func (*IndexedValueComparator) ProtoMessage() {} func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[45] + mi := &file_solana_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2997,7 +3331,7 @@ func (x *IndexedValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use IndexedValueComparator.ProtoReflect.Descriptor instead. func (*IndexedValueComparator) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{45} + return file_solana_proto_rawDescGZIP(), []int{51} } func (x *IndexedValueComparator) GetValue() []byte { @@ -3025,7 +3359,7 @@ type EventBySubkey struct { func (x *EventBySubkey) Reset() { *x = EventBySubkey{} - mi := &file_solana_proto_msgTypes[46] + mi := &file_solana_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3037,7 +3371,7 @@ func (x *EventBySubkey) String() string { func (*EventBySubkey) ProtoMessage() {} func (x *EventBySubkey) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[46] + mi := &file_solana_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3050,7 +3384,7 @@ func (x *EventBySubkey) ProtoReflect() protoreflect.Message { // Deprecated: Use EventBySubkey.ProtoReflect.Descriptor instead. func (*EventBySubkey) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{46} + return file_solana_proto_rawDescGZIP(), []int{52} } func (x *EventBySubkey) GetSubkeyIndex() uint64 { @@ -3081,7 +3415,7 @@ type Expression struct { func (x *Expression) Reset() { *x = Expression{} - mi := &file_solana_proto_msgTypes[47] + mi := &file_solana_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3093,7 +3427,7 @@ func (x *Expression) String() string { func (*Expression) ProtoMessage() {} func (x *Expression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[47] + mi := &file_solana_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3106,7 +3440,7 @@ func (x *Expression) ProtoReflect() protoreflect.Message { // Deprecated: Use Expression.ProtoReflect.Descriptor instead. func (*Expression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{47} + return file_solana_proto_rawDescGZIP(), []int{53} } func (x *Expression) GetEvaluator() isExpression_Evaluator { @@ -3161,7 +3495,7 @@ type BooleanExpression struct { func (x *BooleanExpression) Reset() { *x = BooleanExpression{} - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3173,7 +3507,7 @@ func (x *BooleanExpression) String() string { func (*BooleanExpression) ProtoMessage() {} func (x *BooleanExpression) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[48] + mi := &file_solana_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3186,7 +3520,7 @@ func (x *BooleanExpression) ProtoReflect() protoreflect.Message { // Deprecated: Use BooleanExpression.ProtoReflect.Descriptor instead. func (*BooleanExpression) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{48} + return file_solana_proto_rawDescGZIP(), []int{54} } func (x *BooleanExpression) GetBooleanOperator() chain_common.BooleanOperator { @@ -3219,7 +3553,7 @@ type Primitive struct { func (x *Primitive) Reset() { *x = Primitive{} - mi := &file_solana_proto_msgTypes[49] + mi := &file_solana_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3231,7 +3565,7 @@ func (x *Primitive) String() string { func (*Primitive) ProtoMessage() {} func (x *Primitive) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[49] + mi := &file_solana_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3244,7 +3578,7 @@ func (x *Primitive) ProtoReflect() protoreflect.Message { // Deprecated: Use Primitive.ProtoReflect.Descriptor instead. func (*Primitive) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{49} + return file_solana_proto_rawDescGZIP(), []int{55} } func (x *Primitive) GetPrimitive() isPrimitive_Primitive { @@ -3329,7 +3663,7 @@ type HashedValueComparator struct { func (x *HashedValueComparator) Reset() { *x = HashedValueComparator{} - mi := &file_solana_proto_msgTypes[50] + mi := &file_solana_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3341,7 +3675,7 @@ func (x *HashedValueComparator) String() string { func (*HashedValueComparator) ProtoMessage() {} func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[50] + mi := &file_solana_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3354,7 +3688,7 @@ func (x *HashedValueComparator) ProtoReflect() protoreflect.Message { // Deprecated: Use HashedValueComparator.ProtoReflect.Descriptor instead. func (*HashedValueComparator) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{50} + return file_solana_proto_rawDescGZIP(), []int{56} } func (x *HashedValueComparator) GetValues() [][]byte { @@ -3381,7 +3715,7 @@ type Subkeys struct { func (x *Subkeys) Reset() { *x = Subkeys{} - mi := &file_solana_proto_msgTypes[51] + mi := &file_solana_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3393,7 +3727,7 @@ func (x *Subkeys) String() string { func (*Subkeys) ProtoMessage() {} func (x *Subkeys) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[51] + mi := &file_solana_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3406,7 +3740,7 @@ func (x *Subkeys) ProtoReflect() protoreflect.Message { // Deprecated: Use Subkeys.ProtoReflect.Descriptor instead. func (*Subkeys) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{51} + return file_solana_proto_rawDescGZIP(), []int{57} } func (x *Subkeys) GetSubkeys() []string { @@ -3426,7 +3760,7 @@ type CPIFilterConfig struct { func (x *CPIFilterConfig) Reset() { *x = CPIFilterConfig{} - mi := &file_solana_proto_msgTypes[52] + mi := &file_solana_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3438,7 +3772,7 @@ func (x *CPIFilterConfig) String() string { func (*CPIFilterConfig) ProtoMessage() {} func (x *CPIFilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[52] + mi := &file_solana_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3451,7 +3785,7 @@ func (x *CPIFilterConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use CPIFilterConfig.ProtoReflect.Descriptor instead. func (*CPIFilterConfig) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{52} + return file_solana_proto_rawDescGZIP(), []int{58} } func (x *CPIFilterConfig) GetDestAddress() []byte { @@ -3490,7 +3824,7 @@ type LPFilterQuery struct { func (x *LPFilterQuery) Reset() { *x = LPFilterQuery{} - mi := &file_solana_proto_msgTypes[53] + mi := &file_solana_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3502,7 +3836,7 @@ func (x *LPFilterQuery) String() string { func (*LPFilterQuery) ProtoMessage() {} func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[53] + mi := &file_solana_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3515,7 +3849,7 @@ func (x *LPFilterQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use LPFilterQuery.ProtoReflect.Descriptor instead. func (*LPFilterQuery) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{53} + return file_solana_proto_rawDescGZIP(), []int{59} } func (x *LPFilterQuery) GetName() string { @@ -3623,7 +3957,7 @@ type Log struct { func (x *Log) Reset() { *x = Log{} - mi := &file_solana_proto_msgTypes[54] + mi := &file_solana_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3635,7 +3969,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[54] + mi := &file_solana_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3648,7 +3982,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{54} + return file_solana_proto_rawDescGZIP(), []int{60} } func (x *Log) GetChainId() string { @@ -3739,7 +4073,7 @@ type QueryTrackedLogsRequest struct { func (x *QueryTrackedLogsRequest) Reset() { *x = QueryTrackedLogsRequest{} - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3751,7 +4085,7 @@ func (x *QueryTrackedLogsRequest) String() string { func (*QueryTrackedLogsRequest) ProtoMessage() {} func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[55] + mi := &file_solana_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3764,7 +4098,7 @@ func (x *QueryTrackedLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsRequest.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{55} + return file_solana_proto_rawDescGZIP(), []int{61} } func (x *QueryTrackedLogsRequest) GetFilterQuery() []*Expression { @@ -3790,7 +4124,7 @@ type QueryTrackedLogsReply struct { func (x *QueryTrackedLogsReply) Reset() { *x = QueryTrackedLogsReply{} - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3802,7 +4136,7 @@ func (x *QueryTrackedLogsReply) String() string { func (*QueryTrackedLogsReply) ProtoMessage() {} func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[56] + mi := &file_solana_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3815,7 +4149,7 @@ func (x *QueryTrackedLogsReply) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryTrackedLogsReply.ProtoReflect.Descriptor instead. func (*QueryTrackedLogsReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{56} + return file_solana_proto_rawDescGZIP(), []int{62} } func (x *QueryTrackedLogsReply) GetLogs() []*Log { @@ -3835,7 +4169,7 @@ type RegisterLogTrackingRequest struct { func (x *RegisterLogTrackingRequest) Reset() { *x = RegisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3847,7 +4181,7 @@ func (x *RegisterLogTrackingRequest) String() string { func (*RegisterLogTrackingRequest) ProtoMessage() {} func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[57] + mi := &file_solana_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3860,7 +4194,7 @@ func (x *RegisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{57} + return file_solana_proto_rawDescGZIP(), []int{63} } func (x *RegisterLogTrackingRequest) GetFilter() *LPFilterQuery { @@ -3878,7 +4212,7 @@ type RegisterLogTrackingReply struct { func (x *RegisterLogTrackingReply) Reset() { *x = RegisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3890,7 +4224,7 @@ func (x *RegisterLogTrackingReply) String() string { func (*RegisterLogTrackingReply) ProtoMessage() {} func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[58] + mi := &file_solana_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3903,7 +4237,7 @@ func (x *RegisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*RegisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{58} + return file_solana_proto_rawDescGZIP(), []int{64} } // Unregister a filter by name/id. @@ -3916,7 +4250,7 @@ type UnregisterLogTrackingRequest struct { func (x *UnregisterLogTrackingRequest) Reset() { *x = UnregisterLogTrackingRequest{} - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3928,7 +4262,7 @@ func (x *UnregisterLogTrackingRequest) String() string { func (*UnregisterLogTrackingRequest) ProtoMessage() {} func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[59] + mi := &file_solana_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3941,7 +4275,7 @@ func (x *UnregisterLogTrackingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingRequest.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingRequest) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{59} + return file_solana_proto_rawDescGZIP(), []int{65} } func (x *UnregisterLogTrackingRequest) GetFilterName() string { @@ -3959,7 +4293,7 @@ type UnregisterLogTrackingReply struct { func (x *UnregisterLogTrackingReply) Reset() { *x = UnregisterLogTrackingReply{} - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3971,7 +4305,7 @@ func (x *UnregisterLogTrackingReply) String() string { func (*UnregisterLogTrackingReply) ProtoMessage() {} func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[60] + mi := &file_solana_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3984,7 +4318,7 @@ func (x *UnregisterLogTrackingReply) ProtoReflect() protoreflect.Message { // Deprecated: Use UnregisterLogTrackingReply.ProtoReflect.Descriptor instead. func (*UnregisterLogTrackingReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{60} + return file_solana_proto_rawDescGZIP(), []int{66} } // latest block processed by lp @@ -3997,7 +4331,7 @@ type GetLatestLPBlockReply struct { func (x *GetLatestLPBlockReply) Reset() { *x = GetLatestLPBlockReply{} - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4009,7 +4343,7 @@ func (x *GetLatestLPBlockReply) String() string { func (*GetLatestLPBlockReply) ProtoMessage() {} func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[61] + mi := &file_solana_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4022,7 +4356,7 @@ func (x *GetLatestLPBlockReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLatestLPBlockReply.ProtoReflect.Descriptor instead. func (*GetLatestLPBlockReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{61} + return file_solana_proto_rawDescGZIP(), []int{67} } func (x *GetLatestLPBlockReply) GetSlot() uint64 { @@ -4042,7 +4376,7 @@ type GetFiltersNamesReply struct { func (x *GetFiltersNamesReply) Reset() { *x = GetFiltersNamesReply{} - mi := &file_solana_proto_msgTypes[62] + mi := &file_solana_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4054,7 +4388,7 @@ func (x *GetFiltersNamesReply) String() string { func (*GetFiltersNamesReply) ProtoMessage() {} func (x *GetFiltersNamesReply) ProtoReflect() protoreflect.Message { - mi := &file_solana_proto_msgTypes[62] + mi := &file_solana_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4067,7 +4401,7 @@ func (x *GetFiltersNamesReply) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFiltersNamesReply.ProtoReflect.Descriptor instead. func (*GetFiltersNamesReply) Descriptor() ([]byte, []int) { - return file_solana_proto_rawDescGZIP(), []int{62} + return file_solana_proto_rawDescGZIP(), []int{68} } func (x *GetFiltersNamesReply) GetItems() []string { @@ -4171,6 +4505,30 @@ const file_solana_proto_rawDesc = "" + "\baccounts\x18\x01 \x03(\fR\baccounts\x128\n" + "\x04opts\x18\x02 \x01(\v2$.loop.solana.GetMultipleAccountsOptsR\x04opts\x12\x1f\n" + "\vis_external\x18\x03 \x01(\bR\n" + + "isExternal\"?\n" + + "\x0fRPCFilterMemcmp\x12\x16\n" + + "\x06offset\x18\x01 \x01(\x04R\x06offset\x12\x14\n" + + "\x05bytes\x18\x02 \x01(\fR\x05bytes\"^\n" + + "\tRPCFilter\x124\n" + + "\x06memcmp\x18\x01 \x01(\v2\x1c.loop.solana.RPCFilterMemcmpR\x06memcmp\x12\x1b\n" + + "\tdata_size\x18\x02 \x01(\x04R\bdataSize\"\xf5\x01\n" + + "\x16GetProgramAccountsOpts\x125\n" + + "\bencoding\x18\x01 \x01(\x0e2\x19.loop.solana.EncodingTypeR\bencoding\x12;\n" + + "\n" + + "commitment\x18\x02 \x01(\x0e2\x1b.loop.solana.CommitmentTypeR\n" + + "commitment\x125\n" + + "\n" + + "data_slice\x18\x03 \x01(\v2\x16.loop.solana.DataSliceR\tdataSlice\x120\n" + + "\afilters\x18\x04 \x03(\v2\x16.loop.solana.RPCFilterR\afilters\"V\n" + + "\fKeyedAccount\x12\x16\n" + + "\x06pubkey\x18\x01 \x01(\fR\x06pubkey\x12.\n" + + "\aaccount\x18\x02 \x01(\v2\x14.loop.solana.AccountR\aaccount\"J\n" + + "\x17GetProgramAccountsReply\x12/\n" + + "\x05value\x18\x01 \x03(\v2\x19.loop.solana.KeyedAccountR\x05value\"\x8f\x01\n" + + "\x19GetProgramAccountsRequest\x12\x18\n" + + "\aprogram\x18\x01 \x01(\fR\aprogram\x127\n" + + "\x04opts\x18\x02 \x01(\v2#.loop.solana.GetProgramAccountsOptsR\x04opts\x12\x1f\n" + + "\vis_external\x18\x03 \x01(\bR\n" + "isExternal\"^\n" + "\x19GetSignatureStatusesReply\x12A\n" + "\aresults\x18\x01 \x03(\v2'.loop.solana.GetSignatureStatusesResultR\aresults\"1\n" + @@ -4400,15 +4758,15 @@ const file_solana_proto_rawDesc = "" + "\bTxStatus\x12\x13\n" + "\x0fTX_STATUS_FATAL\x10\x00\x12\x15\n" + "\x11TX_STATUS_ABORTED\x10\x01\x12\x15\n" + - "\x11TX_STATUS_SUCCESS\x10\x022\xfb\n" + - "\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xdf\v\n" + "\x06Solana\x12n\n" + "\x16GetAccountInfoWithOpts\x12*.loop.solana.GetAccountInfoWithOptsRequest\x1a(.loop.solana.GetAccountInfoWithOptsReply\x12J\n" + "\n" + "GetBalance\x12\x1e.loop.solana.GetBalanceRequest\x1a\x1c.loop.solana.GetBalanceReply\x12D\n" + "\bGetBlock\x12\x1c.loop.solana.GetBlockRequest\x1a\x1a.loop.solana.GetBlockReply\x12\\\n" + "\x10GetFeeForMessage\x12$.loop.solana.GetFeeForMessageRequest\x1a\".loop.solana.GetFeeForMessageReply\x12}\n" + - "\x1bGetMultipleAccountsWithOpts\x12/.loop.solana.GetMultipleAccountsWithOptsRequest\x1a-.loop.solana.GetMultipleAccountsWithOptsReply\x12h\n" + + "\x1bGetMultipleAccountsWithOpts\x12/.loop.solana.GetMultipleAccountsWithOptsRequest\x1a-.loop.solana.GetMultipleAccountsWithOptsReply\x12b\n" + + "\x12GetProgramAccounts\x12&.loop.solana.GetProgramAccountsRequest\x1a$.loop.solana.GetProgramAccountsReply\x12h\n" + "\x14GetSignatureStatuses\x12(.loop.solana.GetSignatureStatusesRequest\x1a&.loop.solana.GetSignatureStatusesReply\x12S\n" + "\rGetSlotHeight\x12!.loop.solana.GetSlotHeightRequest\x1a\x1f.loop.solana.GetSlotHeightReply\x12V\n" + "\x0eGetTransaction\x12\".loop.solana.GetTransactionRequest\x1a .loop.solana.GetTransactionReply\x12\\\n" + @@ -4434,7 +4792,7 @@ func file_solana_proto_rawDescGZIP() []byte { } var file_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 63) +var file_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 69) var file_solana_proto_goTypes = []any{ (EncodingType)(0), // 0: loop.solana.EncodingType (CommitmentType)(0), // 1: loop.solana.CommitmentType @@ -4458,66 +4816,72 @@ var file_solana_proto_goTypes = []any{ (*OptionalAccountWrapper)(nil), // 19: loop.solana.OptionalAccountWrapper (*GetMultipleAccountsWithOptsReply)(nil), // 20: loop.solana.GetMultipleAccountsWithOptsReply (*GetMultipleAccountsWithOptsRequest)(nil), // 21: loop.solana.GetMultipleAccountsWithOptsRequest - (*GetSignatureStatusesReply)(nil), // 22: loop.solana.GetSignatureStatusesReply - (*GetSignatureStatusesRequest)(nil), // 23: loop.solana.GetSignatureStatusesRequest - (*GetSignatureStatusesResult)(nil), // 24: loop.solana.GetSignatureStatusesResult - (*GetSlotHeightReply)(nil), // 25: loop.solana.GetSlotHeightReply - (*GetSlotHeightRequest)(nil), // 26: loop.solana.GetSlotHeightRequest - (*MessageHeader)(nil), // 27: loop.solana.MessageHeader - (*ParsedMessage)(nil), // 28: loop.solana.ParsedMessage - (*ParsedTransaction)(nil), // 29: loop.solana.ParsedTransaction - (*UiTokenAmount)(nil), // 30: loop.solana.UiTokenAmount - (*TokenBalance)(nil), // 31: loop.solana.TokenBalance - (*InnerInstruction)(nil), // 32: loop.solana.InnerInstruction - (*LoadedAddresses)(nil), // 33: loop.solana.LoadedAddresses - (*CompiledInstruction)(nil), // 34: loop.solana.CompiledInstruction - (*Data)(nil), // 35: loop.solana.Data - (*ReturnData)(nil), // 36: loop.solana.ReturnData - (*TransactionMeta)(nil), // 37: loop.solana.TransactionMeta - (*TransactionEnvelope)(nil), // 38: loop.solana.TransactionEnvelope - (*GetTransactionReply)(nil), // 39: loop.solana.GetTransactionReply - (*GetTransactionRequest)(nil), // 40: loop.solana.GetTransactionRequest - (*RPCContext)(nil), // 41: loop.solana.RPCContext - (*SimulateTXOpts)(nil), // 42: loop.solana.SimulateTXOpts - (*SimulateTXReply)(nil), // 43: loop.solana.SimulateTXReply - (*SimulateTXRequest)(nil), // 44: loop.solana.SimulateTXRequest - (*SimulateTransactionAccountsOpts)(nil), // 45: loop.solana.SimulateTransactionAccountsOpts - (*SubmitTransactionReply)(nil), // 46: loop.solana.SubmitTransactionReply - (*SubmitTransactionRequest)(nil), // 47: loop.solana.SubmitTransactionRequest - (*EventSig)(nil), // 48: loop.solana.EventSig - (*IndexedValueComparator)(nil), // 49: loop.solana.IndexedValueComparator - (*EventBySubkey)(nil), // 50: loop.solana.EventBySubkey - (*Expression)(nil), // 51: loop.solana.Expression - (*BooleanExpression)(nil), // 52: loop.solana.BooleanExpression - (*Primitive)(nil), // 53: loop.solana.Primitive - (*HashedValueComparator)(nil), // 54: loop.solana.HashedValueComparator - (*Subkeys)(nil), // 55: loop.solana.Subkeys - (*CPIFilterConfig)(nil), // 56: loop.solana.CPIFilterConfig - (*LPFilterQuery)(nil), // 57: loop.solana.LPFilterQuery - (*Log)(nil), // 58: loop.solana.Log - (*QueryTrackedLogsRequest)(nil), // 59: loop.solana.QueryTrackedLogsRequest - (*QueryTrackedLogsReply)(nil), // 60: loop.solana.QueryTrackedLogsReply - (*RegisterLogTrackingRequest)(nil), // 61: loop.solana.RegisterLogTrackingRequest - (*RegisterLogTrackingReply)(nil), // 62: loop.solana.RegisterLogTrackingReply - (*UnregisterLogTrackingRequest)(nil), // 63: loop.solana.UnregisterLogTrackingRequest - (*UnregisterLogTrackingReply)(nil), // 64: loop.solana.UnregisterLogTrackingReply - (*GetLatestLPBlockReply)(nil), // 65: loop.solana.GetLatestLPBlockReply - (*GetFiltersNamesReply)(nil), // 66: loop.solana.GetFiltersNamesReply - (*pb.BigInt)(nil), // 67: values.v1.BigInt - (chain_common.ComparisonOperator)(0), // 68: loop.chain.common.ComparisonOperator - (chain_common.BooleanOperator)(0), // 69: loop.chain.common.BooleanOperator - (*chain_common.Primitive)(nil), // 70: loop.chain.common.Primitive - (*chain_common.LimitAndSort)(nil), // 71: loop.chain.common.LimitAndSort - (*emptypb.Empty)(nil), // 72: google.protobuf.Empty + (*RPCFilterMemcmp)(nil), // 22: loop.solana.RPCFilterMemcmp + (*RPCFilter)(nil), // 23: loop.solana.RPCFilter + (*GetProgramAccountsOpts)(nil), // 24: loop.solana.GetProgramAccountsOpts + (*KeyedAccount)(nil), // 25: loop.solana.KeyedAccount + (*GetProgramAccountsReply)(nil), // 26: loop.solana.GetProgramAccountsReply + (*GetProgramAccountsRequest)(nil), // 27: loop.solana.GetProgramAccountsRequest + (*GetSignatureStatusesReply)(nil), // 28: loop.solana.GetSignatureStatusesReply + (*GetSignatureStatusesRequest)(nil), // 29: loop.solana.GetSignatureStatusesRequest + (*GetSignatureStatusesResult)(nil), // 30: loop.solana.GetSignatureStatusesResult + (*GetSlotHeightReply)(nil), // 31: loop.solana.GetSlotHeightReply + (*GetSlotHeightRequest)(nil), // 32: loop.solana.GetSlotHeightRequest + (*MessageHeader)(nil), // 33: loop.solana.MessageHeader + (*ParsedMessage)(nil), // 34: loop.solana.ParsedMessage + (*ParsedTransaction)(nil), // 35: loop.solana.ParsedTransaction + (*UiTokenAmount)(nil), // 36: loop.solana.UiTokenAmount + (*TokenBalance)(nil), // 37: loop.solana.TokenBalance + (*InnerInstruction)(nil), // 38: loop.solana.InnerInstruction + (*LoadedAddresses)(nil), // 39: loop.solana.LoadedAddresses + (*CompiledInstruction)(nil), // 40: loop.solana.CompiledInstruction + (*Data)(nil), // 41: loop.solana.Data + (*ReturnData)(nil), // 42: loop.solana.ReturnData + (*TransactionMeta)(nil), // 43: loop.solana.TransactionMeta + (*TransactionEnvelope)(nil), // 44: loop.solana.TransactionEnvelope + (*GetTransactionReply)(nil), // 45: loop.solana.GetTransactionReply + (*GetTransactionRequest)(nil), // 46: loop.solana.GetTransactionRequest + (*RPCContext)(nil), // 47: loop.solana.RPCContext + (*SimulateTXOpts)(nil), // 48: loop.solana.SimulateTXOpts + (*SimulateTXReply)(nil), // 49: loop.solana.SimulateTXReply + (*SimulateTXRequest)(nil), // 50: loop.solana.SimulateTXRequest + (*SimulateTransactionAccountsOpts)(nil), // 51: loop.solana.SimulateTransactionAccountsOpts + (*SubmitTransactionReply)(nil), // 52: loop.solana.SubmitTransactionReply + (*SubmitTransactionRequest)(nil), // 53: loop.solana.SubmitTransactionRequest + (*EventSig)(nil), // 54: loop.solana.EventSig + (*IndexedValueComparator)(nil), // 55: loop.solana.IndexedValueComparator + (*EventBySubkey)(nil), // 56: loop.solana.EventBySubkey + (*Expression)(nil), // 57: loop.solana.Expression + (*BooleanExpression)(nil), // 58: loop.solana.BooleanExpression + (*Primitive)(nil), // 59: loop.solana.Primitive + (*HashedValueComparator)(nil), // 60: loop.solana.HashedValueComparator + (*Subkeys)(nil), // 61: loop.solana.Subkeys + (*CPIFilterConfig)(nil), // 62: loop.solana.CPIFilterConfig + (*LPFilterQuery)(nil), // 63: loop.solana.LPFilterQuery + (*Log)(nil), // 64: loop.solana.Log + (*QueryTrackedLogsRequest)(nil), // 65: loop.solana.QueryTrackedLogsRequest + (*QueryTrackedLogsReply)(nil), // 66: loop.solana.QueryTrackedLogsReply + (*RegisterLogTrackingRequest)(nil), // 67: loop.solana.RegisterLogTrackingRequest + (*RegisterLogTrackingReply)(nil), // 68: loop.solana.RegisterLogTrackingReply + (*UnregisterLogTrackingRequest)(nil), // 69: loop.solana.UnregisterLogTrackingRequest + (*UnregisterLogTrackingReply)(nil), // 70: loop.solana.UnregisterLogTrackingReply + (*GetLatestLPBlockReply)(nil), // 71: loop.solana.GetLatestLPBlockReply + (*GetFiltersNamesReply)(nil), // 72: loop.solana.GetFiltersNamesReply + (*pb.BigInt)(nil), // 73: values.v1.BigInt + (chain_common.ComparisonOperator)(0), // 74: loop.chain.common.ComparisonOperator + (chain_common.BooleanOperator)(0), // 75: loop.chain.common.BooleanOperator + (*chain_common.Primitive)(nil), // 76: loop.chain.common.Primitive + (*chain_common.LimitAndSort)(nil), // 77: loop.chain.common.LimitAndSort + (*emptypb.Empty)(nil), // 78: google.protobuf.Empty } var file_solana_proto_depIdxs = []int32{ 6, // 0: loop.solana.Account.data:type_name -> loop.solana.DataBytesOrJSON - 67, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt + 73, // 1: loop.solana.Account.rent_epoch:type_name -> values.v1.BigInt 0, // 2: loop.solana.DataBytesOrJSON.encoding:type_name -> loop.solana.EncodingType 0, // 3: loop.solana.GetAccountInfoOpts.encoding:type_name -> loop.solana.EncodingType 1, // 4: loop.solana.GetAccountInfoOpts.commitment:type_name -> loop.solana.CommitmentType 7, // 5: loop.solana.GetAccountInfoOpts.data_slice:type_name -> loop.solana.DataSlice - 41, // 6: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 47, // 6: loop.solana.GetAccountInfoWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext 4, // 7: loop.solana.GetAccountInfoWithOptsReply.value:type_name -> loop.solana.Account 8, // 8: loop.solana.GetAccountInfoWithOptsRequest.opts:type_name -> loop.solana.GetAccountInfoOpts 1, // 9: loop.solana.GetBalanceRequest.commitment:type_name -> loop.solana.CommitmentType @@ -4528,84 +4892,94 @@ var file_solana_proto_depIdxs = []int32{ 1, // 14: loop.solana.GetMultipleAccountsOpts.commitment:type_name -> loop.solana.CommitmentType 7, // 15: loop.solana.GetMultipleAccountsOpts.data_slice:type_name -> loop.solana.DataSlice 4, // 16: loop.solana.OptionalAccountWrapper.account:type_name -> loop.solana.Account - 41, // 17: loop.solana.GetMultipleAccountsWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext + 47, // 17: loop.solana.GetMultipleAccountsWithOptsReply.rpc_context:type_name -> loop.solana.RPCContext 19, // 18: loop.solana.GetMultipleAccountsWithOptsReply.value:type_name -> loop.solana.OptionalAccountWrapper 18, // 19: loop.solana.GetMultipleAccountsWithOptsRequest.opts:type_name -> loop.solana.GetMultipleAccountsOpts - 24, // 20: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult - 2, // 21: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType - 1, // 22: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType - 27, // 23: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader - 34, // 24: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction - 28, // 25: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage - 30, // 26: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount - 34, // 27: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction - 0, // 28: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType - 35, // 29: loop.solana.ReturnData.data:type_name -> loop.solana.Data - 31, // 30: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance - 31, // 31: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance - 32, // 32: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction - 33, // 33: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses - 36, // 34: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData - 29, // 35: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction - 38, // 36: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope - 37, // 37: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta - 1, // 38: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType - 45, // 39: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts - 4, // 40: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account - 42, // 41: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts - 0, // 42: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType - 3, // 43: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TxStatus - 5, // 44: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig - 54, // 45: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator - 68, // 46: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator - 49, // 47: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator - 53, // 48: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive - 52, // 49: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression - 69, // 50: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator - 51, // 51: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression - 70, // 52: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive - 50, // 53: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey - 55, // 54: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys - 56, // 55: loop.solana.LPFilterQuery.cpi_filter_config:type_name -> loop.solana.CPIFilterConfig - 51, // 56: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression - 71, // 57: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort - 58, // 58: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log - 57, // 59: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery - 10, // 60: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest - 12, // 61: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest - 15, // 62: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest - 17, // 63: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest - 21, // 64: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest - 23, // 65: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest - 26, // 66: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest - 40, // 67: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest - 59, // 68: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest - 61, // 69: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest - 44, // 70: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest - 47, // 71: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest - 63, // 72: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest - 72, // 73: loop.solana.Solana.GetLatestLPBlock:input_type -> google.protobuf.Empty - 72, // 74: loop.solana.Solana.GetFiltersNames:input_type -> google.protobuf.Empty - 9, // 75: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply - 11, // 76: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply - 14, // 77: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply - 16, // 78: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply - 20, // 79: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply - 22, // 80: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply - 25, // 81: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply - 39, // 82: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply - 60, // 83: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply - 62, // 84: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply - 43, // 85: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply - 46, // 86: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply - 64, // 87: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply - 65, // 88: loop.solana.Solana.GetLatestLPBlock:output_type -> loop.solana.GetLatestLPBlockReply - 66, // 89: loop.solana.Solana.GetFiltersNames:output_type -> loop.solana.GetFiltersNamesReply - 75, // [75:90] is the sub-list for method output_type - 60, // [60:75] is the sub-list for method input_type - 60, // [60:60] is the sub-list for extension type_name - 60, // [60:60] is the sub-list for extension extendee - 0, // [0:60] is the sub-list for field type_name + 22, // 20: loop.solana.RPCFilter.memcmp:type_name -> loop.solana.RPCFilterMemcmp + 0, // 21: loop.solana.GetProgramAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 1, // 22: loop.solana.GetProgramAccountsOpts.commitment:type_name -> loop.solana.CommitmentType + 7, // 23: loop.solana.GetProgramAccountsOpts.data_slice:type_name -> loop.solana.DataSlice + 23, // 24: loop.solana.GetProgramAccountsOpts.filters:type_name -> loop.solana.RPCFilter + 4, // 25: loop.solana.KeyedAccount.account:type_name -> loop.solana.Account + 25, // 26: loop.solana.GetProgramAccountsReply.value:type_name -> loop.solana.KeyedAccount + 24, // 27: loop.solana.GetProgramAccountsRequest.opts:type_name -> loop.solana.GetProgramAccountsOpts + 30, // 28: loop.solana.GetSignatureStatusesReply.results:type_name -> loop.solana.GetSignatureStatusesResult + 2, // 29: loop.solana.GetSignatureStatusesResult.confirmation_status:type_name -> loop.solana.ConfirmationStatusType + 1, // 30: loop.solana.GetSlotHeightRequest.commitment:type_name -> loop.solana.CommitmentType + 33, // 31: loop.solana.ParsedMessage.header:type_name -> loop.solana.MessageHeader + 40, // 32: loop.solana.ParsedMessage.instructions:type_name -> loop.solana.CompiledInstruction + 34, // 33: loop.solana.ParsedTransaction.message:type_name -> loop.solana.ParsedMessage + 36, // 34: loop.solana.TokenBalance.ui:type_name -> loop.solana.UiTokenAmount + 40, // 35: loop.solana.InnerInstruction.instructions:type_name -> loop.solana.CompiledInstruction + 0, // 36: loop.solana.Data.encoding:type_name -> loop.solana.EncodingType + 41, // 37: loop.solana.ReturnData.data:type_name -> loop.solana.Data + 37, // 38: loop.solana.TransactionMeta.pre_token_balances:type_name -> loop.solana.TokenBalance + 37, // 39: loop.solana.TransactionMeta.post_token_balances:type_name -> loop.solana.TokenBalance + 38, // 40: loop.solana.TransactionMeta.inner_instructions:type_name -> loop.solana.InnerInstruction + 39, // 41: loop.solana.TransactionMeta.loaded_addresses:type_name -> loop.solana.LoadedAddresses + 42, // 42: loop.solana.TransactionMeta.return_data:type_name -> loop.solana.ReturnData + 35, // 43: loop.solana.TransactionEnvelope.parsed:type_name -> loop.solana.ParsedTransaction + 44, // 44: loop.solana.GetTransactionReply.transaction:type_name -> loop.solana.TransactionEnvelope + 43, // 45: loop.solana.GetTransactionReply.meta:type_name -> loop.solana.TransactionMeta + 1, // 46: loop.solana.SimulateTXOpts.commitment:type_name -> loop.solana.CommitmentType + 51, // 47: loop.solana.SimulateTXOpts.accounts:type_name -> loop.solana.SimulateTransactionAccountsOpts + 4, // 48: loop.solana.SimulateTXReply.accounts:type_name -> loop.solana.Account + 48, // 49: loop.solana.SimulateTXRequest.opts:type_name -> loop.solana.SimulateTXOpts + 0, // 50: loop.solana.SimulateTransactionAccountsOpts.encoding:type_name -> loop.solana.EncodingType + 3, // 51: loop.solana.SubmitTransactionReply.status:type_name -> loop.solana.TxStatus + 5, // 52: loop.solana.SubmitTransactionRequest.cfg:type_name -> loop.solana.ComputeConfig + 60, // 53: loop.solana.EventSig.hashed_value_comparers:type_name -> loop.solana.HashedValueComparator + 74, // 54: loop.solana.IndexedValueComparator.operator:type_name -> loop.chain.common.ComparisonOperator + 55, // 55: loop.solana.EventBySubkey.value_comparers:type_name -> loop.solana.IndexedValueComparator + 59, // 56: loop.solana.Expression.primitive:type_name -> loop.solana.Primitive + 58, // 57: loop.solana.Expression.boolean_expression:type_name -> loop.solana.BooleanExpression + 75, // 58: loop.solana.BooleanExpression.boolean_operator:type_name -> loop.chain.common.BooleanOperator + 57, // 59: loop.solana.BooleanExpression.expression:type_name -> loop.solana.Expression + 76, // 60: loop.solana.Primitive.general_primitive:type_name -> loop.chain.common.Primitive + 56, // 61: loop.solana.Primitive.event_by_subkey:type_name -> loop.solana.EventBySubkey + 61, // 62: loop.solana.LPFilterQuery.subkey_paths:type_name -> loop.solana.Subkeys + 62, // 63: loop.solana.LPFilterQuery.cpi_filter_config:type_name -> loop.solana.CPIFilterConfig + 57, // 64: loop.solana.QueryTrackedLogsRequest.filterQuery:type_name -> loop.solana.Expression + 77, // 65: loop.solana.QueryTrackedLogsRequest.limit_and_sort:type_name -> loop.chain.common.LimitAndSort + 64, // 66: loop.solana.QueryTrackedLogsReply.logs:type_name -> loop.solana.Log + 63, // 67: loop.solana.RegisterLogTrackingRequest.filter:type_name -> loop.solana.LPFilterQuery + 10, // 68: loop.solana.Solana.GetAccountInfoWithOpts:input_type -> loop.solana.GetAccountInfoWithOptsRequest + 12, // 69: loop.solana.Solana.GetBalance:input_type -> loop.solana.GetBalanceRequest + 15, // 70: loop.solana.Solana.GetBlock:input_type -> loop.solana.GetBlockRequest + 17, // 71: loop.solana.Solana.GetFeeForMessage:input_type -> loop.solana.GetFeeForMessageRequest + 21, // 72: loop.solana.Solana.GetMultipleAccountsWithOpts:input_type -> loop.solana.GetMultipleAccountsWithOptsRequest + 27, // 73: loop.solana.Solana.GetProgramAccounts:input_type -> loop.solana.GetProgramAccountsRequest + 29, // 74: loop.solana.Solana.GetSignatureStatuses:input_type -> loop.solana.GetSignatureStatusesRequest + 32, // 75: loop.solana.Solana.GetSlotHeight:input_type -> loop.solana.GetSlotHeightRequest + 46, // 76: loop.solana.Solana.GetTransaction:input_type -> loop.solana.GetTransactionRequest + 65, // 77: loop.solana.Solana.QueryTrackedLogs:input_type -> loop.solana.QueryTrackedLogsRequest + 67, // 78: loop.solana.Solana.RegisterLogTracking:input_type -> loop.solana.RegisterLogTrackingRequest + 50, // 79: loop.solana.Solana.SimulateTX:input_type -> loop.solana.SimulateTXRequest + 53, // 80: loop.solana.Solana.SubmitTransaction:input_type -> loop.solana.SubmitTransactionRequest + 69, // 81: loop.solana.Solana.UnregisterLogTracking:input_type -> loop.solana.UnregisterLogTrackingRequest + 78, // 82: loop.solana.Solana.GetLatestLPBlock:input_type -> google.protobuf.Empty + 78, // 83: loop.solana.Solana.GetFiltersNames:input_type -> google.protobuf.Empty + 9, // 84: loop.solana.Solana.GetAccountInfoWithOpts:output_type -> loop.solana.GetAccountInfoWithOptsReply + 11, // 85: loop.solana.Solana.GetBalance:output_type -> loop.solana.GetBalanceReply + 14, // 86: loop.solana.Solana.GetBlock:output_type -> loop.solana.GetBlockReply + 16, // 87: loop.solana.Solana.GetFeeForMessage:output_type -> loop.solana.GetFeeForMessageReply + 20, // 88: loop.solana.Solana.GetMultipleAccountsWithOpts:output_type -> loop.solana.GetMultipleAccountsWithOptsReply + 26, // 89: loop.solana.Solana.GetProgramAccounts:output_type -> loop.solana.GetProgramAccountsReply + 28, // 90: loop.solana.Solana.GetSignatureStatuses:output_type -> loop.solana.GetSignatureStatusesReply + 31, // 91: loop.solana.Solana.GetSlotHeight:output_type -> loop.solana.GetSlotHeightReply + 45, // 92: loop.solana.Solana.GetTransaction:output_type -> loop.solana.GetTransactionReply + 66, // 93: loop.solana.Solana.QueryTrackedLogs:output_type -> loop.solana.QueryTrackedLogsReply + 68, // 94: loop.solana.Solana.RegisterLogTracking:output_type -> loop.solana.RegisterLogTrackingReply + 49, // 95: loop.solana.Solana.SimulateTX:output_type -> loop.solana.SimulateTXReply + 52, // 96: loop.solana.Solana.SubmitTransaction:output_type -> loop.solana.SubmitTransactionReply + 70, // 97: loop.solana.Solana.UnregisterLogTracking:output_type -> loop.solana.UnregisterLogTrackingReply + 71, // 98: loop.solana.Solana.GetLatestLPBlock:output_type -> loop.solana.GetLatestLPBlockReply + 72, // 99: loop.solana.Solana.GetFiltersNames:output_type -> loop.solana.GetFiltersNamesReply + 84, // [84:100] is the sub-list for method output_type + 68, // [68:84] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_solana_proto_init() } @@ -4620,32 +4994,32 @@ func file_solana_proto_init() { file_solana_proto_msgTypes[5].OneofWrappers = []any{} file_solana_proto_msgTypes[10].OneofWrappers = []any{} file_solana_proto_msgTypes[15].OneofWrappers = []any{} - file_solana_proto_msgTypes[20].OneofWrappers = []any{} - file_solana_proto_msgTypes[27].OneofWrappers = []any{} + file_solana_proto_msgTypes[26].OneofWrappers = []any{} file_solana_proto_msgTypes[33].OneofWrappers = []any{} - file_solana_proto_msgTypes[34].OneofWrappers = []any{ + file_solana_proto_msgTypes[39].OneofWrappers = []any{} + file_solana_proto_msgTypes[40].OneofWrappers = []any{ (*TransactionEnvelope_Raw)(nil), (*TransactionEnvelope_Parsed)(nil), } - file_solana_proto_msgTypes[35].OneofWrappers = []any{} - file_solana_proto_msgTypes[47].OneofWrappers = []any{ + file_solana_proto_msgTypes[41].OneofWrappers = []any{} + file_solana_proto_msgTypes[53].OneofWrappers = []any{ (*Expression_Primitive)(nil), (*Expression_BooleanExpression)(nil), } - file_solana_proto_msgTypes[49].OneofWrappers = []any{ + file_solana_proto_msgTypes[55].OneofWrappers = []any{ (*Primitive_GeneralPrimitive)(nil), (*Primitive_Address)(nil), (*Primitive_EventSig)(nil), (*Primitive_EventBySubkey)(nil), } - file_solana_proto_msgTypes[53].OneofWrappers = []any{} + file_solana_proto_msgTypes[59].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_solana_proto_rawDesc), len(file_solana_proto_rawDesc)), NumEnums: 4, - NumMessages: 63, + NumMessages: 69, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/chains/solana/solana.proto b/pkg/chains/solana/solana.proto index 39f8f935b3..f3b631936e 100644 --- a/pkg/chains/solana/solana.proto +++ b/pkg/chains/solana/solana.proto @@ -13,6 +13,7 @@ service Solana { rpc GetBlock(GetBlockRequest) returns (GetBlockReply); rpc GetFeeForMessage(GetFeeForMessageRequest) returns (GetFeeForMessageReply); rpc GetMultipleAccountsWithOpts(GetMultipleAccountsWithOptsRequest) returns (GetMultipleAccountsWithOptsReply); + rpc GetProgramAccounts(GetProgramAccountsRequest) returns (GetProgramAccountsReply); rpc GetSignatureStatuses(GetSignatureStatusesRequest) returns (GetSignatureStatusesReply); rpc GetSlotHeight(GetSlotHeightRequest) returns (GetSlotHeightReply); rpc GetTransaction(GetTransactionRequest) returns (GetTransactionReply); @@ -176,6 +177,44 @@ message GetMultipleAccountsWithOptsRequest { bool is_external = 3; // if true, limits like response size limit may be applied } +// Memcmp filter for getProgramAccounts. +message RPCFilterMemcmp { + uint64 offset = 1; // byte offset into account data + bytes bytes = 2; // data to match (RPC encodes as base58) +} + +// Account filter for getProgramAccounts (memcmp or data size). +message RPCFilter { + RPCFilterMemcmp memcmp = 1; + uint64 data_size = 2; // match accounts with this data length +} + +// Options for GetProgramAccounts. +message GetProgramAccountsOpts { + EncodingType encoding = 1; + CommitmentType commitment = 2; + DataSlice data_slice = 3; + repeated RPCFilter filters = 4; +} + +// Program-owned account with its pubkey. +message KeyedAccount { + bytes pubkey = 1; // 32-byte Pubkey + Account account = 2; +} + +// Reply for GetProgramAccounts. +message GetProgramAccountsReply { + repeated KeyedAccount value = 1; +} + +// Request for GetProgramAccounts. +message GetProgramAccountsRequest { + bytes program = 1; // 32-byte program Pubkey + GetProgramAccountsOpts opts = 2; + bool is_external = 3; // if true, limits like response size limit may be applied +} + // Reply for GetSignatureStatuses. message GetSignatureStatusesReply { repeated GetSignatureStatusesResult results = 1; // 1:1 with input diff --git a/pkg/chains/solana/solana_grpc.pb.go b/pkg/chains/solana/solana_grpc.pb.go index e86cee5bca..67a288a85c 100644 --- a/pkg/chains/solana/solana_grpc.pb.go +++ b/pkg/chains/solana/solana_grpc.pb.go @@ -25,6 +25,7 @@ const ( Solana_GetBlock_FullMethodName = "/loop.solana.Solana/GetBlock" Solana_GetFeeForMessage_FullMethodName = "/loop.solana.Solana/GetFeeForMessage" Solana_GetMultipleAccountsWithOpts_FullMethodName = "/loop.solana.Solana/GetMultipleAccountsWithOpts" + Solana_GetProgramAccounts_FullMethodName = "/loop.solana.Solana/GetProgramAccounts" Solana_GetSignatureStatuses_FullMethodName = "/loop.solana.Solana/GetSignatureStatuses" Solana_GetSlotHeight_FullMethodName = "/loop.solana.Solana/GetSlotHeight" Solana_GetTransaction_FullMethodName = "/loop.solana.Solana/GetTransaction" @@ -46,6 +47,7 @@ type SolanaClient interface { GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockReply, error) GetFeeForMessage(ctx context.Context, in *GetFeeForMessageRequest, opts ...grpc.CallOption) (*GetFeeForMessageReply, error) GetMultipleAccountsWithOpts(ctx context.Context, in *GetMultipleAccountsWithOptsRequest, opts ...grpc.CallOption) (*GetMultipleAccountsWithOptsReply, error) + GetProgramAccounts(ctx context.Context, in *GetProgramAccountsRequest, opts ...grpc.CallOption) (*GetProgramAccountsReply, error) GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) GetSlotHeight(ctx context.Context, in *GetSlotHeightRequest, opts ...grpc.CallOption) (*GetSlotHeightReply, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionReply, error) @@ -116,6 +118,16 @@ func (c *solanaClient) GetMultipleAccountsWithOpts(ctx context.Context, in *GetM return out, nil } +func (c *solanaClient) GetProgramAccounts(ctx context.Context, in *GetProgramAccountsRequest, opts ...grpc.CallOption) (*GetProgramAccountsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProgramAccountsReply) + err := c.cc.Invoke(ctx, Solana_GetProgramAccounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *solanaClient) GetSignatureStatuses(ctx context.Context, in *GetSignatureStatusesRequest, opts ...grpc.CallOption) (*GetSignatureStatusesReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetSignatureStatusesReply) @@ -225,6 +237,7 @@ type SolanaServer interface { GetBlock(context.Context, *GetBlockRequest) (*GetBlockReply, error) GetFeeForMessage(context.Context, *GetFeeForMessageRequest) (*GetFeeForMessageReply, error) GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) + GetProgramAccounts(context.Context, *GetProgramAccountsRequest) (*GetProgramAccountsReply, error) GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) GetSlotHeight(context.Context, *GetSlotHeightRequest) (*GetSlotHeightReply, error) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionReply, error) @@ -260,6 +273,9 @@ func (UnimplementedSolanaServer) GetFeeForMessage(context.Context, *GetFeeForMes func (UnimplementedSolanaServer) GetMultipleAccountsWithOpts(context.Context, *GetMultipleAccountsWithOptsRequest) (*GetMultipleAccountsWithOptsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMultipleAccountsWithOpts not implemented") } +func (UnimplementedSolanaServer) GetProgramAccounts(context.Context, *GetProgramAccountsRequest) (*GetProgramAccountsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProgramAccounts not implemented") +} func (UnimplementedSolanaServer) GetSignatureStatuses(context.Context, *GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSignatureStatuses not implemented") } @@ -401,6 +417,24 @@ func _Solana_GetMultipleAccountsWithOpts_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _Solana_GetProgramAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProgramAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolanaServer).GetProgramAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Solana_GetProgramAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolanaServer).GetProgramAccounts(ctx, req.(*GetProgramAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Solana_GetSignatureStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSignatureStatusesRequest) if err := dec(in); err != nil { @@ -608,6 +642,10 @@ var Solana_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetMultipleAccountsWithOpts", Handler: _Solana_GetMultipleAccountsWithOpts_Handler, }, + { + MethodName: "GetProgramAccounts", + Handler: _Solana_GetProgramAccounts_Handler, + }, { MethodName: "GetSignatureStatuses", Handler: _Solana_GetSignatureStatuses_Handler, diff --git a/pkg/loop/internal/relayer/relayer.go b/pkg/loop/internal/relayer/relayer.go index 31591479c4..3540c563e5 100644 --- a/pkg/loop/internal/relayer/relayer.go +++ b/pkg/loop/internal/relayer/relayer.go @@ -472,7 +472,7 @@ func (r *relayerClient) TON() (types.TONService, error) { func (r *relayerClient) Solana() (types.SolanaService, error) { return &SolClient{ - r.solClient, + grpcClient: r.solClient, }, nil } diff --git a/pkg/loop/internal/relayer/solana.go b/pkg/loop/internal/relayer/solana.go index 172d946c1c..68eadf7416 100644 --- a/pkg/loop/internal/relayer/solana.go +++ b/pkg/loop/internal/relayer/solana.go @@ -17,6 +17,8 @@ import ( var _ types.SolanaService = (*SolClient)(nil) type SolClient struct { + solana.UnimplementedSolanaClient + grpcClient solpb.SolanaClient } @@ -150,6 +152,22 @@ func (sc *SolClient) GetMultipleAccountsWithOpts(ctx context.Context, req solana return reply, nil } +func (sc *SolClient) GetProgramAccounts(ctx context.Context, req solana.GetProgramAccountsRequest) (*solana.GetProgramAccountsReply, error) { + pReq, err := solpb.ConvertGetProgramAccountsRequestToProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + pResp, err := sc.grpcClient.GetProgramAccounts(ctx, pReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + reply, err := solpb.ConvertGetProgramAccountsReplyFromProto(pResp) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return reply, nil +} + func (sc *SolClient) GetBlock(ctx context.Context, req solana.GetBlockRequest) (*solana.GetBlockReply, error) { pReq := solpb.ConvertGetBlockRequestToProto(&req) pResp, err := sc.grpcClient.GetBlock(ctx, pReq) @@ -361,6 +379,18 @@ func (s *solServer) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb. return solpb.ConvertGetMultipleAccountsReplyToProto(dResp), nil } +func (s *solServer) GetProgramAccounts(ctx context.Context, req *solpb.GetProgramAccountsRequest) (*solpb.GetProgramAccountsReply, error) { + dReq, err := solpb.ConvertGetProgramAccountsRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + dResp, err := s.impl.GetProgramAccounts(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + return solpb.ConvertGetProgramAccountsReplyToProto(dResp), nil +} + func (s *solServer) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { dReq := solpb.ConvertGetBlockRequestFromProto(req) dResp, err := s.impl.GetBlock(ctx, *dReq) diff --git a/pkg/loop/internal/relayerset/relayerset_test.go b/pkg/loop/internal/relayerset/relayerset_test.go index 548521e741..93fec6be48 100644 --- a/pkg/loop/internal/relayerset/relayerset_test.go +++ b/pkg/loop/internal/relayerset/relayerset_test.go @@ -912,7 +912,7 @@ func Test_RelayerSet_SolanaService(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { mockSol := mocks2.NewSolanaService(t) - relayer1.On("Solana", mock.Anything, mock.Anything).Return(mockSol, nil).Once() + relayer1.On("Solana", mock.Anything, mock.Anything).Return(mocks2.WrapSolanaService(mockSol), nil).Once() fetchedSol, err := retrievedRelayer.Solana() require.NoError(t, err) diff --git a/pkg/loop/internal/relayerset/solana.go b/pkg/loop/internal/relayerset/solana.go index e6dfbf1ca2..3a81dd529e 100644 --- a/pkg/loop/internal/relayerset/solana.go +++ b/pkg/loop/internal/relayerset/solana.go @@ -47,6 +47,10 @@ func (sc *solClient) GetMultipleAccountsWithOpts(ctx context.Context, in *solpb. return sc.client.GetMultipleAccountsWithOpts(appendRelayID(ctx, sc.relayID), in, opts...) } +func (sc *solClient) GetProgramAccounts(ctx context.Context, in *solpb.GetProgramAccountsRequest, opts ...grpc.CallOption) (*solpb.GetProgramAccountsReply, error) { + return sc.client.GetProgramAccounts(appendRelayID(ctx, sc.relayID), in, opts...) +} + func (sc *solClient) GetSignatureStatuses(ctx context.Context, in *solpb.GetSignatureStatusesRequest, opts ...grpc.CallOption) (*solpb.GetSignatureStatusesReply, error) { return sc.client.GetSignatureStatuses(appendRelayID(ctx, sc.relayID), in, opts...) } @@ -244,6 +248,25 @@ func (ss *solServer) GetMultipleAccountsWithOpts(ctx context.Context, req *solpb return solpb.ConvertGetMultipleAccountsReplyToProto(dResp), nil } +func (ss *solServer) GetProgramAccounts(ctx context.Context, req *solpb.GetProgramAccountsRequest) (*solpb.GetProgramAccountsReply, error) { + solService, err := ss.parent.getSolService(ctx) + if err != nil { + return nil, err + } + + dReq, err := solpb.ConvertGetProgramAccountsRequestFromProto(req) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + dResp, err := solService.GetProgramAccounts(ctx, dReq) + if err != nil { + return nil, net.WrapRPCErr(err) + } + + return solpb.ConvertGetProgramAccountsReplyToProto(dResp), nil +} + func (ss *solServer) GetBlock(ctx context.Context, req *solpb.GetBlockRequest) (*solpb.GetBlockReply, error) { solService, err := ss.parent.getSolService(ctx) if err != nil { diff --git a/pkg/types/chains/solana/solana.go b/pkg/types/chains/solana/solana.go index 2cd91ab520..3282a4fecd 100644 --- a/pkg/types/chains/solana/solana.go +++ b/pkg/types/chains/solana/solana.go @@ -110,6 +110,13 @@ type Client interface { // In: ctx, {Receiver, EncodedTransaction, Opts(SigVerify, Commitment, ReplaceRecentBlockhash, Accounts)}. // Out: {Err, Logs, Accounts, UnitsConsumed}, error. SimulateTX(ctx context.Context, req SimulateTXRequest) (*SimulateTXReply, error) + + // GetProgramAccounts: all accounts owned by program. + // In: ctx, {Program, Opts(Encoding, Commitment, DataSlice, Filters), IsExternal}. + // Out: {Value([]*KeyedAccount)}, error. + GetProgramAccounts(ctx context.Context, req GetProgramAccountsRequest) (*GetProgramAccountsReply, error) + + mustEmbedUnimplementedClient() } // represents solana-go DataSlice @@ -523,7 +530,7 @@ type SimulateTXRequest struct { Receiver PublicKey // Encoded EncodedTransaction string - Opts *SimulateTXOpts + Opts *SimulateTXOpts // If true, limits like response size limit may be applied. IsExternal bool } @@ -566,3 +573,59 @@ type GetSignatureStatusesResult struct { type GetSignatureStatusesReply struct { Results []GetSignatureStatusesResult } + +// represents solana-go rpc.RPCFilterMemcmp +type RPCFilterMemcmp struct { + Offset uint64 + Bytes []byte +} + +// represents solana-go rpc.RPCFilter +type RPCFilter struct { + Memcmp *RPCFilterMemcmp + DataSize uint64 +} + +// represents solana-go rpc.GetProgramAccountsOpts +type GetProgramAccountsOpts struct { + // Encoding for Account data. + // Either "base58" (slow), "base64", "base64+zstd", or "jsonParsed". + // + // This parameter is optional. + Encoding EncodingType + + // Commitment requirement. + // + // This parameter is optional. Default value is Finalized + Commitment CommitmentType + + // dataSlice parameters for limiting returned account data: + // Limits the returned account data using the provided offset and length fields; + // only available for "base58", "base64" or "base64+zstd" encodings. + // + // This parameter is optional. + DataSlice *DataSlice + + // Filter on accounts, implicit AND between filters. + // Account must meet all filter criteria to be included in results. + // + // This parameter is optional. + Filters []RPCFilter +} + +// represents solana-go rpc.KeyedAccount +type KeyedAccount struct { + Pubkey PublicKey + Account *Account +} + +type GetProgramAccountsRequest struct { + Program PublicKey + Opts *GetProgramAccountsOpts + // If true, limits like response size limit may be applied. + IsExternal bool +} + +type GetProgramAccountsReply struct { + Value []*KeyedAccount +} diff --git a/pkg/types/chains/solana/unimplemented_client.go b/pkg/types/chains/solana/unimplemented_client.go new file mode 100644 index 0000000000..f70770ee5c --- /dev/null +++ b/pkg/types/chains/solana/unimplemented_client.go @@ -0,0 +1,60 @@ +package solana + +import ( + "context" + "fmt" +) + +// UnimplementedSolanaClient provides default stubs for Client methods. +// Embed this type to implement Client and receive default behavior for new RPC methods. +type UnimplementedSolanaClient struct{} + +var _ Client = UnimplementedSolanaClient{} + +func (UnimplementedSolanaClient) mustEmbedUnimplementedClient() {} + +// ClientMustEmbed satisfies Client.mustEmbedUnimplementedClient without stub RPC methods. +// Embed alongside another Client implementation (e.g. a testify mock) when the mock cannot live in this package. +type ClientMustEmbed struct{} + +func (ClientMustEmbed) mustEmbedUnimplementedClient() {} + +func (UnimplementedSolanaClient) GetBalance(context.Context, GetBalanceRequest) (*GetBalanceReply, error) { + return nil, fmt.Errorf("method GetBalance not implemented") +} + +func (UnimplementedSolanaClient) GetAccountInfoWithOpts(context.Context, GetAccountInfoRequest) (*GetAccountInfoReply, error) { + return nil, fmt.Errorf("method GetAccountInfoWithOpts not implemented") +} + +func (UnimplementedSolanaClient) GetMultipleAccountsWithOpts(context.Context, GetMultipleAccountsRequest) (*GetMultipleAccountsReply, error) { + return nil, fmt.Errorf("method GetMultipleAccountsWithOpts not implemented") +} + +func (UnimplementedSolanaClient) GetBlock(context.Context, GetBlockRequest) (*GetBlockReply, error) { + return nil, fmt.Errorf("method GetBlock not implemented") +} + +func (UnimplementedSolanaClient) GetSlotHeight(context.Context, GetSlotHeightRequest) (*GetSlotHeightReply, error) { + return nil, fmt.Errorf("method GetSlotHeight not implemented") +} + +func (UnimplementedSolanaClient) GetTransaction(context.Context, GetTransactionRequest) (*GetTransactionReply, error) { + return nil, fmt.Errorf("method GetTransaction not implemented") +} + +func (UnimplementedSolanaClient) GetFeeForMessage(context.Context, GetFeeForMessageRequest) (*GetFeeForMessageReply, error) { + return nil, fmt.Errorf("method GetFeeForMessage not implemented") +} + +func (UnimplementedSolanaClient) GetSignatureStatuses(context.Context, GetSignatureStatusesRequest) (*GetSignatureStatusesReply, error) { + return nil, fmt.Errorf("method GetSignatureStatuses not implemented") +} + +func (UnimplementedSolanaClient) SimulateTX(context.Context, SimulateTXRequest) (*SimulateTXReply, error) { + return nil, fmt.Errorf("method SimulateTX not implemented") +} + +func (UnimplementedSolanaClient) GetProgramAccounts(context.Context, GetProgramAccountsRequest) (*GetProgramAccountsReply, error) { + return nil, fmt.Errorf("method GetProgramAccounts not implemented") +} diff --git a/pkg/types/mocks/solana_service.go b/pkg/types/mocks/solana_service.go index 36e5ac0024..aae90f77bc 100644 --- a/pkg/types/mocks/solana_service.go +++ b/pkg/types/mocks/solana_service.go @@ -434,6 +434,65 @@ func (_c *SolanaService_GetMultipleAccountsWithOpts_Call) RunAndReturn(run func( return _c } +// GetProgramAccounts provides a mock function with given fields: ctx, req +func (_m *SolanaService) GetProgramAccounts(ctx context.Context, req solana.GetProgramAccountsRequest) (*solana.GetProgramAccountsReply, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for GetProgramAccounts") + } + + var r0 *solana.GetProgramAccountsReply + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, solana.GetProgramAccountsRequest) (*solana.GetProgramAccountsReply, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, solana.GetProgramAccountsRequest) *solana.GetProgramAccountsReply); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*solana.GetProgramAccountsReply) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, solana.GetProgramAccountsRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SolanaService_GetProgramAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProgramAccounts' +type SolanaService_GetProgramAccounts_Call struct { + *mock.Call +} + +// GetProgramAccounts is a helper method to define mock.On call +// - ctx context.Context +// - req solana.GetProgramAccountsRequest +func (_e *SolanaService_Expecter) GetProgramAccounts(ctx interface{}, req interface{}) *SolanaService_GetProgramAccounts_Call { + return &SolanaService_GetProgramAccounts_Call{Call: _e.mock.On("GetProgramAccounts", ctx, req)} +} + +func (_c *SolanaService_GetProgramAccounts_Call) Run(run func(ctx context.Context, req solana.GetProgramAccountsRequest)) *SolanaService_GetProgramAccounts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solana.GetProgramAccountsRequest)) + }) + return _c +} + +func (_c *SolanaService_GetProgramAccounts_Call) Return(_a0 *solana.GetProgramAccountsReply, _a1 error) *SolanaService_GetProgramAccounts_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SolanaService_GetProgramAccounts_Call) RunAndReturn(run func(context.Context, solana.GetProgramAccountsRequest) (*solana.GetProgramAccountsReply, error)) *SolanaService_GetProgramAccounts_Call { + _c.Call.Return(run) + return _c +} + // GetSignatureStatuses provides a mock function with given fields: ctx, req func (_m *SolanaService) GetSignatureStatuses(ctx context.Context, req solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error) { ret := _m.Called(ctx, req) @@ -883,6 +942,38 @@ func (_c *SolanaService_UnregisterLogTracking_Call) RunAndReturn(run func(contex return _c } +// mustEmbedUnimplementedClient provides a mock function with no fields +func (_m *SolanaService) mustEmbedUnimplementedClient() { + _m.Called() +} + +// SolanaService_mustEmbedUnimplementedClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedClient' +type SolanaService_mustEmbedUnimplementedClient_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedClient is a helper method to define mock.On call +func (_e *SolanaService_Expecter) mustEmbedUnimplementedClient() *SolanaService_mustEmbedUnimplementedClient_Call { + return &SolanaService_mustEmbedUnimplementedClient_Call{Call: _e.mock.On("mustEmbedUnimplementedClient")} +} + +func (_c *SolanaService_mustEmbedUnimplementedClient_Call) Run(run func()) *SolanaService_mustEmbedUnimplementedClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *SolanaService_mustEmbedUnimplementedClient_Call) Return() *SolanaService_mustEmbedUnimplementedClient_Call { + _c.Call.Return() + return _c +} + +func (_c *SolanaService_mustEmbedUnimplementedClient_Call) RunAndReturn(run func()) *SolanaService_mustEmbedUnimplementedClient_Call { + _c.Run(run) + return _c +} + // NewSolanaService creates a new instance of SolanaService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewSolanaService(t interface { diff --git a/pkg/types/mocks/solana_service_shim.go b/pkg/types/mocks/solana_service_shim.go new file mode 100644 index 0000000000..014f313e26 --- /dev/null +++ b/pkg/types/mocks/solana_service_shim.go @@ -0,0 +1,26 @@ +package mocks + +import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" + solana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" +) + +// SolanaServiceShim wraps the mockery-generated SolanaService so it satisfies types.SolanaService. +// The generated mock cannot implement solana.Client.mustEmbedUnimplementedClient (unexported, defined in chains/solana). +type SolanaServiceShim struct { + *SolanaService + solana.ClientMustEmbed +} + +var _ types.SolanaService = (*SolanaServiceShim)(nil) + +// WrapSolanaService returns a SolanaService that delegates RPC calls to m. +func WrapSolanaService(m *SolanaService) types.SolanaService { + if m == nil { + return nil + } + return &SolanaServiceShim{ + SolanaService: m, + ClientMustEmbed: solana.ClientMustEmbed{}, + } +} diff --git a/pkg/types/relayer.go b/pkg/types/relayer.go index dc5c0f459e..42f81ae1cf 100644 --- a/pkg/types/relayer.go +++ b/pkg/types/relayer.go @@ -558,9 +558,10 @@ var _ SolanaService = &UnimplementedSolanaService{} // UnimplementedSolanaService implements the SolanaService interface with stubbed methods that return codes.Unimplemented errors or panic. // It is meant to be embedded in real SolanaService implementations in order to get default behavior for new methods without having -// to react to each change. -// In the future, embedding this type may be required to implement SolanaService (through use of an unexported method). -type UnimplementedSolanaService struct{} +// to react to each change. Embedding this type is required to implement SolanaService (through solana.Client's mustEmbedUnimplementedClient). +type UnimplementedSolanaService struct { + solana.UnimplementedSolanaClient +} func (uss *UnimplementedSolanaService) SubmitTransaction(ctx context.Context, req solana.SubmitTransactionRequest) (*solana.SubmitTransactionReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") @@ -576,33 +577,6 @@ func (uss *UnimplementedSolanaService) UnregisterLogTracking(ctx context.Context func (uss *UnimplementedSolanaService) QueryTrackedLogs(ctx context.Context, filterQuery []query.Expression, limitAndSort query.LimitAndSort) ([]*solana.Log, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryTrackedLogs not implemented") } -func (uss *UnimplementedSolanaService) GetBalance(ctx context.Context, req solana.GetBalanceRequest) (*solana.GetBalanceReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented") -} -func (uss *UnimplementedSolanaService) GetAccountInfoWithOpts(ctx context.Context, req solana.GetAccountInfoRequest) (*solana.GetAccountInfoReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfoWithOpts not implemented") -} -func (uss *UnimplementedSolanaService) GetMultipleAccountsWithOpts(ctx context.Context, req solana.GetMultipleAccountsRequest) (*solana.GetMultipleAccountsReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMultipleAccountsWithOpts not implemented") -} -func (uss *UnimplementedSolanaService) GetBlock(ctx context.Context, req solana.GetBlockRequest) (*solana.GetBlockReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") -} -func (uss *UnimplementedSolanaService) GetSlotHeight(ctx context.Context, req solana.GetSlotHeightRequest) (*solana.GetSlotHeightReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSlotHeight not implemented") -} -func (uss *UnimplementedSolanaService) GetTransaction(ctx context.Context, req solana.GetTransactionRequest) (*solana.GetTransactionReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") -} -func (uss *UnimplementedSolanaService) GetFeeForMessage(ctx context.Context, req solana.GetFeeForMessageRequest) (*solana.GetFeeForMessageReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeeForMessage not implemented") -} -func (uss *UnimplementedSolanaService) GetSignatureStatuses(ctx context.Context, req solana.GetSignatureStatusesRequest) (*solana.GetSignatureStatusesReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSignatureStatuses not implemented") -} -func (uss *UnimplementedSolanaService) SimulateTX(ctx context.Context, req solana.SimulateTXRequest) (*solana.SimulateTXReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateTX not implemented") -} func (uss *UnimplementedSolanaService) GetLatestLPBlock(ctx context.Context) (*solana.LPBlock, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLatestLPBlock not implemented") } From 27a72f7f8cf808be8686761b249060b0d87d7c04 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Thu, 4 Jun 2026 19:44:26 -0400 Subject: [PATCH 5/5] add proto conversions for GetProgramAccounts (#2128) --- .../solana/proto_helpers.go | 97 +++++++ .../solana/proto_helpers_test.go | 244 ++++++++++++++++++ 2 files changed, 341 insertions(+) create mode 100644 pkg/capabilities/v2/chain-capabilities/solana/proto_helpers_test.go diff --git a/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers.go b/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers.go index 26d542587f..bc1e1ad64f 100644 --- a/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers.go +++ b/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers.go @@ -911,6 +911,103 @@ func ConvertGetSignatureStatusesRequestFromProto(p *GetSignatureStatusesRequest) return &typesolana.GetSignatureStatusesRequest{Sigs: sigs}, nil } +func convertRPCFilterFromProto(f *RPCFilter) (typesolana.RPCFilter, error) { + if f == nil { + return typesolana.RPCFilter{}, fmt.Errorf("nil filter") + } + var memcmp *typesolana.RPCFilterMemcmp + if f.Memcmp != nil { + memcmp = &typesolana.RPCFilterMemcmp{ + Offset: f.Memcmp.Offset, + Bytes: f.Memcmp.Bytes, + } + } + return typesolana.RPCFilter{ + Memcmp: memcmp, + DataSize: f.DataSize, + }, nil +} + +func convertRPCFiltersFromProto(filters []*RPCFilter) ([]typesolana.RPCFilter, error) { + if len(filters) == 0 { + return nil, nil + } + out := make([]typesolana.RPCFilter, 0, len(filters)) + for i, f := range filters { + filter, err := convertRPCFilterFromProto(f) + if err != nil { + return nil, fmt.Errorf("filters[%d]: %w", i, err) + } + out = append(out, filter) + } + return out, nil +} + +func convertGetProgramAccountsOptsFromProto(p *GetProgramAccountsOpts) (*typesolana.GetProgramAccountsOpts, error) { + if p == nil { + return nil, nil + } + enc, err := convertEncodingTypeFromProto(p.Encoding) + if err != nil { + return nil, fmt.Errorf("encoding: %w", err) + } + commit, err := convertCommitmentTypeFromProto(p.Commitment) + if err != nil { + return nil, fmt.Errorf("commitment: %w", err) + } + filters, err := convertRPCFiltersFromProto(p.Filters) + if err != nil { + return nil, fmt.Errorf("filters: %w", err) + } + return &typesolana.GetProgramAccountsOpts{ + Encoding: enc, + Commitment: commit, + DataSlice: convertDataSliceFromProto(p.DataSlice), + Filters: filters, + }, nil +} + +// ConvertGetProgramAccountsRequestFromProto converts GetProgramAccountsRequest to domain type. +func ConvertGetProgramAccountsRequestFromProto(p *GetProgramAccountsRequest) (*typesolana.GetProgramAccountsRequest, error) { + if p == nil { + return nil, nil + } + program, err := chainsolana.ConvertPublicKeyFromProto(p.Program) + if err != nil { + return nil, fmt.Errorf("program: %w", err) + } + opts, err := convertGetProgramAccountsOptsFromProto(p.Opts) + if err != nil { + return nil, fmt.Errorf("opts: %w", err) + } + return &typesolana.GetProgramAccountsRequest{ + Program: program, + Opts: opts, + }, nil +} + +// ConvertGetProgramAccountsReplyToProto converts GetProgramAccountsReply to proto. +func ConvertGetProgramAccountsReplyToProto(r *typesolana.GetProgramAccountsReply) (*GetProgramAccountsReply, error) { + if r == nil { + return nil, nil + } + accounts := make([]*KeyedAccount, 0, len(r.Value)) + for i, ka := range r.Value { + if ka == nil { + continue + } + acc, err := convertAccountToProto(ka.Account) + if err != nil { + return nil, fmt.Errorf("value[%d].account: %w", i, err) + } + accounts = append(accounts, &KeyedAccount{ + Pubkey: ka.Pubkey[:], + Account: acc, + }) + } + return &GetProgramAccountsReply{Value: accounts}, nil +} + func ptrUint64(v uint64) *uint64 { if v == 0 { return nil diff --git a/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers_test.go b/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers_test.go new file mode 100644 index 0000000000..eceee62d67 --- /dev/null +++ b/pkg/capabilities/v2/chain-capabilities/solana/proto_helpers_test.go @@ -0,0 +1,244 @@ +package solana_test + +import ( + "math/big" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + solcap "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/solana" + typesolana "github.com/smartcontractkit/chainlink-common/pkg/types/chains/solana" +) + +// pk32 builds a 32-byte Solana pubkey with every byte set to b. +func pk32(b byte) []byte { + out := make([]byte, 32) + for i := range out { + out[i] = b + } + return out +} + +// domainPK builds a typesolana.PublicKey with every byte set to b. +func domainPK(b byte) typesolana.PublicKey { + var pk typesolana.PublicKey + for i := range pk { + pk[i] = b + } + return pk +} + +// domainPKBytes returns domainPK(b) as a []byte slice. +func domainPKBytes(b byte) []byte { + pk := domainPK(b) + return pk[:] +} + +// ---- ConvertGetProgramAccountsRequestFromProto ---- + +func TestConvertGetProgramAccountsRequestFromProto_Nil(t *testing.T) { + got, err := solcap.ConvertGetProgramAccountsRequestFromProto(nil) + require.NoError(t, err) + require.Nil(t, got) +} + +func TestConvertGetProgramAccountsRequestFromProto_NoOpts(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0xAB), + } + got, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.NoError(t, err) + require.NotNil(t, got) + assert.Equal(t, domainPK(0xAB), got.Program) + assert.Nil(t, got.Opts) +} + +func TestConvertGetProgramAccountsRequestFromProto_WithOpts(t *testing.T) { + offset := uint64(8) + length := uint64(16) + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0x01), + Opts: &solcap.GetProgramAccountsOpts{ + Encoding: solcap.EncodingType_ENCODING_TYPE_BASE64, + Commitment: solcap.CommitmentType_COMMITMENT_TYPE_CONFIRMED, + DataSlice: &solcap.DataSlice{Offset: offset, Length: length}, + Filters: []*solcap.RPCFilter{ + {DataSize: 165}, + {Memcmp: &solcap.RPCFilterMemcmp{Offset: 0, Bytes: pk32(0x02)}}, + }, + }, + } + got, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.NoError(t, err) + require.NotNil(t, got) + require.NotNil(t, got.Opts) + + assert.Equal(t, typesolana.EncodingBase64, got.Opts.Encoding) + assert.Equal(t, typesolana.CommitmentConfirmed, got.Opts.Commitment) + require.NotNil(t, got.Opts.DataSlice) + assert.Equal(t, &offset, got.Opts.DataSlice.Offset) + assert.Equal(t, &length, got.Opts.DataSlice.Length) + + require.Len(t, got.Opts.Filters, 2) + assert.Equal(t, uint64(165), got.Opts.Filters[0].DataSize) + assert.Nil(t, got.Opts.Filters[0].Memcmp) + + require.NotNil(t, got.Opts.Filters[1].Memcmp) + assert.Equal(t, uint64(0), got.Opts.Filters[1].Memcmp.Offset) + assert.Equal(t, pk32(0x02), got.Opts.Filters[1].Memcmp.Bytes) +} + +func TestConvertGetProgramAccountsRequestFromProto_NilFilters(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0x01), + Opts: &solcap.GetProgramAccountsOpts{Filters: nil}, + } + got, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.NoError(t, err) + require.NotNil(t, got) + assert.Nil(t, got.Opts.Filters) +} + +func TestConvertGetProgramAccountsRequestFromProto_NilFilterEntry(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0x01), + Opts: &solcap.GetProgramAccountsOpts{ + Filters: []*solcap.RPCFilter{nil, {DataSize: 64}}, + }, + } + _, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.Error(t, err) + assert.Contains(t, err.Error(), "filters[0]") +} + +func TestConvertGetProgramAccountsRequestFromProto_InvalidProgram(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: []byte{0x01, 0x02}, // wrong length — must be 32 bytes + } + _, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.Error(t, err) + assert.Contains(t, err.Error(), "program") +} + +func TestConvertGetProgramAccountsRequestFromProto_InvalidEncoding(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0x01), + Opts: &solcap.GetProgramAccountsOpts{Encoding: solcap.EncodingType(999)}, + } + _, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.Error(t, err) + assert.Contains(t, err.Error(), "encoding") +} + +func TestConvertGetProgramAccountsRequestFromProto_InvalidCommitment(t *testing.T) { + req := &solcap.GetProgramAccountsRequest{ + Program: pk32(0x01), + Opts: &solcap.GetProgramAccountsOpts{Commitment: solcap.CommitmentType(999)}, + } + _, err := solcap.ConvertGetProgramAccountsRequestFromProto(req) + require.Error(t, err) + assert.Contains(t, err.Error(), "commitment") +} + +// ---- ConvertGetProgramAccountsReplyToProto ---- + +func TestConvertGetProgramAccountsReplyToProto_Nil(t *testing.T) { + got, err := solcap.ConvertGetProgramAccountsReplyToProto(nil) + require.NoError(t, err) + require.Nil(t, got) +} + +func TestConvertGetProgramAccountsReplyToProto_Empty(t *testing.T) { + got, err := solcap.ConvertGetProgramAccountsReplyToProto(&typesolana.GetProgramAccountsReply{}) + require.NoError(t, err) + require.NotNil(t, got) + assert.Empty(t, got.Value) +} + +func TestConvertGetProgramAccountsReplyToProto_NilEntry(t *testing.T) { + reply := &typesolana.GetProgramAccountsReply{ + Value: []*typesolana.KeyedAccount{nil, {Pubkey: domainPK(0x10)}}, + } + got, err := solcap.ConvertGetProgramAccountsReplyToProto(reply) + require.NoError(t, err) + // nil entry is skipped + require.Len(t, got.Value, 1) + assert.Equal(t, domainPKBytes(0x10), got.Value[0].Pubkey) +} + +func TestConvertGetProgramAccountsReplyToProto_WithAccounts(t *testing.T) { + data := &typesolana.DataBytesOrJSON{ + RawDataEncoding: typesolana.EncodingBase64, + AsDecodedBinary: []byte{0xCA, 0xFE}, + } + reply := &typesolana.GetProgramAccountsReply{ + Value: []*typesolana.KeyedAccount{ + { + Pubkey: domainPK(0x11), + Account: &typesolana.Account{ + Lamports: 1000, + Owner: domainPK(0x22), + Data: data, + Executable: true, + RentEpoch: big.NewInt(42), + Space: 128, + }, + }, + { + Pubkey: domainPK(0x33), + Account: nil, // account may be absent + }, + }, + } + got, err := solcap.ConvertGetProgramAccountsReplyToProto(reply) + require.NoError(t, err) + require.Len(t, got.Value, 2) + + // first entry — full account + ka0 := got.Value[0] + assert.Equal(t, domainPKBytes(0x11), ka0.Pubkey) + require.NotNil(t, ka0.Account) + assert.Equal(t, uint64(1000), ka0.Account.Lamports) + assert.Equal(t, domainPKBytes(0x22), ka0.Account.Owner) + assert.True(t, ka0.Account.Executable) + assert.Equal(t, uint64(128), ka0.Account.Space) + + // second entry — nil account is valid + ka1 := got.Value[1] + assert.Equal(t, domainPKBytes(0x33), ka1.Pubkey) + assert.Nil(t, ka1.Account) +} + +func TestConvertGetProgramAccountsReplyToProto_NilAccountData(t *testing.T) { + reply := &typesolana.GetProgramAccountsReply{ + Value: []*typesolana.KeyedAccount{ + { + Pubkey: domainPK(0x55), + Account: &typesolana.Account{Lamports: 500, Data: nil}, + }, + }, + } + got, err := solcap.ConvertGetProgramAccountsReplyToProto(reply) + require.NoError(t, err) + require.Len(t, got.Value, 1) + assert.Nil(t, got.Value[0].Account.Data) +} + +func TestConvertGetProgramAccountsReplyToProto_InvalidAccountEncoding(t *testing.T) { + reply := &typesolana.GetProgramAccountsReply{ + Value: []*typesolana.KeyedAccount{ + { + Pubkey: domainPK(0x01), + Account: &typesolana.Account{ + Data: &typesolana.DataBytesOrJSON{ + RawDataEncoding: typesolana.EncodingType("invalid-encoding"), + }, + }, + }, + }, + } + _, err := solcap.ConvertGetProgramAccountsReplyToProto(reply) + require.Error(t, err) + assert.Contains(t, err.Error(), "value[0]") +}