Commit 9099c989 authored by Ubuntu's avatar Ubuntu

update interface

parent d7bfe6c9
...@@ -9,7 +9,7 @@ import "ethrpc/v1/account_req_res.proto"; ...@@ -9,7 +9,7 @@ import "ethrpc/v1/account_req_res.proto";
import "base/v1/resource.proto"; import "base/v1/resource.proto";
service NebulaService { service RpcService {
// web3 // web3
rpc Sha3(Sha3Request) returns (Sha3Response) {}; rpc Sha3(Sha3Request) returns (Sha3Response) {};
rpc NodeVersion(google.protobuf.Empty) returns (NodeVersionResponse) {}; rpc NodeVersion(google.protobuf.Empty) returns (NodeVersionResponse) {};
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -33,38 +33,37 @@ var file_ring_v1_service_proto_rawDesc = []byte{ ...@@ -33,38 +33,37 @@ var file_ring_v1_service_proto_rawDesc = []byte{
0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72,
0x65, 0x71, 0x5f, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x65, 0x71, 0x5f, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61,
0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9d, 0x01, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x96, 0x01, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x62, 0x61, 0x73, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x78, 0x1a, 0x23, 0x2e, 0x72,
0x69, 0x6f, 0x6e, 0x1a, 0x23, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x72,
0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4e, 0x6f, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x72,
0x6e, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f,
0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xa7, 0x01,
0x73, 0x65, 0x22, 0x00, 0x42, 0xa7, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x69, 0x6e, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53,
0x67, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x64, 0x75, 0x63, 0x65,
0x2f, 0x43, 0x61, 0x64, 0x75, 0x63, 0x65, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x76, 0x65, 0x72, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x70, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x69,
0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x69, 0x6e, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52,
0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x52,
0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31,
0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x52,
0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_ring_v1_service_proto_goTypes = []interface{}{ var file_ring_v1_service_proto_goTypes = []interface{}{
(*v1.EthTransaction)(nil), // 0: base.v1.EthTransaction (*v1.CheckTx)(nil), // 0: base.v1.CheckTx
(*NonceRequest)(nil), // 1: ring.v1.NonceRequest (*NonceRequest)(nil), // 1: ring.v1.NonceRequest
(*SendRawTransactionResponse)(nil), // 2: ring.v1.SendRawTransactionResponse (*SendRawTransactionResponse)(nil), // 2: ring.v1.SendRawTransactionResponse
(*NonceResponse)(nil), // 3: ring.v1.NonceResponse (*NonceResponse)(nil), // 3: ring.v1.NonceResponse
} }
var file_ring_v1_service_proto_depIdxs = []int32{ var file_ring_v1_service_proto_depIdxs = []int32{
0, // 0: ring.v1.RingService.SendRawTransaction:input_type -> base.v1.EthTransaction 0, // 0: ring.v1.RingService.SendRawTransaction:input_type -> base.v1.CheckTx
1, // 1: ring.v1.RingService.Nonce:input_type -> ring.v1.NonceRequest 1, // 1: ring.v1.RingService.Nonce:input_type -> ring.v1.NonceRequest
2, // 2: ring.v1.RingService.SendRawTransaction:output_type -> ring.v1.SendRawTransactionResponse 2, // 2: ring.v1.RingService.SendRawTransaction:output_type -> ring.v1.SendRawTransactionResponse
3, // 3: ring.v1.RingService.Nonce:output_type -> ring.v1.NonceResponse 3, // 3: ring.v1.RingService.Nonce:output_type -> ring.v1.NonceResponse
......
...@@ -24,7 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 ...@@ -24,7 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
// 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. // 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 RingServiceClient interface { type RingServiceClient interface {
// account info service // account info service
SendRawTransaction(ctx context.Context, in *v1.EthTransaction, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) SendRawTransaction(ctx context.Context, in *v1.CheckTx, opts ...grpc.CallOption) (*SendRawTransactionResponse, error)
Nonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceResponse, error) Nonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceResponse, error)
} }
...@@ -36,7 +36,7 @@ func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient { ...@@ -36,7 +36,7 @@ func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient {
return &ringServiceClient{cc} return &ringServiceClient{cc}
} }
func (c *ringServiceClient) SendRawTransaction(ctx context.Context, in *v1.EthTransaction, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) { func (c *ringServiceClient) SendRawTransaction(ctx context.Context, in *v1.CheckTx, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) {
out := new(SendRawTransactionResponse) out := new(SendRawTransactionResponse)
err := c.cc.Invoke(ctx, "/ring.v1.RingService/SendRawTransaction", in, out, opts...) err := c.cc.Invoke(ctx, "/ring.v1.RingService/SendRawTransaction", in, out, opts...)
if err != nil { if err != nil {
...@@ -59,7 +59,7 @@ func (c *ringServiceClient) Nonce(ctx context.Context, in *NonceRequest, opts .. ...@@ -59,7 +59,7 @@ func (c *ringServiceClient) Nonce(ctx context.Context, in *NonceRequest, opts ..
// for forward compatibility // for forward compatibility
type RingServiceServer interface { type RingServiceServer interface {
// account info service // account info service
SendRawTransaction(context.Context, *v1.EthTransaction) (*SendRawTransactionResponse, error) SendRawTransaction(context.Context, *v1.CheckTx) (*SendRawTransactionResponse, error)
Nonce(context.Context, *NonceRequest) (*NonceResponse, error) Nonce(context.Context, *NonceRequest) (*NonceResponse, error)
mustEmbedUnimplementedRingServiceServer() mustEmbedUnimplementedRingServiceServer()
} }
...@@ -68,7 +68,7 @@ type RingServiceServer interface { ...@@ -68,7 +68,7 @@ type RingServiceServer interface {
type UnimplementedRingServiceServer struct { type UnimplementedRingServiceServer struct {
} }
func (UnimplementedRingServiceServer) SendRawTransaction(context.Context, *v1.EthTransaction) (*SendRawTransactionResponse, error) { func (UnimplementedRingServiceServer) SendRawTransaction(context.Context, *v1.CheckTx) (*SendRawTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendRawTransaction not implemented") return nil, status.Errorf(codes.Unimplemented, "method SendRawTransaction not implemented")
} }
func (UnimplementedRingServiceServer) Nonce(context.Context, *NonceRequest) (*NonceResponse, error) { func (UnimplementedRingServiceServer) Nonce(context.Context, *NonceRequest) (*NonceResponse, error) {
...@@ -88,7 +88,7 @@ func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) { ...@@ -88,7 +88,7 @@ func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) {
} }
func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(v1.EthTransaction) in := new(v1.CheckTx)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
...@@ -100,7 +100,7 @@ func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Contex ...@@ -100,7 +100,7 @@ func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Contex
FullMethod: "/ring.v1.RingService/SendRawTransaction", FullMethod: "/ring.v1.RingService/SendRawTransaction",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RingServiceServer).SendRawTransaction(ctx, req.(*v1.EthTransaction)) return srv.(RingServiceServer).SendRawTransaction(ctx, req.(*v1.CheckTx))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
......
...@@ -10,7 +10,7 @@ import "base/v1/resource.proto"; ...@@ -10,7 +10,7 @@ import "base/v1/resource.proto";
service RingService{ service RingService{
// account info service // account info service
rpc SendRawTransaction(base.v1.EthTransaction) returns (SendRawTransactionResponse) {}; rpc SendRawTransaction(base.v1.CheckTx) returns (SendRawTransactionResponse) {};
rpc Nonce(NonceRequest) returns (NonceResponse) {}; rpc Nonce(NonceRequest) returns (NonceResponse) {};
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment