From 98f7b4b7cb4324ed813281b56db2cd4fb46405e4 Mon Sep 17 00:00:00 2001 From: Domino Valdano <2644901+reductionista@users.noreply.github.com> Date: Wed, 11 Oct 2023 20:19:59 -0700 Subject: [PATCH] Add chain_reader.go with ChainReader type defs, add ChainReader() to PluginProvider Also add loop definitions for ChainReader Service, update medianProviderClient, and regenerate protobuf files --- pkg/loop/internal/chain_reader.go | 63 ++ pkg/loop/internal/median.go | 9 +- pkg/loop/internal/pb/relayer.pb.go | 1018 ++++++++++++++++++----- pkg/loop/internal/pb/relayer.proto | 45 + pkg/loop/internal/pb/relayer_grpc.pb.go | 201 +++++ pkg/loop/internal/plugin_provider.go | 6 + pkg/loop/internal/relayer.go | 2 +- pkg/types/chain_reader.go | 67 ++ pkg/types/provider.go | 1 + 9 files changed, 1198 insertions(+), 214 deletions(-) create mode 100644 pkg/loop/internal/chain_reader.go create mode 100644 pkg/types/chain_reader.go diff --git a/pkg/loop/internal/chain_reader.go b/pkg/loop/internal/chain_reader.go new file mode 100644 index 0000000000..385baea7cb --- /dev/null +++ b/pkg/loop/internal/chain_reader.go @@ -0,0 +1,63 @@ +package internal + +import ( + "context" + "encoding/json" + + "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal/pb" + "github.com/smartcontractkit/chainlink-relay/pkg/types" +) + +var _ types.ChainReader = (*chainReaderClient)(nil) + +type chainReaderClient struct { + *brokerExt + grpc pb.ChainReaderClient +} + +func (c *chainReaderClient) GetLatestValue(ctx context.Context, bc types.BoundContract, method string, params, retValues any) ([]byte, error) { + boundContract := pb.BoundContract{Name: bc.Name, Address: bc.Address, Pending: bc.Pending} + jsonParams, err := json.Marshal(params) + if err != nil { + return nil, err + } + jsonRetValues, err := json.Marshal(retValues) + if err != nil { + return nil, err + } + + reply, err := c.grpc.GetLatestValue(ctx, &pb.GetLatestValueRequest{Bc: &boundContract, Method: method, Params: jsonParams, ReturnValues: jsonRetValues}) + if err != nil { + return nil, err + } + return reply.RetValues, nil +} + +var _ pb.ChainReaderServer = (*chainReaderServer)(nil) + +type chainReaderServer struct { + pb.UnimplementedChainReaderServer + impl types.ChainReader +} + +func (c *chainReaderServer) GetLatestValue(ctx context.Context, request *pb.GetLatestValueRequest) (*pb.GetLatestValueReply, error) { + var bc types.BoundContract + bc.Name = request.Bc.Name[:] + bc.Address = request.Bc.Address[:] + bc.Pending = request.Bc.Pending + retValues, err := c.impl.GetLatestValue(ctx, bc, request.Method, request.Params, request.ReturnValues) + if err != nil { + return nil, err + } + return &pb.GetLatestValueReply{RetValues: retValues}, nil +} + +func (c *chainReaderServer) RegisterEventFilter(ctx context.Context, in *pb.RegisterEventFilterRequest) (*pb.RegisterEventFilterReply, error) { + return nil, nil +} +func (c *chainReaderServer) UnregisterEventFilter(ctx context.Context, in *pb.UnregisterEventFilterRequest) (*pb.RegisterEventFilterReply, error) { + return nil, nil +} +func (c *chainReaderServer) QueryEvents(ctx context.Context, in *pb.QueryEventsRequest) (*pb.QueryEventsReply, error) { + return nil, nil +} diff --git a/pkg/loop/internal/median.go b/pkg/loop/internal/median.go index 34631b4633..e64e07550b 100644 --- a/pkg/loop/internal/median.go +++ b/pkg/loop/internal/median.go @@ -65,6 +65,7 @@ func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider type pb.RegisterOffchainConfigDigesterServer(s, &offchainConfigDigesterServer{impl: provider.OffchainConfigDigester()}) pb.RegisterContractConfigTrackerServer(s, &contractConfigTrackerServer{impl: provider.ContractConfigTracker()}) pb.RegisterContractTransmitterServer(s, &contractTransmitterServer{impl: provider.ContractTransmitter()}) + pb.RegisterChainReaderServer(s, &chainReaderServer{impl: provider.ChainReader()}) pb.RegisterReportCodecServer(s, &reportCodecServer{impl: provider.ReportCodec()}) pb.RegisterMedianContractServer(s, &medianContractServer{impl: provider.MedianContract()}) pb.RegisterOnchainConfigCodecServer(s, &onchainConfigCodecServer{impl: provider.OnchainConfigCodec()}) @@ -172,8 +173,9 @@ var ( type medianProviderClient struct { *pluginProviderClient reportCodec median.ReportCodec - medianContract median.MedianContract onchainConfigCodec median.OnchainConfigCodec + medianContract median.MedianContract + chainReader types.ChainReader } func (m *medianProviderClient) ClientConn() grpc.ClientConnInterface { return m.cc } @@ -183,6 +185,7 @@ func newMedianProviderClient(b *brokerExt, cc grpc.ClientConnInterface) *medianP m.reportCodec = &reportCodecClient{b, pb.NewReportCodecClient(m.cc)} m.medianContract = &medianContractClient{pb.NewMedianContractClient(m.cc)} m.onchainConfigCodec = &onchainConfigCodecClient{b, pb.NewOnchainConfigCodecClient(m.cc)} + m.chainReader = &chainReaderClient{b, pb.NewChainReaderClient(m.cc)} return m } @@ -198,6 +201,10 @@ func (m *medianProviderClient) OnchainConfigCodec() median.OnchainConfigCodec { return m.onchainConfigCodec } +func (m *medianProviderClient) ChainReader() types.ChainReader { + return m.chainReader +} + var _ median.ReportCodec = (*reportCodecClient)(nil) type reportCodecClient struct { diff --git a/pkg/loop/internal/pb/relayer.pb.go b/pkg/loop/internal/pb/relayer.pb.go index 6cc307b4d9..53984a19bc 100644 --- a/pkg/loop/internal/pb/relayer.pb.go +++ b/pkg/loop/internal/pb/relayer.pb.go @@ -2146,6 +2146,424 @@ func (x *FromAccountReply) GetAccount() string { return "" } +// TODO +type RegisterEventFilterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RegisterEventFilterRequest) Reset() { + *x = RegisterEventFilterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterEventFilterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterEventFilterRequest) ProtoMessage() {} + +func (x *RegisterEventFilterRequest) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterEventFilterRequest.ProtoReflect.Descriptor instead. +func (*RegisterEventFilterRequest) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{40} +} + +// TODO +type RegisterEventFilterReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RegisterEventFilterReply) Reset() { + *x = RegisterEventFilterReply{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterEventFilterReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterEventFilterReply) ProtoMessage() {} + +func (x *RegisterEventFilterReply) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterEventFilterReply.ProtoReflect.Descriptor instead. +func (*RegisterEventFilterReply) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{41} +} + +// TODO +type UnregisterEventFilterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnregisterEventFilterRequest) Reset() { + *x = UnregisterEventFilterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnregisterEventFilterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnregisterEventFilterRequest) ProtoMessage() {} + +func (x *UnregisterEventFilterRequest) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnregisterEventFilterRequest.ProtoReflect.Descriptor instead. +func (*UnregisterEventFilterRequest) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{42} +} + +// TODO +type UnregisterEventFilterReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnregisterEventFilterReply) Reset() { + *x = UnregisterEventFilterReply{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnregisterEventFilterReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnregisterEventFilterReply) ProtoMessage() {} + +func (x *UnregisterEventFilterReply) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnregisterEventFilterReply.ProtoReflect.Descriptor instead. +func (*UnregisterEventFilterReply) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{43} +} + +// TODO +type QueryEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryEventsRequest) Reset() { + *x = QueryEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEventsRequest) ProtoMessage() {} + +func (x *QueryEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryEventsRequest.ProtoReflect.Descriptor instead. +func (*QueryEventsRequest) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{44} +} + +// TODO +type QueryEventsReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryEventsReply) Reset() { + *x = QueryEventsReply{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEventsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEventsReply) ProtoMessage() {} + +func (x *QueryEventsReply) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryEventsReply.ProtoReflect.Descriptor instead. +func (*QueryEventsReply) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{45} +} + +// GetLatestValueRequest has arguments for [github.com/smartcontractkit/chainlink-relay/pkg/types.ChainReader.GetLatestValue]. +type GetLatestValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bc *BoundContract `protobuf:"bytes,1,opt,name=bc,proto3" json:"bc,omitempty"` + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + Params []byte `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` + ReturnValues []byte `protobuf:"bytes,4,opt,name=returnValues,proto3" json:"returnValues,omitempty"` +} + +func (x *GetLatestValueRequest) Reset() { + *x = GetLatestValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLatestValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestValueRequest) ProtoMessage() {} + +func (x *GetLatestValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestValueRequest.ProtoReflect.Descriptor instead. +func (*GetLatestValueRequest) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{46} +} + +func (x *GetLatestValueRequest) GetBc() *BoundContract { + if x != nil { + return x.Bc + } + return nil +} + +func (x *GetLatestValueRequest) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *GetLatestValueRequest) GetParams() []byte { + if x != nil { + return x.Params + } + return nil +} + +func (x *GetLatestValueRequest) GetReturnValues() []byte { + if x != nil { + return x.ReturnValues + } + return nil +} + +// GetLatestValueReply has return arguments for [github.com/smartcontractkit/chainlink-relay/pkg/types.ChainReader.GetLatestValue]. +type GetLatestValueReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RetValues []byte `protobuf:"bytes,1,opt,name=retValues,proto3" json:"retValues,omitempty"` +} + +func (x *GetLatestValueReply) Reset() { + *x = GetLatestValueReply{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLatestValueReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestValueReply) ProtoMessage() {} + +func (x *GetLatestValueReply) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestValueReply.ProtoReflect.Descriptor instead. +func (*GetLatestValueReply) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{47} +} + +func (x *GetLatestValueReply) GetRetValues() []byte { + if x != nil { + return x.RetValues + } + return nil +} + +// BoundContract represents a [github.com/smartcontractkit/chainlink-relay/pkg/types.BoundContract]. +type BoundContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Pending bool `protobuf:"varint,3,opt,name=pending,proto3" json:"pending,omitempty"` +} + +func (x *BoundContract) Reset() { + *x = BoundContract{} + if protoimpl.UnsafeEnabled { + mi := &file_relayer_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundContract) ProtoMessage() {} + +func (x *BoundContract) ProtoReflect() protoreflect.Message { + mi := &file_relayer_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundContract.ProtoReflect.Descriptor instead. +func (*BoundContract) Descriptor() ([]byte, []int) { + return file_relayer_proto_rawDescGZIP(), []int{48} +} + +func (x *BoundContract) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *BoundContract) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BoundContract) GetPending() bool { + if x != nil { + return x.Pending + } + return false +} + // NameReply has return arguments for [github.com/smartcontractkit/chainlink-relay/pkg/types.Service.Name]. type NameReply struct { state protoimpl.MessageState @@ -2158,7 +2576,7 @@ type NameReply struct { func (x *NameReply) Reset() { *x = NameReply{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[40] + mi := &file_relayer_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2171,7 +2589,7 @@ func (x *NameReply) String() string { func (*NameReply) ProtoMessage() {} func (x *NameReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[40] + mi := &file_relayer_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2184,7 +2602,7 @@ func (x *NameReply) ProtoReflect() protoreflect.Message { // Deprecated: Use NameReply.ProtoReflect.Descriptor instead. func (*NameReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{40} + return file_relayer_proto_rawDescGZIP(), []int{49} } func (x *NameReply) GetName() string { @@ -2206,7 +2624,7 @@ type HealthReportReply struct { func (x *HealthReportReply) Reset() { *x = HealthReportReply{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[41] + mi := &file_relayer_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2219,7 +2637,7 @@ func (x *HealthReportReply) String() string { func (*HealthReportReply) ProtoMessage() {} func (x *HealthReportReply) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[41] + mi := &file_relayer_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2232,7 +2650,7 @@ func (x *HealthReportReply) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthReportReply.ProtoReflect.Descriptor instead. func (*HealthReportReply) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{41} + return file_relayer_proto_rawDescGZIP(), []int{50} } func (x *HealthReportReply) GetHealthReport() map[string]string { @@ -2255,7 +2673,7 @@ type BigInt struct { func (x *BigInt) Reset() { *x = BigInt{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[42] + mi := &file_relayer_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2268,7 +2686,7 @@ func (x *BigInt) String() string { func (*BigInt) ProtoMessage() {} func (x *BigInt) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[42] + mi := &file_relayer_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2281,7 +2699,7 @@ func (x *BigInt) ProtoReflect() protoreflect.Message { // Deprecated: Use BigInt.ProtoReflect.Descriptor instead. func (*BigInt) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{42} + return file_relayer_proto_rawDescGZIP(), []int{51} } func (x *BigInt) GetNegative() bool { @@ -2310,7 +2728,7 @@ type StarknetSignature struct { func (x *StarknetSignature) Reset() { *x = StarknetSignature{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[43] + mi := &file_relayer_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2323,7 +2741,7 @@ func (x *StarknetSignature) String() string { func (*StarknetSignature) ProtoMessage() {} func (x *StarknetSignature) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[43] + mi := &file_relayer_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2336,7 +2754,7 @@ func (x *StarknetSignature) ProtoReflect() protoreflect.Message { // Deprecated: Use StarknetSignature.ProtoReflect.Descriptor instead. func (*StarknetSignature) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{43} + return file_relayer_proto_rawDescGZIP(), []int{52} } func (x *StarknetSignature) GetX() *BigInt { @@ -2364,7 +2782,7 @@ type StarknetMessageHash struct { func (x *StarknetMessageHash) Reset() { *x = StarknetMessageHash{} if protoimpl.UnsafeEnabled { - mi := &file_relayer_proto_msgTypes[44] + mi := &file_relayer_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2377,7 +2795,7 @@ func (x *StarknetMessageHash) String() string { func (*StarknetMessageHash) ProtoMessage() {} func (x *StarknetMessageHash) ProtoReflect() protoreflect.Message { - mi := &file_relayer_proto_msgTypes[44] + mi := &file_relayer_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2390,7 +2808,7 @@ func (x *StarknetMessageHash) ProtoReflect() protoreflect.Message { // Deprecated: Use StarknetMessageHash.ProtoReflect.Descriptor instead. func (*StarknetMessageHash) Descriptor() ([]byte, []int) { - return file_relayer_proto_rawDescGZIP(), []int{44} + return file_relayer_proto_rawDescGZIP(), []int{53} } func (x *StarknetMessageHash) GetHash() *BigInt { @@ -2611,138 +3029,188 @@ var file_relayer_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x10, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4d, 0x0a, 0x0c, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3f, 0x0a, 0x11, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x06, 0x42, 0x69, - 0x67, 0x49, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, - 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x01, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, - 0x67, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x78, 0x12, 0x1a, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, - 0x52, 0x01, 0x79, 0x22, 0x37, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, 0x4f, 0x0a, 0x0d, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x3e, 0x0a, - 0x0a, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x52, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x73, 0x0a, - 0x08, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x11, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x32, 0x91, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x53, - 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x0a, + 0x1c, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1c, 0x0a, + 0x1a, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x12, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x02, 0x62, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x52, 0x02, 0x62, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x33, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x57, 0x0a, + 0x0d, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4d, 0x0a, + 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3f, 0x0a, 0x11, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, + 0x06, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4b, 0x0a, 0x11, 0x53, 0x74, 0x61, + 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, + 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x78, 0x12, 0x1a, 0x0a, 0x01, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, + 0x49, 0x6e, 0x74, 0x52, 0x01, 0x79, 0x22, 0x37, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x6b, 0x6e, + 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, + 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x42, 0x69, 0x67, 0x49, 0x6e, 0x74, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x32, + 0x4f, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, + 0x65, 0x77, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, + 0x32, 0x73, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x39, 0x0a, 0x08, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, + 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x91, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, + 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x65, + 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x4e, 0x65, 0x77, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, - 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xb6, 0x01, 0x0a, 0x16, - 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x12, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x32, 0x8d, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x59, - 0x0a, 0x13, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0c, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x11, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x00, 0x32, 0x82, 0x02, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x1a, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, - 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, - 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xf5, 0x01, 0x0a, 0x07, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x61, 0x6d, - 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x08, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0a, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x12, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xb6, + 0x01, 0x0a, 0x16, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x8d, 0x02, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, + 0x72, 0x12, 0x59, 0x0a, 0x13, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0c, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x22, 0x00, 0x12, 0x53, 0x0a, 0x11, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x82, 0x02, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, + 0x38, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x12, 0x15, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x1a, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, + 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x46, 0x72, 0x6f, + 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xd6, 0x02, 0x0a, + 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x13, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x15, 0x55, 0x6e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xf5, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, - 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x00, 0x42, 0x42, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x72, 0x65, 0x6c, 0x61, 0x79, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x1a, 0x0f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x39, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x42, 0x5a, + 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, + 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2757,7 +3225,7 @@ func file_relayer_proto_rawDescGZIP() []byte { return file_relayer_proto_rawDescData } -var file_relayer_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_relayer_proto_msgTypes = make([]protoimpl.MessageInfo, 55) var file_relayer_proto_goTypes = []interface{}{ (*NewRelayerRequest)(nil), // 0: loop.NewRelayerRequest (*NewRelayerReply)(nil), // 1: loop.NewRelayerReply @@ -2799,13 +3267,22 @@ var file_relayer_proto_goTypes = []interface{}{ (*LatestConfigDigestAndEpochReply)(nil), // 37: loop.LatestConfigDigestAndEpochReply (*FromAccountRequest)(nil), // 38: loop.FromAccountRequest (*FromAccountReply)(nil), // 39: loop.FromAccountReply - (*NameReply)(nil), // 40: loop.NameReply - (*HealthReportReply)(nil), // 41: loop.HealthReportReply - (*BigInt)(nil), // 42: loop.BigInt - (*StarknetSignature)(nil), // 43: loop.StarknetSignature - (*StarknetMessageHash)(nil), // 44: loop.StarknetMessageHash - nil, // 45: loop.HealthReportReply.HealthReportEntry - (*emptypb.Empty)(nil), // 46: google.protobuf.Empty + (*RegisterEventFilterRequest)(nil), // 40: loop.RegisterEventFilterRequest + (*RegisterEventFilterReply)(nil), // 41: loop.RegisterEventFilterReply + (*UnregisterEventFilterRequest)(nil), // 42: loop.UnregisterEventFilterRequest + (*UnregisterEventFilterReply)(nil), // 43: loop.UnregisterEventFilterReply + (*QueryEventsRequest)(nil), // 44: loop.QueryEventsRequest + (*QueryEventsReply)(nil), // 45: loop.QueryEventsReply + (*GetLatestValueRequest)(nil), // 46: loop.GetLatestValueRequest + (*GetLatestValueReply)(nil), // 47: loop.GetLatestValueReply + (*BoundContract)(nil), // 48: loop.BoundContract + (*NameReply)(nil), // 49: loop.NameReply + (*HealthReportReply)(nil), // 50: loop.HealthReportReply + (*BigInt)(nil), // 51: loop.BigInt + (*StarknetSignature)(nil), // 52: loop.StarknetSignature + (*StarknetMessageHash)(nil), // 53: loop.StarknetMessageHash + nil, // 54: loop.HealthReportReply.HealthReportEntry + (*emptypb.Empty)(nil), // 55: google.protobuf.Empty } var file_relayer_proto_depIdxs = []int32{ 5, // 0: loop.NewPluginProviderRequest.relayArgs:type_name -> loop.RelayArgs @@ -2813,65 +3290,74 @@ var file_relayer_proto_depIdxs = []int32{ 5, // 2: loop.NewConfigProviderRequest.relayArgs:type_name -> loop.RelayArgs 13, // 3: loop.GetChainStatusReply.chain:type_name -> loop.ChainStatus 16, // 4: loop.ListNodeStatusesReply.nodes:type_name -> loop.NodeStatus - 42, // 5: loop.TransactionRequest.amount:type_name -> loop.BigInt + 51, // 5: loop.TransactionRequest.amount:type_name -> loop.BigInt 31, // 6: loop.ObserveRequest.reportTimestamp:type_name -> loop.ReportTimestamp - 42, // 7: loop.ObserveReply.value:type_name -> loop.BigInt + 51, // 7: loop.ObserveReply.value:type_name -> loop.BigInt 20, // 8: loop.ConfigDigestRequest.contractConfig:type_name -> loop.ContractConfig 20, // 9: loop.LatestConfigReply.contractConfig:type_name -> loop.ContractConfig 31, // 10: loop.ReportContext.reportTimestamp:type_name -> loop.ReportTimestamp 32, // 11: loop.TransmitRequest.reportContext:type_name -> loop.ReportContext 33, // 12: loop.TransmitRequest.attributedOnchainSignatures:type_name -> loop.AttributedOnchainSignature - 45, // 13: loop.HealthReportReply.healthReport:type_name -> loop.HealthReportReply.HealthReportEntry - 42, // 14: loop.StarknetSignature.x:type_name -> loop.BigInt - 42, // 15: loop.StarknetSignature.y:type_name -> loop.BigInt - 42, // 16: loop.StarknetMessageHash.hash:type_name -> loop.BigInt - 0, // 17: loop.PluginRelayer.NewRelayer:input_type -> loop.NewRelayerRequest - 46, // 18: loop.Keystore.Accounts:input_type -> google.protobuf.Empty - 3, // 19: loop.Keystore.Sign:input_type -> loop.SignRequest - 9, // 20: loop.Relayer.NewConfigProvider:input_type -> loop.NewConfigProviderRequest - 7, // 21: loop.Relayer.NewPluginProvider:input_type -> loop.NewPluginProviderRequest - 11, // 22: loop.Relayer.GetChainStatus:input_type -> loop.GetChainStatusRequest - 14, // 23: loop.Relayer.ListNodeStatuses:input_type -> loop.ListNodeStatusesRequest - 17, // 24: loop.Relayer.Transact:input_type -> loop.TransactionRequest - 18, // 25: loop.DataSource.Observe:input_type -> loop.ObserveRequest - 21, // 26: loop.OffchainConfigDigester.ConfigDigest:input_type -> loop.ConfigDigestRequest - 23, // 27: loop.OffchainConfigDigester.ConfigDigestPrefix:input_type -> loop.ConfigDigestPrefixRequest - 25, // 28: loop.ContractConfigTracker.LatestConfigDetails:input_type -> loop.LatestConfigDetailsRequest - 27, // 29: loop.ContractConfigTracker.LatestConfig:input_type -> loop.LatestConfigRequest - 29, // 30: loop.ContractConfigTracker.LatestBlockHeight:input_type -> loop.LatestBlockHeightRequest - 34, // 31: loop.ContractTransmitter.Transmit:input_type -> loop.TransmitRequest - 36, // 32: loop.ContractTransmitter.LatestConfigDigestAndEpoch:input_type -> loop.LatestConfigDigestAndEpochRequest - 38, // 33: loop.ContractTransmitter.FromAccount:input_type -> loop.FromAccountRequest - 46, // 34: loop.Service.Name:input_type -> google.protobuf.Empty - 46, // 35: loop.Service.Close:input_type -> google.protobuf.Empty - 46, // 36: loop.Service.Ready:input_type -> google.protobuf.Empty - 46, // 37: loop.Service.HealthReport:input_type -> google.protobuf.Empty - 1, // 38: loop.PluginRelayer.NewRelayer:output_type -> loop.NewRelayerReply - 2, // 39: loop.Keystore.Accounts:output_type -> loop.AccountsReply - 4, // 40: loop.Keystore.Sign:output_type -> loop.SignReply - 10, // 41: loop.Relayer.NewConfigProvider:output_type -> loop.NewConfigProviderReply - 8, // 42: loop.Relayer.NewPluginProvider:output_type -> loop.NewPluginProviderReply - 12, // 43: loop.Relayer.GetChainStatus:output_type -> loop.GetChainStatusReply - 15, // 44: loop.Relayer.ListNodeStatuses:output_type -> loop.ListNodeStatusesReply - 46, // 45: loop.Relayer.Transact:output_type -> google.protobuf.Empty - 19, // 46: loop.DataSource.Observe:output_type -> loop.ObserveReply - 22, // 47: loop.OffchainConfigDigester.ConfigDigest:output_type -> loop.ConfigDigestReply - 24, // 48: loop.OffchainConfigDigester.ConfigDigestPrefix:output_type -> loop.ConfigDigestPrefixReply - 26, // 49: loop.ContractConfigTracker.LatestConfigDetails:output_type -> loop.LatestConfigDetailsReply - 28, // 50: loop.ContractConfigTracker.LatestConfig:output_type -> loop.LatestConfigReply - 30, // 51: loop.ContractConfigTracker.LatestBlockHeight:output_type -> loop.LatestBlockHeightReply - 35, // 52: loop.ContractTransmitter.Transmit:output_type -> loop.TransmitReply - 37, // 53: loop.ContractTransmitter.LatestConfigDigestAndEpoch:output_type -> loop.LatestConfigDigestAndEpochReply - 39, // 54: loop.ContractTransmitter.FromAccount:output_type -> loop.FromAccountReply - 40, // 55: loop.Service.Name:output_type -> loop.NameReply - 46, // 56: loop.Service.Close:output_type -> google.protobuf.Empty - 46, // 57: loop.Service.Ready:output_type -> google.protobuf.Empty - 41, // 58: loop.Service.HealthReport:output_type -> loop.HealthReportReply - 38, // [38:59] is the sub-list for method output_type - 17, // [17:38] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 48, // 13: loop.GetLatestValueRequest.bc:type_name -> loop.BoundContract + 54, // 14: loop.HealthReportReply.healthReport:type_name -> loop.HealthReportReply.HealthReportEntry + 51, // 15: loop.StarknetSignature.x:type_name -> loop.BigInt + 51, // 16: loop.StarknetSignature.y:type_name -> loop.BigInt + 51, // 17: loop.StarknetMessageHash.hash:type_name -> loop.BigInt + 0, // 18: loop.PluginRelayer.NewRelayer:input_type -> loop.NewRelayerRequest + 55, // 19: loop.Keystore.Accounts:input_type -> google.protobuf.Empty + 3, // 20: loop.Keystore.Sign:input_type -> loop.SignRequest + 9, // 21: loop.Relayer.NewConfigProvider:input_type -> loop.NewConfigProviderRequest + 7, // 22: loop.Relayer.NewPluginProvider:input_type -> loop.NewPluginProviderRequest + 11, // 23: loop.Relayer.GetChainStatus:input_type -> loop.GetChainStatusRequest + 14, // 24: loop.Relayer.ListNodeStatuses:input_type -> loop.ListNodeStatusesRequest + 17, // 25: loop.Relayer.Transact:input_type -> loop.TransactionRequest + 18, // 26: loop.DataSource.Observe:input_type -> loop.ObserveRequest + 21, // 27: loop.OffchainConfigDigester.ConfigDigest:input_type -> loop.ConfigDigestRequest + 23, // 28: loop.OffchainConfigDigester.ConfigDigestPrefix:input_type -> loop.ConfigDigestPrefixRequest + 25, // 29: loop.ContractConfigTracker.LatestConfigDetails:input_type -> loop.LatestConfigDetailsRequest + 27, // 30: loop.ContractConfigTracker.LatestConfig:input_type -> loop.LatestConfigRequest + 29, // 31: loop.ContractConfigTracker.LatestBlockHeight:input_type -> loop.LatestBlockHeightRequest + 34, // 32: loop.ContractTransmitter.Transmit:input_type -> loop.TransmitRequest + 36, // 33: loop.ContractTransmitter.LatestConfigDigestAndEpoch:input_type -> loop.LatestConfigDigestAndEpochRequest + 38, // 34: loop.ContractTransmitter.FromAccount:input_type -> loop.FromAccountRequest + 40, // 35: loop.ChainReader.RegisterEventFilter:input_type -> loop.RegisterEventFilterRequest + 42, // 36: loop.ChainReader.UnregisterEventFilter:input_type -> loop.UnregisterEventFilterRequest + 44, // 37: loop.ChainReader.QueryEvents:input_type -> loop.QueryEventsRequest + 46, // 38: loop.ChainReader.GetLatestValue:input_type -> loop.GetLatestValueRequest + 55, // 39: loop.Service.Name:input_type -> google.protobuf.Empty + 55, // 40: loop.Service.Close:input_type -> google.protobuf.Empty + 55, // 41: loop.Service.Ready:input_type -> google.protobuf.Empty + 55, // 42: loop.Service.HealthReport:input_type -> google.protobuf.Empty + 1, // 43: loop.PluginRelayer.NewRelayer:output_type -> loop.NewRelayerReply + 2, // 44: loop.Keystore.Accounts:output_type -> loop.AccountsReply + 4, // 45: loop.Keystore.Sign:output_type -> loop.SignReply + 10, // 46: loop.Relayer.NewConfigProvider:output_type -> loop.NewConfigProviderReply + 8, // 47: loop.Relayer.NewPluginProvider:output_type -> loop.NewPluginProviderReply + 12, // 48: loop.Relayer.GetChainStatus:output_type -> loop.GetChainStatusReply + 15, // 49: loop.Relayer.ListNodeStatuses:output_type -> loop.ListNodeStatusesReply + 55, // 50: loop.Relayer.Transact:output_type -> google.protobuf.Empty + 19, // 51: loop.DataSource.Observe:output_type -> loop.ObserveReply + 22, // 52: loop.OffchainConfigDigester.ConfigDigest:output_type -> loop.ConfigDigestReply + 24, // 53: loop.OffchainConfigDigester.ConfigDigestPrefix:output_type -> loop.ConfigDigestPrefixReply + 26, // 54: loop.ContractConfigTracker.LatestConfigDetails:output_type -> loop.LatestConfigDetailsReply + 28, // 55: loop.ContractConfigTracker.LatestConfig:output_type -> loop.LatestConfigReply + 30, // 56: loop.ContractConfigTracker.LatestBlockHeight:output_type -> loop.LatestBlockHeightReply + 35, // 57: loop.ContractTransmitter.Transmit:output_type -> loop.TransmitReply + 37, // 58: loop.ContractTransmitter.LatestConfigDigestAndEpoch:output_type -> loop.LatestConfigDigestAndEpochReply + 39, // 59: loop.ContractTransmitter.FromAccount:output_type -> loop.FromAccountReply + 41, // 60: loop.ChainReader.RegisterEventFilter:output_type -> loop.RegisterEventFilterReply + 41, // 61: loop.ChainReader.UnregisterEventFilter:output_type -> loop.RegisterEventFilterReply + 45, // 62: loop.ChainReader.QueryEvents:output_type -> loop.QueryEventsReply + 47, // 63: loop.ChainReader.GetLatestValue:output_type -> loop.GetLatestValueReply + 49, // 64: loop.Service.Name:output_type -> loop.NameReply + 55, // 65: loop.Service.Close:output_type -> google.protobuf.Empty + 55, // 66: loop.Service.Ready:output_type -> google.protobuf.Empty + 50, // 67: loop.Service.HealthReport:output_type -> loop.HealthReportReply + 43, // [43:68] is the sub-list for method output_type + 18, // [18:43] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_relayer_proto_init() } @@ -3361,7 +3847,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NameReply); i { + switch v := v.(*RegisterEventFilterRequest); i { case 0: return &v.state case 1: @@ -3373,7 +3859,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthReportReply); i { + switch v := v.(*RegisterEventFilterReply); i { case 0: return &v.state case 1: @@ -3385,7 +3871,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BigInt); i { + switch v := v.(*UnregisterEventFilterRequest); i { case 0: return &v.state case 1: @@ -3397,7 +3883,7 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StarknetSignature); i { + switch v := v.(*UnregisterEventFilterReply); i { case 0: return &v.state case 1: @@ -3409,6 +3895,114 @@ func file_relayer_proto_init() { } } file_relayer_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryEventsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLatestValueReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NameReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthReportReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigInt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StarknetSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_relayer_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StarknetMessageHash); i { case 0: return &v.state @@ -3427,9 +4021,9 @@ func file_relayer_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_relayer_proto_rawDesc, NumEnums: 0, - NumMessages: 46, + NumMessages: 55, NumExtensions: 0, - NumServices: 8, + NumServices: 9, }, GoTypes: file_relayer_proto_goTypes, DependencyIndexes: file_relayer_proto_depIdxs, diff --git a/pkg/loop/internal/pb/relayer.proto b/pkg/loop/internal/pb/relayer.proto index 5aded65082..9bc54e1cd0 100644 --- a/pkg/loop/internal/pb/relayer.proto +++ b/pkg/loop/internal/pb/relayer.proto @@ -256,6 +256,51 @@ message FromAccountReply { string Account = 1; } +service ChainReader { + rpc RegisterEventFilter (RegisterEventFilterRequest) returns (RegisterEventFilterReply) {} + rpc UnregisterEventFilter (UnregisterEventFilterRequest) returns (RegisterEventFilterReply) {} + rpc QueryEvents (QueryEventsRequest) returns (QueryEventsReply) {} + rpc GetLatestValue (GetLatestValueRequest) returns (GetLatestValueReply) {} +} + +// TODO +message RegisterEventFilterRequest {} + +// TODO +message RegisterEventFilterReply {} + +// TODO +message UnregisterEventFilterRequest {} + +// TODO +message UnregisterEventFilterReply {} + +// TODO +message QueryEventsRequest {} + +// TODO +message QueryEventsReply {} + +// GetLatestValueRequest has arguments for [github.com/smartcontractkit/chainlink-relay/pkg/types.ChainReader.GetLatestValue]. +message GetLatestValueRequest { + BoundContract bc = 1; + string method = 2; + bytes params = 3; + bytes returnValues = 4; +} + +// GetLatestValueReply has return arguments for [github.com/smartcontractkit/chainlink-relay/pkg/types.ChainReader.GetLatestValue]. +message GetLatestValueReply { + bytes retValues = 1; +} + +// BoundContract represents a [github.com/smartcontractkit/chainlink-relay/pkg/types.BoundContract]. +message BoundContract { + string address = 1; + string name = 2; + bool pending = 3; +} + service Service { rpc Name (google.protobuf.Empty) returns (NameReply) {} rpc Close (google.protobuf.Empty) returns (google.protobuf.Empty) {} diff --git a/pkg/loop/internal/pb/relayer_grpc.pb.go b/pkg/loop/internal/pb/relayer_grpc.pb.go index c715e31ffe..fd503d6b6d 100644 --- a/pkg/loop/internal/pb/relayer_grpc.pb.go +++ b/pkg/loop/internal/pb/relayer_grpc.pb.go @@ -1020,6 +1020,207 @@ var ContractTransmitter_ServiceDesc = grpc.ServiceDesc{ Metadata: "relayer.proto", } +const ( + ChainReader_RegisterEventFilter_FullMethodName = "/loop.ChainReader/RegisterEventFilter" + ChainReader_UnregisterEventFilter_FullMethodName = "/loop.ChainReader/UnregisterEventFilter" + ChainReader_QueryEvents_FullMethodName = "/loop.ChainReader/QueryEvents" + ChainReader_GetLatestValue_FullMethodName = "/loop.ChainReader/GetLatestValue" +) + +// ChainReaderClient is the client API for ChainReader service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ChainReaderClient interface { + RegisterEventFilter(ctx context.Context, in *RegisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) + UnregisterEventFilter(ctx context.Context, in *UnregisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) + QueryEvents(ctx context.Context, in *QueryEventsRequest, opts ...grpc.CallOption) (*QueryEventsReply, error) + GetLatestValue(ctx context.Context, in *GetLatestValueRequest, opts ...grpc.CallOption) (*GetLatestValueReply, error) +} + +type chainReaderClient struct { + cc grpc.ClientConnInterface +} + +func NewChainReaderClient(cc grpc.ClientConnInterface) ChainReaderClient { + return &chainReaderClient{cc} +} + +func (c *chainReaderClient) RegisterEventFilter(ctx context.Context, in *RegisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) { + out := new(RegisterEventFilterReply) + err := c.cc.Invoke(ctx, ChainReader_RegisterEventFilter_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chainReaderClient) UnregisterEventFilter(ctx context.Context, in *UnregisterEventFilterRequest, opts ...grpc.CallOption) (*RegisterEventFilterReply, error) { + out := new(RegisterEventFilterReply) + err := c.cc.Invoke(ctx, ChainReader_UnregisterEventFilter_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chainReaderClient) QueryEvents(ctx context.Context, in *QueryEventsRequest, opts ...grpc.CallOption) (*QueryEventsReply, error) { + out := new(QueryEventsReply) + err := c.cc.Invoke(ctx, ChainReader_QueryEvents_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chainReaderClient) GetLatestValue(ctx context.Context, in *GetLatestValueRequest, opts ...grpc.CallOption) (*GetLatestValueReply, error) { + out := new(GetLatestValueReply) + err := c.cc.Invoke(ctx, ChainReader_GetLatestValue_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChainReaderServer is the server API for ChainReader service. +// All implementations must embed UnimplementedChainReaderServer +// for forward compatibility +type ChainReaderServer interface { + RegisterEventFilter(context.Context, *RegisterEventFilterRequest) (*RegisterEventFilterReply, error) + UnregisterEventFilter(context.Context, *UnregisterEventFilterRequest) (*RegisterEventFilterReply, error) + QueryEvents(context.Context, *QueryEventsRequest) (*QueryEventsReply, error) + GetLatestValue(context.Context, *GetLatestValueRequest) (*GetLatestValueReply, error) + mustEmbedUnimplementedChainReaderServer() +} + +// UnimplementedChainReaderServer must be embedded to have forward compatible implementations. +type UnimplementedChainReaderServer struct { +} + +func (UnimplementedChainReaderServer) RegisterEventFilter(context.Context, *RegisterEventFilterRequest) (*RegisterEventFilterReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterEventFilter not implemented") +} +func (UnimplementedChainReaderServer) UnregisterEventFilter(context.Context, *UnregisterEventFilterRequest) (*RegisterEventFilterReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterEventFilter not implemented") +} +func (UnimplementedChainReaderServer) QueryEvents(context.Context, *QueryEventsRequest) (*QueryEventsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryEvents not implemented") +} +func (UnimplementedChainReaderServer) GetLatestValue(context.Context, *GetLatestValueRequest) (*GetLatestValueReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestValue not implemented") +} +func (UnimplementedChainReaderServer) mustEmbedUnimplementedChainReaderServer() {} + +// UnsafeChainReaderServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChainReaderServer will +// result in compilation errors. +type UnsafeChainReaderServer interface { + mustEmbedUnimplementedChainReaderServer() +} + +func RegisterChainReaderServer(s grpc.ServiceRegistrar, srv ChainReaderServer) { + s.RegisterService(&ChainReader_ServiceDesc, srv) +} + +func _ChainReader_RegisterEventFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterEventFilterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChainReaderServer).RegisterEventFilter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChainReader_RegisterEventFilter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChainReaderServer).RegisterEventFilter(ctx, req.(*RegisterEventFilterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChainReader_UnregisterEventFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnregisterEventFilterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChainReaderServer).UnregisterEventFilter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChainReader_UnregisterEventFilter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChainReaderServer).UnregisterEventFilter(ctx, req.(*UnregisterEventFilterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChainReader_QueryEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChainReaderServer).QueryEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChainReader_QueryEvents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChainReaderServer).QueryEvents(ctx, req.(*QueryEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChainReader_GetLatestValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLatestValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChainReaderServer).GetLatestValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChainReader_GetLatestValue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChainReaderServer).GetLatestValue(ctx, req.(*GetLatestValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ChainReader_ServiceDesc is the grpc.ServiceDesc for ChainReader service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ChainReader_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "loop.ChainReader", + HandlerType: (*ChainReaderServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterEventFilter", + Handler: _ChainReader_RegisterEventFilter_Handler, + }, + { + MethodName: "UnregisterEventFilter", + Handler: _ChainReader_UnregisterEventFilter_Handler, + }, + { + MethodName: "QueryEvents", + Handler: _ChainReader_QueryEvents_Handler, + }, + { + MethodName: "GetLatestValue", + Handler: _ChainReader_GetLatestValue_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "relayer.proto", +} + const ( Service_Name_FullMethodName = "/loop.Service/Name" Service_Close_FullMethodName = "/loop.Service/Close" diff --git a/pkg/loop/internal/plugin_provider.go b/pkg/loop/internal/plugin_provider.go index 18551b3d28..3f6b7f8212 100644 --- a/pkg/loop/internal/plugin_provider.go +++ b/pkg/loop/internal/plugin_provider.go @@ -5,11 +5,13 @@ import ( "google.golang.org/grpc" "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal/pb" + "github.com/smartcontractkit/chainlink-relay/pkg/types" ) type pluginProviderClient struct { *configProviderClient contractTransmitter libocr.ContractTransmitter + chainReader types.ChainReader } func (p *pluginProviderClient) ClientConn() grpc.ClientConnInterface { return p.cc } @@ -23,3 +25,7 @@ func newPluginProviderClient(b *brokerExt, cc grpc.ClientConnInterface) *pluginP func (p *pluginProviderClient) ContractTransmitter() libocr.ContractTransmitter { return p.contractTransmitter } + +func (p *pluginProviderClient) ChainReader() types.ChainReader { + return p.chainReader +} diff --git a/pkg/loop/internal/relayer.go b/pkg/loop/internal/relayer.go index 86824d5596..719ecba2c9 100644 --- a/pkg/loop/internal/relayer.go +++ b/pkg/loop/internal/relayer.go @@ -369,7 +369,7 @@ func (r *relayerServer) newMedianProvider(ctx context.Context, relayArgs types.R pb.RegisterContractConfigTrackerServer(s, &contractConfigTrackerServer{impl: provider.ContractConfigTracker()}) pb.RegisterContractTransmitterServer(s, &contractTransmitterServer{impl: provider.ContractTransmitter()}) pb.RegisterReportCodecServer(s, &reportCodecServer{impl: provider.ReportCodec()}) - pb.RegisterMedianContractServer(s, &medianContractServer{impl: provider.MedianContract()}) + pb.RegisterChainReaderServer(s, &chainReaderServer{impl: provider.ChainReader()}) pb.RegisterOnchainConfigCodecServer(s, &onchainConfigCodecServer{impl: provider.OnchainConfigCodec()}) }, providerRes) if err != nil { diff --git a/pkg/types/chain_reader.go b/pkg/types/chain_reader.go new file mode 100644 index 0000000000..29239ea154 --- /dev/null +++ b/pkg/types/chain_reader.go @@ -0,0 +1,67 @@ +package types + +import ( + "context" + "math/big" + "time" +) + +type BigInt big.Int +type String string + +// Union of BigInt & String +type BlockID interface { + bi() *BigInt + s() String +} + +func (b *BigInt) bi() *BigInt { + return b +} + +func (b String) s() String { + return b +} + +type ChainReader interface { + //RegisterEventFilter(ctx context.Context, filterName string, filter EventFilter, startingBlock BlockID) error + //UnregisterEventFilter(ctx context.Context, filterName string) error + //QueryEvents(ctx context.Context, query EventQuery) ([]Event, error) + // The params argument of GetLatestValue() can be any object which maps a set of generic parameters into chain specific parameters defined in RelayConfig. It must be something which can be passed into + // json.Marshal(). Typically would be either an anonymous map such as `map[string]any{"baz": 42, "test": true}}` or something which implements the `MarshalJSON()` method (satisfying `Marshaller` interface). + // + // returnVal should satisfy Marshaller interface. + GetLatestValue(ctx context.Context, bc BoundContract, method string, params, returnVal any) ([]byte, error) +} + +type BoundContract struct { + Address string + Name string + Pending bool +} + +type Event struct { + ChainId string + EventIndexInBlock string + Address string + TxHash string + BlockHash string + BlockNumber int64 + BlockTimestamp time.Time + CreatedAt time.Time + Keys []string + Data []byte +} + +type EventFilter struct { + AddressList []string // contract address + KeysList [][]string // 2D list of indexed search keys, outer dim = AND, inner dim = OR. Params[0] is the name of the event (or "event type"), rest are any narrowing parameters that may help further specify the event + Retention time.Duration +} + +type EventQuery struct { + FromBlock BlockID + ToBlock BlockID + Filter EventFilter + Pending bool +} diff --git a/pkg/types/provider.go b/pkg/types/provider.go index e99d7e7eb0..7bda2dd031 100644 --- a/pkg/types/provider.go +++ b/pkg/types/provider.go @@ -18,4 +18,5 @@ type Plugin = PluginProvider type PluginProvider interface { ConfigProvider ContractTransmitter() ocrtypes.ContractTransmitter + ChainReader() ChainReader }