From f648aa52bda8c9967d53386ac55e68754647f7bc Mon Sep 17 00:00:00 2001 From: Bryan White Date: Thu, 23 Jan 2025 14:00:43 +0100 Subject: [PATCH] feat: add migrate collect-morse-account subcommand --- api/poktroll/application/query_grpc.pb.go | 194 + api/poktroll/application/tx_grpc.pb.go | 346 ++ api/poktroll/gateway/query_grpc.pb.go | 194 + api/poktroll/gateway/tx_grpc.pb.go | 232 ++ api/poktroll/migration/query_grpc.pb.go | 116 + api/poktroll/migration/tx_grpc.pb.go | 156 + api/poktroll/migration/types.pulsar.go | 3651 +++++++++++++++++ api/poktroll/proof/query_grpc.pb.go | 272 ++ api/poktroll/proof/tx_grpc.pb.go | 232 ++ api/poktroll/service/query_grpc.pb.go | 272 ++ api/poktroll/service/tx_grpc.pb.go | 194 + api/poktroll/session/query_grpc.pb.go | 156 + api/poktroll/session/tx_grpc.pb.go | 156 + api/poktroll/shared/query_grpc.pb.go | 116 + api/poktroll/shared/tx_grpc.pb.go | 156 + api/poktroll/supplier/query_grpc.pb.go | 194 + api/poktroll/supplier/tx_grpc.pb.go | 232 ++ api/poktroll/tokenomics/query_grpc.pb.go | 116 + api/poktroll/tokenomics/tx_grpc.pb.go | 156 + cmd/poktrolld/cmd/commands.go | 1 + cmd/poktrolld/cmd/migrate.go | 220 + cmd/poktrolld/cmd/migrate_test.go | 168 + proto/poktroll/migration/types.proto | 101 + x/application/types/event.pb.go | 2493 +++++++++++ x/application/types/genesis.pb.go | 387 ++ x/application/types/params.pb.go | 400 ++ x/application/types/query.pb.go | 1421 +++++++ x/application/types/query.pb.gw.go | 337 ++ x/application/types/tx.pb.go | 3386 +++++++++++++++ x/application/types/types.pb.go | 1166 ++++++ x/gateway/types/event.pb.go | 579 +++ x/gateway/types/genesis.pb.go | 385 ++ x/gateway/types/params.pb.go | 355 ++ x/gateway/types/query.pb.go | 1367 ++++++ x/gateway/types/query.pb.gw.go | 337 ++ x/gateway/types/tx.pb.go | 1967 +++++++++ x/gateway/types/types.pb.go | 379 ++ x/migration/types/genesis.pb.go | 320 ++ x/migration/types/params.pb.go | 285 ++ x/migration/types/query.pb.go | 532 +++ x/migration/types/query.pb.gw.go | 153 + x/migration/types/tx.pb.go | 965 +++++ x/migration/types/types.pb.go | 1690 ++++++++ x/proof/types/event.pb.go | 1647 ++++++++ x/proof/types/genesis.pb.go | 448 ++ x/proof/types/params.pb.go | 537 +++ x/proof/types/query.pb.go | 2756 +++++++++++++ x/proof/types/query.pb.gw.go | 565 +++ x/proof/types/tx.pb.go | 2270 ++++++++++ x/proof/types/types.pb.go | 791 ++++ x/service/types/event.pb.go | 495 +++ x/service/types/genesis.pb.go | 452 ++ x/service/types/params.pb.go | 401 ++ x/service/types/query.pb.go | 2197 ++++++++++ x/service/types/query.pb.gw.go | 521 +++ x/service/types/relay.pb.go | 1370 +++++++ x/service/types/relay_mining_difficulty.pb.go | 456 ++ x/service/types/tx.pb.go | 1645 ++++++++ x/session/types/genesis.pb.go | 320 ++ x/session/types/params.pb.go | 329 ++ x/session/types/query.pb.go | 1008 +++++ x/session/types/query.pb.gw.go | 236 ++ x/session/types/tx.pb.go | 1114 +++++ x/session/types/types.pb.go | 933 +++++ x/shared/types/genesis.pb.go | 320 ++ x/shared/types/params.pb.go | 671 +++ x/shared/types/query.pb.go | 532 +++ x/shared/types/query.pb.gw.go | 153 + x/shared/types/service.pb.go | 1675 ++++++++ x/shared/types/supplier.pb.go | 706 ++++ x/shared/types/tx.pb.go | 1262 ++++++ x/supplier/types/event.pb.go | 1230 ++++++ x/supplier/types/genesis.pb.go | 386 ++ x/supplier/types/params.pb.go | 423 ++ x/supplier/types/query.pb.go | 1370 +++++++ x/supplier/types/query.pb.gw.go | 337 ++ x/supplier/types/tx.pb.go | 2189 ++++++++++ x/tokenomics/types/event.pb.go | 2063 ++++++++++ x/tokenomics/types/genesis.pb.go | 320 ++ x/tokenomics/types/params.pb.go | 759 ++++ x/tokenomics/types/query.pb.go | 531 +++ x/tokenomics/types/query.pb.gw.go | 153 + x/tokenomics/types/tx.pb.go | 1329 ++++++ x/tokenomics/types/types.pb.go | 1553 +++++++ 84 files changed, 64988 insertions(+) create mode 100644 api/poktroll/application/query_grpc.pb.go create mode 100644 api/poktroll/application/tx_grpc.pb.go create mode 100644 api/poktroll/gateway/query_grpc.pb.go create mode 100644 api/poktroll/gateway/tx_grpc.pb.go create mode 100644 api/poktroll/migration/query_grpc.pb.go create mode 100644 api/poktroll/migration/tx_grpc.pb.go create mode 100644 api/poktroll/migration/types.pulsar.go create mode 100644 api/poktroll/proof/query_grpc.pb.go create mode 100644 api/poktroll/proof/tx_grpc.pb.go create mode 100644 api/poktroll/service/query_grpc.pb.go create mode 100644 api/poktroll/service/tx_grpc.pb.go create mode 100644 api/poktroll/session/query_grpc.pb.go create mode 100644 api/poktroll/session/tx_grpc.pb.go create mode 100644 api/poktroll/shared/query_grpc.pb.go create mode 100644 api/poktroll/shared/tx_grpc.pb.go create mode 100644 api/poktroll/supplier/query_grpc.pb.go create mode 100644 api/poktroll/supplier/tx_grpc.pb.go create mode 100644 api/poktroll/tokenomics/query_grpc.pb.go create mode 100644 api/poktroll/tokenomics/tx_grpc.pb.go create mode 100644 cmd/poktrolld/cmd/migrate.go create mode 100644 cmd/poktrolld/cmd/migrate_test.go create mode 100644 proto/poktroll/migration/types.proto create mode 100644 x/application/types/event.pb.go create mode 100644 x/application/types/genesis.pb.go create mode 100644 x/application/types/params.pb.go create mode 100644 x/application/types/query.pb.go create mode 100644 x/application/types/query.pb.gw.go create mode 100644 x/application/types/tx.pb.go create mode 100644 x/application/types/types.pb.go create mode 100644 x/gateway/types/event.pb.go create mode 100644 x/gateway/types/genesis.pb.go create mode 100644 x/gateway/types/params.pb.go create mode 100644 x/gateway/types/query.pb.go create mode 100644 x/gateway/types/query.pb.gw.go create mode 100644 x/gateway/types/tx.pb.go create mode 100644 x/gateway/types/types.pb.go create mode 100644 x/migration/types/genesis.pb.go create mode 100644 x/migration/types/params.pb.go create mode 100644 x/migration/types/query.pb.go create mode 100644 x/migration/types/query.pb.gw.go create mode 100644 x/migration/types/tx.pb.go create mode 100644 x/migration/types/types.pb.go create mode 100644 x/proof/types/event.pb.go create mode 100644 x/proof/types/genesis.pb.go create mode 100644 x/proof/types/params.pb.go create mode 100644 x/proof/types/query.pb.go create mode 100644 x/proof/types/query.pb.gw.go create mode 100644 x/proof/types/tx.pb.go create mode 100644 x/proof/types/types.pb.go create mode 100644 x/service/types/event.pb.go create mode 100644 x/service/types/genesis.pb.go create mode 100644 x/service/types/params.pb.go create mode 100644 x/service/types/query.pb.go create mode 100644 x/service/types/query.pb.gw.go create mode 100644 x/service/types/relay.pb.go create mode 100644 x/service/types/relay_mining_difficulty.pb.go create mode 100644 x/service/types/tx.pb.go create mode 100644 x/session/types/genesis.pb.go create mode 100644 x/session/types/params.pb.go create mode 100644 x/session/types/query.pb.go create mode 100644 x/session/types/query.pb.gw.go create mode 100644 x/session/types/tx.pb.go create mode 100644 x/session/types/types.pb.go create mode 100644 x/shared/types/genesis.pb.go create mode 100644 x/shared/types/params.pb.go create mode 100644 x/shared/types/query.pb.go create mode 100644 x/shared/types/query.pb.gw.go create mode 100644 x/shared/types/service.pb.go create mode 100644 x/shared/types/supplier.pb.go create mode 100644 x/shared/types/tx.pb.go create mode 100644 x/supplier/types/event.pb.go create mode 100644 x/supplier/types/genesis.pb.go create mode 100644 x/supplier/types/params.pb.go create mode 100644 x/supplier/types/query.pb.go create mode 100644 x/supplier/types/query.pb.gw.go create mode 100644 x/supplier/types/tx.pb.go create mode 100644 x/tokenomics/types/event.pb.go create mode 100644 x/tokenomics/types/genesis.pb.go create mode 100644 x/tokenomics/types/params.pb.go create mode 100644 x/tokenomics/types/query.pb.go create mode 100644 x/tokenomics/types/query.pb.gw.go create mode 100644 x/tokenomics/types/tx.pb.go create mode 100644 x/tokenomics/types/types.pb.go diff --git a/api/poktroll/application/query_grpc.pb.go b/api/poktroll/application/query_grpc.pb.go new file mode 100644 index 000000000..38b436639 --- /dev/null +++ b/api/poktroll/application/query_grpc.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/application/query.proto + +package application + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.application.Query/Params" + Query_Application_FullMethodName = "/poktroll.application.Query/Application" + Query_AllApplications_FullMethodName = "/poktroll.application.Query/AllApplications" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Application items. + Application(ctx context.Context, in *QueryGetApplicationRequest, opts ...grpc.CallOption) (*QueryGetApplicationResponse, error) + AllApplications(ctx context.Context, in *QueryAllApplicationsRequest, opts ...grpc.CallOption) (*QueryAllApplicationsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Application(ctx context.Context, in *QueryGetApplicationRequest, opts ...grpc.CallOption) (*QueryGetApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetApplicationResponse) + err := c.cc.Invoke(ctx, Query_Application_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllApplications(ctx context.Context, in *QueryAllApplicationsRequest, opts ...grpc.CallOption) (*QueryAllApplicationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllApplicationsResponse) + err := c.cc.Invoke(ctx, Query_AllApplications_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Application items. + Application(context.Context, *QueryGetApplicationRequest) (*QueryGetApplicationResponse, error) + AllApplications(context.Context, *QueryAllApplicationsRequest) (*QueryAllApplicationsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Application(context.Context, *QueryGetApplicationRequest) (*QueryGetApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Application not implemented") +} +func (UnimplementedQueryServer) AllApplications(context.Context, *QueryAllApplicationsRequest) (*QueryAllApplicationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllApplications not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Application_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetApplicationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Application(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Application_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Application(ctx, req.(*QueryGetApplicationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllApplications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllApplicationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllApplications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllApplications_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllApplications(ctx, req.(*QueryAllApplicationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.application.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Application", + Handler: _Query_Application_Handler, + }, + { + MethodName: "AllApplications", + Handler: _Query_AllApplications_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/application/query.proto", +} diff --git a/api/poktroll/application/tx_grpc.pb.go b/api/poktroll/application/tx_grpc.pb.go new file mode 100644 index 000000000..536793ba9 --- /dev/null +++ b/api/poktroll/application/tx_grpc.pb.go @@ -0,0 +1,346 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/application/tx.proto + +package application + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.application.Msg/UpdateParams" + Msg_StakeApplication_FullMethodName = "/poktroll.application.Msg/StakeApplication" + Msg_UnstakeApplication_FullMethodName = "/poktroll.application.Msg/UnstakeApplication" + Msg_DelegateToGateway_FullMethodName = "/poktroll.application.Msg/DelegateToGateway" + Msg_UndelegateFromGateway_FullMethodName = "/poktroll.application.Msg/UndelegateFromGateway" + Msg_TransferApplication_FullMethodName = "/poktroll.application.Msg/TransferApplication" + Msg_UpdateParam_FullMethodName = "/poktroll.application.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeApplication(ctx context.Context, in *MsgStakeApplication, opts ...grpc.CallOption) (*MsgStakeApplicationResponse, error) + UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) + DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) + UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeApplication(ctx context.Context, in *MsgStakeApplication, opts ...grpc.CallOption) (*MsgStakeApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgStakeApplicationResponse) + err := c.cc.Invoke(ctx, Msg_StakeApplication_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUnstakeApplicationResponse) + err := c.cc.Invoke(ctx, Msg_UnstakeApplication_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgDelegateToGatewayResponse) + err := c.cc.Invoke(ctx, Msg_DelegateToGateway_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUndelegateFromGatewayResponse) + err := c.cc.Invoke(ctx, Msg_UndelegateFromGateway_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgTransferApplicationResponse) + err := c.cc.Invoke(ctx, Msg_TransferApplication_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeApplication(context.Context, *MsgStakeApplication) (*MsgStakeApplicationResponse, error) + UnstakeApplication(context.Context, *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) + DelegateToGateway(context.Context, *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) + UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) StakeApplication(context.Context, *MsgStakeApplication) (*MsgStakeApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeApplication not implemented") +} +func (UnimplementedMsgServer) UnstakeApplication(context.Context, *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeApplication not implemented") +} +func (UnimplementedMsgServer) DelegateToGateway(context.Context, *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateToGateway not implemented") +} +func (UnimplementedMsgServer) UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UndelegateFromGateway not implemented") +} +func (UnimplementedMsgServer) TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferApplication not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_StakeApplication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeApplication(ctx, req.(*MsgStakeApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnstakeApplication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeApplication(ctx, req.(*MsgUnstakeApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelegateToGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDelegateToGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelegateToGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DelegateToGateway_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelegateToGateway(ctx, req.(*MsgDelegateToGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UndelegateFromGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUndelegateFromGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UndelegateFromGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UndelegateFromGateway_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UndelegateFromGateway(ctx, req.(*MsgUndelegateFromGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TransferApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_TransferApplication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferApplication(ctx, req.(*MsgTransferApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.application.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeApplication", + Handler: _Msg_StakeApplication_Handler, + }, + { + MethodName: "UnstakeApplication", + Handler: _Msg_UnstakeApplication_Handler, + }, + { + MethodName: "DelegateToGateway", + Handler: _Msg_DelegateToGateway_Handler, + }, + { + MethodName: "UndelegateFromGateway", + Handler: _Msg_UndelegateFromGateway_Handler, + }, + { + MethodName: "TransferApplication", + Handler: _Msg_TransferApplication_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/application/tx.proto", +} diff --git a/api/poktroll/gateway/query_grpc.pb.go b/api/poktroll/gateway/query_grpc.pb.go new file mode 100644 index 000000000..d6106bde7 --- /dev/null +++ b/api/poktroll/gateway/query_grpc.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/gateway/query.proto + +package gateway + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.gateway.Query/Params" + Query_Gateway_FullMethodName = "/poktroll.gateway.Query/Gateway" + Query_AllGateways_FullMethodName = "/poktroll.gateway.Query/AllGateways" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Gateway items. + Gateway(ctx context.Context, in *QueryGetGatewayRequest, opts ...grpc.CallOption) (*QueryGetGatewayResponse, error) + AllGateways(ctx context.Context, in *QueryAllGatewaysRequest, opts ...grpc.CallOption) (*QueryAllGatewaysResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Gateway(ctx context.Context, in *QueryGetGatewayRequest, opts ...grpc.CallOption) (*QueryGetGatewayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetGatewayResponse) + err := c.cc.Invoke(ctx, Query_Gateway_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllGateways(ctx context.Context, in *QueryAllGatewaysRequest, opts ...grpc.CallOption) (*QueryAllGatewaysResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllGatewaysResponse) + err := c.cc.Invoke(ctx, Query_AllGateways_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Gateway items. + Gateway(context.Context, *QueryGetGatewayRequest) (*QueryGetGatewayResponse, error) + AllGateways(context.Context, *QueryAllGatewaysRequest) (*QueryAllGatewaysResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Gateway(context.Context, *QueryGetGatewayRequest) (*QueryGetGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Gateway not implemented") +} +func (UnimplementedQueryServer) AllGateways(context.Context, *QueryAllGatewaysRequest) (*QueryAllGatewaysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllGateways not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Gateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetGatewayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Gateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Gateway_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Gateway(ctx, req.(*QueryGetGatewayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllGateways_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllGatewaysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllGateways(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllGateways_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllGateways(ctx, req.(*QueryAllGatewaysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.gateway.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Gateway", + Handler: _Query_Gateway_Handler, + }, + { + MethodName: "AllGateways", + Handler: _Query_AllGateways_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/gateway/query.proto", +} diff --git a/api/poktroll/gateway/tx_grpc.pb.go b/api/poktroll/gateway/tx_grpc.pb.go new file mode 100644 index 000000000..e326d0d9f --- /dev/null +++ b/api/poktroll/gateway/tx_grpc.pb.go @@ -0,0 +1,232 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/gateway/tx.proto + +package gateway + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.gateway.Msg/UpdateParams" + Msg_StakeGateway_FullMethodName = "/poktroll.gateway.Msg/StakeGateway" + Msg_UnstakeGateway_FullMethodName = "/poktroll.gateway.Msg/UnstakeGateway" + Msg_UpdateParam_FullMethodName = "/poktroll.gateway.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeGateway(ctx context.Context, in *MsgStakeGateway, opts ...grpc.CallOption) (*MsgStakeGatewayResponse, error) + UnstakeGateway(ctx context.Context, in *MsgUnstakeGateway, opts ...grpc.CallOption) (*MsgUnstakeGatewayResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeGateway(ctx context.Context, in *MsgStakeGateway, opts ...grpc.CallOption) (*MsgStakeGatewayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgStakeGatewayResponse) + err := c.cc.Invoke(ctx, Msg_StakeGateway_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeGateway(ctx context.Context, in *MsgUnstakeGateway, opts ...grpc.CallOption) (*MsgUnstakeGatewayResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUnstakeGatewayResponse) + err := c.cc.Invoke(ctx, Msg_UnstakeGateway_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeGateway(context.Context, *MsgStakeGateway) (*MsgStakeGatewayResponse, error) + UnstakeGateway(context.Context, *MsgUnstakeGateway) (*MsgUnstakeGatewayResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) StakeGateway(context.Context, *MsgStakeGateway) (*MsgStakeGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeGateway not implemented") +} +func (UnimplementedMsgServer) UnstakeGateway(context.Context, *MsgUnstakeGateway) (*MsgUnstakeGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeGateway not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_StakeGateway_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeGateway(ctx, req.(*MsgStakeGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnstakeGateway_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeGateway(ctx, req.(*MsgUnstakeGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.gateway.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeGateway", + Handler: _Msg_StakeGateway_Handler, + }, + { + MethodName: "UnstakeGateway", + Handler: _Msg_UnstakeGateway_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/gateway/tx.proto", +} diff --git a/api/poktroll/migration/query_grpc.pb.go b/api/poktroll/migration/query_grpc.pb.go new file mode 100644 index 000000000..1fc079a50 --- /dev/null +++ b/api/poktroll/migration/query_grpc.pb.go @@ -0,0 +1,116 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/migration/query.proto + +package migration + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.migration.Query/Params" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.migration.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/migration/query.proto", +} diff --git a/api/poktroll/migration/tx_grpc.pb.go b/api/poktroll/migration/tx_grpc.pb.go new file mode 100644 index 000000000..555b607e6 --- /dev/null +++ b/api/poktroll/migration/tx_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/migration/tx.proto + +package migration + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.migration.Msg/UpdateParams" + Msg_UploadMorseState_FullMethodName = "/poktroll.migration.Msg/UploadMorseState" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUploadMorseStateResponse) + err := c.cc.Invoke(ctx, Msg_UploadMorseState_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadMorseState not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UploadMorseState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUploadMorseState) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UploadMorseState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UploadMorseState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UploadMorseState(ctx, req.(*MsgUploadMorseState)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.migration.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UploadMorseState", + Handler: _Msg_UploadMorseState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/migration/tx.proto", +} diff --git a/api/poktroll/migration/types.pulsar.go b/api/poktroll/migration/types.pulsar.go new file mode 100644 index 000000000..6262b5c6b --- /dev/null +++ b/api/poktroll/migration/types.pulsar.go @@ -0,0 +1,3651 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package migration + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sort "sort" + sync "sync" +) + +var _ protoreflect.List = (*_MorseAccount_3_list)(nil) + +type _MorseAccount_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MorseAccount_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MorseAccount_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MorseAccount_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MorseAccount_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MorseAccount_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MorseAccount_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MorseAccount_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MorseAccount_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MorseAccount protoreflect.MessageDescriptor + fd_MorseAccount_address protoreflect.FieldDescriptor + fd_MorseAccount_pub_key protoreflect.FieldDescriptor + fd_MorseAccount_coins protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_types_proto_init() + md_MorseAccount = File_poktroll_migration_types_proto.Messages().ByName("MorseAccount") + fd_MorseAccount_address = md_MorseAccount.Fields().ByName("address") + fd_MorseAccount_pub_key = md_MorseAccount.Fields().ByName("pub_key") + fd_MorseAccount_coins = md_MorseAccount.Fields().ByName("coins") +} + +var _ protoreflect.Message = (*fastReflection_MorseAccount)(nil) + +type fastReflection_MorseAccount MorseAccount + +func (x *MorseAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_MorseAccount)(x) +} + +func (x *MorseAccount) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_types_proto_msgTypes[0] + 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) +} + +var _fastReflection_MorseAccount_messageType fastReflection_MorseAccount_messageType +var _ protoreflect.MessageType = fastReflection_MorseAccount_messageType{} + +type fastReflection_MorseAccount_messageType struct{} + +func (x fastReflection_MorseAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_MorseAccount)(nil) +} +func (x fastReflection_MorseAccount_messageType) New() protoreflect.Message { + return new(fastReflection_MorseAccount) +} +func (x fastReflection_MorseAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MorseAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MorseAccount) Descriptor() protoreflect.MessageDescriptor { + return md_MorseAccount +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MorseAccount) Type() protoreflect.MessageType { + return _fastReflection_MorseAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MorseAccount) New() protoreflect.Message { + return new(fastReflection_MorseAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MorseAccount) Interface() protoreflect.ProtoMessage { + return (*MorseAccount)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MorseAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_MorseAccount_address, value) { + return + } + } + if x.PubKey != nil { + value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) + if !f(fd_MorseAccount_pub_key, value) { + return + } + } + if len(x.Coins) != 0 { + value := protoreflect.ValueOfList(&_MorseAccount_3_list{list: &x.Coins}) + if !f(fd_MorseAccount_coins, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MorseAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MorseAccount.address": + return len(x.Address) != 0 + case "poktroll.migration.MorseAccount.pub_key": + return x.PubKey != nil + case "poktroll.migration.MorseAccount.coins": + return len(x.Coins) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MorseAccount.address": + x.Address = nil + case "poktroll.migration.MorseAccount.pub_key": + x.PubKey = nil + case "poktroll.migration.MorseAccount.coins": + x.Coins = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MorseAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MorseAccount.address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MorseAccount.pub_key": + value := x.PubKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "poktroll.migration.MorseAccount.coins": + if len(x.Coins) == 0 { + return protoreflect.ValueOfList(&_MorseAccount_3_list{}) + } + listValue := &_MorseAccount_3_list{list: &x.Coins} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MorseAccount.address": + x.Address = value.Bytes() + case "poktroll.migration.MorseAccount.pub_key": + x.PubKey = value.Message().Interface().(*MorsePublicKey) + case "poktroll.migration.MorseAccount.coins": + lv := value.List() + clv := lv.(*_MorseAccount_3_list) + x.Coins = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseAccount.pub_key": + if x.PubKey == nil { + x.PubKey = new(MorsePublicKey) + } + return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) + case "poktroll.migration.MorseAccount.coins": + if x.Coins == nil { + x.Coins = []*v1beta1.Coin{} + } + value := &_MorseAccount_3_list{list: &x.Coins} + return protoreflect.ValueOfList(value) + case "poktroll.migration.MorseAccount.address": + panic(fmt.Errorf("field address of message poktroll.migration.MorseAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MorseAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseAccount.address": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MorseAccount.pub_key": + m := new(MorsePublicKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "poktroll.migration.MorseAccount.coins": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MorseAccount_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccount")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccount does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MorseAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MorseAccount", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MorseAccount) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccount) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MorseAccount) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MorseAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MorseAccount) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.PubKey != nil { + l = options.Size(x.PubKey) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Coins) > 0 { + for _, e := range x.Coins { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MorseAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Coins) > 0 { + for iNdEx := len(x.Coins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Coins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if x.PubKey != nil { + encoded, err := options.Marshal(x.PubKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MorseAccount) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.PubKey == nil { + x.PubKey = &MorsePublicKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Coins = append(x.Coins, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Coins[len(x.Coins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MorsePublicKey protoreflect.MessageDescriptor + fd_MorsePublicKey_type protoreflect.FieldDescriptor + fd_MorsePublicKey_value protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_types_proto_init() + md_MorsePublicKey = File_poktroll_migration_types_proto.Messages().ByName("MorsePublicKey") + fd_MorsePublicKey_type = md_MorsePublicKey.Fields().ByName("type") + fd_MorsePublicKey_value = md_MorsePublicKey.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_MorsePublicKey)(nil) + +type fastReflection_MorsePublicKey MorsePublicKey + +func (x *MorsePublicKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_MorsePublicKey)(x) +} + +func (x *MorsePublicKey) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_types_proto_msgTypes[1] + 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) +} + +var _fastReflection_MorsePublicKey_messageType fastReflection_MorsePublicKey_messageType +var _ protoreflect.MessageType = fastReflection_MorsePublicKey_messageType{} + +type fastReflection_MorsePublicKey_messageType struct{} + +func (x fastReflection_MorsePublicKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_MorsePublicKey)(nil) +} +func (x fastReflection_MorsePublicKey_messageType) New() protoreflect.Message { + return new(fastReflection_MorsePublicKey) +} +func (x fastReflection_MorsePublicKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MorsePublicKey +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MorsePublicKey) Descriptor() protoreflect.MessageDescriptor { + return md_MorsePublicKey +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MorsePublicKey) Type() protoreflect.MessageType { + return _fastReflection_MorsePublicKey_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MorsePublicKey) New() protoreflect.Message { + return new(fastReflection_MorsePublicKey) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MorsePublicKey) Interface() protoreflect.ProtoMessage { + return (*MorsePublicKey)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MorsePublicKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Type_ != "" { + value := protoreflect.ValueOfString(x.Type_) + if !f(fd_MorsePublicKey_type, value) { + return + } + } + if len(x.Value) != 0 { + value := protoreflect.ValueOfBytes(x.Value) + if !f(fd_MorsePublicKey_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MorsePublicKey) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MorsePublicKey.type": + return x.Type_ != "" + case "poktroll.migration.MorsePublicKey.value": + return len(x.Value) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorsePublicKey) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MorsePublicKey.type": + x.Type_ = "" + case "poktroll.migration.MorsePublicKey.value": + x.Value = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MorsePublicKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MorsePublicKey.type": + value := x.Type_ + return protoreflect.ValueOfString(value) + case "poktroll.migration.MorsePublicKey.value": + value := x.Value + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorsePublicKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MorsePublicKey.type": + x.Type_ = value.Interface().(string) + case "poktroll.migration.MorsePublicKey.value": + x.Value = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorsePublicKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorsePublicKey.type": + panic(fmt.Errorf("field type of message poktroll.migration.MorsePublicKey is not mutable")) + case "poktroll.migration.MorsePublicKey.value": + panic(fmt.Errorf("field value of message poktroll.migration.MorsePublicKey is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MorsePublicKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorsePublicKey.type": + return protoreflect.ValueOfString("") + case "poktroll.migration.MorsePublicKey.value": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorsePublicKey")) + } + panic(fmt.Errorf("message poktroll.migration.MorsePublicKey does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MorsePublicKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MorsePublicKey", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MorsePublicKey) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorsePublicKey) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MorsePublicKey) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MorsePublicKey) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MorsePublicKey) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Type_) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MorsePublicKey) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x12 + } + if len(x.Type_) > 0 { + i -= len(x.Type_) + copy(dAtA[i:], x.Type_) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MorsePublicKey) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorsePublicKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorsePublicKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Type_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) + if x.Value == nil { + x.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MorseApplication protoreflect.MessageDescriptor + fd_MorseApplication_address protoreflect.FieldDescriptor + fd_MorseApplication_public_key protoreflect.FieldDescriptor + fd_MorseApplication_jailed protoreflect.FieldDescriptor + fd_MorseApplication_status protoreflect.FieldDescriptor + fd_MorseApplication_staked_tokens protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_types_proto_init() + md_MorseApplication = File_poktroll_migration_types_proto.Messages().ByName("MorseApplication") + fd_MorseApplication_address = md_MorseApplication.Fields().ByName("address") + fd_MorseApplication_public_key = md_MorseApplication.Fields().ByName("public_key") + fd_MorseApplication_jailed = md_MorseApplication.Fields().ByName("jailed") + fd_MorseApplication_status = md_MorseApplication.Fields().ByName("status") + fd_MorseApplication_staked_tokens = md_MorseApplication.Fields().ByName("staked_tokens") +} + +var _ protoreflect.Message = (*fastReflection_MorseApplication)(nil) + +type fastReflection_MorseApplication MorseApplication + +func (x *MorseApplication) ProtoReflect() protoreflect.Message { + return (*fastReflection_MorseApplication)(x) +} + +func (x *MorseApplication) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_types_proto_msgTypes[2] + 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) +} + +var _fastReflection_MorseApplication_messageType fastReflection_MorseApplication_messageType +var _ protoreflect.MessageType = fastReflection_MorseApplication_messageType{} + +type fastReflection_MorseApplication_messageType struct{} + +func (x fastReflection_MorseApplication_messageType) Zero() protoreflect.Message { + return (*fastReflection_MorseApplication)(nil) +} +func (x fastReflection_MorseApplication_messageType) New() protoreflect.Message { + return new(fastReflection_MorseApplication) +} +func (x fastReflection_MorseApplication_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MorseApplication +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MorseApplication) Descriptor() protoreflect.MessageDescriptor { + return md_MorseApplication +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MorseApplication) Type() protoreflect.MessageType { + return _fastReflection_MorseApplication_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MorseApplication) New() protoreflect.Message { + return new(fastReflection_MorseApplication) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MorseApplication) Interface() protoreflect.ProtoMessage { + return (*MorseApplication)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MorseApplication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_MorseApplication_address, value) { + return + } + } + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) + if !f(fd_MorseApplication_public_key, value) { + return + } + } + if x.Jailed != false { + value := protoreflect.ValueOfBool(x.Jailed) + if !f(fd_MorseApplication_jailed, value) { + return + } + } + if x.Status != int32(0) { + value := protoreflect.ValueOfInt32(x.Status) + if !f(fd_MorseApplication_status, value) { + return + } + } + if x.StakedTokens != "" { + value := protoreflect.ValueOfString(x.StakedTokens) + if !f(fd_MorseApplication_staked_tokens, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MorseApplication) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MorseApplication.address": + return len(x.Address) != 0 + case "poktroll.migration.MorseApplication.public_key": + return len(x.PublicKey) != 0 + case "poktroll.migration.MorseApplication.jailed": + return x.Jailed != false + case "poktroll.migration.MorseApplication.status": + return x.Status != int32(0) + case "poktroll.migration.MorseApplication.staked_tokens": + return x.StakedTokens != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseApplication) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MorseApplication.address": + x.Address = nil + case "poktroll.migration.MorseApplication.public_key": + x.PublicKey = nil + case "poktroll.migration.MorseApplication.jailed": + x.Jailed = false + case "poktroll.migration.MorseApplication.status": + x.Status = int32(0) + case "poktroll.migration.MorseApplication.staked_tokens": + x.StakedTokens = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MorseApplication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MorseApplication.address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MorseApplication.public_key": + value := x.PublicKey + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MorseApplication.jailed": + value := x.Jailed + return protoreflect.ValueOfBool(value) + case "poktroll.migration.MorseApplication.status": + value := x.Status + return protoreflect.ValueOfInt32(value) + case "poktroll.migration.MorseApplication.staked_tokens": + value := x.StakedTokens + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseApplication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MorseApplication.address": + x.Address = value.Bytes() + case "poktroll.migration.MorseApplication.public_key": + x.PublicKey = value.Bytes() + case "poktroll.migration.MorseApplication.jailed": + x.Jailed = value.Bool() + case "poktroll.migration.MorseApplication.status": + x.Status = int32(value.Int()) + case "poktroll.migration.MorseApplication.staked_tokens": + x.StakedTokens = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseApplication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseApplication.address": + panic(fmt.Errorf("field address of message poktroll.migration.MorseApplication is not mutable")) + case "poktroll.migration.MorseApplication.public_key": + panic(fmt.Errorf("field public_key of message poktroll.migration.MorseApplication is not mutable")) + case "poktroll.migration.MorseApplication.jailed": + panic(fmt.Errorf("field jailed of message poktroll.migration.MorseApplication is not mutable")) + case "poktroll.migration.MorseApplication.status": + panic(fmt.Errorf("field status of message poktroll.migration.MorseApplication is not mutable")) + case "poktroll.migration.MorseApplication.staked_tokens": + panic(fmt.Errorf("field staked_tokens of message poktroll.migration.MorseApplication is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MorseApplication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseApplication.address": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MorseApplication.public_key": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MorseApplication.jailed": + return protoreflect.ValueOfBool(false) + case "poktroll.migration.MorseApplication.status": + return protoreflect.ValueOfInt32(int32(0)) + case "poktroll.migration.MorseApplication.staked_tokens": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseApplication")) + } + panic(fmt.Errorf("message poktroll.migration.MorseApplication does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MorseApplication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MorseApplication", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MorseApplication) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseApplication) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MorseApplication) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MorseApplication) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MorseApplication) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PublicKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Jailed { + n += 2 + } + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + l = len(x.StakedTokens) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MorseApplication) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.StakedTokens) > 0 { + i -= len(x.StakedTokens) + copy(dAtA[i:], x.StakedTokens) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StakedTokens))) + i-- + dAtA[i] = 0x32 + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x20 + } + if x.Jailed { + i-- + if x.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MorseApplication) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if x.PublicKey == nil { + x.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Status |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StakedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.StakedTokens = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MorseValidator protoreflect.MessageDescriptor + fd_MorseValidator_Address protoreflect.FieldDescriptor + fd_MorseValidator_PublicKey protoreflect.FieldDescriptor + fd_MorseValidator_jailed protoreflect.FieldDescriptor + fd_MorseValidator_status protoreflect.FieldDescriptor + fd_MorseValidator_StakedTokens protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_types_proto_init() + md_MorseValidator = File_poktroll_migration_types_proto.Messages().ByName("MorseValidator") + fd_MorseValidator_Address = md_MorseValidator.Fields().ByName("Address") + fd_MorseValidator_PublicKey = md_MorseValidator.Fields().ByName("PublicKey") + fd_MorseValidator_jailed = md_MorseValidator.Fields().ByName("jailed") + fd_MorseValidator_status = md_MorseValidator.Fields().ByName("status") + fd_MorseValidator_StakedTokens = md_MorseValidator.Fields().ByName("StakedTokens") +} + +var _ protoreflect.Message = (*fastReflection_MorseValidator)(nil) + +type fastReflection_MorseValidator MorseValidator + +func (x *MorseValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_MorseValidator)(x) +} + +func (x *MorseValidator) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_types_proto_msgTypes[3] + 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) +} + +var _fastReflection_MorseValidator_messageType fastReflection_MorseValidator_messageType +var _ protoreflect.MessageType = fastReflection_MorseValidator_messageType{} + +type fastReflection_MorseValidator_messageType struct{} + +func (x fastReflection_MorseValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_MorseValidator)(nil) +} +func (x fastReflection_MorseValidator_messageType) New() protoreflect.Message { + return new(fastReflection_MorseValidator) +} +func (x fastReflection_MorseValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MorseValidator +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MorseValidator) Descriptor() protoreflect.MessageDescriptor { + return md_MorseValidator +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MorseValidator) Type() protoreflect.MessageType { + return _fastReflection_MorseValidator_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MorseValidator) New() protoreflect.Message { + return new(fastReflection_MorseValidator) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MorseValidator) Interface() protoreflect.ProtoMessage { + return (*MorseValidator)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MorseValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_MorseValidator_Address, value) { + return + } + } + if len(x.PublicKey) != 0 { + value := protoreflect.ValueOfBytes(x.PublicKey) + if !f(fd_MorseValidator_PublicKey, value) { + return + } + } + if x.Jailed != false { + value := protoreflect.ValueOfBool(x.Jailed) + if !f(fd_MorseValidator_jailed, value) { + return + } + } + if x.Status != int32(0) { + value := protoreflect.ValueOfInt32(x.Status) + if !f(fd_MorseValidator_status, value) { + return + } + } + if x.StakedTokens != "" { + value := protoreflect.ValueOfString(x.StakedTokens) + if !f(fd_MorseValidator_StakedTokens, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MorseValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MorseValidator.Address": + return len(x.Address) != 0 + case "poktroll.migration.MorseValidator.PublicKey": + return len(x.PublicKey) != 0 + case "poktroll.migration.MorseValidator.jailed": + return x.Jailed != false + case "poktroll.migration.MorseValidator.status": + return x.Status != int32(0) + case "poktroll.migration.MorseValidator.StakedTokens": + return x.StakedTokens != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MorseValidator.Address": + x.Address = nil + case "poktroll.migration.MorseValidator.PublicKey": + x.PublicKey = nil + case "poktroll.migration.MorseValidator.jailed": + x.Jailed = false + case "poktroll.migration.MorseValidator.status": + x.Status = int32(0) + case "poktroll.migration.MorseValidator.StakedTokens": + x.StakedTokens = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MorseValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MorseValidator.Address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MorseValidator.PublicKey": + value := x.PublicKey + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MorseValidator.jailed": + value := x.Jailed + return protoreflect.ValueOfBool(value) + case "poktroll.migration.MorseValidator.status": + value := x.Status + return protoreflect.ValueOfInt32(value) + case "poktroll.migration.MorseValidator.StakedTokens": + value := x.StakedTokens + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MorseValidator.Address": + x.Address = value.Bytes() + case "poktroll.migration.MorseValidator.PublicKey": + x.PublicKey = value.Bytes() + case "poktroll.migration.MorseValidator.jailed": + x.Jailed = value.Bool() + case "poktroll.migration.MorseValidator.status": + x.Status = int32(value.Int()) + case "poktroll.migration.MorseValidator.StakedTokens": + x.StakedTokens = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseValidator.Address": + panic(fmt.Errorf("field Address of message poktroll.migration.MorseValidator is not mutable")) + case "poktroll.migration.MorseValidator.PublicKey": + panic(fmt.Errorf("field PublicKey of message poktroll.migration.MorseValidator is not mutable")) + case "poktroll.migration.MorseValidator.jailed": + panic(fmt.Errorf("field jailed of message poktroll.migration.MorseValidator is not mutable")) + case "poktroll.migration.MorseValidator.status": + panic(fmt.Errorf("field status of message poktroll.migration.MorseValidator is not mutable")) + case "poktroll.migration.MorseValidator.StakedTokens": + panic(fmt.Errorf("field StakedTokens of message poktroll.migration.MorseValidator is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MorseValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseValidator.Address": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MorseValidator.PublicKey": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MorseValidator.jailed": + return protoreflect.ValueOfBool(false) + case "poktroll.migration.MorseValidator.status": + return protoreflect.ValueOfInt32(int32(0)) + case "poktroll.migration.MorseValidator.StakedTokens": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseValidator")) + } + panic(fmt.Errorf("message poktroll.migration.MorseValidator does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MorseValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MorseValidator", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MorseValidator) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseValidator) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MorseValidator) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MorseValidator) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MorseValidator) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PublicKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Jailed { + n += 2 + } + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + l = len(x.StakedTokens) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MorseValidator) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.StakedTokens) > 0 { + i -= len(x.StakedTokens) + copy(dAtA[i:], x.StakedTokens) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StakedTokens))) + i-- + dAtA[i] = 0x3a + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x20 + } + if x.Jailed { + i-- + if x.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(x.PublicKey) > 0 { + i -= len(x.PublicKey) + copy(dAtA[i:], x.PublicKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MorseValidator) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if x.PublicKey == nil { + x.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Status |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StakedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.StakedTokens = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_MorseAccountState_1_map)(nil) + +type _MorseAccountState_1_map struct { + m *map[string]*MorseAccount +} + +func (x *_MorseAccountState_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MorseAccountState_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_MorseAccountState_1_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_MorseAccountState_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MorseAccountState_1_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MorseAccountState_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*MorseAccount) + (*x.m)[concreteKey] = concreteValue +} + +func (x *_MorseAccountState_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if ok { + return protoreflect.ValueOfMessage(v.ProtoReflect()) + } + newValue := new(MorseAccount) + (*x.m)[concreteKey] = newValue + return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +} + +func (x *_MorseAccountState_1_map) NewValue() protoreflect.Value { + v := new(MorseAccount) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MorseAccountState_1_map) IsValid() bool { + return x.m != nil +} + +var ( + md_MorseAccountState protoreflect.MessageDescriptor + fd_MorseAccountState_accounts protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_types_proto_init() + md_MorseAccountState = File_poktroll_migration_types_proto.Messages().ByName("MorseAccountState") + fd_MorseAccountState_accounts = md_MorseAccountState.Fields().ByName("accounts") +} + +var _ protoreflect.Message = (*fastReflection_MorseAccountState)(nil) + +type fastReflection_MorseAccountState MorseAccountState + +func (x *MorseAccountState) ProtoReflect() protoreflect.Message { + return (*fastReflection_MorseAccountState)(x) +} + +func (x *MorseAccountState) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_types_proto_msgTypes[4] + 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) +} + +var _fastReflection_MorseAccountState_messageType fastReflection_MorseAccountState_messageType +var _ protoreflect.MessageType = fastReflection_MorseAccountState_messageType{} + +type fastReflection_MorseAccountState_messageType struct{} + +func (x fastReflection_MorseAccountState_messageType) Zero() protoreflect.Message { + return (*fastReflection_MorseAccountState)(nil) +} +func (x fastReflection_MorseAccountState_messageType) New() protoreflect.Message { + return new(fastReflection_MorseAccountState) +} +func (x fastReflection_MorseAccountState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MorseAccountState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MorseAccountState) Descriptor() protoreflect.MessageDescriptor { + return md_MorseAccountState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MorseAccountState) Type() protoreflect.MessageType { + return _fastReflection_MorseAccountState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MorseAccountState) New() protoreflect.Message { + return new(fastReflection_MorseAccountState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MorseAccountState) Interface() protoreflect.ProtoMessage { + return (*MorseAccountState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MorseAccountState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfMap(&_MorseAccountState_1_map{m: &x.Accounts}) + if !f(fd_MorseAccountState_accounts, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MorseAccountState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + return len(x.Accounts) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccountState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + x.Accounts = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MorseAccountState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfMap(&_MorseAccountState_1_map{}) + } + mapValue := &_MorseAccountState_1_map{m: &x.Accounts} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccountState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + mv := value.Map() + cmv := mv.(*_MorseAccountState_1_map) + x.Accounts = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccountState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + if x.Accounts == nil { + x.Accounts = make(map[string]*MorseAccount) + } + value := &_MorseAccountState_1_map{m: &x.Accounts} + return protoreflect.ValueOfMap(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MorseAccountState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MorseAccountState.accounts": + m := make(map[string]*MorseAccount) + return protoreflect.ValueOfMap(&_MorseAccountState_1_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MorseAccountState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MorseAccountState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MorseAccountState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MorseAccountState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MorseAccountState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MorseAccountState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MorseAccountState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MorseAccountState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Accounts) > 0 { + SiZeMaP := func(k string, v *MorseAccount) { + l := 0 + if v != nil { + l = options.Size(v) + } + l += 1 + runtime.Sov(uint64(l)) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Accounts)) + for k := range x.Accounts { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Accounts[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Accounts { + SiZeMaP(k, v) + } + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MorseAccountState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Accounts) > 0 { + MaRsHaLmAp := func(k string, v *MorseAccount) (protoiface.MarshalOutput, error) { + baseI := i + encoded, err := options.Marshal(v) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForAccounts := make([]string, 0, len(x.Accounts)) + for k := range x.Accounts { + keysForAccounts = append(keysForAccounts, string(k)) + } + sort.Slice(keysForAccounts, func(i, j int) bool { + return keysForAccounts[i] < keysForAccounts[j] + }) + for iNdEx := len(keysForAccounts) - 1; iNdEx >= 0; iNdEx-- { + v := x.Accounts[string(keysForAccounts[iNdEx])] + out, err := MaRsHaLmAp(keysForAccounts[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Accounts { + v := x.Accounts[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MorseAccountState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseAccountState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MorseAccountState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Accounts == nil { + x.Accounts = make(map[string]*MorseAccount) + } + var mapkey string + var mapvalue *MorseAccount + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &MorseAccount{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Accounts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: poktroll/migration/types.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MorseAccount defines a base account type. It contains all the necessary fields +// for basic account functionality. Any custom account type should extend this +// type for additional functionality (e.g. vesting). +type MorseAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TODO_IN_THIS_COMMIT: update gogoproto.casttype option... + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + PubKey *MorsePublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + Coins []*v1beta1.Coin `protobuf:"bytes,3,rep,name=coins,proto3" json:"coins,omitempty"` +} + +func (x *MorseAccount) Reset() { + *x = MorseAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorseAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorseAccount) ProtoMessage() {} + +// Deprecated: Use MorseAccount.ProtoReflect.Descriptor instead. +func (*MorseAccount) Descriptor() ([]byte, []int) { + return file_poktroll_migration_types_proto_rawDescGZIP(), []int{0} +} + +func (x *MorseAccount) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *MorseAccount) GetPubKey() *MorsePublicKey { + if x != nil { + return x.PubKey + } + return nil +} + +func (x *MorseAccount) GetCoins() []*v1beta1.Coin { + if x != nil { + return x.Coins + } + return nil +} + +type MorsePublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *MorsePublicKey) Reset() { + *x = MorsePublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorsePublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorsePublicKey) ProtoMessage() {} + +// Deprecated: Use MorsePublicKey.ProtoReflect.Descriptor instead. +func (*MorsePublicKey) Descriptor() ([]byte, []int) { + return file_poktroll_migration_types_proto_rawDescGZIP(), []int{1} +} + +func (x *MorsePublicKey) GetType_() string { + if x != nil { + return x.Type_ + } + return "" +} + +func (x *MorsePublicKey) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// MorseApplication defines the total amount of bond shares and their exchange rate to +// coins. Slashing results in a decrease in the exchange rate, allowing correct +// calculation of future undelegations without iterating over delegators. +// When coins are delegated to this validator, the validator is credited with a +// delegation whose number of bond shares is based on the amount of coins +// delegated divided by the current exchange rate. Voting power can be +// calculated as total bonded shares multiplied by exchange rate. +type MorseApplication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` + // repeated string chains = 5 [ + // + // (gogoproto.jsontag) = "chains", + // (gogoproto.moretags) = "yaml:\"chains\""]; + StakedTokens string `protobuf:"bytes,6,opt,name=staked_tokens,json=stakedTokens,proto3" json:"staked_tokens,omitempty"` //[ +} + +func (x *MorseApplication) Reset() { + *x = MorseApplication{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorseApplication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorseApplication) ProtoMessage() {} + +// Deprecated: Use MorseApplication.ProtoReflect.Descriptor instead. +func (*MorseApplication) Descriptor() ([]byte, []int) { + return file_poktroll_migration_types_proto_rawDescGZIP(), []int{2} +} + +func (x *MorseApplication) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *MorseApplication) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MorseApplication) GetJailed() bool { + if x != nil { + return x.Jailed + } + return false +} + +func (x *MorseApplication) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MorseApplication) GetStakedTokens() string { + if x != nil { + return x.StakedTokens + } + return "" +} + +type MorseValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed,omitempty"` + Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` + // repeated string Chains = 5 [(gogoproto.jsontag) = "chains"]; + // string ServiceURL = 6 [(gogoproto.jsontag) = "service_url"]; + // string StakedTokens = 7 [(gogoproto.customtype) = "github.com/pokt-network/pocket-core/types.BigInt", (gogoproto.jsontag) = "tokens", (gogoproto.nullable) = false]; + StakedTokens string `protobuf:"bytes,7,opt,name=StakedTokens,proto3" json:"StakedTokens,omitempty"` +} + +func (x *MorseValidator) Reset() { + *x = MorseValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorseValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorseValidator) ProtoMessage() {} + +// Deprecated: Use MorseValidator.ProtoReflect.Descriptor instead. +func (*MorseValidator) Descriptor() ([]byte, []int) { + return file_poktroll_migration_types_proto_rawDescGZIP(), []int{3} +} + +func (x *MorseValidator) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *MorseValidator) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MorseValidator) GetJailed() bool { + if x != nil { + return x.Jailed + } + return false +} + +func (x *MorseValidator) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MorseValidator) GetStakedTokens() string { + if x != nil { + return x.StakedTokens + } + return "" +} + +type MorseAccountState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Accounts map[string]*MorseAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *MorseAccountState) Reset() { + *x = MorseAccountState{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorseAccountState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorseAccountState) ProtoMessage() {} + +// Deprecated: Use MorseAccountState.ProtoReflect.Descriptor instead. +func (*MorseAccountState) Descriptor() ([]byte, []int) { + return file_poktroll_migration_types_proto_rawDescGZIP(), []int{4} +} + +func (x *MorseAccountState) GetAccounts() map[string]*MorseAccount { + if x != nil { + return x.Accounts + } + return nil +} + +var File_poktroll_migration_types_proto protoreflect.FileDescriptor + +var file_poktroll_migration_types_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x02, 0x0a, 0x0c, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3a, 0xea, 0xde, 0x1f, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0xfa, 0xde, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x07, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x42, 0x23, 0xea, 0xde, 0x1f, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, + 0x0a, 0x05, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x17, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x01, 0x88, + 0xa2, 0x1f, 0x01, 0xca, 0xb4, 0x2d, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x58, + 0x0a, 0x0e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x1c, 0xfa, 0xde, 0x1f, 0x18, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, + 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd7, 0x02, 0x0a, 0x10, 0x4d, 0x6f, 0x72, + 0x73, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x4c, + 0xea, 0xde, 0x1f, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x0e, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xfa, 0xde, 0x1f, + 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x23, 0xea, 0xde, 0x1f, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x6a, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1b, 0xea, 0xde, 0x1f, 0x06, 0x6a, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6a, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x1b, + 0xea, 0xde, 0x1f, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0xc5, 0x02, 0x0a, 0x0e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x66, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x4c, 0xea, 0xde, 0x1f, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0xfa, 0xde, 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, + 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x23, 0xea, 0xde, 0x1f, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x52, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x22, 0x0a, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x0a, 0xea, 0xde, 0x1f, 0x06, 0x6a, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x06, 0x6a, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x0a, 0xea, 0xde, 0x1f, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, + 0xea, 0xde, 0x1f, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x0c, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x3a, 0x10, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, + 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x01, 0x98, 0xa1, 0x1f, 0x01, 0x22, 0xc3, 0x01, 0x0a, 0x11, 0x4d, + 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x1a, 0x5d, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0xb6, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x12, + 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0xe2, 0x02, 0x1e, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, + 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_poktroll_migration_types_proto_rawDescOnce sync.Once + file_poktroll_migration_types_proto_rawDescData = file_poktroll_migration_types_proto_rawDesc +) + +func file_poktroll_migration_types_proto_rawDescGZIP() []byte { + file_poktroll_migration_types_proto_rawDescOnce.Do(func() { + file_poktroll_migration_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_poktroll_migration_types_proto_rawDescData) + }) + return file_poktroll_migration_types_proto_rawDescData +} + +var file_poktroll_migration_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_poktroll_migration_types_proto_goTypes = []interface{}{ + (*MorseAccount)(nil), // 0: poktroll.migration.MorseAccount + (*MorsePublicKey)(nil), // 1: poktroll.migration.MorsePublicKey + (*MorseApplication)(nil), // 2: poktroll.migration.MorseApplication + (*MorseValidator)(nil), // 3: poktroll.migration.MorseValidator + (*MorseAccountState)(nil), // 4: poktroll.migration.MorseAccountState + nil, // 5: poktroll.migration.MorseAccountState.AccountsEntry + (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin +} +var file_poktroll_migration_types_proto_depIdxs = []int32{ + 1, // 0: poktroll.migration.MorseAccount.pub_key:type_name -> poktroll.migration.MorsePublicKey + 6, // 1: poktroll.migration.MorseAccount.coins:type_name -> cosmos.base.v1beta1.Coin + 5, // 2: poktroll.migration.MorseAccountState.accounts:type_name -> poktroll.migration.MorseAccountState.AccountsEntry + 0, // 3: poktroll.migration.MorseAccountState.AccountsEntry.value:type_name -> poktroll.migration.MorseAccount + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_poktroll_migration_types_proto_init() } +func file_poktroll_migration_types_proto_init() { + if File_poktroll_migration_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_poktroll_migration_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorseAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorsePublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorseApplication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorseValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorseAccountState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_poktroll_migration_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_poktroll_migration_types_proto_goTypes, + DependencyIndexes: file_poktroll_migration_types_proto_depIdxs, + MessageInfos: file_poktroll_migration_types_proto_msgTypes, + }.Build() + File_poktroll_migration_types_proto = out.File + file_poktroll_migration_types_proto_rawDesc = nil + file_poktroll_migration_types_proto_goTypes = nil + file_poktroll_migration_types_proto_depIdxs = nil +} diff --git a/api/poktroll/proof/query_grpc.pb.go b/api/poktroll/proof/query_grpc.pb.go new file mode 100644 index 000000000..aa2dc91eb --- /dev/null +++ b/api/poktroll/proof/query_grpc.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/proof/query.proto + +package proof + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.proof.Query/Params" + Query_Claim_FullMethodName = "/poktroll.proof.Query/Claim" + Query_AllClaims_FullMethodName = "/poktroll.proof.Query/AllClaims" + Query_Proof_FullMethodName = "/poktroll.proof.Query/Proof" + Query_AllProofs_FullMethodName = "/poktroll.proof.Query/AllProofs" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Claim items. + Claim(ctx context.Context, in *QueryGetClaimRequest, opts ...grpc.CallOption) (*QueryGetClaimResponse, error) + AllClaims(ctx context.Context, in *QueryAllClaimsRequest, opts ...grpc.CallOption) (*QueryAllClaimsResponse, error) + // Queries a list of Proof items. + Proof(ctx context.Context, in *QueryGetProofRequest, opts ...grpc.CallOption) (*QueryGetProofResponse, error) + AllProofs(ctx context.Context, in *QueryAllProofsRequest, opts ...grpc.CallOption) (*QueryAllProofsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Claim(ctx context.Context, in *QueryGetClaimRequest, opts ...grpc.CallOption) (*QueryGetClaimResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetClaimResponse) + err := c.cc.Invoke(ctx, Query_Claim_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllClaims(ctx context.Context, in *QueryAllClaimsRequest, opts ...grpc.CallOption) (*QueryAllClaimsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllClaimsResponse) + err := c.cc.Invoke(ctx, Query_AllClaims_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proof(ctx context.Context, in *QueryGetProofRequest, opts ...grpc.CallOption) (*QueryGetProofResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetProofResponse) + err := c.cc.Invoke(ctx, Query_Proof_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProofs(ctx context.Context, in *QueryAllProofsRequest, opts ...grpc.CallOption) (*QueryAllProofsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllProofsResponse) + err := c.cc.Invoke(ctx, Query_AllProofs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Claim items. + Claim(context.Context, *QueryGetClaimRequest) (*QueryGetClaimResponse, error) + AllClaims(context.Context, *QueryAllClaimsRequest) (*QueryAllClaimsResponse, error) + // Queries a list of Proof items. + Proof(context.Context, *QueryGetProofRequest) (*QueryGetProofResponse, error) + AllProofs(context.Context, *QueryAllProofsRequest) (*QueryAllProofsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Claim(context.Context, *QueryGetClaimRequest) (*QueryGetClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") +} +func (UnimplementedQueryServer) AllClaims(context.Context, *QueryAllClaimsRequest) (*QueryAllClaimsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllClaims not implemented") +} +func (UnimplementedQueryServer) Proof(context.Context, *QueryGetProofRequest) (*QueryGetProofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proof not implemented") +} +func (UnimplementedQueryServer) AllProofs(context.Context, *QueryAllProofsRequest) (*QueryAllProofsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProofs not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetClaimRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Claim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Claim_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Claim(ctx, req.(*QueryGetClaimRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllClaims_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllClaimsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllClaims(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllClaims_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllClaims(ctx, req.(*QueryAllClaimsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Proof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetProofRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Proof(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Proof_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Proof(ctx, req.(*QueryGetProofRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProofs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProofsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProofs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllProofs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProofs(ctx, req.(*QueryAllProofsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.proof.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Claim", + Handler: _Query_Claim_Handler, + }, + { + MethodName: "AllClaims", + Handler: _Query_AllClaims_Handler, + }, + { + MethodName: "Proof", + Handler: _Query_Proof_Handler, + }, + { + MethodName: "AllProofs", + Handler: _Query_AllProofs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/proof/query.proto", +} diff --git a/api/poktroll/proof/tx_grpc.pb.go b/api/poktroll/proof/tx_grpc.pb.go new file mode 100644 index 000000000..51c26c023 --- /dev/null +++ b/api/poktroll/proof/tx_grpc.pb.go @@ -0,0 +1,232 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/proof/tx.proto + +package proof + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.proof.Msg/UpdateParams" + Msg_CreateClaim_FullMethodName = "/poktroll.proof.Msg/CreateClaim" + Msg_SubmitProof_FullMethodName = "/poktroll.proof.Msg/SubmitProof" + Msg_UpdateParam_FullMethodName = "/poktroll.proof.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateClaim(ctx context.Context, in *MsgCreateClaim, opts ...grpc.CallOption) (*MsgCreateClaimResponse, error) + SubmitProof(ctx context.Context, in *MsgSubmitProof, opts ...grpc.CallOption) (*MsgSubmitProofResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateClaim(ctx context.Context, in *MsgCreateClaim, opts ...grpc.CallOption) (*MsgCreateClaimResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateClaimResponse) + err := c.cc.Invoke(ctx, Msg_CreateClaim_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitProof(ctx context.Context, in *MsgSubmitProof, opts ...grpc.CallOption) (*MsgSubmitProofResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgSubmitProofResponse) + err := c.cc.Invoke(ctx, Msg_SubmitProof_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + CreateClaim(context.Context, *MsgCreateClaim) (*MsgCreateClaimResponse, error) + SubmitProof(context.Context, *MsgSubmitProof) (*MsgSubmitProofResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) CreateClaim(context.Context, *MsgCreateClaim) (*MsgCreateClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateClaim not implemented") +} +func (UnimplementedMsgServer) SubmitProof(context.Context, *MsgSubmitProof) (*MsgSubmitProofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitProof not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateClaim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateClaim_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateClaim(ctx, req.(*MsgCreateClaim)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitProof) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitProof(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SubmitProof_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitProof(ctx, req.(*MsgSubmitProof)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.proof.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CreateClaim", + Handler: _Msg_CreateClaim_Handler, + }, + { + MethodName: "SubmitProof", + Handler: _Msg_SubmitProof_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/proof/tx.proto", +} diff --git a/api/poktroll/service/query_grpc.pb.go b/api/poktroll/service/query_grpc.pb.go new file mode 100644 index 000000000..99ea067f5 --- /dev/null +++ b/api/poktroll/service/query_grpc.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/service/query.proto + +package service + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.service.Query/Params" + Query_Service_FullMethodName = "/poktroll.service.Query/Service" + Query_AllServices_FullMethodName = "/poktroll.service.Query/AllServices" + Query_RelayMiningDifficulty_FullMethodName = "/poktroll.service.Query/RelayMiningDifficulty" + Query_RelayMiningDifficultyAll_FullMethodName = "/poktroll.service.Query/RelayMiningDifficultyAll" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Service items. + Service(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error) + AllServices(ctx context.Context, in *QueryAllServicesRequest, opts ...grpc.CallOption) (*QueryAllServicesResponse, error) + // Queries a list of RelayMiningDifficulty items. + RelayMiningDifficulty(ctx context.Context, in *QueryGetRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryGetRelayMiningDifficultyResponse, error) + RelayMiningDifficultyAll(ctx context.Context, in *QueryAllRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryAllRelayMiningDifficultyResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Service(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetServiceResponse) + err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllServices(ctx context.Context, in *QueryAllServicesRequest, opts ...grpc.CallOption) (*QueryAllServicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllServicesResponse) + err := c.cc.Invoke(ctx, Query_AllServices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RelayMiningDifficulty(ctx context.Context, in *QueryGetRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryGetRelayMiningDifficultyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetRelayMiningDifficultyResponse) + err := c.cc.Invoke(ctx, Query_RelayMiningDifficulty_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RelayMiningDifficultyAll(ctx context.Context, in *QueryAllRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryAllRelayMiningDifficultyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllRelayMiningDifficultyResponse) + err := c.cc.Invoke(ctx, Query_RelayMiningDifficultyAll_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Service items. + Service(context.Context, *QueryGetServiceRequest) (*QueryGetServiceResponse, error) + AllServices(context.Context, *QueryAllServicesRequest) (*QueryAllServicesResponse, error) + // Queries a list of RelayMiningDifficulty items. + RelayMiningDifficulty(context.Context, *QueryGetRelayMiningDifficultyRequest) (*QueryGetRelayMiningDifficultyResponse, error) + RelayMiningDifficultyAll(context.Context, *QueryAllRelayMiningDifficultyRequest) (*QueryAllRelayMiningDifficultyResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Service(context.Context, *QueryGetServiceRequest) (*QueryGetServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") +} +func (UnimplementedQueryServer) AllServices(context.Context, *QueryAllServicesRequest) (*QueryAllServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllServices not implemented") +} +func (UnimplementedQueryServer) RelayMiningDifficulty(context.Context, *QueryGetRelayMiningDifficultyRequest) (*QueryGetRelayMiningDifficultyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RelayMiningDifficulty not implemented") +} +func (UnimplementedQueryServer) RelayMiningDifficultyAll(context.Context, *QueryAllRelayMiningDifficultyRequest) (*QueryAllRelayMiningDifficultyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RelayMiningDifficultyAll not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Service(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Service_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Service(ctx, req.(*QueryGetServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllServices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllServices(ctx, req.(*QueryAllServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RelayMiningDifficulty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetRelayMiningDifficultyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RelayMiningDifficulty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RelayMiningDifficulty_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RelayMiningDifficulty(ctx, req.(*QueryGetRelayMiningDifficultyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RelayMiningDifficultyAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllRelayMiningDifficultyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RelayMiningDifficultyAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RelayMiningDifficultyAll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RelayMiningDifficultyAll(ctx, req.(*QueryAllRelayMiningDifficultyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.service.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Service", + Handler: _Query_Service_Handler, + }, + { + MethodName: "AllServices", + Handler: _Query_AllServices_Handler, + }, + { + MethodName: "RelayMiningDifficulty", + Handler: _Query_RelayMiningDifficulty_Handler, + }, + { + MethodName: "RelayMiningDifficultyAll", + Handler: _Query_RelayMiningDifficultyAll_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/service/query.proto", +} diff --git a/api/poktroll/service/tx_grpc.pb.go b/api/poktroll/service/tx_grpc.pb.go new file mode 100644 index 000000000..45f7d6418 --- /dev/null +++ b/api/poktroll/service/tx_grpc.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/service/tx.proto + +package service + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.service.Msg/UpdateParams" + Msg_UpdateParam_FullMethodName = "/poktroll.service.Msg/UpdateParam" + Msg_AddService_FullMethodName = "/poktroll.service.Msg/AddService" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) + AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgAddServiceResponse) + err := c.cc.Invoke(ctx, Msg_AddService_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddService) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_AddService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddService(ctx, req.(*MsgAddService)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.service.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + { + MethodName: "AddService", + Handler: _Msg_AddService_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/service/tx.proto", +} diff --git a/api/poktroll/session/query_grpc.pb.go b/api/poktroll/session/query_grpc.pb.go new file mode 100644 index 000000000..ea6063319 --- /dev/null +++ b/api/poktroll/session/query_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/session/query.proto + +package session + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.session.Query/Params" + Query_GetSession_FullMethodName = "/poktroll.session.Query/GetSession" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries the session given app_address, service and block_height. + GetSession(ctx context.Context, in *QueryGetSessionRequest, opts ...grpc.CallOption) (*QueryGetSessionResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetSession(ctx context.Context, in *QueryGetSessionRequest, opts ...grpc.CallOption) (*QueryGetSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetSessionResponse) + err := c.cc.Invoke(ctx, Query_GetSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries the session given app_address, service and block_height. + GetSession(context.Context, *QueryGetSessionRequest) (*QueryGetSessionResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) GetSession(context.Context, *QueryGetSessionRequest) (*QueryGetSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetSession(ctx, req.(*QueryGetSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.session.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "GetSession", + Handler: _Query_GetSession_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/session/query.proto", +} diff --git a/api/poktroll/session/tx_grpc.pb.go b/api/poktroll/session/tx_grpc.pb.go new file mode 100644 index 000000000..1a6c46c28 --- /dev/null +++ b/api/poktroll/session/tx_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/session/tx.proto + +package session + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.session.Msg/UpdateParams" + Msg_UpdateParam_FullMethodName = "/poktroll.session.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.session.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/session/tx.proto", +} diff --git a/api/poktroll/shared/query_grpc.pb.go b/api/poktroll/shared/query_grpc.pb.go new file mode 100644 index 000000000..95d4fc364 --- /dev/null +++ b/api/poktroll/shared/query_grpc.pb.go @@ -0,0 +1,116 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/shared/query.proto + +package shared + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.shared.Query/Params" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.shared.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/shared/query.proto", +} diff --git a/api/poktroll/shared/tx_grpc.pb.go b/api/poktroll/shared/tx_grpc.pb.go new file mode 100644 index 000000000..19e2023a9 --- /dev/null +++ b/api/poktroll/shared/tx_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/shared/tx.proto + +package shared + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.shared.Msg/UpdateParams" + Msg_UpdateParam_FullMethodName = "/poktroll.shared.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.shared.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/shared/tx.proto", +} diff --git a/api/poktroll/supplier/query_grpc.pb.go b/api/poktroll/supplier/query_grpc.pb.go new file mode 100644 index 000000000..aa83f20ec --- /dev/null +++ b/api/poktroll/supplier/query_grpc.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/supplier/query.proto + +package supplier + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.supplier.Query/Params" + Query_Supplier_FullMethodName = "/poktroll.supplier.Query/Supplier" + Query_AllSuppliers_FullMethodName = "/poktroll.supplier.Query/AllSuppliers" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Supplier items. + Supplier(ctx context.Context, in *QueryGetSupplierRequest, opts ...grpc.CallOption) (*QueryGetSupplierResponse, error) + AllSuppliers(ctx context.Context, in *QueryAllSuppliersRequest, opts ...grpc.CallOption) (*QueryAllSuppliersResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Supplier(ctx context.Context, in *QueryGetSupplierRequest, opts ...grpc.CallOption) (*QueryGetSupplierResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetSupplierResponse) + err := c.cc.Invoke(ctx, Query_Supplier_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllSuppliers(ctx context.Context, in *QueryAllSuppliersRequest, opts ...grpc.CallOption) (*QueryAllSuppliersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryAllSuppliersResponse) + err := c.cc.Invoke(ctx, Query_AllSuppliers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Supplier items. + Supplier(context.Context, *QueryGetSupplierRequest) (*QueryGetSupplierResponse, error) + AllSuppliers(context.Context, *QueryAllSuppliersRequest) (*QueryAllSuppliersResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) Supplier(context.Context, *QueryGetSupplierRequest) (*QueryGetSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Supplier not implemented") +} +func (UnimplementedQueryServer) AllSuppliers(context.Context, *QueryAllSuppliersRequest) (*QueryAllSuppliersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllSuppliers not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Supplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSupplierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Supplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Supplier_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Supplier(ctx, req.(*QueryGetSupplierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllSuppliers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllSuppliersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllSuppliers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllSuppliers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllSuppliers(ctx, req.(*QueryAllSuppliersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.supplier.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Supplier", + Handler: _Query_Supplier_Handler, + }, + { + MethodName: "AllSuppliers", + Handler: _Query_AllSuppliers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/supplier/query.proto", +} diff --git a/api/poktroll/supplier/tx_grpc.pb.go b/api/poktroll/supplier/tx_grpc.pb.go new file mode 100644 index 000000000..1e175c012 --- /dev/null +++ b/api/poktroll/supplier/tx_grpc.pb.go @@ -0,0 +1,232 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/supplier/tx.proto + +package supplier + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.supplier.Msg/UpdateParams" + Msg_StakeSupplier_FullMethodName = "/poktroll.supplier.Msg/StakeSupplier" + Msg_UnstakeSupplier_FullMethodName = "/poktroll.supplier.Msg/UnstakeSupplier" + Msg_UpdateParam_FullMethodName = "/poktroll.supplier.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) + UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgStakeSupplierResponse) + err := c.cc.Invoke(ctx, Msg_StakeSupplier_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUnstakeSupplierResponse) + err := c.cc.Invoke(ctx, Msg_UnstakeSupplier_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeSupplier(context.Context, *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) + UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) StakeSupplier(context.Context, *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeSupplier not implemented") +} +func (UnimplementedMsgServer) UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeSupplier not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeSupplier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeSupplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_StakeSupplier_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeSupplier(ctx, req.(*MsgStakeSupplier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeSupplier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeSupplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnstakeSupplier_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeSupplier(ctx, req.(*MsgUnstakeSupplier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.supplier.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeSupplier", + Handler: _Msg_StakeSupplier_Handler, + }, + { + MethodName: "UnstakeSupplier", + Handler: _Msg_UnstakeSupplier_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/supplier/tx.proto", +} diff --git a/api/poktroll/tokenomics/query_grpc.pb.go b/api/poktroll/tokenomics/query_grpc.pb.go new file mode 100644 index 000000000..f12dade48 --- /dev/null +++ b/api/poktroll/tokenomics/query_grpc.pb.go @@ -0,0 +1,116 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/tokenomics/query.proto + +package tokenomics + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Query_Params_FullMethodName = "/poktroll.tokenomics.Query/Params" +) + +// QueryClient is the client API for Query 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. +// +// Query defines the gRPC querier service. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +// +// Query defines the gRPC querier service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.tokenomics.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/tokenomics/query.proto", +} diff --git a/api/poktroll/tokenomics/tx_grpc.pb.go b/api/poktroll/tokenomics/tx_grpc.pb.go new file mode 100644 index 000000000..307e37b0b --- /dev/null +++ b/api/poktroll/tokenomics/tx_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: poktroll/tokenomics/tx.proto + +package tokenomics + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_UpdateParams_FullMethodName = "/poktroll.tokenomics.Msg/UpdateParams" + Msg_UpdateParam_FullMethodName = "/poktroll.tokenomics.Msg/UpdateParam" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the Msg service. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +// +// Msg defines the Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.tokenomics.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/tokenomics/tx.proto", +} diff --git a/cmd/poktrolld/cmd/commands.go b/cmd/poktrolld/cmd/commands.go index 7792e07f7..e47fc0162 100644 --- a/cmd/poktrolld/cmd/commands.go +++ b/cmd/poktrolld/cmd/commands.go @@ -52,6 +52,7 @@ func initRootCmd( queryCommand(), txCommand(), keys.Commands(), + migrateCmd(), ) } diff --git a/cmd/poktrolld/cmd/migrate.go b/cmd/poktrolld/cmd/migrate.go new file mode 100644 index 000000000..a651065af --- /dev/null +++ b/cmd/poktrolld/cmd/migrate.go @@ -0,0 +1,220 @@ +package cmd + +import ( + "encoding/json" + "fmt" + "os" + + cosmosmath "cosmossdk.io/math" + cmtjson "github.com/cometbft/cometbft/libs/json" + cosmostypes "github.com/cosmos/cosmos-sdk/types" + "github.com/spf13/cobra" + + "github.com/pokt-network/poktroll/app/volatile" + migrationtypes "github.com/pokt-network/poktroll/x/migration/types" +) + +// TODO_IN_THIS_COMMIT: godoc & move... +type MorseStateExport struct { + ConsensusParams json.RawMessage `json:"consensus_params"` + AppHash json.RawMessage `json:"app_hash"` + AppState MorseAppState `json:"app_state"` +} + +// TODO_IN_THIS_COMMIT: godoc & move... avoiding dependency on pocket-core protobuf types. +type MorseAppState struct { + Application struct { + Applications []migrationtypes.MorseApplication `json:"applications"` + } `json:"application"` + Auth struct { + Accounts []struct { + Type string `json:"type"` + Value migrationtypes.MorseAccount `json:"value"` + } `json:"accounts"` + } `json:"auth"` + Pos struct { + Validators []migrationtypes.MorseValidator `json:"validators"` + } `json:"pos"` +} + +var collectMorseAccountsCmd = &cobra.Command{ + Use: "collect-morse-accounts [morse-state-path] [morse-accounts-path]", + Args: cobra.ExactArgs(2), + Short: "Collect all accounts and balances from the JSON file at [morse-state-path] and output them as JSON to [morse-accounts-path]", + Long: `Collects the accounts, and balances thereof, from the JSON file at morse-state-path +and outputs them as a MorseAccountState JSON to morse-accounts-path for use with +Shannon's MsgUploadMorseState. The Morse state export is generated via the Morse CLI: +pocket util export-genesis-for-reset [height] [new-chain-id] > morse-state-export.json`, + RunE: runCollectMorseAccounts, +} + +func migrateCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "migrate", + Short: "Migration commands", + } + cmd.AddCommand(collectMorseAccountsCmd) + + return cmd +} + +func runCollectMorseAccounts(cmd *cobra.Command, args []string) error { + inputPath := args[0] + outputPath := args[1] + + return collectMorseAccounts(inputPath, outputPath) +} + +// TODO_IN_THIS_COMMIT: godoc & move... +func collectMorseAccounts(inputStatePath, outputStatePath string) error { + if err := validatePathIsFile(inputStatePath); err != nil { + return err + } + + inputStateJSON, err := os.ReadFile(inputStatePath) + if err != nil { + return err + } + + inputState := new(MorseStateExport) + if err = cmtjson.Unmarshal(inputStateJSON, inputState); err != nil { + return err + } + + outputStateJSON, err := transformMorseState(inputState) + if err != nil { + return err + } + + if err = os.WriteFile(outputStatePath, outputStateJSON, 0644); err != nil { + return err + } + + return nil +} + +// TODO_IN_THIS_COMMIT: godoc & move... +func validatePathIsFile(path string) error { + info, err := os.Stat(path) + if err != nil { + return err + } + + if info.IsDir() { + return fmt.Errorf("[morse-JSON-input-path] cannot be a directory") + } + + return nil +} + +// TODO_IN_THIS_COMMIT: godoc & move... +func transformMorseState(inputState *MorseStateExport) ([]byte, error) { + //importAccounts := make(map[string]migrationtypes.MorseAccount) + morseAcctState := &migrationtypes.MorseAccountState{ + Accounts: make(map[string]*migrationtypes.MorseAccount), + } + + // TODO_IN_THIS_COMMIT: benchmark and consider at what point (i.e. number of accounts) does asynchronous import processing matter? + + // Iterate over accounts and copy the balances. + if err := collectInputAccountBalances(inputState, morseAcctState); err != nil { + return nil, err + } + + // Iterate over applications and add the stakes to the corresponding account balances. + if err := collectInputApplicationStakes(inputState, morseAcctState); err != nil { + return nil, err + } + + // Iterate over suppliers and add the stakes to the corresponding account balances. + err := collectInputSupplierStakes(inputState, morseAcctState) + if err != nil { + return nil, err + } + + return cmtjson.Marshal(morseAcctState) +} + +func collectInputSupplierStakes(inputState *MorseStateExport, morseAcctState *migrationtypes.MorseAccountState) error { + for _, exportSupplier := range inputState.AppState.Pos.Validators { + addr := exportSupplier.Address.String() + exportBalance := cosmostypes.NewCoin(volatile.DenomuPOKT, cosmosmath.ZeroInt()) + + // TODO_IN_THIS_COMMIT: importAccounts is guaranteed to be empty at this point unless it's being updated concurrently. + if importAccount, ok := morseAcctState.Accounts[addr]; ok { + // TODO_IN_THIS_COMMIT: comment... SHOULD ONLY be one denom (upokt). + if len(importAccount.Coins) != 0 { + exportBalance = importAccount.Coins[0] + } + } + + supplierStakeAmtUpokt, ok := cosmosmath.NewIntFromString(exportSupplier.StakedTokens) + if !ok { + return fmt.Errorf("failed to parse supplier stake amount %q", exportSupplier.StakedTokens) + } + + exportBalance.Amount = exportBalance.Amount.Add(supplierStakeAmtUpokt) + morseAcctState.Accounts[addr].Coins[0] = exportBalance + } + return nil +} + +func collectInputApplicationStakes(inputState *MorseStateExport, morseAcctState *migrationtypes.MorseAccountState) error { + for _, exportApplication := range inputState.AppState.Application.Applications { + addr := exportApplication.Address.String() + exportBalance := cosmostypes.NewCoin(volatile.DenomuPOKT, cosmosmath.ZeroInt()) + + // TODO_IN_THIS_COMMIT: importAccounts is guaranteed to be empty at this point unless it's being updated concurrently. + if importAccount, ok := morseAcctState.Accounts[addr]; ok { + // TODO_IN_THIS_COMMIT: comment... SHOULD ONLY be one denom (upokt). + if len(importAccount.Coins) != 0 { + exportBalance = importAccount.Coins[0] + } + } + appStakeAmtUpokt, ok := cosmosmath.NewIntFromString(exportApplication.StakedTokens) + if !ok { + return fmt.Errorf("failed to parse application stake amount %q", exportApplication.StakedTokens) + } + + exportBalance.Amount = exportBalance.Amount.Add(appStakeAmtUpokt) + morseAcctState.Accounts[addr].Coins[0] = exportBalance + } + return nil +} + +func collectInputAccountBalances(inputState *MorseStateExport, morseAcctState *migrationtypes.MorseAccountState) error { + for _, exportAccount := range inputState.AppState.Auth.Accounts { + // DEV_NOTE: Ignore module accounts. + if exportAccount.Type != "posmint/Account" { + continue + } + + addr := exportAccount.Value.Address.String() + exportBalance := cosmostypes.NewCoin(volatile.DenomuPOKT, cosmosmath.ZeroInt()) + + // TODO_IN_THIS_COMMIT: importAccounts is guaranteed to be empty at this point unless it's being updated concurrently. + if importAccount, ok := morseAcctState.Accounts[addr]; ok { + // TODO_IN_THIS_COMMIT: comment... SHOULD ONLY be one denom (upokt). + if len(importAccount.Coins) != 0 { + exportBalance = importAccount.Coins[0] + } + } else { + morseAcctState.Accounts[addr] = &migrationtypes.MorseAccount{ + Address: exportAccount.Value.Address, + PubKey: exportAccount.Value.PubKey, + Coins: cosmostypes.Coins{exportBalance}, + } + } + + // TODO_IN_THIS_COMMIT: comment... SHOULD ONLY be one denom (upokt). + coin := exportAccount.Value.Coins[0] + if coin.Denom != volatile.DenomuPOKT { + return fmt.Errorf("unsupported denom %q", coin.Denom) + } + exportBalance.Amount = exportBalance.Amount.Add(coin.Amount) + + // TODO_IN_THIS_COMMIT: comment... SHOULD ONLY be one denom (upokt). + morseAcctState.Accounts[addr].Coins[0] = exportBalance + } + return nil +} diff --git a/cmd/poktrolld/cmd/migrate_test.go b/cmd/poktrolld/cmd/migrate_test.go new file mode 100644 index 000000000..41dad4df3 --- /dev/null +++ b/cmd/poktrolld/cmd/migrate_test.go @@ -0,0 +1,168 @@ +package cmd + +import ( + "bytes" + "os" + "path/filepath" + "strings" + "testing" + "text/template" + + "github.com/stretchr/testify/require" +) + +var ( + mockMorseStateJSONTmpl = template.Must(template.New("morse_state_export").Parse(` +{ + "consensus_params": { + "validator": { + "pub_key_types": [ + "ed25519" + ] + } + }, + "app_hash": "", + "app_state": { + "application": { + "params": { + "unstaking_time": "1814400000000000", + "max_applications": "9223372036854775807", + "app_stake_minimum": "1000000", + "base_relays_per_pokt": "100", + "stability_adjustment": "0", + "participation_rate_on": false, + "maximum_chains": "15" + }, + "applications": [ + { + "address": "{{.AddressHex}}", + "public_key": "{{.PublicKeyHex}}", + "jailed": false, + "chains": [ + "0001" + ], + "max_relays": "10000000000000", + "status": 2, + "staked_tokens": "{{.AppStakeAmount}}", + "unstaking_time": "0001-01-01T00:00:00Z" + } + ], + "exported": false + }, + "auth": { + "accounts": [ + { + "type": "posmint/Account", + "value": { + "address": "{{.AddressHex}}", + "coins": [ + { + "denom": "upokt", + "amount": "{{.AccountAmount}}" + } + ], + "public_key": { + "type": "crypto/ed25519_public_key", + "value": "{{.PublicKeyHex}}" + } + } + } + ], + "supply": [] + }, + "pos": { + "validators": [ + { + "address": "934066aae79da1e8012bacf4953985dc6bac3371", + "public_key": "{{.PublicKeyHex}}", + "jailed": false, + "status": 2, + "chains": [ + "0001" + ], + "service_url": "http://127.0.0.1:8081", + "tokens": "{{.SupplierStakeAmount}}", + "unstaking_time": "0001-01-01T00:00:00Z", + "output_address": "", + "reward_delegators": null + } + ] + } + } +} +`)) + + AccountAmount = uint64(2000000) + AppStakeAmount = uint64(10000000000000) + SupplierStakeAmount = uint64(30000000) + AddressHex = "934066AAE79DA1E8012BACF4953985DC6BAC3371" + PublicKeyHex = "f68e32d72e7f5f1c797bcd41d8d0e9a1004354c6b1c85429f2ebd7d82ccf4a70" +) + +func TestCollectMorseAccounts(t *testing.T) { + tmpDir := t.TempDir() + outputPath := filepath.Join(tmpDir, "morse-state-output.json") + inputFile, err := os.CreateTemp(tmpDir, "morse-state-input.json") + require.NoError(t, err) + + err = mockMorseStateJSONTmpl.Execute(inputFile, struct { + AccountAmount, + AppStakeAmount, + SupplierStakeAmount uint64 + AddressHex, + PublicKeyHex string + }{ + AccountAmount, + AppStakeAmount, + SupplierStakeAmount, + AddressHex, + PublicKeyHex, + }) + require.NoError(t, err) + + err = inputFile.Close() + require.NoError(t, err) + + // Call the function under test. + err = collectMorseAccounts(inputFile.Name(), outputPath) + require.NoError(t, err) + + outputJSON, err := os.ReadFile(outputPath) + require.NoError(t, err) + + expectedJSONBuf := new(bytes.Buffer) + expectedAmount := AppStakeAmount + AccountAmount + SupplierStakeAmount + err = template.Must(template.New("expected").Parse(`{ + "accounts": { + "{{.AddressHex}}": { + "address": "{{.AddressHex}}", + "public_key": { + "type": "crypto/ed25519_public_key", + "value": "{{.PublicKeyHex}}" + }, + "coins": [ + { + "denom": "upokt", + "amount": "{{.AccountAmount}}" + } + ] + } + } +}`)).Execute(expectedJSONBuf, struct { + AddressHex, + PublicKeyHex string + AccountAmount uint64 + }{ + AddressHex, + PublicKeyHex, + expectedAmount, + }) + + // Strip all whitespace from the expected JSON. + expectedJSON := expectedJSONBuf.String() + expectedJSON = strings.ReplaceAll(expectedJSON, "\n", "") + expectedJSON = strings.ReplaceAll(expectedJSON, " ", "") + + require.NoError(t, err) + require.Equal(t, expectedJSON, string(outputJSON)) +} diff --git a/proto/poktroll/migration/types.proto b/proto/poktroll/migration/types.proto new file mode 100644 index 000000000..adedf872b --- /dev/null +++ b/proto/poktroll/migration/types.proto @@ -0,0 +1,101 @@ +syntax = "proto3"; + +package poktroll.migration; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/pokt-network/poktroll/x/migration/types"; +option (gogoproto.stable_marshaler_all) = true; + +// MorseAccount defines a base account type. It contains all the necessary fields +// for basic account functionality. Any custom account type should extend this +// type for additional functionality (e.g. vesting). +message MorseAccount { + option (gogoproto.messagename) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + option (cosmos_proto.implements_interface) = "Account"; + + // TODO_IN_THIS_COMMIT: update gogoproto.casttype option... + bytes address = 1 [(gogoproto.jsontag) = "address", (gogoproto.casttype) = "github.com/cometbft/cometbft/crypto.Address"]; + MorsePublicKey pub_key = 2 [(gogoproto.jsontag) = "public_key", (gogoproto.moretags) = "yaml:\"public_key\""]; + repeated cosmos.base.v1beta1.Coin coins = 3 [(gogoproto.nullable) = false]; +} + +message MorsePublicKey { + string type = 1; + bytes value = 2 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; +} + +// MorseApplication defines the total amount of bond shares and their exchange rate to +// coins. Slashing results in a decrease in the exchange rate, allowing correct +// calculation of future undelegations without iterating over delegators. +// When coins are delegated to this validator, the validator is credited with a +// delegation whose number of bond shares is based on the amount of coins +// delegated divided by the current exchange rate. Voting power can be +// calculated as total bonded shares multiplied by exchange rate. +message MorseApplication { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + + bytes address = 1 [ + (gogoproto.casttype) = "github.com/cometbft/cometbft/crypto.Address", + (gogoproto.jsontag) = "address", + (gogoproto.moretags) = "yaml:\"address\"" + ]; + bytes public_key = 2 [ + (gogoproto.jsontag) = "public_key", + (gogoproto.moretags) = "yaml:\"public_key\""]; + bool jailed = 3[ + (gogoproto.jsontag) = "jailed", + (gogoproto.moretags) = "yaml:\"jailed\""]; + int32 status = 4 [ +// (gogoproto.casttype) = "github.com/pokt-network/pocket-core/types.StakeStatus", + (gogoproto.jsontag) = "status", + (gogoproto.moretags) = "yaml:\"status\""]; +// repeated string chains = 5 [ +// (gogoproto.jsontag) = "chains", +// (gogoproto.moretags) = "yaml:\"chains\""]; + string staked_tokens = 6; //[ +// (gogoproto.customtype) = "github.com/pokt-network/pocket-core/types.BigInt", +// (gogoproto.nullable) = false, +// (gogoproto.jsontag) = "tokens", +// (gogoproto.moretags) = "yaml:\"tokens\""]; +// string max_relays = 7 [ +// (gogoproto.customtype) = "github.com/pokt-network/pocket-core/types.BigInt", +// (gogoproto.nullable) = false, +// (gogoproto.jsontag) = "max_relays", +// (gogoproto.moretags) = "yaml:\"max_relays\""]; +// google.protobuf.Timestamp unstaking_completion_time = 8 [ +// (gogoproto.nullable) = false, +// (gogoproto.stdtime) = true, +// (gogoproto.jsontag) = "unstaking_time", +// (gogoproto.moretags) = "yaml:\"unstaking_time\""]; +} + +message MorseValidator { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = true; + option (gogoproto.goproto_getters) = false; + + // This option is to make the order of RewardDelegators deterministic + option (gogoproto.stable_marshaler) = true; + + bytes Address = 1 [(gogoproto.casttype) = "github.com/cometbft/cometbft/crypto.Address", (gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; + bytes PublicKey = 2 [(gogoproto.moretags) = "yaml:\"public_key\"", (gogoproto.jsontag) = "public_key"]; + bool jailed = 3 [(gogoproto.jsontag) = "jailed"]; + int32 status = 4 [(gogoproto.jsontag) = "status"]; +// repeated string Chains = 5 [(gogoproto.jsontag) = "chains"]; +// string ServiceURL = 6 [(gogoproto.jsontag) = "service_url"]; +// string StakedTokens = 7 [(gogoproto.customtype) = "github.com/pokt-network/pocket-core/types.BigInt", (gogoproto.jsontag) = "tokens", (gogoproto.nullable) = false]; + string StakedTokens = 7 [(gogoproto.jsontag) = "tokens"]; +// google.protobuf.Timestamp UnstakingCompletionTime = 8 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.jsontag) = "unstaking_time", (gogoproto.moretags) = "yaml:\"unstaking_time\""]; +// bytes OutputAddress = 9 [(gogoproto.casttype) = "github.com/pokt-network/pocket-core/types.Address", (gogoproto.jsontag) = "output_address,omitempty", (gogoproto.moretags) = "yaml:\"output_address\""]; +// map RewardDelegators = 10 [(gogoproto.jsontag) = "reward_delegators,omitempty", (gogoproto.moretags) = "yaml:\"reward_delegators\""]; +} + +message MorseAccountState { + map accounts = 1; +} \ No newline at end of file diff --git a/x/application/types/event.pb.go b/x/application/types/event.pb.go new file mode 100644 index 000000000..c443e8e31 --- /dev/null +++ b/x/application/types/event.pb.go @@ -0,0 +1,2493 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/event.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ApplicationUnbondingReason int32 + +const ( + ApplicationUnbondingReason_APPLICATION_UNBONDING_REASON_ELECTIVE ApplicationUnbondingReason = 0 + ApplicationUnbondingReason_APPLICATION_UNBONDING_REASON_BELOW_MIN_STAKE ApplicationUnbondingReason = 1 +) + +var ApplicationUnbondingReason_name = map[int32]string{ + 0: "APPLICATION_UNBONDING_REASON_ELECTIVE", + 1: "APPLICATION_UNBONDING_REASON_BELOW_MIN_STAKE", +} + +var ApplicationUnbondingReason_value = map[string]int32{ + "APPLICATION_UNBONDING_REASON_ELECTIVE": 0, + "APPLICATION_UNBONDING_REASON_BELOW_MIN_STAKE": 1, +} + +func (x ApplicationUnbondingReason) String() string { + return proto.EnumName(ApplicationUnbondingReason_name, int32(x)) +} + +func (ApplicationUnbondingReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{0} +} + +// EventApplicationStaked is emitted when an application is staked or up-staked. +type EventApplicationStaked struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` + // The end height of the session in which the application was staked. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventApplicationStaked) Reset() { *m = EventApplicationStaked{} } +func (m *EventApplicationStaked) String() string { return proto.CompactTextString(m) } +func (*EventApplicationStaked) ProtoMessage() {} +func (*EventApplicationStaked) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{0} +} +func (m *EventApplicationStaked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationStaked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationStaked) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationStaked.Merge(m, src) +} +func (m *EventApplicationStaked) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationStaked) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationStaked.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationStaked proto.InternalMessageInfo + +func (m *EventApplicationStaked) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *EventApplicationStaked) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +// EventRedelegation is an event emitted whenever an application changes its +// delegatee gateways on chain. This is in response to both a DelegateToGateway +// and UndelegateFromGateway message. +type EventRedelegation struct { + // The application which was redelegated. + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` + // The end height of the session in which the redelegation was committed. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventRedelegation) Reset() { *m = EventRedelegation{} } +func (m *EventRedelegation) String() string { return proto.CompactTextString(m) } +func (*EventRedelegation) ProtoMessage() {} +func (*EventRedelegation) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{1} +} +func (m *EventRedelegation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRedelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventRedelegation) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRedelegation.Merge(m, src) +} +func (m *EventRedelegation) XXX_Size() int { + return m.Size() +} +func (m *EventRedelegation) XXX_DiscardUnknown() { + xxx_messageInfo_EventRedelegation.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRedelegation proto.InternalMessageInfo + +func (m *EventRedelegation) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *EventRedelegation) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +// EventTransferBegin is emitted whenever an application begins a transfer. It +// includes the source application state immediately after the transfer began. +type EventTransferBegin struct { + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + SourceApplication *Application `protobuf:"bytes,3,opt,name=source_application,json=sourceApplication,proto3" json:"source_application,omitempty"` + // The end height of the session in which the transfer began. + SessionEndHeight int64 `protobuf:"varint,4,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which the transfer will complete. + TransferEndHeight int64 `protobuf:"varint,5,opt,name=transfer_end_height,json=transferEndHeight,proto3" json:"transfer_end_height"` +} + +func (m *EventTransferBegin) Reset() { *m = EventTransferBegin{} } +func (m *EventTransferBegin) String() string { return proto.CompactTextString(m) } +func (*EventTransferBegin) ProtoMessage() {} +func (*EventTransferBegin) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{2} +} +func (m *EventTransferBegin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransferBegin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventTransferBegin) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransferBegin.Merge(m, src) +} +func (m *EventTransferBegin) XXX_Size() int { + return m.Size() +} +func (m *EventTransferBegin) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransferBegin.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransferBegin proto.InternalMessageInfo + +func (m *EventTransferBegin) GetSourceAddress() string { + if m != nil { + return m.SourceAddress + } + return "" +} + +func (m *EventTransferBegin) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +func (m *EventTransferBegin) GetSourceApplication() *Application { + if m != nil { + return m.SourceApplication + } + return nil +} + +func (m *EventTransferBegin) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventTransferBegin) GetTransferEndHeight() int64 { + if m != nil { + return m.TransferEndHeight + } + return 0 +} + +// EventTransferEnd is emitted whenever an application transfer is completed. It +// includes the destination application state at the time the transfer completed. +// Either EventTransferEnd or EventTransferError will be emitted corresponding to +// any given EventTransferBegin event. +type EventTransferEnd struct { + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + DestinationApplication *Application `protobuf:"bytes,3,opt,name=destination_application,json=destinationApplication,proto3" json:"destination_application,omitempty"` + // The end height of the session in which the transfer ended. + SessionEndHeight int64 `protobuf:"varint,4,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which the transfer completed. + TransferEndHeight int64 `protobuf:"varint,5,opt,name=transfer_end_height,json=transferEndHeight,proto3" json:"transfer_end_height"` +} + +func (m *EventTransferEnd) Reset() { *m = EventTransferEnd{} } +func (m *EventTransferEnd) String() string { return proto.CompactTextString(m) } +func (*EventTransferEnd) ProtoMessage() {} +func (*EventTransferEnd) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{3} +} +func (m *EventTransferEnd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransferEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventTransferEnd) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransferEnd.Merge(m, src) +} +func (m *EventTransferEnd) XXX_Size() int { + return m.Size() +} +func (m *EventTransferEnd) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransferEnd.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransferEnd proto.InternalMessageInfo + +func (m *EventTransferEnd) GetSourceAddress() string { + if m != nil { + return m.SourceAddress + } + return "" +} + +func (m *EventTransferEnd) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +func (m *EventTransferEnd) GetDestinationApplication() *Application { + if m != nil { + return m.DestinationApplication + } + return nil +} + +func (m *EventTransferEnd) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventTransferEnd) GetTransferEndHeight() int64 { + if m != nil { + return m.TransferEndHeight + } + return 0 +} + +// EventTransferError is emitted whenever an application transfer fails. It +// includes the source application state at the time the transfer failed and +// the error message. +// Either EventTransferEnd or EventTransferError will be emitted corresponding to +// any given EventTransferBegin event. +type EventTransferError struct { + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + SourceApplication *Application `protobuf:"bytes,3,opt,name=source_application,json=sourceApplication,proto3" json:"source_application,omitempty"` + // The end height of the session in which the transfer failed. + SessionEndHeight int64 `protobuf:"varint,4,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *EventTransferError) Reset() { *m = EventTransferError{} } +func (m *EventTransferError) String() string { return proto.CompactTextString(m) } +func (*EventTransferError) ProtoMessage() {} +func (*EventTransferError) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{4} +} +func (m *EventTransferError) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTransferError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventTransferError) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTransferError.Merge(m, src) +} +func (m *EventTransferError) XXX_Size() int { + return m.Size() +} +func (m *EventTransferError) XXX_DiscardUnknown() { + xxx_messageInfo_EventTransferError.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTransferError proto.InternalMessageInfo + +func (m *EventTransferError) GetSourceAddress() string { + if m != nil { + return m.SourceAddress + } + return "" +} + +func (m *EventTransferError) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +func (m *EventTransferError) GetSourceApplication() *Application { + if m != nil { + return m.SourceApplication + } + return nil +} + +func (m *EventTransferError) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventTransferError) GetError() string { + if m != nil { + return m.Error + } + return "" +} + +// EventApplicationUnbondingBegin is emitted when an application begins unbonding. +// This can be triggered by the commitment of an unstake message or by the applicaiton's +// stake dropping below the minimum. This event signals that an application has begun +// unbonding. The unbonding period is determined by the shared param, +// application_unbonding_period_sessions. +type EventApplicationUnbondingBegin struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` + Reason ApplicationUnbondingReason `protobuf:"varint,2,opt,name=reason,proto3,enum=poktroll.application.ApplicationUnbondingReason" json:"reason"` + // The end height of the session in which the unbonding began. + SessionEndHeight int64 `protobuf:"varint,3,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which application unbonding will end. + UnbondingEndHeight int64 `protobuf:"varint,4,opt,name=unbonding_end_height,json=unbondingEndHeight,proto3" json:"unbonding_height"` +} + +func (m *EventApplicationUnbondingBegin) Reset() { *m = EventApplicationUnbondingBegin{} } +func (m *EventApplicationUnbondingBegin) String() string { return proto.CompactTextString(m) } +func (*EventApplicationUnbondingBegin) ProtoMessage() {} +func (*EventApplicationUnbondingBegin) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{5} +} +func (m *EventApplicationUnbondingBegin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationUnbondingBegin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationUnbondingBegin) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationUnbondingBegin.Merge(m, src) +} +func (m *EventApplicationUnbondingBegin) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationUnbondingBegin) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationUnbondingBegin.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationUnbondingBegin proto.InternalMessageInfo + +func (m *EventApplicationUnbondingBegin) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *EventApplicationUnbondingBegin) GetReason() ApplicationUnbondingReason { + if m != nil { + return m.Reason + } + return ApplicationUnbondingReason_APPLICATION_UNBONDING_REASON_ELECTIVE +} + +func (m *EventApplicationUnbondingBegin) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventApplicationUnbondingBegin) GetUnbondingEndHeight() int64 { + if m != nil { + return m.UnbondingEndHeight + } + return 0 +} + +// EventApplicationUnbondingEnd is emitted when an application has completed +// unbonding. The unbonding period is determined by the shared param, +// application_unbonding_period_sessions. +type EventApplicationUnbondingEnd struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` + Reason ApplicationUnbondingReason `protobuf:"varint,2,opt,name=reason,proto3,enum=poktroll.application.ApplicationUnbondingReason" json:"reason"` + // The end height of the session in which the unbonding ended. + SessionEndHeight int64 `protobuf:"varint,3,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which application unbonding ended. + UnbondingEndHeight int64 `protobuf:"varint,4,opt,name=unbonding_end_height,json=unbondingEndHeight,proto3" json:"unbonding_height"` +} + +func (m *EventApplicationUnbondingEnd) Reset() { *m = EventApplicationUnbondingEnd{} } +func (m *EventApplicationUnbondingEnd) String() string { return proto.CompactTextString(m) } +func (*EventApplicationUnbondingEnd) ProtoMessage() {} +func (*EventApplicationUnbondingEnd) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{6} +} +func (m *EventApplicationUnbondingEnd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationUnbondingEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationUnbondingEnd) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationUnbondingEnd.Merge(m, src) +} +func (m *EventApplicationUnbondingEnd) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationUnbondingEnd) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationUnbondingEnd.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationUnbondingEnd proto.InternalMessageInfo + +func (m *EventApplicationUnbondingEnd) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *EventApplicationUnbondingEnd) GetReason() ApplicationUnbondingReason { + if m != nil { + return m.Reason + } + return ApplicationUnbondingReason_APPLICATION_UNBONDING_REASON_ELECTIVE +} + +func (m *EventApplicationUnbondingEnd) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventApplicationUnbondingEnd) GetUnbondingEndHeight() int64 { + if m != nil { + return m.UnbondingEndHeight + } + return 0 +} + +// EventApplicationUnbondingCanceled is emitted when an application which was unbonding +// successfully (re-)stakes before the unbonding period has elapsed. An EventApplicationStaked +// event will also be emitted immediately after this event. +type EventApplicationUnbondingCanceled struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` + // The end height of the session in which the unbonding was canceled. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventApplicationUnbondingCanceled) Reset() { *m = EventApplicationUnbondingCanceled{} } +func (m *EventApplicationUnbondingCanceled) String() string { return proto.CompactTextString(m) } +func (*EventApplicationUnbondingCanceled) ProtoMessage() {} +func (*EventApplicationUnbondingCanceled) Descriptor() ([]byte, []int) { + return fileDescriptor_d0d229437c622598, []int{7} +} +func (m *EventApplicationUnbondingCanceled) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationUnbondingCanceled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationUnbondingCanceled) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationUnbondingCanceled.Merge(m, src) +} +func (m *EventApplicationUnbondingCanceled) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationUnbondingCanceled) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationUnbondingCanceled.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationUnbondingCanceled proto.InternalMessageInfo + +func (m *EventApplicationUnbondingCanceled) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *EventApplicationUnbondingCanceled) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func init() { + proto.RegisterEnum("poktroll.application.ApplicationUnbondingReason", ApplicationUnbondingReason_name, ApplicationUnbondingReason_value) + proto.RegisterType((*EventApplicationStaked)(nil), "poktroll.application.EventApplicationStaked") + proto.RegisterType((*EventRedelegation)(nil), "poktroll.application.EventRedelegation") + proto.RegisterType((*EventTransferBegin)(nil), "poktroll.application.EventTransferBegin") + proto.RegisterType((*EventTransferEnd)(nil), "poktroll.application.EventTransferEnd") + proto.RegisterType((*EventTransferError)(nil), "poktroll.application.EventTransferError") + proto.RegisterType((*EventApplicationUnbondingBegin)(nil), "poktroll.application.EventApplicationUnbondingBegin") + proto.RegisterType((*EventApplicationUnbondingEnd)(nil), "poktroll.application.EventApplicationUnbondingEnd") + proto.RegisterType((*EventApplicationUnbondingCanceled)(nil), "poktroll.application.EventApplicationUnbondingCanceled") +} + +func init() { proto.RegisterFile("poktroll/application/event.proto", fileDescriptor_d0d229437c622598) } + +var fileDescriptor_d0d229437c622598 = []byte{ + // 675 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x96, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xc7, 0xbb, 0xed, 0x0f, 0x12, 0x86, 0xfc, 0xb0, 0x0c, 0x0d, 0x20, 0xd1, 0x2d, 0x90, 0x98, + 0xa0, 0x91, 0x2e, 0xa0, 0x77, 0xd3, 0x85, 0x15, 0x1b, 0xb1, 0x25, 0xdb, 0x45, 0x13, 0x2e, 0x9b, + 0xed, 0xee, 0xe3, 0x76, 0x43, 0x99, 0x69, 0x66, 0x06, 0x94, 0xa3, 0x47, 0x6f, 0xbe, 0x13, 0x2f, + 0xdc, 0xbd, 0x7a, 0x32, 0xc4, 0x13, 0xf1, 0xd0, 0x98, 0x72, 0xeb, 0xab, 0x30, 0xdd, 0x9d, 0xb6, + 0x0b, 0xb4, 0xf2, 0x27, 0x31, 0xe9, 0x81, 0x53, 0x3b, 0xcf, 0x9f, 0xef, 0x7e, 0xf7, 0xf3, 0xec, + 0x4c, 0x06, 0xcd, 0xd7, 0xe9, 0x9e, 0x60, 0xb4, 0x56, 0xd3, 0x9c, 0x7a, 0xbd, 0x16, 0xb8, 0x8e, + 0x08, 0x28, 0xd1, 0xe0, 0x10, 0x88, 0xc8, 0xd5, 0x19, 0x15, 0x14, 0x67, 0x3a, 0x15, 0xb9, 0x58, + 0xc5, 0xdc, 0x7d, 0x97, 0xf2, 0x7d, 0xca, 0xed, 0xb0, 0x46, 0x8b, 0x16, 0x51, 0xc3, 0x5c, 0xc6, + 0xa7, 0x3e, 0x8d, 0xe2, 0xed, 0x7f, 0x32, 0xaa, 0x46, 0x35, 0x5a, 0xc5, 0xe1, 0xa0, 0x1d, 0xae, + 0x56, 0x40, 0x38, 0xab, 0x9a, 0x4b, 0x03, 0x22, 0xf3, 0x0f, 0xbb, 0x46, 0x78, 0xd5, 0x61, 0xe0, + 0x69, 0x1c, 0xd8, 0x61, 0xe0, 0x82, 0x4c, 0xf7, 0xf7, 0x29, 0x8e, 0xea, 0x20, 0x1f, 0xbb, 0x78, + 0xac, 0xa0, 0x69, 0xa3, 0xed, 0x3b, 0xdf, 0x2b, 0x28, 0x0b, 0x67, 0x0f, 0x3c, 0x6c, 0xa1, 0xf1, + 0x58, 0xd7, 0xac, 0x32, 0xaf, 0x2c, 0x8d, 0xaf, 0x2d, 0xe4, 0xfa, 0xbd, 0x58, 0x2e, 0xd6, 0xad, + 0xdf, 0x6b, 0x35, 0xb2, 0xf1, 0x4e, 0x33, 0xbe, 0xc0, 0x1b, 0x08, 0x73, 0xe0, 0x3c, 0xa0, 0xc4, + 0x06, 0xe2, 0xd9, 0x55, 0x08, 0xfc, 0xaa, 0x98, 0x4d, 0xce, 0x2b, 0x4b, 0x29, 0x7d, 0xba, 0xd5, + 0xc8, 0xf6, 0xc9, 0x9a, 0x69, 0x19, 0x33, 0x88, 0xf7, 0x2a, 0x8c, 0x2c, 0x7e, 0x55, 0xd0, 0x64, + 0x68, 0xdb, 0x04, 0x0f, 0x6a, 0xe0, 0x47, 0xda, 0xc3, 0xec, 0xf8, 0x53, 0x0a, 0xe1, 0xd0, 0xb1, + 0xc5, 0x1c, 0xc2, 0xdf, 0x03, 0xd3, 0xc1, 0x0f, 0x08, 0x7e, 0x81, 0x26, 0x38, 0x3d, 0x60, 0x2e, + 0xd8, 0x8e, 0xe7, 0x31, 0xe0, 0x3c, 0x74, 0x3d, 0xa6, 0xcf, 0xfe, 0x3c, 0x5e, 0xce, 0xc8, 0x0f, + 0x24, 0x1f, 0x65, 0xca, 0x82, 0x05, 0xc4, 0x37, 0xff, 0x8f, 0xea, 0x65, 0x10, 0x17, 0xd0, 0x94, + 0x07, 0x5c, 0x04, 0x24, 0x34, 0xdb, 0x55, 0x49, 0x5e, 0xa1, 0x82, 0x63, 0x4d, 0x1d, 0xa9, 0x6d, + 0x84, 0x3b, 0x5e, 0x62, 0x14, 0x53, 0xd7, 0xa4, 0x68, 0x4e, 0x4a, 0x63, 0x57, 0xa2, 0xfb, 0xef, + 0x66, 0xe8, 0xf0, 0x26, 0x9a, 0x12, 0x12, 0x5a, 0x5c, 0x66, 0x24, 0x94, 0x99, 0x69, 0x35, 0xb2, + 0xfd, 0xd2, 0xe6, 0x64, 0x27, 0xd8, 0x9b, 0xc1, 0xe7, 0x14, 0x4a, 0x9f, 0x9b, 0x81, 0x41, 0xbc, + 0xa1, 0x9a, 0xc0, 0x2e, 0x9a, 0x39, 0x27, 0x75, 0x9b, 0x31, 0x4c, 0xc7, 0x75, 0x87, 0x77, 0x16, + 0x3f, 0x92, 0x17, 0xf6, 0x83, 0xc1, 0x18, 0x65, 0x77, 0xfb, 0xe1, 0x1a, 0x33, 0xc8, 0xa0, 0x11, + 0x68, 0xc3, 0x0a, 0xa9, 0x8f, 0x99, 0xd1, 0x62, 0xf1, 0x57, 0x12, 0xa9, 0x17, 0x4f, 0xf2, 0x1d, + 0x52, 0xa1, 0xc4, 0x0b, 0x88, 0x1f, 0x1d, 0x36, 0xff, 0xe6, 0x7c, 0xb4, 0xd0, 0x28, 0x03, 0x87, + 0x53, 0x12, 0x42, 0x9e, 0x58, 0x5b, 0xb9, 0x52, 0xb0, 0x6b, 0xcb, 0x0c, 0xfb, 0x74, 0xd4, 0x6a, + 0x64, 0xa5, 0x86, 0x29, 0x7f, 0x07, 0xa0, 0x4a, 0xdd, 0x10, 0xd5, 0x4b, 0x94, 0x39, 0xe8, 0x3c, + 0xec, 0x32, 0xf2, 0x4c, 0xab, 0x91, 0x4d, 0xf7, 0xf2, 0x52, 0x05, 0x77, 0x23, 0xbd, 0xaf, 0xf5, + 0x34, 0x89, 0x1e, 0x0c, 0x84, 0xdb, 0x3e, 0x45, 0xee, 0xd0, 0xde, 0x16, 0xed, 0x37, 0x05, 0x2d, + 0x0c, 0x44, 0xbb, 0xee, 0x10, 0x17, 0x6a, 0xc3, 0x7d, 0x19, 0x79, 0x72, 0x84, 0xe6, 0x06, 0x4f, + 0x00, 0x3f, 0x46, 0x8f, 0xf2, 0xdb, 0xdb, 0x5b, 0x85, 0xf5, 0xbc, 0x55, 0x28, 0x15, 0xed, 0x9d, + 0xa2, 0x5e, 0x2a, 0x6e, 0x14, 0x8a, 0x9b, 0xb6, 0x69, 0xe4, 0xcb, 0xa5, 0xa2, 0x6d, 0x6c, 0x19, + 0xeb, 0x56, 0xe1, 0xad, 0x91, 0x4e, 0xe0, 0x15, 0xf4, 0xf4, 0xaf, 0xa5, 0xba, 0xb1, 0x55, 0x7a, + 0x67, 0xbf, 0x29, 0x14, 0xed, 0xb2, 0x95, 0x7f, 0x6d, 0xa4, 0x15, 0xdd, 0xfc, 0xde, 0x54, 0x95, + 0x93, 0xa6, 0xaa, 0x9c, 0x36, 0x55, 0xe5, 0x77, 0x53, 0x55, 0xbe, 0x9c, 0xa9, 0x89, 0x93, 0x33, + 0x35, 0x71, 0x7a, 0xa6, 0x26, 0x76, 0x9f, 0xfb, 0x81, 0xa8, 0x1e, 0x54, 0x72, 0x2e, 0xdd, 0xd7, + 0xda, 0xa4, 0x96, 0x09, 0x88, 0x0f, 0x94, 0xed, 0x69, 0xdd, 0x6b, 0xe1, 0xc7, 0xcb, 0x17, 0xc3, + 0xca, 0x68, 0x78, 0x33, 0x7c, 0xf6, 0x27, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x8d, 0x8e, 0xb2, 0xe5, + 0x0a, 0x00, 0x00, +} + +func (m *EventApplicationStaked) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationStaked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationStaked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventRedelegation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRedelegation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRedelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransferBegin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTransferBegin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransferBegin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TransferEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TransferEndHeight)) + i-- + dAtA[i] = 0x28 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SourceApplication != nil { + { + size, err := m.SourceApplication.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourceAddress) > 0 { + i -= len(m.SourceAddress) + copy(dAtA[i:], m.SourceAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SourceAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransferEnd) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTransferEnd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransferEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TransferEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.TransferEndHeight)) + i-- + dAtA[i] = 0x28 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.DestinationApplication != nil { + { + size, err := m.DestinationApplication.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourceAddress) > 0 { + i -= len(m.SourceAddress) + copy(dAtA[i:], m.SourceAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SourceAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTransferError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTransferError) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTransferError) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x2a + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SourceApplication != nil { + { + size, err := m.SourceApplication.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourceAddress) > 0 { + i -= len(m.SourceAddress) + copy(dAtA[i:], m.SourceAddress) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SourceAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventApplicationUnbondingBegin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationUnbondingBegin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationUnbondingBegin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnbondingEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.UnbondingEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x18 + } + if m.Reason != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Reason)) + i-- + dAtA[i] = 0x10 + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventApplicationUnbondingEnd) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationUnbondingEnd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationUnbondingEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnbondingEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.UnbondingEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x18 + } + if m.Reason != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Reason)) + i-- + dAtA[i] = 0x10 + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventApplicationUnbondingCanceled) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationUnbondingCanceled) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationUnbondingCanceled) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventApplicationStaked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func (m *EventRedelegation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func (m *EventTransferBegin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourceAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.SourceApplication != nil { + l = m.SourceApplication.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.TransferEndHeight != 0 { + n += 1 + sovEvent(uint64(m.TransferEndHeight)) + } + return n +} + +func (m *EventTransferEnd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourceAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.DestinationApplication != nil { + l = m.DestinationApplication.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.TransferEndHeight != 0 { + n += 1 + sovEvent(uint64(m.TransferEndHeight)) + } + return n +} + +func (m *EventTransferError) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourceAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.SourceApplication != nil { + l = m.SourceApplication.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + l = len(m.Error) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventApplicationUnbondingBegin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Reason != 0 { + n += 1 + sovEvent(uint64(m.Reason)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.UnbondingEndHeight != 0 { + n += 1 + sovEvent(uint64(m.UnbondingEndHeight)) + } + return n +} + +func (m *EventApplicationUnbondingEnd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Reason != 0 { + n += 1 + sovEvent(uint64(m.Reason)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.UnbondingEndHeight != 0 { + n += 1 + sovEvent(uint64(m.UnbondingEndHeight)) + } + return n +} + +func (m *EventApplicationUnbondingCanceled) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventApplicationStaked) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationStaked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationStaked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventRedelegation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRedelegation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRedelegation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransferBegin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTransferBegin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransferBegin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceApplication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceApplication == nil { + m.SourceApplication = &Application{} + } + if err := m.SourceApplication.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TransferEndHeight", wireType) + } + m.TransferEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TransferEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransferEnd) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTransferEnd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransferEnd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationApplication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DestinationApplication == nil { + m.DestinationApplication = &Application{} + } + if err := m.DestinationApplication.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TransferEndHeight", wireType) + } + m.TransferEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TransferEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTransferError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTransferError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTransferError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceApplication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceApplication == nil { + m.SourceApplication = &Application{} + } + if err := m.SourceApplication.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventApplicationUnbondingBegin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationUnbondingBegin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationUnbondingBegin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + m.Reason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reason |= ApplicationUnbondingReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEndHeight", wireType) + } + m.UnbondingEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventApplicationUnbondingEnd) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationUnbondingEnd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationUnbondingEnd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + m.Reason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reason |= ApplicationUnbondingReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEndHeight", wireType) + } + m.UnbondingEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventApplicationUnbondingCanceled) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationUnbondingCanceled: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationUnbondingCanceled: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/application/types/genesis.pb.go b/x/application/types/genesis.pb.go new file mode 100644 index 000000000..0f0b4e831 --- /dev/null +++ b/x/application/types/genesis.pb.go @@ -0,0 +1,387 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the application module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + ApplicationList []Application `protobuf:"bytes,2,rep,name=application_list,json=applicationList,proto3" json:"application_list"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad2a010ae2744ea, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetApplicationList() []Application { + if m != nil { + return m.ApplicationList + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.application.GenesisState") +} + +func init() { + proto.RegisterFile("poktroll/application/genesis.proto", fileDescriptor_7ad2a010ae2744ea) +} + +var fileDescriptor_7ad2a010ae2744ea = []byte{ + // 265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, + 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x81, 0xa9, 0xd1, 0x43, 0x52, 0x23, 0x25, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, + 0x0a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0xaa, 0x88, 0xd5, + 0x8a, 0x82, 0xc4, 0xa2, 0xc4, 0x5c, 0xa8, 0x0d, 0x52, 0x0a, 0x58, 0x95, 0x94, 0x54, 0x16, 0xa4, + 0x42, 0x55, 0x28, 0x2d, 0x66, 0xe4, 0xe2, 0x71, 0x87, 0xb8, 0x2a, 0xb8, 0x24, 0xb1, 0x24, 0x55, + 0xc8, 0x9e, 0x8b, 0x0d, 0x62, 0x84, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x8c, 0x1e, 0x36, + 0x57, 0xea, 0x05, 0x80, 0xd5, 0x38, 0x71, 0x9e, 0xb8, 0x27, 0xcf, 0xb0, 0xe2, 0xf9, 0x06, 0x2d, + 0xc6, 0x20, 0xa8, 0x36, 0xa1, 0x20, 0x2e, 0x01, 0x24, 0x85, 0xf1, 0x39, 0x99, 0xc5, 0x25, 0x12, + 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x8a, 0xd8, 0x8d, 0x72, 0x44, 0xb0, 0x9d, 0x58, 0x40, 0xe6, + 0x05, 0xf1, 0x23, 0x49, 0xfb, 0x64, 0x16, 0x97, 0x38, 0x05, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x91, 0x1c, 0xe3, 0x8d, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, + 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x26, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, + 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x20, 0x1b, 0x74, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, + 0xe1, 0xbe, 0xaf, 0xc0, 0xf4, 0x7f, 0x12, 0x1b, 0x38, 0x00, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xc5, 0x7a, 0x1b, 0xd6, 0xaa, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ApplicationList) > 0 { + for iNdEx := len(m.ApplicationList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ApplicationList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.ApplicationList) > 0 { + for _, e := range m.ApplicationList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApplicationList = append(m.ApplicationList, Application{}) + if err := m.ApplicationList[len(m.ApplicationList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/application/types/params.pb.go b/x/application/types/params.pb.go new file mode 100644 index 000000000..c1296fd8b --- /dev/null +++ b/x/application/types/params.pb.go @@ -0,0 +1,400 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/params.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // max_delegated_gateways defines the maximum number of gateways that a single + // application can delegate to. This is used to prevent performance issues + // in case the relay ring signature becomes too large. + MaxDelegatedGateways uint64 `protobuf:"varint,1,opt,name=max_delegated_gateways,json=maxDelegatedGateways,proto3" json:"max_delegated_gateways" yaml:"max_delegated_gateways"` + // min_stake is the minimum stake in upokt that an application must have to remain staked. + MinStake *types.Coin `protobuf:"bytes,2,opt,name=min_stake,json=minStake,proto3" json:"min_stake" yaml:"min_stake"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_16533d77d399ef60, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMaxDelegatedGateways() uint64 { + if m != nil { + return m.MaxDelegatedGateways + } + return 0 +} + +func (m *Params) GetMinStake() *types.Coin { + if m != nil { + return m.MinStake + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.application.Params") +} + +func init() { proto.RegisterFile("poktroll/application/params.proto", fileDescriptor_16533d77d399ef60) } + +var fileDescriptor_16533d77d399ef60 = []byte{ + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, + 0xd3, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, + 0x29, 0xd1, 0x43, 0x52, 0x22, 0x25, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x0a, + 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0x2a, 0x97, 0x9c, 0x5f, + 0x9c, 0x9b, 0x5f, 0xac, 0x9f, 0x94, 0x58, 0x9c, 0xaa, 0x5f, 0x66, 0x98, 0x94, 0x5a, 0x92, 0x68, + 0xa8, 0x9f, 0x9c, 0x9f, 0x99, 0x07, 0x91, 0x57, 0xfa, 0xc7, 0xc8, 0xc5, 0x16, 0x00, 0xb6, 0x4f, + 0xa8, 0x90, 0x4b, 0x2c, 0x37, 0xb1, 0x22, 0x3e, 0x25, 0x35, 0x27, 0x35, 0x3d, 0xb1, 0x24, 0x35, + 0x25, 0x1e, 0x44, 0x96, 0x27, 0x56, 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x38, 0x59, 0xbf, + 0xba, 0x27, 0x8f, 0x43, 0xc5, 0xa7, 0x7b, 0xf2, 0xb2, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0xd8, + 0xe5, 0x95, 0x82, 0x44, 0x72, 0x13, 0x2b, 0x5c, 0x60, 0xe2, 0xee, 0x50, 0x61, 0xa1, 0x48, 0x2e, + 0xce, 0xdc, 0xcc, 0xbc, 0xf8, 0xe2, 0x92, 0xc4, 0xec, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, + 0x23, 0x49, 0x3d, 0x88, 0x8b, 0xf5, 0x40, 0x2e, 0xd6, 0x83, 0xba, 0x58, 0xcf, 0x39, 0x3f, 0x33, + 0xcf, 0x49, 0xf1, 0xd5, 0x3d, 0x79, 0x84, 0xfa, 0x4f, 0xf7, 0xe4, 0x05, 0xa0, 0x76, 0xc2, 0x84, + 0x94, 0x82, 0x38, 0x72, 0x33, 0xf3, 0x82, 0x41, 0x4c, 0x2b, 0xb5, 0x17, 0x0b, 0xe4, 0x19, 0xbb, + 0x9e, 0x6f, 0xd0, 0x92, 0x85, 0x87, 0x71, 0x05, 0x4a, 0x28, 0x43, 0x7c, 0xed, 0x14, 0x74, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, + 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa4, 0x67, + 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x83, 0xcc, 0xd1, 0xcd, 0x4b, 0x2d, 0x29, + 0xcf, 0x2f, 0xca, 0xd6, 0xc7, 0x61, 0x68, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x6c, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x81, 0x50, 0x13, 0x0c, 0xdf, 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MaxDelegatedGateways != that1.MaxDelegatedGateways { + return false + } + if !this.MinStake.Equal(that1.MinStake) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MinStake != nil { + { + size, err := m.MinStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MaxDelegatedGateways != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxDelegatedGateways)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxDelegatedGateways != 0 { + n += 1 + sovParams(uint64(m.MaxDelegatedGateways)) + } + if m.MinStake != nil { + l = m.MinStake.Size() + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDelegatedGateways", wireType) + } + m.MaxDelegatedGateways = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDelegatedGateways |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStake == nil { + m.MinStake = &types.Coin{} + } + if err := m.MinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/application/types/query.pb.go b/x/application/types/query.pb.go new file mode 100644 index 000000000..e0377020a --- /dev/null +++ b/x/application/types/query.pb.go @@ -0,0 +1,1421 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetApplicationRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryGetApplicationRequest) Reset() { *m = QueryGetApplicationRequest{} } +func (m *QueryGetApplicationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetApplicationRequest) ProtoMessage() {} +func (*QueryGetApplicationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{2} +} +func (m *QueryGetApplicationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetApplicationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetApplicationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetApplicationRequest.Merge(m, src) +} +func (m *QueryGetApplicationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetApplicationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetApplicationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetApplicationRequest proto.InternalMessageInfo + +func (m *QueryGetApplicationRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type QueryGetApplicationResponse struct { + Application Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application"` +} + +func (m *QueryGetApplicationResponse) Reset() { *m = QueryGetApplicationResponse{} } +func (m *QueryGetApplicationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetApplicationResponse) ProtoMessage() {} +func (*QueryGetApplicationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{3} +} +func (m *QueryGetApplicationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetApplicationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetApplicationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetApplicationResponse.Merge(m, src) +} +func (m *QueryGetApplicationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetApplicationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetApplicationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetApplicationResponse proto.InternalMessageInfo + +func (m *QueryGetApplicationResponse) GetApplication() Application { + if m != nil { + return m.Application + } + return Application{} +} + +type QueryAllApplicationsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // TODO_MAINNET(@adshmh): rename this field to `gateway_address_delegated_to` + // delegatee_gateway_address, if specified, filters the application list to only include those with delegation to the specified gateway address. + DelegateeGatewayAddress string `protobuf:"bytes,2,opt,name=delegatee_gateway_address,json=delegateeGatewayAddress,proto3" json:"delegatee_gateway_address,omitempty"` +} + +func (m *QueryAllApplicationsRequest) Reset() { *m = QueryAllApplicationsRequest{} } +func (m *QueryAllApplicationsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllApplicationsRequest) ProtoMessage() {} +func (*QueryAllApplicationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{4} +} +func (m *QueryAllApplicationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllApplicationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllApplicationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllApplicationsRequest.Merge(m, src) +} +func (m *QueryAllApplicationsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllApplicationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllApplicationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllApplicationsRequest proto.InternalMessageInfo + +func (m *QueryAllApplicationsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QueryAllApplicationsRequest) GetDelegateeGatewayAddress() string { + if m != nil { + return m.DelegateeGatewayAddress + } + return "" +} + +type QueryAllApplicationsResponse struct { + Applications []Application `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllApplicationsResponse) Reset() { *m = QueryAllApplicationsResponse{} } +func (m *QueryAllApplicationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllApplicationsResponse) ProtoMessage() {} +func (*QueryAllApplicationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5cf77e4e046ed3a7, []int{5} +} +func (m *QueryAllApplicationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllApplicationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllApplicationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllApplicationsResponse.Merge(m, src) +} +func (m *QueryAllApplicationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllApplicationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllApplicationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllApplicationsResponse proto.InternalMessageInfo + +func (m *QueryAllApplicationsResponse) GetApplications() []Application { + if m != nil { + return m.Applications + } + return nil +} + +func (m *QueryAllApplicationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.application.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.application.QueryParamsResponse") + proto.RegisterType((*QueryGetApplicationRequest)(nil), "poktroll.application.QueryGetApplicationRequest") + proto.RegisterType((*QueryGetApplicationResponse)(nil), "poktroll.application.QueryGetApplicationResponse") + proto.RegisterType((*QueryAllApplicationsRequest)(nil), "poktroll.application.QueryAllApplicationsRequest") + proto.RegisterType((*QueryAllApplicationsResponse)(nil), "poktroll.application.QueryAllApplicationsResponse") +} + +func init() { proto.RegisterFile("poktroll/application/query.proto", fileDescriptor_5cf77e4e046ed3a7) } + +var fileDescriptor_5cf77e4e046ed3a7 = []byte{ + // 574 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x41, 0x6f, 0xd3, 0x3e, + 0x18, 0xc6, 0xeb, 0xfe, 0xf7, 0x2f, 0x9a, 0x8b, 0x84, 0x30, 0x95, 0x18, 0xa1, 0x0a, 0x5b, 0x0e, + 0xb0, 0x0d, 0x61, 0xaf, 0x05, 0x4d, 0x68, 0x17, 0x68, 0x0f, 0x54, 0x88, 0xcb, 0xc8, 0x81, 0x03, + 0x97, 0xc9, 0x6d, 0xad, 0x2c, 0x5a, 0x1a, 0x67, 0x89, 0xcb, 0xa8, 0x10, 0x17, 0xc4, 0x07, 0x98, + 0xc4, 0x27, 0xe0, 0xc6, 0x71, 0x87, 0x7d, 0x88, 0x1d, 0x27, 0x71, 0xd9, 0x09, 0xa1, 0x16, 0x89, + 0xaf, 0x81, 0x62, 0x3b, 0xcc, 0x65, 0xa6, 0xac, 0x97, 0xc8, 0x8d, 0x9f, 0xc7, 0xef, 0xef, 0x79, + 0xfd, 0x36, 0x70, 0x39, 0xe1, 0x7b, 0x22, 0xe5, 0x51, 0x44, 0x68, 0x92, 0x44, 0x61, 0x8f, 0x8a, + 0x90, 0xc7, 0x64, 0x7f, 0xc8, 0xd2, 0x11, 0x4e, 0x52, 0x2e, 0x38, 0xaa, 0x15, 0x0a, 0x6c, 0x28, + 0x9c, 0xeb, 0x74, 0x10, 0xc6, 0x9c, 0xc8, 0xa7, 0x12, 0x3a, 0xb5, 0x80, 0x07, 0x5c, 0x2e, 0x49, + 0xbe, 0xd2, 0x6f, 0xeb, 0x01, 0xe7, 0x41, 0xc4, 0x08, 0x4d, 0x42, 0x42, 0xe3, 0x98, 0x0b, 0xe9, + 0xcf, 0xf4, 0xee, 0x7a, 0x8f, 0x67, 0x03, 0x9e, 0x91, 0x2e, 0xcd, 0x98, 0xaa, 0x4a, 0xde, 0x34, + 0xba, 0x4c, 0xd0, 0x06, 0x49, 0x68, 0x10, 0xc6, 0x52, 0xac, 0xb5, 0xae, 0xa9, 0x2d, 0x54, 0x3d, + 0x1e, 0x16, 0xfb, 0x2b, 0xd6, 0x28, 0x09, 0x4d, 0xe9, 0xa0, 0x28, 0x67, 0x4f, 0x2b, 0x46, 0x09, + 0xd3, 0x0a, 0xaf, 0x06, 0xd1, 0xcb, 0x1c, 0x63, 0x5b, 0xda, 0x7c, 0xb6, 0x3f, 0x64, 0x99, 0xf0, + 0x5e, 0xc1, 0x1b, 0x53, 0x6f, 0xb3, 0x84, 0xc7, 0x19, 0x43, 0x4f, 0x60, 0x45, 0x1d, 0xbf, 0x04, + 0x96, 0xc1, 0x6a, 0xb5, 0x59, 0xc7, 0xb6, 0x5e, 0x61, 0xe5, 0x6a, 0x2f, 0x9e, 0x7c, 0xbb, 0x53, + 0xfa, 0xf2, 0xf3, 0x68, 0x1d, 0xf8, 0xda, 0xe6, 0x6d, 0x42, 0x47, 0x9e, 0xdb, 0x61, 0xa2, 0x75, + 0x6e, 0xd0, 0x55, 0xd1, 0x12, 0xbc, 0x42, 0xfb, 0xfd, 0x94, 0x65, 0xea, 0xfc, 0x45, 0xbf, 0xf8, + 0xe9, 0xed, 0xc2, 0xdb, 0x56, 0x9f, 0xe6, 0x7a, 0x0e, 0xab, 0x46, 0x7d, 0x0d, 0xb7, 0x62, 0x87, + 0x33, 0xfc, 0xed, 0x85, 0x9c, 0xd0, 0x37, 0xbd, 0xde, 0x67, 0xa0, 0x4b, 0xb5, 0xa2, 0xc8, 0x90, + 0x16, 0x9d, 0x41, 0xcf, 0x20, 0x3c, 0xbf, 0x28, 0x5d, 0xe9, 0x2e, 0x56, 0x37, 0x85, 0xf3, 0x9b, + 0xc2, 0x6a, 0x96, 0xf4, 0x7d, 0xe1, 0x6d, 0x1a, 0x30, 0xed, 0xf5, 0x0d, 0x27, 0xda, 0x82, 0xb7, + 0xfa, 0x2c, 0x62, 0x01, 0x15, 0x8c, 0xed, 0xe4, 0xcf, 0x03, 0x3a, 0xda, 0x29, 0xd2, 0x97, 0x65, + 0xfa, 0x9b, 0xbf, 0x05, 0x1d, 0xb5, 0xdf, 0xd2, 0xdd, 0x38, 0x06, 0xb0, 0x6e, 0x67, 0xd4, 0xfd, + 0x78, 0x01, 0xaf, 0x1a, 0x99, 0xf2, 0x6e, 0xfe, 0x37, 0x4f, 0x43, 0xa6, 0xcc, 0xa8, 0x33, 0x95, + 0xb8, 0x2c, 0x13, 0xdf, 0xfb, 0x67, 0x62, 0x45, 0x62, 0x46, 0x6e, 0x7e, 0x5c, 0x80, 0xff, 0x4b, + 0x6c, 0x74, 0x08, 0x60, 0x45, 0x0d, 0x09, 0x5a, 0xb5, 0x43, 0x5d, 0x9c, 0x49, 0x67, 0xed, 0x12, + 0x4a, 0x55, 0xd5, 0x6b, 0x7c, 0xf8, 0xfa, 0xe3, 0x53, 0xf9, 0x3e, 0x5a, 0x23, 0xb9, 0xe5, 0x41, + 0xcc, 0xc4, 0x01, 0x4f, 0xf7, 0xc8, 0x8c, 0xff, 0x0b, 0x3a, 0x06, 0xb0, 0x6a, 0x74, 0x02, 0x6d, + 0xcc, 0xa8, 0x66, 0x9d, 0x5e, 0xa7, 0x31, 0x87, 0x43, 0x73, 0x3e, 0x95, 0x9c, 0x5b, 0xe8, 0xf1, + 0x25, 0x38, 0xcd, 0xf5, 0x3b, 0x3d, 0x28, 0xef, 0xd1, 0x11, 0x80, 0xd7, 0xfe, 0x98, 0x02, 0x34, + 0x0b, 0xc4, 0x3e, 0xd5, 0x4e, 0x73, 0x1e, 0x8b, 0x86, 0xdf, 0x94, 0xf0, 0x1b, 0x08, 0xcf, 0x07, + 0xdf, 0xf6, 0x4f, 0xc6, 0x2e, 0x38, 0x1d, 0xbb, 0xe0, 0x6c, 0xec, 0x82, 0xef, 0x63, 0x17, 0x1c, + 0x4e, 0xdc, 0xd2, 0xe9, 0xc4, 0x2d, 0x9d, 0x4d, 0xdc, 0xd2, 0xeb, 0x47, 0x41, 0x28, 0x76, 0x87, + 0x5d, 0xdc, 0xe3, 0x83, 0xbf, 0x9c, 0xfb, 0xf6, 0xe2, 0xb7, 0xac, 0x5b, 0x91, 0x1f, 0xb3, 0x87, + 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x43, 0x1f, 0xbc, 0xde, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Application items. + Application(ctx context.Context, in *QueryGetApplicationRequest, opts ...grpc.CallOption) (*QueryGetApplicationResponse, error) + AllApplications(ctx context.Context, in *QueryAllApplicationsRequest, opts ...grpc.CallOption) (*QueryAllApplicationsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Application(ctx context.Context, in *QueryGetApplicationRequest, opts ...grpc.CallOption) (*QueryGetApplicationResponse, error) { + out := new(QueryGetApplicationResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Query/Application", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllApplications(ctx context.Context, in *QueryAllApplicationsRequest, opts ...grpc.CallOption) (*QueryAllApplicationsResponse, error) { + out := new(QueryAllApplicationsResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Query/AllApplications", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Application items. + Application(context.Context, *QueryGetApplicationRequest) (*QueryGetApplicationResponse, error) + AllApplications(context.Context, *QueryAllApplicationsRequest) (*QueryAllApplicationsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Application(ctx context.Context, req *QueryGetApplicationRequest) (*QueryGetApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Application not implemented") +} +func (*UnimplementedQueryServer) AllApplications(ctx context.Context, req *QueryAllApplicationsRequest) (*QueryAllApplicationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllApplications not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Application_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetApplicationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Application(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Query/Application", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Application(ctx, req.(*QueryGetApplicationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllApplications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllApplicationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllApplications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Query/AllApplications", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllApplications(ctx, req.(*QueryAllApplicationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.application.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Application", + Handler: _Query_Application_Handler, + }, + { + MethodName: "AllApplications", + Handler: _Query_AllApplications_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/application/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetApplicationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetApplicationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetApplicationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetApplicationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetApplicationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetApplicationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllApplicationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllApplicationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllApplicationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DelegateeGatewayAddress) > 0 { + i -= len(m.DelegateeGatewayAddress) + copy(dAtA[i:], m.DelegateeGatewayAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegateeGatewayAddress))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllApplicationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllApplicationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllApplicationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Applications) > 0 { + for iNdEx := len(m.Applications) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Applications[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetApplicationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetApplicationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Application.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllApplicationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.DelegateeGatewayAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllApplicationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Applications) > 0 { + for _, e := range m.Applications { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetApplicationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetApplicationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetApplicationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetApplicationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetApplicationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllApplicationsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllApplicationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllApplicationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegateeGatewayAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegateeGatewayAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllApplicationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllApplicationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllApplicationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Applications", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Applications = append(m.Applications, Application{}) + if err := m.Applications[len(m.Applications)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/application/types/query.pb.gw.go b/x/application/types/query.pb.gw.go new file mode 100644 index 000000000..362f63ea2 --- /dev/null +++ b/x/application/types/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/application/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Application_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetApplicationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Application(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Application_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetApplicationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Application(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllApplications_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllApplications_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllApplicationsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllApplications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllApplications(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllApplications_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllApplicationsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllApplications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllApplications(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Application_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Application_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Application_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllApplications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllApplications_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllApplications_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Application_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Application_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Application_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllApplications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllApplications_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllApplications_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "application", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Application_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pokt-network", "poktroll", "application", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllApplications_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"pokt-network", "poktroll", "application"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Application_0 = runtime.ForwardResponseMessage + + forward_Query_AllApplications_0 = runtime.ForwardResponseMessage +) diff --git a/x/application/types/tx.pb.go b/x/application/types/tx.pb.go new file mode 100644 index 000000000..27f5f6f20 --- /dev/null +++ b/x/application/types/tx.pb.go @@ -0,0 +1,3386 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/pokt-network/poktroll/x/shared/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/application parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +type MsgStakeApplication struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Stake *types.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` + Services []*types1.ApplicationServiceConfig `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"` +} + +func (m *MsgStakeApplication) Reset() { *m = MsgStakeApplication{} } +func (m *MsgStakeApplication) String() string { return proto.CompactTextString(m) } +func (*MsgStakeApplication) ProtoMessage() {} +func (*MsgStakeApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{2} +} +func (m *MsgStakeApplication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeApplication.Merge(m, src) +} +func (m *MsgStakeApplication) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeApplication) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeApplication proto.InternalMessageInfo + +func (m *MsgStakeApplication) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgStakeApplication) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +func (m *MsgStakeApplication) GetServices() []*types1.ApplicationServiceConfig { + if m != nil { + return m.Services + } + return nil +} + +type MsgStakeApplicationResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgStakeApplicationResponse) Reset() { *m = MsgStakeApplicationResponse{} } +func (m *MsgStakeApplicationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStakeApplicationResponse) ProtoMessage() {} +func (*MsgStakeApplicationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{3} +} +func (m *MsgStakeApplicationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeApplicationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeApplicationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeApplicationResponse.Merge(m, src) +} +func (m *MsgStakeApplicationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeApplicationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeApplicationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeApplicationResponse proto.InternalMessageInfo + +func (m *MsgStakeApplicationResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +type MsgUnstakeApplication struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgUnstakeApplication) Reset() { *m = MsgUnstakeApplication{} } +func (m *MsgUnstakeApplication) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeApplication) ProtoMessage() {} +func (*MsgUnstakeApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{4} +} +func (m *MsgUnstakeApplication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeApplication.Merge(m, src) +} +func (m *MsgUnstakeApplication) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeApplication) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeApplication proto.InternalMessageInfo + +func (m *MsgUnstakeApplication) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type MsgUnstakeApplicationResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgUnstakeApplicationResponse) Reset() { *m = MsgUnstakeApplicationResponse{} } +func (m *MsgUnstakeApplicationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeApplicationResponse) ProtoMessage() {} +func (*MsgUnstakeApplicationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{5} +} +func (m *MsgUnstakeApplicationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeApplicationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeApplicationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeApplicationResponse.Merge(m, src) +} +func (m *MsgUnstakeApplicationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeApplicationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeApplicationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeApplicationResponse proto.InternalMessageInfo + +func (m *MsgUnstakeApplicationResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +type MsgDelegateToGateway struct { + AppAddress string `protobuf:"bytes,1,opt,name=app_address,json=appAddress,proto3" json:"app_address,omitempty"` + GatewayAddress string `protobuf:"bytes,2,opt,name=gateway_address,json=gatewayAddress,proto3" json:"gateway_address,omitempty"` +} + +func (m *MsgDelegateToGateway) Reset() { *m = MsgDelegateToGateway{} } +func (m *MsgDelegateToGateway) String() string { return proto.CompactTextString(m) } +func (*MsgDelegateToGateway) ProtoMessage() {} +func (*MsgDelegateToGateway) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{6} +} +func (m *MsgDelegateToGateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDelegateToGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgDelegateToGateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDelegateToGateway.Merge(m, src) +} +func (m *MsgDelegateToGateway) XXX_Size() int { + return m.Size() +} +func (m *MsgDelegateToGateway) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDelegateToGateway.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDelegateToGateway proto.InternalMessageInfo + +func (m *MsgDelegateToGateway) GetAppAddress() string { + if m != nil { + return m.AppAddress + } + return "" +} + +func (m *MsgDelegateToGateway) GetGatewayAddress() string { + if m != nil { + return m.GatewayAddress + } + return "" +} + +type MsgDelegateToGatewayResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgDelegateToGatewayResponse) Reset() { *m = MsgDelegateToGatewayResponse{} } +func (m *MsgDelegateToGatewayResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDelegateToGatewayResponse) ProtoMessage() {} +func (*MsgDelegateToGatewayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{7} +} +func (m *MsgDelegateToGatewayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDelegateToGatewayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgDelegateToGatewayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDelegateToGatewayResponse.Merge(m, src) +} +func (m *MsgDelegateToGatewayResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDelegateToGatewayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDelegateToGatewayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDelegateToGatewayResponse proto.InternalMessageInfo + +func (m *MsgDelegateToGatewayResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +type MsgUndelegateFromGateway struct { + AppAddress string `protobuf:"bytes,1,opt,name=app_address,json=appAddress,proto3" json:"app_address,omitempty"` + GatewayAddress string `protobuf:"bytes,2,opt,name=gateway_address,json=gatewayAddress,proto3" json:"gateway_address,omitempty"` +} + +func (m *MsgUndelegateFromGateway) Reset() { *m = MsgUndelegateFromGateway{} } +func (m *MsgUndelegateFromGateway) String() string { return proto.CompactTextString(m) } +func (*MsgUndelegateFromGateway) ProtoMessage() {} +func (*MsgUndelegateFromGateway) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{8} +} +func (m *MsgUndelegateFromGateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUndelegateFromGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUndelegateFromGateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUndelegateFromGateway.Merge(m, src) +} +func (m *MsgUndelegateFromGateway) XXX_Size() int { + return m.Size() +} +func (m *MsgUndelegateFromGateway) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUndelegateFromGateway.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUndelegateFromGateway proto.InternalMessageInfo + +func (m *MsgUndelegateFromGateway) GetAppAddress() string { + if m != nil { + return m.AppAddress + } + return "" +} + +func (m *MsgUndelegateFromGateway) GetGatewayAddress() string { + if m != nil { + return m.GatewayAddress + } + return "" +} + +type MsgUndelegateFromGatewayResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgUndelegateFromGatewayResponse) Reset() { *m = MsgUndelegateFromGatewayResponse{} } +func (m *MsgUndelegateFromGatewayResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUndelegateFromGatewayResponse) ProtoMessage() {} +func (*MsgUndelegateFromGatewayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{9} +} +func (m *MsgUndelegateFromGatewayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUndelegateFromGatewayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUndelegateFromGatewayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUndelegateFromGatewayResponse.Merge(m, src) +} +func (m *MsgUndelegateFromGatewayResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUndelegateFromGatewayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUndelegateFromGatewayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUndelegateFromGatewayResponse proto.InternalMessageInfo + +func (m *MsgUndelegateFromGatewayResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +type MsgTransferApplication struct { + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` +} + +func (m *MsgTransferApplication) Reset() { *m = MsgTransferApplication{} } +func (m *MsgTransferApplication) String() string { return proto.CompactTextString(m) } +func (*MsgTransferApplication) ProtoMessage() {} +func (*MsgTransferApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{10} +} +func (m *MsgTransferApplication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgTransferApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferApplication.Merge(m, src) +} +func (m *MsgTransferApplication) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferApplication) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferApplication proto.InternalMessageInfo + +func (m *MsgTransferApplication) GetSourceAddress() string { + if m != nil { + return m.SourceAddress + } + return "" +} + +func (m *MsgTransferApplication) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +type MsgTransferApplicationResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgTransferApplicationResponse) Reset() { *m = MsgTransferApplicationResponse{} } +func (m *MsgTransferApplicationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferApplicationResponse) ProtoMessage() {} +func (*MsgTransferApplicationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{11} +} +func (m *MsgTransferApplicationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferApplicationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgTransferApplicationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferApplicationResponse.Merge(m, src) +} +func (m *MsgTransferApplicationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferApplicationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferApplicationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferApplicationResponse proto.InternalMessageInfo + +func (m *MsgTransferApplicationResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // + // *MsgUpdateParam_AsUint64 + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{12} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsUint64 struct { + AsUint64 uint64 `protobuf:"varint,3,opt,name=as_uint64,json=asUint64,proto3,oneof" json:"as_uint64"` +} +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,4,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin"` +} + +func (*MsgUpdateParam_AsUint64) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsUint64() uint64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsUint64); ok { + return x.AsUint64 + } + return 0 +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsUint64)(nil), + (*MsgUpdateParam_AsCoin)(nil), + } +} + +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{13} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.application.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.application.MsgUpdateParamsResponse") + proto.RegisterType((*MsgStakeApplication)(nil), "poktroll.application.MsgStakeApplication") + proto.RegisterType((*MsgStakeApplicationResponse)(nil), "poktroll.application.MsgStakeApplicationResponse") + proto.RegisterType((*MsgUnstakeApplication)(nil), "poktroll.application.MsgUnstakeApplication") + proto.RegisterType((*MsgUnstakeApplicationResponse)(nil), "poktroll.application.MsgUnstakeApplicationResponse") + proto.RegisterType((*MsgDelegateToGateway)(nil), "poktroll.application.MsgDelegateToGateway") + proto.RegisterType((*MsgDelegateToGatewayResponse)(nil), "poktroll.application.MsgDelegateToGatewayResponse") + proto.RegisterType((*MsgUndelegateFromGateway)(nil), "poktroll.application.MsgUndelegateFromGateway") + proto.RegisterType((*MsgUndelegateFromGatewayResponse)(nil), "poktroll.application.MsgUndelegateFromGatewayResponse") + proto.RegisterType((*MsgTransferApplication)(nil), "poktroll.application.MsgTransferApplication") + proto.RegisterType((*MsgTransferApplicationResponse)(nil), "poktroll.application.MsgTransferApplicationResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.application.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.application.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/application/tx.proto", fileDescriptor_bed224e38ab1cc6d) } + +var fileDescriptor_bed224e38ab1cc6d = []byte{ + // 904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0xd6, 0xc5, 0x8e, 0x62, 0x3d, 0x25, 0x4e, 0x42, 0x3b, 0x0d, 0xcd, 0x26, 0xb4, 0x42, 0xb4, + 0x85, 0xe3, 0xda, 0x24, 0xac, 0x18, 0x06, 0xe2, 0xc5, 0xb0, 0xdc, 0x1f, 0xe9, 0xa0, 0xa2, 0xa0, + 0x9d, 0xa5, 0x8b, 0x71, 0x12, 0x2f, 0x34, 0x61, 0x89, 0x47, 0xf0, 0x4e, 0x4a, 0x34, 0xb5, 0xe8, + 0xd8, 0xa9, 0x7f, 0x45, 0x51, 0x74, 0xd2, 0xd0, 0xa5, 0x7f, 0x40, 0x81, 0x6c, 0x0d, 0x3a, 0x65, + 0x32, 0x0a, 0x79, 0x10, 0xe0, 0xbf, 0xa2, 0xe0, 0x4f, 0x51, 0x14, 0x55, 0xd1, 0x85, 0x86, 0x2e, + 0x36, 0x79, 0xef, 0x7b, 0xdf, 0xfb, 0xde, 0x77, 0xd4, 0xbd, 0x83, 0xc7, 0x0e, 0x3d, 0xe7, 0x2e, + 0x6d, 0xb5, 0x34, 0xec, 0x38, 0x2d, 0xab, 0x89, 0xb9, 0x45, 0x6d, 0x8d, 0xbf, 0x51, 0x1d, 0x97, + 0x72, 0x2a, 0xac, 0x46, 0x61, 0x35, 0x11, 0x96, 0xee, 0xe3, 0xb6, 0x65, 0x53, 0xcd, 0xff, 0x1b, + 0x00, 0xa5, 0xb5, 0x26, 0x65, 0x6d, 0xca, 0x4e, 0xfd, 0x37, 0x2d, 0x78, 0x09, 0x43, 0x72, 0xf0, + 0xa6, 0x35, 0x30, 0x23, 0x5a, 0x77, 0xa7, 0x41, 0x38, 0xde, 0xd1, 0x9a, 0xd4, 0xb2, 0xc3, 0xf8, + 0xc3, 0x30, 0xde, 0x66, 0xa6, 0xd6, 0xdd, 0xf1, 0xfe, 0x85, 0x81, 0x55, 0x93, 0x9a, 0x34, 0x20, + 0xf4, 0x9e, 0xc2, 0xd5, 0x4a, 0xb6, 0xe2, 0x9e, 0x43, 0xa2, 0x82, 0x4f, 0x32, 0x11, 0x0e, 0x76, + 0x71, 0x3b, 0x82, 0x8c, 0xda, 0x66, 0x67, 0xd8, 0x25, 0x86, 0xc6, 0x88, 0xdb, 0xb5, 0x9a, 0x24, + 0x08, 0x2b, 0x7f, 0x20, 0xb8, 0x5b, 0x67, 0xe6, 0x4b, 0xc7, 0xc0, 0x9c, 0x7c, 0xe3, 0x27, 0x0a, + 0x7b, 0x50, 0xc2, 0x1d, 0x7e, 0x46, 0x5d, 0x8b, 0xf7, 0x44, 0x54, 0x41, 0x1b, 0xa5, 0x9a, 0xf8, + 0xd7, 0x6f, 0xdb, 0xab, 0x61, 0xaf, 0x87, 0x86, 0xe1, 0x12, 0xc6, 0x8e, 0xb9, 0x6b, 0xd9, 0xa6, + 0x3e, 0x82, 0x0a, 0x07, 0x50, 0x0c, 0x4a, 0x8b, 0x37, 0x2a, 0x68, 0xa3, 0x5c, 0x7d, 0xa4, 0x66, + 0x79, 0xaa, 0x06, 0x55, 0x6a, 0xa5, 0xb7, 0x17, 0xeb, 0x85, 0x5f, 0x86, 0xfd, 0x4d, 0xa4, 0x87, + 0x69, 0xfb, 0xcf, 0x7f, 0x18, 0xf6, 0x37, 0x47, 0x84, 0x3f, 0x0e, 0xfb, 0x9b, 0x9f, 0xc4, 0xf2, + 0xdf, 0x8c, 0xf5, 0x98, 0xd2, 0xac, 0xac, 0xc1, 0xc3, 0xd4, 0x92, 0x4e, 0x98, 0x43, 0x6d, 0x46, + 0x94, 0x3f, 0x11, 0xac, 0xd4, 0x99, 0x79, 0xcc, 0xf1, 0x39, 0x39, 0x1c, 0x51, 0x08, 0x55, 0xb8, + 0x85, 0x83, 0x56, 0x66, 0x36, 0x19, 0x01, 0x05, 0x0d, 0x6e, 0x32, 0x8f, 0x27, 0xec, 0x70, 0x4d, + 0x0d, 0xe1, 0xde, 0x8e, 0xab, 0xe1, 0x8e, 0xab, 0x47, 0xd4, 0xb2, 0xf5, 0x00, 0x27, 0x7c, 0x0e, + 0x4b, 0xa1, 0xe1, 0x4c, 0x5c, 0xa8, 0x2c, 0x6c, 0x94, 0xab, 0x4f, 0x47, 0xae, 0x04, 0x3b, 0xa2, + 0x26, 0x44, 0x1d, 0x07, 0xd8, 0x23, 0x6a, 0xbf, 0xb2, 0x4c, 0x3d, 0x4e, 0xdd, 0xbf, 0xed, 0x39, + 0x13, 0xa9, 0x50, 0x1a, 0xf0, 0x61, 0x46, 0x43, 0x51, 0xc3, 0xc2, 0x11, 0x94, 0x13, 0x56, 0xf9, + 0xcd, 0x95, 0xab, 0x4f, 0xb2, 0x37, 0x23, 0x99, 0x9f, 0xcc, 0x52, 0x0e, 0xe0, 0x81, 0x67, 0xa8, + 0xcd, 0xd2, 0xb6, 0x89, 0x29, 0xdb, 0x62, 0x73, 0x52, 0x22, 0x0d, 0x78, 0x9c, 0x49, 0x30, 0x5f, + 0x99, 0x3f, 0x23, 0x58, 0xad, 0x33, 0xf3, 0x33, 0xd2, 0x22, 0x26, 0xe6, 0xe4, 0x84, 0x7e, 0x89, + 0x39, 0x79, 0x8d, 0x7b, 0xc2, 0x73, 0x9f, 0xfd, 0x34, 0xef, 0x0e, 0x03, 0x76, 0x9c, 0x70, 0x45, + 0x38, 0x84, 0xbb, 0x66, 0xc0, 0x12, 0xa7, 0xdf, 0x98, 0x91, 0xbe, 0x1c, 0x26, 0x84, 0xab, 0xfb, + 0xf7, 0x3c, 0x2b, 0x92, 0x02, 0x94, 0x26, 0x3c, 0xca, 0xd2, 0x39, 0x5f, 0x37, 0x7e, 0x45, 0x20, + 0xfa, 0xa6, 0x1b, 0x61, 0x9d, 0x2f, 0x5c, 0xda, 0xfe, 0xbf, 0x3a, 0x62, 0x42, 0x65, 0x9a, 0xd6, + 0xf9, 0xba, 0xf2, 0x3b, 0x82, 0x0f, 0xea, 0xcc, 0x3c, 0x71, 0xb1, 0xcd, 0x5e, 0x11, 0x37, 0xf9, + 0x31, 0x1f, 0xc0, 0x32, 0xa3, 0x1d, 0xb7, 0x49, 0x72, 0xdb, 0x72, 0x27, 0xc0, 0x47, 0xce, 0x7c, + 0x05, 0x2b, 0x06, 0x61, 0xdc, 0xb2, 0x7d, 0xbe, 0xdc, 0xee, 0x08, 0x89, 0xa4, 0xc8, 0xa1, 0x15, + 0xcf, 0xa1, 0x94, 0x1c, 0x85, 0x80, 0x9c, 0x2d, 0x7d, 0xbe, 0x16, 0x0d, 0x11, 0x2c, 0x8f, 0x9f, + 0x9f, 0xff, 0x79, 0x0a, 0x08, 0xb0, 0x68, 0xe3, 0x76, 0x70, 0x42, 0x96, 0x74, 0xff, 0x59, 0xd8, + 0x82, 0x12, 0x66, 0xa7, 0x1d, 0xcb, 0xe6, 0x7b, 0xbb, 0xe2, 0x42, 0x05, 0x6d, 0x2c, 0xd6, 0xee, + 0x5c, 0x5d, 0xac, 0x8f, 0x16, 0x5f, 0x14, 0xf4, 0x25, 0xcc, 0x5e, 0xfa, 0xcf, 0xc2, 0x21, 0xdc, + 0xc2, 0xec, 0xd4, 0x9b, 0x9b, 0xe2, 0xe2, 0x8c, 0x63, 0xb6, 0x56, 0xbe, 0xba, 0x58, 0x8f, 0xd0, + 0x2f, 0x0a, 0x7a, 0x11, 0x33, 0x6f, 0x79, 0x7f, 0x79, 0x7c, 0x92, 0xd4, 0x96, 0xa0, 0x88, 0xd9, + 0x49, 0xcf, 0x21, 0xca, 0xd7, 0xfe, 0xb7, 0x90, 0x68, 0x34, 0x36, 0x72, 0x37, 0x1e, 0x5f, 0x68, + 0xf6, 0xf8, 0x8a, 0x66, 0x56, 0xb5, 0x5f, 0x84, 0x85, 0x3a, 0x33, 0x05, 0x03, 0x6e, 0x8f, 0x0d, + 0xd1, 0x8f, 0xb3, 0xb3, 0x53, 0x43, 0x4a, 0xda, 0xce, 0x05, 0x8b, 0x35, 0x3a, 0x70, 0x6f, 0x62, + 0x8e, 0x3d, 0x9d, 0x4a, 0x91, 0x86, 0x4a, 0x3b, 0xb9, 0xa1, 0x71, 0xc5, 0x2e, 0x08, 0x19, 0x43, + 0xe0, 0xd3, 0xe9, 0xb2, 0x27, 0xc0, 0xd2, 0xb3, 0x6b, 0x80, 0xe3, 0xba, 0x0c, 0xee, 0x4f, 0x1e, + 0xea, 0x9b, 0x53, 0x99, 0x26, 0xb0, 0x52, 0x35, 0x3f, 0x36, 0x2e, 0xfa, 0x1d, 0x3c, 0xc8, 0x3e, + 0x3b, 0xd5, 0x7f, 0x69, 0x21, 0x03, 0x2f, 0xed, 0x5d, 0x0f, 0x1f, 0x0b, 0xe8, 0xc1, 0x4a, 0xd6, + 0x31, 0xb5, 0x35, 0x95, 0x2e, 0x03, 0x2d, 0xed, 0x5e, 0x07, 0x1d, 0x97, 0xc6, 0x50, 0x4e, 0xfe, + 0xfc, 0x3f, 0xca, 0xf3, 0x61, 0x4a, 0x5b, 0x79, 0x50, 0x51, 0x09, 0xe9, 0xe6, 0xf7, 0xde, 0x75, + 0xaf, 0xa6, 0xbf, 0x1d, 0xc8, 0xe8, 0xdd, 0x40, 0x46, 0xef, 0x07, 0x32, 0xfa, 0x7b, 0x20, 0xa3, + 0x9f, 0x2e, 0xe5, 0xc2, 0xbb, 0x4b, 0xb9, 0xf0, 0xfe, 0x52, 0x2e, 0x7c, 0xbb, 0x6b, 0x5a, 0xfc, + 0xac, 0xd3, 0x50, 0x9b, 0xb4, 0xad, 0x79, 0xe4, 0xdb, 0x36, 0xe1, 0xaf, 0xa9, 0x7b, 0xae, 0x4d, + 0xb9, 0x09, 0xfa, 0xf7, 0xe1, 0x46, 0xd1, 0xbf, 0xce, 0x3e, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, + 0xe7, 0x83, 0x9b, 0xb4, 0xe6, 0x0b, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeApplication(ctx context.Context, in *MsgStakeApplication, opts ...grpc.CallOption) (*MsgStakeApplicationResponse, error) + UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) + DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) + UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeApplication(ctx context.Context, in *MsgStakeApplication, opts ...grpc.CallOption) (*MsgStakeApplicationResponse, error) { + out := new(MsgStakeApplicationResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/StakeApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) { + out := new(MsgUnstakeApplicationResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/UnstakeApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) { + out := new(MsgDelegateToGatewayResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/DelegateToGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) { + out := new(MsgUndelegateFromGatewayResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/UndelegateFromGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) { + out := new(MsgTransferApplicationResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/TransferApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeApplication(context.Context, *MsgStakeApplication) (*MsgStakeApplicationResponse, error) + UnstakeApplication(context.Context, *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) + DelegateToGateway(context.Context, *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) + UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) StakeApplication(ctx context.Context, req *MsgStakeApplication) (*MsgStakeApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeApplication not implemented") +} +func (*UnimplementedMsgServer) UnstakeApplication(ctx context.Context, req *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeApplication not implemented") +} +func (*UnimplementedMsgServer) DelegateToGateway(ctx context.Context, req *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegateToGateway not implemented") +} +func (*UnimplementedMsgServer) UndelegateFromGateway(ctx context.Context, req *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UndelegateFromGateway not implemented") +} +func (*UnimplementedMsgServer) TransferApplication(ctx context.Context, req *MsgTransferApplication) (*MsgTransferApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferApplication not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/StakeApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeApplication(ctx, req.(*MsgStakeApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/UnstakeApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeApplication(ctx, req.(*MsgUnstakeApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelegateToGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDelegateToGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelegateToGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/DelegateToGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelegateToGateway(ctx, req.(*MsgDelegateToGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UndelegateFromGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUndelegateFromGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UndelegateFromGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/UndelegateFromGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UndelegateFromGateway(ctx, req.(*MsgUndelegateFromGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TransferApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/TransferApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferApplication(ctx, req.(*MsgTransferApplication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.application.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeApplication", + Handler: _Msg_StakeApplication_Handler, + }, + { + MethodName: "UnstakeApplication", + Handler: _Msg_UnstakeApplication_Handler, + }, + { + MethodName: "DelegateToGateway", + Handler: _Msg_DelegateToGateway_Handler, + }, + { + MethodName: "UndelegateFromGateway", + Handler: _Msg_UndelegateFromGateway_Handler, + }, + { + MethodName: "TransferApplication", + Handler: _Msg_TransferApplication_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/application/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStakeApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeApplication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeApplication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStakeApplicationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeApplicationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeApplicationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeApplication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeApplication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeApplicationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeApplicationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeApplicationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDelegateToGateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDelegateToGateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegateToGateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GatewayAddress) > 0 { + i -= len(m.GatewayAddress) + copy(dAtA[i:], m.GatewayAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GatewayAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.AppAddress) > 0 { + i -= len(m.AppAddress) + copy(dAtA[i:], m.AppAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.AppAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDelegateToGatewayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDelegateToGatewayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDelegateToGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUndelegateFromGateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUndelegateFromGateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUndelegateFromGateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GatewayAddress) > 0 { + i -= len(m.GatewayAddress) + copy(dAtA[i:], m.GatewayAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.GatewayAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.AppAddress) > 0 { + i -= len(m.AppAddress) + copy(dAtA[i:], m.AppAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.AppAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUndelegateFromGatewayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUndelegateFromGatewayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUndelegateFromGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferApplication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferApplication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourceAddress) > 0 { + i -= len(m.SourceAddress) + copy(dAtA[i:], m.SourceAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferApplicationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferApplicationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferApplicationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsUint64) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsUint64) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.AsUint64)) + i-- + dAtA[i] = 0x18 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStakeApplication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Services) > 0 { + for _, e := range m.Services { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgStakeApplicationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeApplication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeApplicationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDelegateToGateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AppAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.GatewayAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDelegateToGatewayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUndelegateFromGateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AppAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.GatewayAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUndelegateFromGatewayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferApplication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourceAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferApplicationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsUint64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.AsUint64)) + return n +} +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, &types1.ApplicationServiceConfig{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeApplicationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeApplicationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeApplicationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeApplicationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDelegateToGateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDelegateToGateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegateToGateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDelegateToGatewayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDelegateToGatewayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDelegateToGatewayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUndelegateFromGateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUndelegateFromGateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUndelegateFromGateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUndelegateFromGatewayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUndelegateFromGatewayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUndelegateFromGatewayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferApplicationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferApplicationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsUint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsType = &MsgUpdateParam_AsUint64{v} + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/application/types/types.pb.go b/x/application/types/types.pb.go new file mode 100644 index 000000000..4a7e43bba --- /dev/null +++ b/x/application/types/types.pb.go @@ -0,0 +1,1166 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/application/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_sortkeys "github.com/cosmos/gogoproto/sortkeys" + types1 "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Application defines the type used to store an onchain definition and state for an application +type Application struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Stake *types.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` + // CRITICAL_DEV_NOTE: The number of service_configs must be EXACTLY ONE. + // This prevents applications from over-servicing. + // The field is kept repeated (a list) for both legacy and future logic reaosns. + // References: + // - https://github.com/pokt-network/poktroll/pull/750#discussion_r1735025033 + // - https://www.notion.so/buildwithgrove/Off-chain-Application-Stake-Tracking-6a8bebb107db4f7f9dc62cbe7ba555f7 + ServiceConfigs []*types1.ApplicationServiceConfig `protobuf:"bytes,3,rep,name=service_configs,json=serviceConfigs,proto3" json:"service_configs,omitempty"` + // TODO_BETA(@bryanchriswhite): Rename `delegatee_gateway_addresses` to `gateway_addresses_delegated_to`. + // Ensure to rename all relevant configs, comments, variables, function names, etc as well. + DelegateeGatewayAddresses []string `protobuf:"bytes,4,rep,name=delegatee_gateway_addresses,json=delegateeGatewayAddresses,proto3" json:"delegatee_gateway_addresses,omitempty"` + // A map from sessionEndHeights to a list of Gateways. + // The key is the height of the last block of the session during which the + // respective undelegation was committed. + // The value is a list of gateways being undelegated from. + // TODO_DOCUMENT(@red-0ne): Need to document the flow from this comment + // so its clear to everyone why this is necessary; https://github.com/pokt-network/poktroll/issues/476#issuecomment-2052639906. + PendingUndelegations map[uint64]UndelegatingGatewayList `protobuf:"bytes,5,rep,name=pending_undelegations,json=pendingUndelegations,proto3" json:"pending_undelegations" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The end height of the session at which an application initiated its unstaking process. + // If the application did not unstake, this value will be 0. + UnstakeSessionEndHeight uint64 `protobuf:"varint,6,opt,name=unstake_session_end_height,json=unstakeSessionEndHeight,proto3" json:"unstake_session_end_height,omitempty"` + PendingTransfer *PendingApplicationTransfer `protobuf:"bytes,7,opt,name=pending_transfer,json=pendingTransfer,proto3" json:"pending_transfer,omitempty"` +} + +func (m *Application) Reset() { *m = Application{} } +func (m *Application) String() string { return proto.CompactTextString(m) } +func (*Application) ProtoMessage() {} +func (*Application) Descriptor() ([]byte, []int) { + return fileDescriptor_1899440439257283, []int{0} +} +func (m *Application) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Application) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Application) XXX_Merge(src proto.Message) { + xxx_messageInfo_Application.Merge(m, src) +} +func (m *Application) XXX_Size() int { + return m.Size() +} +func (m *Application) XXX_DiscardUnknown() { + xxx_messageInfo_Application.DiscardUnknown(m) +} + +var xxx_messageInfo_Application proto.InternalMessageInfo + +func (m *Application) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Application) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +func (m *Application) GetServiceConfigs() []*types1.ApplicationServiceConfig { + if m != nil { + return m.ServiceConfigs + } + return nil +} + +func (m *Application) GetDelegateeGatewayAddresses() []string { + if m != nil { + return m.DelegateeGatewayAddresses + } + return nil +} + +func (m *Application) GetPendingUndelegations() map[uint64]UndelegatingGatewayList { + if m != nil { + return m.PendingUndelegations + } + return nil +} + +func (m *Application) GetUnstakeSessionEndHeight() uint64 { + if m != nil { + return m.UnstakeSessionEndHeight + } + return 0 +} + +func (m *Application) GetPendingTransfer() *PendingApplicationTransfer { + if m != nil { + return m.PendingTransfer + } + return nil +} + +// UndelegatingGatewayList is used as the Value of `pending_undelegations`. +// It is required to store a repeated list of strings as a map value. +type UndelegatingGatewayList struct { + GatewayAddresses []string `protobuf:"bytes,2,rep,name=gateway_addresses,json=gatewayAddresses,proto3" json:"gateway_addresses,omitempty"` +} + +func (m *UndelegatingGatewayList) Reset() { *m = UndelegatingGatewayList{} } +func (m *UndelegatingGatewayList) String() string { return proto.CompactTextString(m) } +func (*UndelegatingGatewayList) ProtoMessage() {} +func (*UndelegatingGatewayList) Descriptor() ([]byte, []int) { + return fileDescriptor_1899440439257283, []int{1} +} +func (m *UndelegatingGatewayList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UndelegatingGatewayList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *UndelegatingGatewayList) XXX_Merge(src proto.Message) { + xxx_messageInfo_UndelegatingGatewayList.Merge(m, src) +} +func (m *UndelegatingGatewayList) XXX_Size() int { + return m.Size() +} +func (m *UndelegatingGatewayList) XXX_DiscardUnknown() { + xxx_messageInfo_UndelegatingGatewayList.DiscardUnknown(m) +} + +var xxx_messageInfo_UndelegatingGatewayList proto.InternalMessageInfo + +func (m *UndelegatingGatewayList) GetGatewayAddresses() []string { + if m != nil { + return m.GatewayAddresses + } + return nil +} + +// PendingTransfer is used to store the details of a pending transfer. +// It is only intended to be used inside of an Application object. +type PendingApplicationTransfer struct { + DestinationAddress string `protobuf:"bytes,1,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + SessionEndHeight uint64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height,omitempty"` +} + +func (m *PendingApplicationTransfer) Reset() { *m = PendingApplicationTransfer{} } +func (m *PendingApplicationTransfer) String() string { return proto.CompactTextString(m) } +func (*PendingApplicationTransfer) ProtoMessage() {} +func (*PendingApplicationTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_1899440439257283, []int{2} +} +func (m *PendingApplicationTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingApplicationTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PendingApplicationTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingApplicationTransfer.Merge(m, src) +} +func (m *PendingApplicationTransfer) XXX_Size() int { + return m.Size() +} +func (m *PendingApplicationTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_PendingApplicationTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingApplicationTransfer proto.InternalMessageInfo + +func (m *PendingApplicationTransfer) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +func (m *PendingApplicationTransfer) GetSessionEndHeight() uint64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func init() { + proto.RegisterType((*Application)(nil), "poktroll.application.Application") + proto.RegisterMapType((map[uint64]UndelegatingGatewayList)(nil), "poktroll.application.Application.PendingUndelegationsEntry") + proto.RegisterType((*UndelegatingGatewayList)(nil), "poktroll.application.UndelegatingGatewayList") + proto.RegisterType((*PendingApplicationTransfer)(nil), "poktroll.application.PendingApplicationTransfer") +} + +func init() { proto.RegisterFile("poktroll/application/types.proto", fileDescriptor_1899440439257283) } + +var fileDescriptor_1899440439257283 = []byte{ + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x9b, 0xfe, 0xd9, 0x34, 0x57, 0x62, 0xc5, 0x14, 0x2d, 0x2d, 0x10, 0xa2, 0x9e, 0x8a, + 0x44, 0x13, 0x56, 0x38, 0x20, 0x76, 0x6a, 0xab, 0x09, 0x26, 0x71, 0x40, 0x29, 0x5c, 0x00, 0x29, + 0x4a, 0x13, 0x2f, 0xb5, 0xda, 0xd9, 0x51, 0x5e, 0xb7, 0xa3, 0xdf, 0x82, 0x0b, 0x5f, 0x83, 0x13, + 0x1f, 0x62, 0xc7, 0x89, 0xd3, 0x4e, 0x08, 0xb5, 0x5f, 0x64, 0x4a, 0xec, 0x74, 0xd1, 0xd6, 0x4a, + 0xbb, 0x54, 0x89, 0xdf, 0xe7, 0x79, 0xfb, 0xf3, 0xfb, 0x38, 0x46, 0x66, 0xc4, 0x27, 0x22, 0xe6, + 0xd3, 0xa9, 0xed, 0x45, 0xd1, 0x94, 0xfa, 0x9e, 0xa0, 0x9c, 0xd9, 0x62, 0x11, 0x11, 0xb0, 0xa2, + 0x98, 0x0b, 0x8e, 0xeb, 0x99, 0xc2, 0xca, 0x29, 0x9a, 0xf5, 0x90, 0x87, 0x3c, 0x15, 0xd8, 0xc9, + 0x93, 0xd4, 0x36, 0x0d, 0x9f, 0xc3, 0x19, 0x07, 0x7b, 0xe4, 0x01, 0xb1, 0xe7, 0x87, 0x23, 0x22, + 0xbc, 0x43, 0xdb, 0xe7, 0x94, 0xa9, 0x7a, 0x43, 0xd6, 0x5d, 0x69, 0x94, 0x2f, 0xaa, 0xf4, 0x6c, + 0x0d, 0x02, 0x63, 0x2f, 0x26, 0x81, 0x0d, 0x24, 0x9e, 0x53, 0x9f, 0xc8, 0x72, 0xeb, 0x77, 0x05, + 0x55, 0x7b, 0x37, 0xff, 0x8f, 0xbb, 0x68, 0xd7, 0x0b, 0x82, 0x98, 0x00, 0xe8, 0x9a, 0xa9, 0xb5, + 0xf7, 0xfa, 0xfa, 0xdf, 0x3f, 0x9d, 0xba, 0xea, 0xd8, 0x93, 0x95, 0xa1, 0x88, 0x29, 0x0b, 0x9d, + 0x4c, 0x88, 0x6d, 0x54, 0x01, 0xe1, 0x4d, 0x88, 0x5e, 0x34, 0xb5, 0x76, 0xb5, 0xdb, 0xb0, 0x94, + 0x3c, 0xa1, 0xb5, 0x14, 0xad, 0x35, 0xe0, 0x94, 0x39, 0x52, 0x87, 0x1d, 0xb4, 0xaf, 0x28, 0x5c, + 0x9f, 0xb3, 0x53, 0x1a, 0x82, 0x5e, 0x32, 0x4b, 0xed, 0x6a, 0xf7, 0x85, 0xb5, 0x1e, 0x8a, 0xa4, + 0xb5, 0x72, 0x6c, 0x43, 0x69, 0x19, 0xa4, 0x0e, 0xe7, 0x01, 0xe4, 0x5f, 0x01, 0x7f, 0x47, 0x4f, + 0x02, 0x32, 0x25, 0xa1, 0x27, 0x08, 0x71, 0x93, 0xdf, 0x73, 0x6f, 0xe1, 0x2a, 0x42, 0x02, 0x7a, + 0xd9, 0x2c, 0xb5, 0xf7, 0xfa, 0x4f, 0x2f, 0xfe, 0x3d, 0x2f, 0x6c, 0xdd, 0x50, 0x63, 0xdd, 0xe0, + 0xbd, 0xf4, 0xf7, 0x32, 0x3b, 0x9e, 0xa3, 0xc7, 0x11, 0x61, 0x01, 0x65, 0xa1, 0x3b, 0x63, 0x4a, + 0x46, 0x39, 0x03, 0xbd, 0x92, 0x72, 0x1f, 0x59, 0x9b, 0xc2, 0xcc, 0xc3, 0x5b, 0x9f, 0xa4, 0xfd, + 0x4b, 0xde, 0x7d, 0xcc, 0x44, 0xbc, 0xe8, 0x97, 0x13, 0x28, 0xa7, 0x1e, 0x6d, 0x10, 0xe0, 0x23, + 0xd4, 0x9c, 0xb1, 0x74, 0x68, 0x2e, 0x10, 0x00, 0xca, 0x99, 0x4b, 0x58, 0xe0, 0x8e, 0x09, 0x0d, + 0xc7, 0x42, 0xdf, 0x31, 0xb5, 0x76, 0xd9, 0x39, 0x50, 0x8a, 0xa1, 0x14, 0x1c, 0xb3, 0xe0, 0x43, + 0x5a, 0xc6, 0xdf, 0x50, 0x2d, 0x83, 0x16, 0xb1, 0xc7, 0xe0, 0x94, 0xc4, 0xfa, 0x6e, 0x1a, 0xd1, + 0xab, 0xcd, 0xbc, 0x8a, 0x31, 0x87, 0xfd, 0x59, 0xf9, 0x9c, 0x7d, 0xd5, 0x29, 0x5b, 0x68, 0xce, + 0x51, 0x63, 0xeb, 0x96, 0x70, 0x0d, 0x95, 0x26, 0x64, 0x91, 0x9e, 0xa0, 0xb2, 0x93, 0x3c, 0xe2, + 0x01, 0xaa, 0xcc, 0xbd, 0xe9, 0x2c, 0x3b, 0x23, 0x9d, 0xcd, 0x00, 0x37, 0xad, 0x58, 0xa8, 0x32, + 0xf8, 0x48, 0x41, 0x38, 0xd2, 0xfb, 0xae, 0xf8, 0x56, 0x6b, 0x05, 0xe8, 0x60, 0x8b, 0x0a, 0x9f, + 0xa0, 0x87, 0x77, 0x83, 0x2f, 0xde, 0x23, 0xf8, 0x5a, 0x78, 0x2b, 0xef, 0xd6, 0x2f, 0x0d, 0x35, + 0xb7, 0x4f, 0x03, 0x9f, 0xa0, 0x47, 0x01, 0x01, 0x41, 0x59, 0xba, 0xec, 0xde, 0xf7, 0x8b, 0xc1, + 0x39, 0x93, 0xaa, 0xe0, 0x97, 0x08, 0x6f, 0x48, 0xb6, 0x98, 0x4e, 0xae, 0x06, 0xb7, 0x22, 0xed, + 0x3b, 0x17, 0x4b, 0x43, 0xbb, 0x5c, 0x1a, 0xda, 0xd5, 0xd2, 0xd0, 0xfe, 0x2f, 0x0d, 0xed, 0xe7, + 0xca, 0x28, 0x5c, 0xae, 0x8c, 0xc2, 0xd5, 0xca, 0x28, 0x7c, 0x7d, 0x13, 0x52, 0x31, 0x9e, 0x8d, + 0x2c, 0x9f, 0x9f, 0xd9, 0xc9, 0x7c, 0x3b, 0x8c, 0x88, 0x73, 0x1e, 0x4f, 0xec, 0xf5, 0x1d, 0xf0, + 0xe3, 0xee, 0x75, 0x34, 0xda, 0x49, 0x6f, 0x82, 0xd7, 0xd7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8c, + 0x2e, 0xfc, 0xb7, 0xb3, 0x04, 0x00, 0x00, +} + +func (m *Application) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Application) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Application) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PendingTransfer != nil { + { + size, err := m.PendingTransfer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.UnstakeSessionEndHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.UnstakeSessionEndHeight)) + i-- + dAtA[i] = 0x30 + } + if len(m.PendingUndelegations) > 0 { + keysForPendingUndelegations := make([]uint64, 0, len(m.PendingUndelegations)) + for k := range m.PendingUndelegations { + keysForPendingUndelegations = append(keysForPendingUndelegations, uint64(k)) + } + github_com_cosmos_gogoproto_sortkeys.Uint64s(keysForPendingUndelegations) + for iNdEx := len(keysForPendingUndelegations) - 1; iNdEx >= 0; iNdEx-- { + v := m.PendingUndelegations[uint64(keysForPendingUndelegations[iNdEx])] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i = encodeVarintTypes(dAtA, i, uint64(keysForPendingUndelegations[iNdEx])) + i-- + dAtA[i] = 0x8 + i = encodeVarintTypes(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.DelegateeGatewayAddresses) > 0 { + for iNdEx := len(m.DelegateeGatewayAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DelegateeGatewayAddresses[iNdEx]) + copy(dAtA[i:], m.DelegateeGatewayAddresses[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DelegateeGatewayAddresses[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.ServiceConfigs) > 0 { + for iNdEx := len(m.ServiceConfigs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ServiceConfigs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UndelegatingGatewayList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UndelegatingGatewayList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UndelegatingGatewayList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GatewayAddresses) > 0 { + for iNdEx := len(m.GatewayAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GatewayAddresses[iNdEx]) + copy(dAtA[i:], m.GatewayAddresses[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GatewayAddresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + return len(dAtA) - i, nil +} + +func (m *PendingApplicationTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PendingApplicationTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingApplicationTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Application) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.ServiceConfigs) > 0 { + for _, e := range m.ServiceConfigs { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.DelegateeGatewayAddresses) > 0 { + for _, s := range m.DelegateeGatewayAddresses { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.PendingUndelegations) > 0 { + for k, v := range m.PendingUndelegations { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.UnstakeSessionEndHeight != 0 { + n += 1 + sovTypes(uint64(m.UnstakeSessionEndHeight)) + } + if m.PendingTransfer != nil { + l = m.PendingTransfer.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *UndelegatingGatewayList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GatewayAddresses) > 0 { + for _, s := range m.GatewayAddresses { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *PendingApplicationTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovTypes(uint64(m.SessionEndHeight)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Application) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Application: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Application: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceConfigs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceConfigs = append(m.ServiceConfigs, &types1.ApplicationServiceConfig{}) + if err := m.ServiceConfigs[len(m.ServiceConfigs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegateeGatewayAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegateeGatewayAddresses = append(m.DelegateeGatewayAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingUndelegations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PendingUndelegations == nil { + m.PendingUndelegations = make(map[uint64]UndelegatingGatewayList) + } + var mapkey uint64 + mapvalue := &UndelegatingGatewayList{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &UndelegatingGatewayList{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.PendingUndelegations[mapkey] = *mapvalue + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnstakeSessionEndHeight", wireType) + } + m.UnstakeSessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnstakeSessionEndHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTransfer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PendingTransfer == nil { + m.PendingTransfer = &PendingApplicationTransfer{} + } + if err := m.PendingTransfer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UndelegatingGatewayList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UndelegatingGatewayList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UndelegatingGatewayList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayAddresses = append(m.GatewayAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PendingApplicationTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PendingApplicationTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingApplicationTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/event.pb.go b/x/gateway/types/event.pb.go new file mode 100644 index 000000000..653a77c44 --- /dev/null +++ b/x/gateway/types/event.pb.go @@ -0,0 +1,579 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/event.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GatewayStaked is emitted when a gateway is staked or up-staked. +type EventGatewayStaked struct { + // The gateway that has been staked. + Gateway *Gateway `protobuf:"bytes,1,opt,name=gateway,proto3" json:"gateway"` + // The end height of the session in which gateway was staked. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventGatewayStaked) Reset() { *m = EventGatewayStaked{} } +func (m *EventGatewayStaked) String() string { return proto.CompactTextString(m) } +func (*EventGatewayStaked) ProtoMessage() {} +func (*EventGatewayStaked) Descriptor() ([]byte, []int) { + return fileDescriptor_34212b93ec812e7c, []int{0} +} +func (m *EventGatewayStaked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGatewayStaked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventGatewayStaked) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGatewayStaked.Merge(m, src) +} +func (m *EventGatewayStaked) XXX_Size() int { + return m.Size() +} +func (m *EventGatewayStaked) XXX_DiscardUnknown() { + xxx_messageInfo_EventGatewayStaked.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGatewayStaked proto.InternalMessageInfo + +func (m *EventGatewayStaked) GetGateway() *Gateway { + if m != nil { + return m.Gateway + } + return nil +} + +func (m *EventGatewayStaked) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +// GatewayUnstaked defines the event emitted when a gateway has been unstaked. +type EventGatewayUnstaked struct { + // The gateway that has been unstaked. + Gateway *Gateway `protobuf:"bytes,1,opt,name=gateway,proto3" json:"gateway"` + // The end height of the session in which gateway was unstaked. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventGatewayUnstaked) Reset() { *m = EventGatewayUnstaked{} } +func (m *EventGatewayUnstaked) String() string { return proto.CompactTextString(m) } +func (*EventGatewayUnstaked) ProtoMessage() {} +func (*EventGatewayUnstaked) Descriptor() ([]byte, []int) { + return fileDescriptor_34212b93ec812e7c, []int{1} +} +func (m *EventGatewayUnstaked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGatewayUnstaked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventGatewayUnstaked) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGatewayUnstaked.Merge(m, src) +} +func (m *EventGatewayUnstaked) XXX_Size() int { + return m.Size() +} +func (m *EventGatewayUnstaked) XXX_DiscardUnknown() { + xxx_messageInfo_EventGatewayUnstaked.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGatewayUnstaked proto.InternalMessageInfo + +func (m *EventGatewayUnstaked) GetGateway() *Gateway { + if m != nil { + return m.Gateway + } + return nil +} + +func (m *EventGatewayUnstaked) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func init() { + proto.RegisterType((*EventGatewayStaked)(nil), "poktroll.gateway.EventGatewayStaked") + proto.RegisterType((*EventGatewayUnstaked)(nil), "poktroll.gateway.EventGatewayUnstaked") +} + +func init() { proto.RegisterFile("poktroll/gateway/event.proto", fileDescriptor_34212b93ec812e7c) } + +var fileDescriptor_34212b93ec812e7c = []byte{ + // 270 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x4f, 0x2c, 0x49, 0x2d, 0x4f, 0xac, 0xd4, 0x4f, 0x2d, 0x4b, + 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xea, 0x41, 0x65, 0xa5, + 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0xc1, 0xf2, 0xfa, 0x10, 0x0e, 0x44, 0xb1, 0x94, + 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x44, 0x1c, 0xc4, 0x82, 0x8a, 0x62, 0x5a, 0x50, 0x52, 0x59, 0x90, + 0x0a, 0xd5, 0xa3, 0x34, 0x87, 0x91, 0x4b, 0xc8, 0x15, 0x64, 0xa1, 0x3b, 0x44, 0x32, 0xb8, 0x24, + 0x31, 0x3b, 0x35, 0x45, 0xc8, 0x81, 0x8b, 0x1d, 0xaa, 0x5a, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, + 0x48, 0x52, 0x0f, 0xdd, 0x25, 0x7a, 0x50, 0x1d, 0x4e, 0xdc, 0xaf, 0xee, 0xc9, 0xc3, 0x54, 0x07, + 0xc1, 0x18, 0x42, 0x2e, 0x5c, 0x42, 0xc5, 0xa9, 0xc5, 0xc5, 0x99, 0xf9, 0x79, 0xf1, 0xa9, 0x79, + 0x29, 0xf1, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x4e, 0x62, + 0xaf, 0xee, 0xc9, 0x63, 0x91, 0x0d, 0x12, 0x80, 0x8a, 0xb9, 0xe6, 0xa5, 0x78, 0x80, 0x45, 0x94, + 0xe6, 0x31, 0x72, 0x89, 0x20, 0x3b, 0x2f, 0x34, 0xaf, 0x78, 0x50, 0x39, 0xd0, 0xc9, 0xef, 0xc4, + 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, + 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x48, 0xcf, + 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x39, 0x4f, 0x37, 0x2f, 0xb5, 0xa4, + 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0x1e, 0x27, 0x15, 0xa8, 0xb1, 0x92, 0xc4, 0x06, 0x8e, 0x16, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0x1b, 0x3b, 0x48, 0x17, 0x02, 0x00, 0x00, +} + +func (m *EventGatewayStaked) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGatewayStaked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGatewayStaked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Gateway != nil { + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventGatewayUnstaked) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGatewayUnstaked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGatewayUnstaked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Gateway != nil { + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventGatewayStaked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gateway != nil { + l = m.Gateway.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func (m *EventGatewayUnstaked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gateway != nil { + l = m.Gateway.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventGatewayStaked) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGatewayStaked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGatewayStaked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gateway == nil { + m.Gateway = &Gateway{} + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGatewayUnstaked) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGatewayUnstaked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGatewayUnstaked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gateway == nil { + m.Gateway = &Gateway{} + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/genesis.pb.go b/x/gateway/types/genesis.pb.go new file mode 100644 index 000000000..73c4e72c9 --- /dev/null +++ b/x/gateway/types/genesis.pb.go @@ -0,0 +1,385 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the gateway module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + GatewayList []Gateway `protobuf:"bytes,2,rep,name=gateway_list,json=gatewayList,proto3" json:"gateway_list"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_df7fba938e36955d, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetGatewayList() []Gateway { + if m != nil { + return m.GatewayList + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.gateway.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/gateway/genesis.proto", fileDescriptor_df7fba938e36955d) } + +var fileDescriptor_df7fba938e36955d = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x4f, 0x2c, 0x49, 0x2d, 0x4f, 0xac, 0xd4, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xeb, 0x41, + 0xe5, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x48, 0x7a, + 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0x31, 0x8c, 0x2e, 0x48, 0x2c, 0x4a, + 0xcc, 0x85, 0x9a, 0x2c, 0x25, 0x83, 0x21, 0x5d, 0x52, 0x59, 0x90, 0x0a, 0x95, 0x55, 0xea, 0x67, + 0xe4, 0xe2, 0x71, 0x87, 0xb8, 0x24, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x9a, 0x8b, 0x0d, 0xa2, + 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x42, 0x0f, 0xdd, 0x65, 0x7a, 0x01, 0x60, 0x79, + 0x27, 0xce, 0x13, 0xf7, 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd5, 0x22, 0xe4, + 0xc4, 0xc5, 0x03, 0x55, 0x14, 0x9f, 0x93, 0x59, 0x5c, 0x22, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, + 0x24, 0x89, 0x69, 0x84, 0x3b, 0x84, 0x76, 0x62, 0x01, 0x99, 0x11, 0xc4, 0x0d, 0x15, 0xf6, 0xc9, + 0x2c, 0x2e, 0x71, 0xf2, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, + 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, + 0xe5, 0x18, 0xa2, 0x0c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, + 0xa6, 0xea, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0xc3, 0x7d, 0x59, 0x81, 0xea, 0xcf, + 0x24, 0x36, 0xb0, 0x47, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x2b, 0x21, 0x5c, 0x82, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GatewayList) > 0 { + for iNdEx := len(m.GatewayList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GatewayList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.GatewayList) > 0 { + for _, e := range m.GatewayList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayList = append(m.GatewayList, Gateway{}) + if err := m.GatewayList[len(m.GatewayList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/params.pb.go b/x/gateway/types/params.pb.go new file mode 100644 index 000000000..c930a8322 --- /dev/null +++ b/x/gateway/types/params.pb.go @@ -0,0 +1,355 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/params.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // min_stake is the minimum amount of uPOKT that a gateway must stake. + MinStake *types.Coin `protobuf:"bytes,1,opt,name=min_stake,json=minStake,proto3" json:"min_stake"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_23ed52a392489486, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMinStake() *types.Coin { + if m != nil { + return m.MinStake + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.gateway.Params") +} + +func init() { proto.RegisterFile("poktroll/gateway/params.proto", fileDescriptor_23ed52a392489486) } + +var fileDescriptor_23ed52a392489486 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x4f, 0x2c, 0x49, 0x2d, 0x4f, 0xac, 0xd4, 0x2f, 0x48, 0x2c, + 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x49, 0xeb, 0x41, 0xa5, + 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x5c, 0x72, 0x7e, + 0x71, 0x6e, 0x7e, 0xb1, 0x7e, 0x52, 0x62, 0x71, 0xaa, 0x7e, 0x99, 0x61, 0x52, 0x6a, 0x49, 0xa2, + 0xa1, 0x7e, 0x72, 0x7e, 0x66, 0x1e, 0x54, 0x5e, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xcc, 0xd4, 0x07, + 0xb1, 0x20, 0xa2, 0x4a, 0xc5, 0x5c, 0x6c, 0x01, 0x60, 0xab, 0x84, 0x5c, 0xb9, 0x38, 0x73, 0x33, + 0xf3, 0xe2, 0x8b, 0x4b, 0x12, 0xb3, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x24, 0xf5, + 0x20, 0x66, 0xea, 0x81, 0xcc, 0xd4, 0x83, 0x9a, 0xa9, 0xe7, 0x9c, 0x9f, 0x99, 0xe7, 0xc4, 0xfb, + 0xea, 0x9e, 0x3c, 0x42, 0x7d, 0x10, 0x47, 0x6e, 0x66, 0x5e, 0x30, 0x88, 0x65, 0xa5, 0xf4, 0x62, + 0x81, 0x3c, 0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0x92, 0x70, 0x3f, 0x55, 0xc0, 0x7d, 0x05, 0xb1, 0xca, + 0xc9, 0xef, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, + 0x32, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x99, 0xa1, 0x9b, + 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0xc5, 0xc0, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, + 0x36, 0xb0, 0x5f, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xcb, 0xc3, 0x2b, 0x47, 0x01, + 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.MinStake.Equal(that1.MinStake) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MinStake != nil { + { + size, err := m.MinStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MinStake != nil { + l = m.MinStake.Size() + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStake == nil { + m.MinStake = &types.Coin{} + } + if err := m.MinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/query.pb.go b/x/gateway/types/query.pb.go new file mode 100644 index 000000000..79c6ebb53 --- /dev/null +++ b/x/gateway/types/query.pb.go @@ -0,0 +1,1367 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetGatewayRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryGetGatewayRequest) Reset() { *m = QueryGetGatewayRequest{} } +func (m *QueryGetGatewayRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetGatewayRequest) ProtoMessage() {} +func (*QueryGetGatewayRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{2} +} +func (m *QueryGetGatewayRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetGatewayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetGatewayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetGatewayRequest.Merge(m, src) +} +func (m *QueryGetGatewayRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetGatewayRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetGatewayRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetGatewayRequest proto.InternalMessageInfo + +func (m *QueryGetGatewayRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type QueryGetGatewayResponse struct { + Gateway Gateway `protobuf:"bytes,1,opt,name=gateway,proto3" json:"gateway"` +} + +func (m *QueryGetGatewayResponse) Reset() { *m = QueryGetGatewayResponse{} } +func (m *QueryGetGatewayResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetGatewayResponse) ProtoMessage() {} +func (*QueryGetGatewayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{3} +} +func (m *QueryGetGatewayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetGatewayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetGatewayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetGatewayResponse.Merge(m, src) +} +func (m *QueryGetGatewayResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetGatewayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetGatewayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetGatewayResponse proto.InternalMessageInfo + +func (m *QueryGetGatewayResponse) GetGateway() Gateway { + if m != nil { + return m.Gateway + } + return Gateway{} +} + +type QueryAllGatewaysRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllGatewaysRequest) Reset() { *m = QueryAllGatewaysRequest{} } +func (m *QueryAllGatewaysRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllGatewaysRequest) ProtoMessage() {} +func (*QueryAllGatewaysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{4} +} +func (m *QueryAllGatewaysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllGatewaysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllGatewaysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllGatewaysRequest.Merge(m, src) +} +func (m *QueryAllGatewaysRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllGatewaysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllGatewaysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllGatewaysRequest proto.InternalMessageInfo + +func (m *QueryAllGatewaysRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllGatewaysResponse struct { + Gateways []Gateway `protobuf:"bytes,1,rep,name=gateways,proto3" json:"gateways"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllGatewaysResponse) Reset() { *m = QueryAllGatewaysResponse{} } +func (m *QueryAllGatewaysResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllGatewaysResponse) ProtoMessage() {} +func (*QueryAllGatewaysResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_60df9a8709a45d29, []int{5} +} +func (m *QueryAllGatewaysResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllGatewaysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllGatewaysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllGatewaysResponse.Merge(m, src) +} +func (m *QueryAllGatewaysResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllGatewaysResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllGatewaysResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllGatewaysResponse proto.InternalMessageInfo + +func (m *QueryAllGatewaysResponse) GetGateways() []Gateway { + if m != nil { + return m.Gateways + } + return nil +} + +func (m *QueryAllGatewaysResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.gateway.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.gateway.QueryParamsResponse") + proto.RegisterType((*QueryGetGatewayRequest)(nil), "poktroll.gateway.QueryGetGatewayRequest") + proto.RegisterType((*QueryGetGatewayResponse)(nil), "poktroll.gateway.QueryGetGatewayResponse") + proto.RegisterType((*QueryAllGatewaysRequest)(nil), "poktroll.gateway.QueryAllGatewaysRequest") + proto.RegisterType((*QueryAllGatewaysResponse)(nil), "poktroll.gateway.QueryAllGatewaysResponse") +} + +func init() { proto.RegisterFile("poktroll/gateway/query.proto", fileDescriptor_60df9a8709a45d29) } + +var fileDescriptor_60df9a8709a45d29 = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0x16, 0x12, 0xea, 0x2e, 0x60, 0x2a, 0x48, 0x4f, 0xe5, 0x40, 0x27, 0xda, 0x86, + 0x48, 0xb5, 0xdb, 0xb0, 0x80, 0x98, 0xc8, 0x40, 0x36, 0x54, 0x4e, 0x4c, 0x2c, 0xc8, 0x49, 0xad, + 0xe3, 0xd4, 0xcb, 0xf9, 0x7a, 0xe7, 0x50, 0x22, 0xc4, 0x82, 0xf8, 0x00, 0x48, 0x30, 0x30, 0x32, + 0x32, 0xf2, 0x11, 0x18, 0x3b, 0x56, 0x62, 0xe9, 0x84, 0x50, 0x82, 0xc4, 0xd7, 0x40, 0x67, 0x3f, + 0x97, 0xa4, 0x56, 0x94, 0x2c, 0x6d, 0xec, 0xf7, 0x7f, 0xef, 0xff, 0x7b, 0x7e, 0x4f, 0x87, 0x37, + 0x32, 0x79, 0xa8, 0x72, 0x99, 0x24, 0x2c, 0xe2, 0x4a, 0x1c, 0xf3, 0x21, 0x3b, 0x1a, 0x88, 0x7c, + 0x48, 0xb3, 0x5c, 0x2a, 0x49, 0xae, 0xda, 0x28, 0x85, 0xa8, 0x77, 0x8d, 0xf7, 0xe3, 0x54, 0x32, + 0xfd, 0xd7, 0x88, 0xbc, 0xf5, 0x9e, 0x2c, 0xfa, 0xb2, 0x78, 0xa9, 0x4f, 0xcc, 0x1c, 0x20, 0xb4, + 0x16, 0xc9, 0x48, 0x9a, 0xfb, 0xf2, 0x17, 0xdc, 0x6e, 0x44, 0x52, 0x46, 0x89, 0x60, 0x3c, 0x8b, + 0x19, 0x4f, 0x53, 0xa9, 0xb8, 0x8a, 0x65, 0x6a, 0x73, 0x9a, 0xa6, 0x02, 0xeb, 0xf2, 0x42, 0x18, + 0x18, 0xf6, 0x7a, 0xaf, 0x2b, 0x14, 0xdf, 0x63, 0x19, 0x8f, 0xe2, 0x54, 0x8b, 0x41, 0xeb, 0x4f, + 0x6a, 0xad, 0xaa, 0x27, 0x63, 0x1b, 0xbf, 0xe5, 0x74, 0x97, 0xf1, 0x9c, 0xf7, 0xad, 0x95, 0xdb, + 0xbc, 0x1a, 0x66, 0x02, 0xa2, 0xc1, 0x1a, 0x26, 0xcf, 0x4a, 0xfb, 0x7d, 0x9d, 0x12, 0x8a, 0xa3, + 0x81, 0x28, 0x54, 0x10, 0xe2, 0xeb, 0x53, 0xb7, 0x45, 0x26, 0xd3, 0x42, 0x90, 0x47, 0xb8, 0x6a, + 0x4a, 0xd7, 0xd1, 0x1d, 0xd4, 0x58, 0x6d, 0xd5, 0xe9, 0xc5, 0xa7, 0xa3, 0x26, 0xa3, 0xbd, 0x72, + 0xf2, 0xeb, 0x76, 0xe5, 0xdb, 0xdf, 0xef, 0x4d, 0x14, 0x42, 0x4a, 0xd0, 0xc2, 0x37, 0x74, 0xcd, + 0x8e, 0x50, 0x1d, 0x23, 0x06, 0x37, 0x52, 0xc7, 0x35, 0x7e, 0x70, 0x90, 0x8b, 0xc2, 0xd4, 0x5d, + 0x09, 0xed, 0x31, 0x78, 0x8e, 0x6f, 0x3a, 0x39, 0xc0, 0xf2, 0x10, 0xd7, 0xc0, 0x13, 0x60, 0xd6, + 0x5d, 0x18, 0xc8, 0x69, 0x5f, 0x2a, 0x69, 0x42, 0xab, 0x0f, 0x38, 0x54, 0x7d, 0x9c, 0x24, 0xa0, + 0xb0, 0x8d, 0x93, 0x27, 0x18, 0xff, 0x7f, 0x7f, 0x28, 0xbc, 0x45, 0x61, 0xdc, 0xe5, 0x00, 0xa8, + 0xd9, 0x1c, 0x18, 0x03, 0xdd, 0xe7, 0x91, 0x80, 0xdc, 0x70, 0x22, 0x33, 0xf8, 0x8a, 0x70, 0xdd, + 0xf5, 0x38, 0x7f, 0xc6, 0x2b, 0x80, 0x52, 0x36, 0xbc, 0xbc, 0x08, 0xfb, 0x79, 0x02, 0xe9, 0x4c, + 0x11, 0x2e, 0x69, 0xc2, 0xed, 0xb9, 0x84, 0xc6, 0x79, 0x12, 0xb1, 0xf5, 0x63, 0x19, 0x5f, 0xd6, + 0x88, 0xe4, 0x03, 0xc2, 0x55, 0x33, 0x37, 0x72, 0xd7, 0x05, 0x71, 0xd7, 0xc3, 0xdb, 0x9c, 0xa3, + 0x32, 0x6e, 0xc1, 0xce, 0xfb, 0x9f, 0x7f, 0x3e, 0x2d, 0x6d, 0x93, 0x4d, 0x56, 0xca, 0x77, 0x52, + 0xa1, 0x8e, 0x65, 0x7e, 0xc8, 0x66, 0xac, 0x2b, 0xf9, 0x82, 0x70, 0x0d, 0xba, 0x26, 0x8d, 0x19, + 0x0e, 0xce, 0xf2, 0x78, 0xf7, 0x16, 0x50, 0x02, 0xcf, 0x03, 0xcd, 0xd3, 0x22, 0xbb, 0x73, 0x78, + 0xec, 0xff, 0xb7, 0xb0, 0x86, 0xef, 0xc8, 0x67, 0x84, 0x57, 0x27, 0x26, 0x49, 0x66, 0x99, 0xba, + 0x1b, 0xe5, 0x35, 0x17, 0x91, 0x02, 0x20, 0xd5, 0x80, 0x0d, 0xb2, 0xb5, 0x18, 0x60, 0xfb, 0xe9, + 0xc9, 0xc8, 0x47, 0xa7, 0x23, 0x1f, 0x9d, 0x8d, 0x7c, 0xf4, 0x7b, 0xe4, 0xa3, 0x8f, 0x63, 0xbf, + 0x72, 0x3a, 0xf6, 0x2b, 0x67, 0x63, 0xbf, 0xf2, 0x62, 0x37, 0x8a, 0xd5, 0xab, 0x41, 0x97, 0xf6, + 0x64, 0x7f, 0x46, 0xbd, 0x37, 0xd3, 0x9f, 0x84, 0x6e, 0x55, 0x7f, 0x13, 0xee, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0xaa, 0x8d, 0xbf, 0xd7, 0x30, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Gateway items. + Gateway(ctx context.Context, in *QueryGetGatewayRequest, opts ...grpc.CallOption) (*QueryGetGatewayResponse, error) + AllGateways(ctx context.Context, in *QueryAllGatewaysRequest, opts ...grpc.CallOption) (*QueryAllGatewaysResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Gateway(ctx context.Context, in *QueryGetGatewayRequest, opts ...grpc.CallOption) (*QueryGetGatewayResponse, error) { + out := new(QueryGetGatewayResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Query/Gateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllGateways(ctx context.Context, in *QueryAllGatewaysRequest, opts ...grpc.CallOption) (*QueryAllGatewaysResponse, error) { + out := new(QueryAllGatewaysResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Query/AllGateways", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Gateway items. + Gateway(context.Context, *QueryGetGatewayRequest) (*QueryGetGatewayResponse, error) + AllGateways(context.Context, *QueryAllGatewaysRequest) (*QueryAllGatewaysResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Gateway(ctx context.Context, req *QueryGetGatewayRequest) (*QueryGetGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Gateway not implemented") +} +func (*UnimplementedQueryServer) AllGateways(ctx context.Context, req *QueryAllGatewaysRequest) (*QueryAllGatewaysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllGateways not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Gateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetGatewayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Gateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Query/Gateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Gateway(ctx, req.(*QueryGetGatewayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllGateways_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllGatewaysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllGateways(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Query/AllGateways", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllGateways(ctx, req.(*QueryAllGatewaysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.gateway.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Gateway", + Handler: _Query_Gateway_Handler, + }, + { + MethodName: "AllGateways", + Handler: _Query_AllGateways_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/gateway/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetGatewayRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetGatewayRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetGatewayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetGatewayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetGatewayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllGatewaysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllGatewaysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllGatewaysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllGatewaysResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllGatewaysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllGatewaysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Gateways) > 0 { + for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Gateways[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetGatewayRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetGatewayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Gateway.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllGatewaysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllGatewaysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Gateways) > 0 { + for _, e := range m.Gateways { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetGatewayRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetGatewayRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetGatewayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetGatewayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetGatewayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetGatewayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllGatewaysRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllGatewaysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllGatewaysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllGatewaysResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllGatewaysResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllGatewaysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, Gateway{}) + if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/query.pb.gw.go b/x/gateway/types/query.pb.gw.go new file mode 100644 index 000000000..ddabb8637 --- /dev/null +++ b/x/gateway/types/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/gateway/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Gateway_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetGatewayRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.Gateway(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Gateway_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetGatewayRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.Gateway(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllGateways_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllGateways_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllGatewaysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllGateways_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllGateways(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllGateways_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllGatewaysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllGateways_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllGateways(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Gateway_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Gateway_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Gateway_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllGateways_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllGateways_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllGateways_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Gateway_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Gateway_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Gateway_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllGateways_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllGateways_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllGateways_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "gateway", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Gateway_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pokt-network", "poktroll", "gateway", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllGateways_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"pokt-network", "poktroll", "gateway"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Gateway_0 = runtime.ForwardResponseMessage + + forward_Query_AllGateways_0 = runtime.ForwardResponseMessage +) diff --git a/x/gateway/types/tx.pb.go b/x/gateway/types/tx.pb.go new file mode 100644 index 000000000..f0d49bb3f --- /dev/null +++ b/x/gateway/types/tx.pb.go @@ -0,0 +1,1967 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/gateway parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +type MsgStakeGateway struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Stake *types.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` +} + +func (m *MsgStakeGateway) Reset() { *m = MsgStakeGateway{} } +func (m *MsgStakeGateway) String() string { return proto.CompactTextString(m) } +func (*MsgStakeGateway) ProtoMessage() {} +func (*MsgStakeGateway) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{2} +} +func (m *MsgStakeGateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeGateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeGateway.Merge(m, src) +} +func (m *MsgStakeGateway) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeGateway) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeGateway.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeGateway proto.InternalMessageInfo + +func (m *MsgStakeGateway) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgStakeGateway) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +type MsgStakeGatewayResponse struct { + Gateway *Gateway `protobuf:"bytes,1,opt,name=gateway,proto3" json:"gateway,omitempty"` +} + +func (m *MsgStakeGatewayResponse) Reset() { *m = MsgStakeGatewayResponse{} } +func (m *MsgStakeGatewayResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStakeGatewayResponse) ProtoMessage() {} +func (*MsgStakeGatewayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{3} +} +func (m *MsgStakeGatewayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeGatewayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeGatewayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeGatewayResponse.Merge(m, src) +} +func (m *MsgStakeGatewayResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeGatewayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeGatewayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeGatewayResponse proto.InternalMessageInfo + +func (m *MsgStakeGatewayResponse) GetGateway() *Gateway { + if m != nil { + return m.Gateway + } + return nil +} + +type MsgUnstakeGateway struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgUnstakeGateway) Reset() { *m = MsgUnstakeGateway{} } +func (m *MsgUnstakeGateway) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeGateway) ProtoMessage() {} +func (*MsgUnstakeGateway) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{4} +} +func (m *MsgUnstakeGateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeGateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeGateway.Merge(m, src) +} +func (m *MsgUnstakeGateway) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeGateway) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeGateway.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeGateway proto.InternalMessageInfo + +func (m *MsgUnstakeGateway) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type MsgUnstakeGatewayResponse struct { + Gateway *Gateway `protobuf:"bytes,1,opt,name=gateway,proto3" json:"gateway,omitempty"` +} + +func (m *MsgUnstakeGatewayResponse) Reset() { *m = MsgUnstakeGatewayResponse{} } +func (m *MsgUnstakeGatewayResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeGatewayResponse) ProtoMessage() {} +func (*MsgUnstakeGatewayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{5} +} +func (m *MsgUnstakeGatewayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeGatewayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeGatewayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeGatewayResponse.Merge(m, src) +} +func (m *MsgUnstakeGatewayResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeGatewayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeGatewayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeGatewayResponse proto.InternalMessageInfo + +func (m *MsgUnstakeGatewayResponse) GetGateway() *Gateway { + if m != nil { + return m.Gateway + } + return nil +} + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{6} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin"` +} + +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsCoin)(nil), + } +} + +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7ad4b0c5e3b59f23, []int{7} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.gateway.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.gateway.MsgUpdateParamsResponse") + proto.RegisterType((*MsgStakeGateway)(nil), "poktroll.gateway.MsgStakeGateway") + proto.RegisterType((*MsgStakeGatewayResponse)(nil), "poktroll.gateway.MsgStakeGatewayResponse") + proto.RegisterType((*MsgUnstakeGateway)(nil), "poktroll.gateway.MsgUnstakeGateway") + proto.RegisterType((*MsgUnstakeGatewayResponse)(nil), "poktroll.gateway.MsgUnstakeGatewayResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.gateway.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.gateway.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/gateway/tx.proto", fileDescriptor_7ad4b0c5e3b59f23) } + +var fileDescriptor_7ad4b0c5e3b59f23 = []byte{ + // 605 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x18, 0xcd, 0x51, 0xda, 0x2a, 0x97, 0x28, 0x50, 0xab, 0xa2, 0x89, 0x05, 0x6e, 0x30, 0x4b, 0x08, + 0xaa, 0xaf, 0x49, 0x05, 0x43, 0x98, 0x1a, 0x06, 0x10, 0x52, 0xab, 0xca, 0x55, 0x07, 0x50, 0xa5, + 0xea, 0x92, 0x58, 0xae, 0x95, 0xda, 0x67, 0xf9, 0xae, 0x3f, 0xb2, 0x21, 0x84, 0x84, 0xc4, 0xc4, + 0x9f, 0xc1, 0x98, 0x81, 0x09, 0x89, 0xbd, 0x63, 0xc5, 0xd4, 0xa9, 0x42, 0xc9, 0x10, 0x89, 0xbf, + 0x02, 0x9d, 0xef, 0xec, 0xc6, 0x4e, 0x20, 0x88, 0x2e, 0x89, 0x7d, 0xdf, 0xfb, 0x9e, 0xdf, 0xbb, + 0xef, 0xdd, 0xc1, 0x92, 0x4f, 0xba, 0x2c, 0x20, 0x47, 0x47, 0xc8, 0xc6, 0xcc, 0x3a, 0xc5, 0x3d, + 0xc4, 0xce, 0x0c, 0x3f, 0x20, 0x8c, 0x28, 0x77, 0xa3, 0x92, 0x21, 0x4b, 0xea, 0x12, 0x76, 0x1d, + 0x8f, 0xa0, 0xf0, 0x57, 0x80, 0xd4, 0x95, 0x36, 0xa1, 0x2e, 0xa1, 0xc8, 0xa5, 0x36, 0x3a, 0xa9, + 0xf1, 0x3f, 0x59, 0x28, 0x89, 0xc2, 0x41, 0xf8, 0x86, 0xc4, 0x8b, 0x2c, 0x2d, 0xdb, 0xc4, 0x26, + 0x62, 0x9d, 0x3f, 0xc9, 0x55, 0x4d, 0x32, 0xb5, 0x30, 0xb5, 0xd0, 0x49, 0xad, 0x65, 0x31, 0x5c, + 0x43, 0x6d, 0xe2, 0x78, 0xb2, 0xfe, 0x60, 0x42, 0xa9, 0x8f, 0x03, 0xec, 0x46, 0xa4, 0xf7, 0x27, + 0x8d, 0xf4, 0x7c, 0x4b, 0x56, 0xf5, 0xef, 0x00, 0xde, 0xd9, 0xa2, 0xf6, 0x9e, 0xdf, 0xc1, 0xcc, + 0xda, 0x09, 0xfb, 0x94, 0x67, 0x30, 0x8b, 0x8f, 0xd9, 0x21, 0x09, 0x1c, 0xd6, 0x2b, 0x82, 0x32, + 0xa8, 0x64, 0x9b, 0xc5, 0x1f, 0x5f, 0xd7, 0x96, 0xa5, 0xd6, 0xcd, 0x4e, 0x27, 0xb0, 0x28, 0xdd, + 0x65, 0x81, 0xe3, 0xd9, 0xe6, 0x35, 0x54, 0x79, 0x0e, 0x17, 0xc4, 0x97, 0x8b, 0xb7, 0xca, 0xa0, + 0x92, 0xab, 0x17, 0x8d, 0xf4, 0x46, 0x19, 0xe2, 0x0b, 0xcd, 0xec, 0xf9, 0xd5, 0x6a, 0xe6, 0xcb, + 0xa8, 0x5f, 0x05, 0xa6, 0x6c, 0x69, 0x3c, 0x7d, 0x3f, 0xea, 0x57, 0xaf, 0xc9, 0x3e, 0x8d, 0xfa, + 0x55, 0x3d, 0x56, 0x7e, 0x16, 0x6b, 0x4f, 0x69, 0xd5, 0x4b, 0x70, 0x25, 0xb5, 0x64, 0x5a, 0xd4, + 0x27, 0x1e, 0xb5, 0xf4, 0x0f, 0xc2, 0xda, 0x2e, 0xc3, 0x5d, 0xeb, 0xa5, 0x68, 0x57, 0xea, 0x70, + 0x11, 0x0b, 0xf9, 0x33, 0x8d, 0x45, 0x40, 0x05, 0xc1, 0x79, 0xca, 0x39, 0xa4, 0xab, 0x92, 0x21, + 0xe1, 0x7c, 0x1e, 0x86, 0x9c, 0x87, 0xf1, 0x82, 0x38, 0x9e, 0x29, 0x70, 0x8d, 0x3c, 0xb7, 0x12, + 0xb5, 0xeb, 0xdb, 0xa1, 0xc2, 0x71, 0x15, 0x91, 0x42, 0x65, 0x03, 0x2e, 0x4a, 0x5f, 0xa1, 0x1a, + 0xce, 0x3d, 0xb1, 0x63, 0x51, 0x4f, 0x84, 0xd4, 0xf7, 0xe0, 0x12, 0x77, 0xec, 0xd1, 0x1b, 0xfa, + 0x4a, 0xc9, 0xdc, 0x81, 0xa5, 0x09, 0xda, 0x9b, 0x09, 0xfd, 0x06, 0x60, 0x21, 0x39, 0x9b, 0xff, + 0x4e, 0x96, 0x02, 0x6f, 0x7b, 0xd8, 0x15, 0x13, 0xc8, 0x9a, 0xe1, 0xb3, 0xb2, 0x09, 0x17, 0x31, + 0x3d, 0xe0, 0xe7, 0xa0, 0x38, 0x37, 0x63, 0x30, 0xcd, 0xdc, 0xaf, 0xab, 0xd5, 0x08, 0xfd, 0x2a, + 0x63, 0x2e, 0x60, 0xca, 0x97, 0x1b, 0x85, 0x64, 0xe6, 0x9a, 0xd9, 0x90, 0x92, 0x1f, 0x0f, 0xfd, + 0x35, 0xbc, 0x97, 0xd4, 0x1e, 0xef, 0xc5, 0x7a, 0x9c, 0x72, 0xf0, 0xf7, 0x94, 0x47, 0xd1, 0xae, + 0x7f, 0x9c, 0x83, 0x73, 0x5b, 0xd4, 0x56, 0xf6, 0x61, 0x3e, 0x71, 0xce, 0x1e, 0x4e, 0x76, 0xa6, + 0xb2, 0xac, 0x3e, 0x9e, 0x09, 0x89, 0x75, 0xed, 0xc3, 0x7c, 0x22, 0xea, 0xd3, 0xd9, 0xc7, 0x21, + 0x7f, 0x60, 0x9f, 0x1a, 0xd5, 0x16, 0x2c, 0xa4, 0x22, 0xf7, 0x68, 0xba, 0xb4, 0x04, 0x48, 0x7d, + 0xf2, 0x0f, 0xa0, 0xf8, 0x1b, 0x6f, 0x60, 0x6e, 0x3c, 0x2c, 0xe5, 0x59, 0xde, 0xd5, 0xca, 0x2c, + 0x44, 0x44, 0xad, 0xce, 0xbf, 0xe3, 0x97, 0x4d, 0x73, 0xfb, 0x7c, 0xa0, 0x81, 0x8b, 0x81, 0x06, + 0x2e, 0x07, 0x1a, 0xf8, 0x39, 0xd0, 0xc0, 0xe7, 0xa1, 0x96, 0xb9, 0x18, 0x6a, 0x99, 0xcb, 0xa1, + 0x96, 0x79, 0xbb, 0x6e, 0x3b, 0xec, 0xf0, 0xb8, 0x65, 0xb4, 0x89, 0x8b, 0x38, 0xf1, 0x9a, 0x67, + 0xb1, 0x53, 0x12, 0x74, 0xd1, 0x94, 0x7b, 0x28, 0xbc, 0x43, 0x5b, 0x0b, 0xe1, 0x25, 0xba, 0xf1, + 0x3b, 0x00, 0x00, 0xff, 0xff, 0x24, 0x9f, 0x5b, 0xdd, 0x2d, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeGateway(ctx context.Context, in *MsgStakeGateway, opts ...grpc.CallOption) (*MsgStakeGatewayResponse, error) + UnstakeGateway(ctx context.Context, in *MsgUnstakeGateway, opts ...grpc.CallOption) (*MsgUnstakeGatewayResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeGateway(ctx context.Context, in *MsgStakeGateway, opts ...grpc.CallOption) (*MsgStakeGatewayResponse, error) { + out := new(MsgStakeGatewayResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Msg/StakeGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeGateway(ctx context.Context, in *MsgUnstakeGateway, opts ...grpc.CallOption) (*MsgUnstakeGatewayResponse, error) { + out := new(MsgUnstakeGatewayResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Msg/UnstakeGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.gateway.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeGateway(context.Context, *MsgStakeGateway) (*MsgStakeGatewayResponse, error) + UnstakeGateway(context.Context, *MsgUnstakeGateway) (*MsgUnstakeGatewayResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) StakeGateway(ctx context.Context, req *MsgStakeGateway) (*MsgStakeGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeGateway not implemented") +} +func (*UnimplementedMsgServer) UnstakeGateway(ctx context.Context, req *MsgUnstakeGateway) (*MsgUnstakeGatewayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeGateway not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Msg/StakeGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeGateway(ctx, req.(*MsgStakeGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeGateway) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Msg/UnstakeGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeGateway(ctx, req.(*MsgUnstakeGateway)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.gateway.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.gateway.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeGateway", + Handler: _Msg_StakeGateway_Handler, + }, + { + MethodName: "UnstakeGateway", + Handler: _Msg_UnstakeGateway_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/gateway/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStakeGateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeGateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeGateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStakeGatewayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeGatewayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Gateway != nil { + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeGateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeGateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeGateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeGatewayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeGatewayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Gateway != nil { + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStakeGateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStakeGatewayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gateway != nil { + l = m.Gateway.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeGateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeGatewayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Gateway != nil { + l = m.Gateway.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeGateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeGateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeGateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeGatewayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeGatewayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeGatewayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gateway == nil { + m.Gateway = &Gateway{} + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeGateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeGateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeGateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeGatewayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeGatewayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeGatewayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gateway == nil { + m.Gateway = &Gateway{} + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gateway/types/types.pb.go b/x/gateway/types/types.pb.go new file mode 100644 index 000000000..f91d243f3 --- /dev/null +++ b/x/gateway/types/types.pb.go @@ -0,0 +1,379 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/gateway/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Gateway struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Stake *types.Coin `protobuf:"bytes,2,opt,name=stake,proto3" json:"stake,omitempty"` +} + +func (m *Gateway) Reset() { *m = Gateway{} } +func (m *Gateway) String() string { return proto.CompactTextString(m) } +func (*Gateway) ProtoMessage() {} +func (*Gateway) Descriptor() ([]byte, []int) { + return fileDescriptor_8e457ba71add809d, []int{0} +} +func (m *Gateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Gateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateway.Merge(m, src) +} +func (m *Gateway) XXX_Size() int { + return m.Size() +} +func (m *Gateway) XXX_DiscardUnknown() { + xxx_messageInfo_Gateway.DiscardUnknown(m) +} + +var xxx_messageInfo_Gateway proto.InternalMessageInfo + +func (m *Gateway) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *Gateway) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +func init() { + proto.RegisterType((*Gateway)(nil), "poktroll.gateway.Gateway") +} + +func init() { proto.RegisterFile("poktroll/gateway/types.proto", fileDescriptor_8e457ba71add809d) } + +var fileDescriptor_8e457ba71add809d = []byte{ + // 256 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x4f, 0x2c, 0x49, 0x2d, 0x4f, 0xac, 0xd4, 0x2f, 0xa9, 0x2c, + 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xea, 0x41, 0x65, 0xa5, + 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0xc1, 0xf2, 0xfa, 0x10, 0x0e, 0x44, 0xb1, 0x94, + 0x1c, 0x84, 0xa7, 0x9f, 0x94, 0x58, 0x9c, 0xaa, 0x5f, 0x66, 0x98, 0x94, 0x5a, 0x92, 0x68, 0xa8, + 0x9f, 0x9c, 0x9f, 0x99, 0x07, 0x95, 0x17, 0x49, 0xcf, 0x4f, 0xcf, 0x87, 0xe8, 0x03, 0xb1, 0x20, + 0xa2, 0x4a, 0x79, 0x5c, 0xec, 0xee, 0x10, 0xb3, 0x85, 0x8c, 0xb8, 0xd8, 0x13, 0x53, 0x52, 0x8a, + 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24, 0x2e, 0x6d, 0xd1, 0x15, 0x81, + 0xda, 0xe1, 0x08, 0x91, 0x09, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x82, 0x29, 0x14, 0xd2, 0xe7, + 0x62, 0x2d, 0x2e, 0x49, 0xcc, 0x4e, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4, 0x83, + 0x2a, 0x07, 0x39, 0x42, 0x0f, 0xea, 0x08, 0x3d, 0xe7, 0xfc, 0xcc, 0xbc, 0x20, 0x88, 0x3a, 0x27, + 0xbf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, + 0x20, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe4, 0x77, 0xdd, 0xbc, + 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, 0x7d, 0x78, 0x30, 0x55, 0xa0, 0x06, 0x54, 0x12, 0x1b, 0xd8, + 0x1b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x4f, 0xc7, 0x17, 0x49, 0x01, 0x00, 0x00, +} + +func (m *Gateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Gateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Gateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Gateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Gateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/migration/types/genesis.pb.go b/x/migration/types/genesis.pb.go new file mode 100644 index 000000000..334ae0fd2 --- /dev/null +++ b/x/migration/types/genesis.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/migration/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the migration module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_c544bf46e8dacb64, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.migration.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/migration/genesis.proto", fileDescriptor_c544bf46e8dacb64) } + +var fileDescriptor_c544bf46e8dacb64 = []byte{ + // 219 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0xcf, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x4f, + 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xa9, + 0xd0, 0x83, 0xab, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, + 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x95, 0xc7, 0x62, 0x7c, 0x41, + 0x62, 0x51, 0x62, 0x2e, 0xd4, 0x74, 0x25, 0x5f, 0x2e, 0x1e, 0x77, 0x88, 0x75, 0xc1, 0x25, 0x89, + 0x25, 0xa9, 0x42, 0xb6, 0x5c, 0x6c, 0x10, 0x79, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, + 0x3d, 0x4c, 0xeb, 0xf5, 0x02, 0xc0, 0x2a, 0x9c, 0x38, 0x4f, 0xdc, 0x93, 0x67, 0x58, 0xf1, 0x7c, + 0x83, 0x16, 0x63, 0x10, 0x54, 0x93, 0x53, 0xc0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, + 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0x0f, 0x32, 0x56, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xee, 0xca, + 0x0a, 0x24, 0x77, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xdd, 0x69, 0x0c, 0x08, 0x00, + 0x00, 0xff, 0xff, 0xd2, 0xec, 0xd5, 0xe0, 0x29, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/migration/types/params.pb.go b/x/migration/types/params.pb.go new file mode 100644 index 000000000..549b399e5 --- /dev/null +++ b/x/migration/types/params.pb.go @@ -0,0 +1,285 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/migration/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_c43627a1a6fcee1f, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.migration.Params") +} + +func init() { proto.RegisterFile("poktroll/migration/params.proto", fileDescriptor_c43627a1a6fcee1f) } + +var fileDescriptor_c43627a1a6fcee1f = []byte{ + // 183 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0xcf, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, + 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x29, 0xd0, + 0x83, 0x2b, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, + 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0xd2, 0xe3, 0x62, 0x0b, 0x00, + 0x1b, 0x66, 0xa5, 0xf2, 0x62, 0x81, 0x3c, 0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xd2, 0x70, 0x0b, 0x2b, + 0x90, 0xac, 0x84, 0xa8, 0x72, 0x0a, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, + 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, + 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, + 0xf5, 0x41, 0xa6, 0xe8, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0x63, 0x35, 0xb2, 0xa4, + 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x10, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, + 0x7c, 0x65, 0x65, 0xe8, 0x00, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/migration/types/query.pb.go b/x/migration/types/query.pb.go new file mode 100644 index 000000000..d82a26af1 --- /dev/null +++ b/x/migration/types/query.pb.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/migration/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_524460f9291c42e8, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_524460f9291c42e8, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.migration.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.migration.QueryParamsResponse") +} + +func init() { proto.RegisterFile("poktroll/migration/query.proto", fileDescriptor_524460f9291c42e8) } + +var fileDescriptor_524460f9291c42e8 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x31, 0x4b, 0xc3, 0x40, + 0x14, 0xc7, 0x73, 0x82, 0x05, 0xe3, 0xe4, 0xd9, 0x41, 0x82, 0x5c, 0xa5, 0x83, 0xd5, 0x82, 0x79, + 0xb4, 0xce, 0x2e, 0xfd, 0x04, 0xb5, 0x38, 0xb9, 0x5d, 0xca, 0x71, 0x86, 0x36, 0xf7, 0xae, 0xb9, + 0xab, 0xda, 0xd5, 0xd1, 0x49, 0xd0, 0x0f, 0xe1, 0xe8, 0xc7, 0xe8, 0x58, 0x70, 0xe9, 0x24, 0x92, + 0x0a, 0x7e, 0x0d, 0xc9, 0x25, 0x8a, 0xd2, 0x16, 0x97, 0xf0, 0x78, 0xff, 0xff, 0xff, 0x97, 0xff, + 0x3d, 0x9f, 0x69, 0x1c, 0xd8, 0x14, 0x87, 0x43, 0x48, 0x62, 0x99, 0x72, 0x1b, 0xa3, 0x82, 0xd1, + 0x58, 0xa4, 0x93, 0x50, 0xa7, 0x68, 0x91, 0xd2, 0x6f, 0x3d, 0xfc, 0xd1, 0x83, 0x1d, 0x9e, 0xc4, + 0x0a, 0xc1, 0x7d, 0x0b, 0x5b, 0x50, 0x95, 0x28, 0xd1, 0x8d, 0x90, 0x4f, 0xe5, 0x76, 0x5f, 0x22, + 0xca, 0xa1, 0x00, 0xae, 0x63, 0xe0, 0x4a, 0xa1, 0x75, 0x79, 0x53, 0xaa, 0xcd, 0x3e, 0x9a, 0x04, + 0x0d, 0x44, 0xdc, 0x88, 0xe2, 0x9f, 0x70, 0xdd, 0x8a, 0x84, 0xe5, 0x2d, 0xd0, 0x5c, 0xc6, 0xca, + 0x99, 0x4b, 0x6f, 0x6d, 0x45, 0x4d, 0xcd, 0x53, 0x9e, 0x94, 0xb0, 0x7a, 0xd5, 0xa7, 0xe7, 0x39, + 0xa2, 0xeb, 0x96, 0x3d, 0x31, 0x1a, 0x0b, 0x63, 0xeb, 0x17, 0xfe, 0xee, 0x9f, 0xad, 0xd1, 0xa8, + 0x8c, 0xa0, 0x67, 0x7e, 0xa5, 0x08, 0xef, 0x91, 0x03, 0x72, 0xb4, 0xdd, 0x0e, 0xc2, 0xe5, 0x57, + 0x86, 0x45, 0xa6, 0xb3, 0x35, 0x7d, 0xab, 0x79, 0xcf, 0x9f, 0x2f, 0x4d, 0xd2, 0x2b, 0x43, 0xed, + 0x27, 0xe2, 0x6f, 0x3a, 0x2c, 0xbd, 0x27, 0x7e, 0xa5, 0xf0, 0xd1, 0xc3, 0x55, 0x8c, 0xe5, 0x4a, + 0x41, 0xe3, 0x5f, 0x5f, 0x51, 0xb2, 0x0e, 0x77, 0xaf, 0x1f, 0x8f, 0x1b, 0xc7, 0xb4, 0x01, 0x79, + 0xe0, 0x44, 0x09, 0x7b, 0x83, 0xe9, 0x00, 0xd6, 0x1e, 0xa2, 0xd3, 0x9d, 0x66, 0x8c, 0xcc, 0x32, + 0x46, 0xe6, 0x19, 0x23, 0xef, 0x19, 0x23, 0x0f, 0x0b, 0xe6, 0xcd, 0x16, 0xcc, 0x9b, 0x2f, 0x98, + 0x77, 0xd9, 0x96, 0xb1, 0xbd, 0x1a, 0x47, 0x61, 0x1f, 0x93, 0x35, 0xc0, 0xdb, 0x5f, 0x48, 0x3b, + 0xd1, 0xc2, 0x44, 0x15, 0x77, 0xdb, 0xd3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x9a, 0x4e, + 0xc3, 0x25, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.migration.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/migration/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/migration/types/query.pb.gw.go b/x/migration/types/query.pb.gw.go new file mode 100644 index 000000000..5ab60bb65 --- /dev/null +++ b/x/migration/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/migration/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "migration", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/migration/types/tx.pb.go b/x/migration/types/tx.pb.go new file mode 100644 index 000000000..837557554 --- /dev/null +++ b/x/migration/types/tx.pb.go @@ -0,0 +1,965 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/migration/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgUploadMorseState commits the "Morse migration" state to the Shannon state +// for subsequent migration operations on Shannon. +type MsgUploadMorseState struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + State []byte `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` +} + +func (m *MsgUploadMorseState) Reset() { *m = MsgUploadMorseState{} } +func (m *MsgUploadMorseState) String() string { return proto.CompactTextString(m) } +func (*MsgUploadMorseState) ProtoMessage() {} +func (*MsgUploadMorseState) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{2} +} +func (m *MsgUploadMorseState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUploadMorseState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUploadMorseState) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUploadMorseState.Merge(m, src) +} +func (m *MsgUploadMorseState) XXX_Size() int { + return m.Size() +} +func (m *MsgUploadMorseState) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUploadMorseState.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUploadMorseState proto.InternalMessageInfo + +func (m *MsgUploadMorseState) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUploadMorseState) GetState() []byte { + if m != nil { + return m.State + } + return nil +} + +type MsgUploadMorseStateResponse struct { +} + +func (m *MsgUploadMorseStateResponse) Reset() { *m = MsgUploadMorseStateResponse{} } +func (m *MsgUploadMorseStateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUploadMorseStateResponse) ProtoMessage() {} +func (*MsgUploadMorseStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{3} +} +func (m *MsgUploadMorseStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUploadMorseStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUploadMorseStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUploadMorseStateResponse.Merge(m, src) +} +func (m *MsgUploadMorseStateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUploadMorseStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUploadMorseStateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUploadMorseStateResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.migration.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.migration.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUploadMorseState)(nil), "poktroll.migration.MsgUploadMorseState") + proto.RegisterType((*MsgUploadMorseStateResponse)(nil), "poktroll.migration.MsgUploadMorseStateResponse") +} + +func init() { proto.RegisterFile("poktroll/migration/tx.proto", fileDescriptor_21658240592266b6) } + +var fileDescriptor_21658240592266b6 = []byte{ + // 420 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0xcf, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, + 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x49, 0xea, 0xc1, 0x25, 0xa5, 0x04, + 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x99, 0x94, 0x78, 0x72, 0x7e, 0x71, 0x6e, + 0x7e, 0xb1, 0x7e, 0x6e, 0x71, 0xba, 0x7e, 0x99, 0x21, 0x88, 0x82, 0x4a, 0x48, 0x42, 0x24, 0xe2, + 0xc1, 0x3c, 0x7d, 0x08, 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, + 0xa2, 0xf2, 0x58, 0x5c, 0x53, 0x90, 0x58, 0x94, 0x98, 0x0b, 0xd5, 0xa6, 0x74, 0x90, 0x91, 0x8b, + 0xdf, 0xb7, 0x38, 0x3d, 0xb4, 0x20, 0x25, 0xb1, 0x24, 0x35, 0x00, 0x2c, 0x23, 0x64, 0xc6, 0xc5, + 0x99, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x52, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, + 0x24, 0x71, 0x69, 0x8b, 0xae, 0x08, 0xd4, 0x3e, 0xc7, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, + 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x84, 0x52, 0x21, 0x5b, 0x2e, 0x36, 0x88, 0xd9, 0x12, 0x4c, + 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x52, 0x7a, 0x98, 0xde, 0xd5, 0x83, 0xd8, 0xe1, 0xc4, 0x79, 0xe2, + 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0xa0, 0x9a, 0xac, 0xcc, 0x9b, 0x9e, 0x6f, + 0xd0, 0x42, 0x18, 0xd7, 0xf5, 0x7c, 0x83, 0x96, 0x0a, 0xdc, 0xf9, 0x15, 0x48, 0x1e, 0x40, 0x73, + 0xaf, 0x92, 0x24, 0x97, 0x38, 0x9a, 0x50, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x52, + 0x31, 0x97, 0x30, 0x58, 0x2a, 0x27, 0x3f, 0x31, 0xc5, 0x37, 0xbf, 0xa8, 0x38, 0x35, 0xb8, 0x24, + 0xb1, 0x24, 0x95, 0x6c, 0x1f, 0x8a, 0x70, 0xb1, 0x16, 0x83, 0x0c, 0x00, 0x7b, 0x90, 0x27, 0x08, + 0xc2, 0xb1, 0xe2, 0x43, 0x75, 0xb8, 0x92, 0x2c, 0x97, 0x34, 0x16, 0x4b, 0x61, 0x6e, 0x32, 0xba, + 0xc3, 0xc8, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0x94, 0xc0, 0xc5, 0x83, 0x12, 0xec, 0xca, 0xd8, 0x82, + 0x0b, 0xcd, 0x63, 0x52, 0xda, 0x44, 0x28, 0x82, 0xd9, 0x24, 0x94, 0xc3, 0x25, 0x80, 0xe1, 0x75, + 0x75, 0x9c, 0x06, 0xa0, 0x2a, 0x94, 0xd2, 0x27, 0x52, 0x21, 0xcc, 0x36, 0x29, 0xd6, 0x06, 0x50, + 0x74, 0x3a, 0x05, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x8d, 0x47, 0x72, 0x8c, + 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, + 0x0c, 0x51, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x20, 0xf3, + 0x75, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0xb1, 0xc6, 0x74, 0x49, 0x65, 0x41, 0x6a, + 0x71, 0x12, 0x1b, 0x38, 0xa9, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x61, 0x68, 0x19, + 0x5b, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) { + out := new(MsgUploadMorseStateResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Msg/UploadMorseState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UploadMorseState(ctx context.Context, req *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadMorseState not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UploadMorseState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUploadMorseState) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UploadMorseState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Msg/UploadMorseState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UploadMorseState(ctx, req.(*MsgUploadMorseState)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.migration.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UploadMorseState", + Handler: _Msg_UploadMorseState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/migration/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUploadMorseState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUploadMorseState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUploadMorseState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintTx(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUploadMorseStateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUploadMorseStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUploadMorseStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUploadMorseState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUploadMorseStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUploadMorseState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUploadMorseState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUploadMorseState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = append(m.State[:0], dAtA[iNdEx:postIndex]...) + if m.State == nil { + m.State = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUploadMorseStateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUploadMorseStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUploadMorseStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/migration/types/types.pb.go b/x/migration/types/types.pb.go new file mode 100644 index 000000000..8c68ac215 --- /dev/null +++ b/x/migration/types/types.pb.go @@ -0,0 +1,1690 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/migration/types.proto + +package types + +import ( + bytes "bytes" + crypto_ed25519 "crypto/ed25519" + fmt "fmt" + github_com_cometbft_cometbft_crypto "github.com/cometbft/cometbft/crypto" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_sortkeys "github.com/cosmos/gogoproto/sortkeys" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MorseAccount defines a base account type. It contains all the necessary fields +// for basic account functionality. Any custom account type should extend this +// type for additional functionality (e.g. vesting). +type MorseAccount struct { + // TODO_IN_THIS_COMMIT: update gogoproto.casttype option... + Address github_com_cometbft_cometbft_crypto.Address `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cometbft/cometbft/crypto.Address" json:"address"` + PubKey *MorsePublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"public_key" yaml:"public_key"` + Coins []types.Coin `protobuf:"bytes,3,rep,name=coins,proto3" json:"coins"` +} + +func (m *MorseAccount) Reset() { *m = MorseAccount{} } +func (m *MorseAccount) String() string { return proto.CompactTextString(m) } +func (*MorseAccount) ProtoMessage() {} +func (*MorseAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed31f79aa0bc330, []int{0} +} +func (m *MorseAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MorseAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MorseAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_MorseAccount.Merge(m, src) +} +func (m *MorseAccount) XXX_Size() int { + return m.Size() +} +func (m *MorseAccount) XXX_DiscardUnknown() { + xxx_messageInfo_MorseAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_MorseAccount proto.InternalMessageInfo + +func (*MorseAccount) XXX_MessageName() string { + return "poktroll.migration.MorseAccount" +} + +type MorsePublicKey struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Value crypto_ed25519.PublicKey `protobuf:"bytes,2,opt,name=value,proto3,casttype=crypto/ed25519.PublicKey" json:"value,omitempty"` +} + +func (m *MorsePublicKey) Reset() { *m = MorsePublicKey{} } +func (m *MorsePublicKey) String() string { return proto.CompactTextString(m) } +func (*MorsePublicKey) ProtoMessage() {} +func (*MorsePublicKey) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed31f79aa0bc330, []int{1} +} +func (m *MorsePublicKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MorsePublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MorsePublicKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_MorsePublicKey.Merge(m, src) +} +func (m *MorsePublicKey) XXX_Size() int { + return m.Size() +} +func (m *MorsePublicKey) XXX_DiscardUnknown() { + xxx_messageInfo_MorsePublicKey.DiscardUnknown(m) +} + +var xxx_messageInfo_MorsePublicKey proto.InternalMessageInfo + +func (m *MorsePublicKey) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *MorsePublicKey) GetValue() crypto_ed25519.PublicKey { + if m != nil { + return m.Value + } + return nil +} + +// MorseApplication defines the total amount of bond shares and their exchange rate to +// coins. Slashing results in a decrease in the exchange rate, allowing correct +// calculation of future undelegations without iterating over delegators. +// When coins are delegated to this validator, the validator is credited with a +// delegation whose number of bond shares is based on the amount of coins +// delegated divided by the current exchange rate. Voting power can be +// calculated as total bonded shares multiplied by exchange rate. +type MorseApplication struct { + Address github_com_cometbft_cometbft_crypto.Address `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cometbft/cometbft/crypto.Address" json:"address" yaml:"address"` + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key" yaml:"public_key"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed" yaml:"jailed"` + Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status" yaml:"status"` + // repeated string chains = 5 [ + // + // (gogoproto.jsontag) = "chains", + // (gogoproto.moretags) = "yaml:\"chains\""]; + StakedTokens string `protobuf:"bytes,6,opt,name=staked_tokens,json=stakedTokens,proto3" json:"staked_tokens,omitempty"` +} + +func (m *MorseApplication) Reset() { *m = MorseApplication{} } +func (m *MorseApplication) String() string { return proto.CompactTextString(m) } +func (*MorseApplication) ProtoMessage() {} +func (*MorseApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed31f79aa0bc330, []int{2} +} +func (m *MorseApplication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MorseApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MorseApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_MorseApplication.Merge(m, src) +} +func (m *MorseApplication) XXX_Size() int { + return m.Size() +} +func (m *MorseApplication) XXX_DiscardUnknown() { + xxx_messageInfo_MorseApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_MorseApplication proto.InternalMessageInfo + +type MorseValidator struct { + Address github_com_cometbft_cometbft_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,casttype=github.com/cometbft/cometbft/crypto.Address" json:"address" yaml:"address"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"public_key" yaml:"public_key"` + Jailed bool `protobuf:"varint,3,opt,name=jailed,proto3" json:"jailed"` + Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status"` + // repeated string Chains = 5 [(gogoproto.jsontag) = "chains"]; + // string ServiceURL = 6 [(gogoproto.jsontag) = "service_url"]; + // string StakedTokens = 7 [(gogoproto.customtype) = "github.com/pokt-network/pocket-core/types.BigInt", (gogoproto.jsontag) = "tokens", (gogoproto.nullable) = false]; + StakedTokens string `protobuf:"bytes,7,opt,name=StakedTokens,proto3" json:"tokens"` +} + +func (m *MorseValidator) Reset() { *m = MorseValidator{} } +func (m *MorseValidator) String() string { return proto.CompactTextString(m) } +func (*MorseValidator) ProtoMessage() {} +func (*MorseValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed31f79aa0bc330, []int{3} +} +func (m *MorseValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MorseValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MorseValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MorseValidator.Merge(m, src) +} +func (m *MorseValidator) XXX_Size() int { + return m.Size() +} +func (m *MorseValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MorseValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MorseValidator proto.InternalMessageInfo + +type MorseAccountState struct { + Accounts map[string]*MorseAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MorseAccountState) Reset() { *m = MorseAccountState{} } +func (m *MorseAccountState) String() string { return proto.CompactTextString(m) } +func (*MorseAccountState) ProtoMessage() {} +func (*MorseAccountState) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed31f79aa0bc330, []int{4} +} +func (m *MorseAccountState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MorseAccountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MorseAccountState) XXX_Merge(src proto.Message) { + xxx_messageInfo_MorseAccountState.Merge(m, src) +} +func (m *MorseAccountState) XXX_Size() int { + return m.Size() +} +func (m *MorseAccountState) XXX_DiscardUnknown() { + xxx_messageInfo_MorseAccountState.DiscardUnknown(m) +} + +var xxx_messageInfo_MorseAccountState proto.InternalMessageInfo + +func (m *MorseAccountState) GetAccounts() map[string]*MorseAccount { + if m != nil { + return m.Accounts + } + return nil +} + +func init() { + proto.RegisterType((*MorseAccount)(nil), "poktroll.migration.MorseAccount") + proto.RegisterType((*MorsePublicKey)(nil), "poktroll.migration.MorsePublicKey") + proto.RegisterType((*MorseApplication)(nil), "poktroll.migration.MorseApplication") + proto.RegisterType((*MorseValidator)(nil), "poktroll.migration.MorseValidator") + proto.RegisterType((*MorseAccountState)(nil), "poktroll.migration.MorseAccountState") + proto.RegisterMapType((map[string]*MorseAccount)(nil), "poktroll.migration.MorseAccountState.AccountsEntry") +} + +func init() { proto.RegisterFile("poktroll/migration/types.proto", fileDescriptor_7ed31f79aa0bc330) } + +var fileDescriptor_7ed31f79aa0bc330 = []byte{ + // 693 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x4f, 0x6b, 0xd4, 0x4e, + 0x18, 0xc7, 0x77, 0x76, 0xdb, 0xdd, 0x76, 0xba, 0x2d, 0xed, 0xf0, 0x83, 0x5f, 0x5a, 0x25, 0xb3, + 0xa4, 0x97, 0x05, 0x69, 0x42, 0xb7, 0x54, 0x74, 0x6f, 0x1b, 0xf1, 0x54, 0xc5, 0x92, 0x16, 0x11, + 0x41, 0x6a, 0x92, 0x9d, 0xae, 0x71, 0xb3, 0x99, 0x90, 0x4c, 0xaa, 0x79, 0x07, 0x3d, 0x7a, 0x92, + 0x1e, 0xab, 0xaf, 0xc1, 0x77, 0x20, 0x42, 0xf1, 0xd4, 0x9b, 0x3d, 0x05, 0xd9, 0x5e, 0xa4, 0xc7, + 0x1e, 0x7b, 0x92, 0xc9, 0x64, 0xb3, 0xe9, 0x8a, 0xf8, 0x07, 0xbc, 0x3d, 0xff, 0xbe, 0x93, 0x79, + 0x3e, 0x4f, 0x9e, 0x81, 0xb2, 0x4f, 0xfb, 0x2c, 0xa0, 0xae, 0xab, 0x0d, 0x9c, 0x5e, 0x60, 0x32, + 0x87, 0x7a, 0x1a, 0x8b, 0x7d, 0x12, 0xaa, 0x7e, 0x40, 0x19, 0x45, 0x68, 0x94, 0x57, 0xf3, 0xfc, + 0xca, 0xb2, 0x4d, 0xc3, 0x01, 0x0d, 0xf7, 0xd2, 0x0a, 0x4d, 0x38, 0xa2, 0x7c, 0x45, 0x16, 0x9e, + 0x66, 0x99, 0x21, 0xd1, 0x0e, 0xd6, 0x2d, 0xc2, 0xcc, 0x75, 0xcd, 0xa6, 0x8e, 0x97, 0xe5, 0xff, + 0xeb, 0xd1, 0x1e, 0x15, 0x3a, 0x6e, 0x89, 0xa8, 0xf2, 0xb6, 0x0c, 0xeb, 0x0f, 0x69, 0x10, 0x92, + 0x8e, 0x6d, 0xd3, 0xc8, 0x63, 0x68, 0x17, 0xd6, 0xcc, 0x6e, 0x37, 0x20, 0x61, 0x28, 0x81, 0x06, + 0x68, 0xd6, 0xf5, 0xf6, 0x45, 0x82, 0x47, 0xa1, 0xab, 0x04, 0xdf, 0xea, 0x39, 0xec, 0x45, 0x64, + 0xa9, 0x36, 0x1d, 0x68, 0x36, 0x1d, 0x10, 0x66, 0xed, 0xb3, 0x82, 0x11, 0xc4, 0x3e, 0xa3, 0x6a, + 0x47, 0x94, 0x1b, 0x23, 0x1d, 0x7a, 0x0e, 0x6b, 0x7e, 0x64, 0xed, 0xf5, 0x49, 0x2c, 0x95, 0x1b, + 0xa0, 0x39, 0xd7, 0x52, 0xd4, 0x1f, 0xbb, 0x53, 0xd3, 0x8b, 0x6c, 0x47, 0x96, 0xeb, 0xd8, 0x5b, + 0x24, 0xd6, 0x57, 0x2f, 0x12, 0x0c, 0xfd, 0xd4, 0xe5, 0xca, 0xcb, 0x04, 0x2f, 0xc5, 0xe6, 0xc0, + 0x6d, 0x2b, 0xe3, 0x98, 0x62, 0x54, 0xfd, 0xc8, 0xda, 0x22, 0x31, 0xda, 0x84, 0xd3, 0xbc, 0xd9, + 0x50, 0xaa, 0x34, 0x2a, 0xcd, 0xb9, 0xd6, 0xb2, 0x9a, 0xc1, 0xe1, 0x38, 0xd4, 0x0c, 0x87, 0x7a, + 0x8f, 0x3a, 0x9e, 0x3e, 0x75, 0x92, 0xe0, 0x92, 0x21, 0xaa, 0xdb, 0xff, 0x1f, 0x1e, 0xe3, 0xd2, + 0xd1, 0x31, 0x06, 0x87, 0xef, 0x31, 0xf8, 0xfc, 0x61, 0xad, 0x96, 0x71, 0x50, 0x9e, 0xc0, 0x85, + 0xeb, 0xd7, 0x41, 0x08, 0x4e, 0xf1, 0xf1, 0xa4, 0x58, 0x66, 0x8d, 0xd4, 0x46, 0x2d, 0x38, 0x7d, + 0x60, 0xba, 0x11, 0x49, 0xbb, 0xaa, 0xeb, 0x37, 0xaf, 0x12, 0x2c, 0x09, 0x06, 0x1a, 0xe9, 0xb6, + 0x36, 0x37, 0xd7, 0xef, 0xaa, 0xf9, 0x01, 0x86, 0x28, 0x55, 0xbe, 0x94, 0xe1, 0xa2, 0x40, 0xee, + 0xfb, 0xae, 0x63, 0xa7, 0xad, 0xa3, 0xfd, 0x49, 0xec, 0x0f, 0x0a, 0xd8, 0x2f, 0x13, 0xbc, 0x20, + 0x3a, 0xcf, 0x02, 0xca, 0x5f, 0x0f, 0x42, 0x87, 0x05, 0xa2, 0xd9, 0xad, 0x7f, 0x8b, 0xf3, 0xac, + 0x9f, 0x83, 0xd8, 0x80, 0xd5, 0x97, 0xa6, 0xe3, 0x92, 0xae, 0x54, 0x69, 0x80, 0xe6, 0x8c, 0x7e, + 0xe3, 0x22, 0xc1, 0x59, 0xe4, 0x32, 0xc1, 0xf3, 0x42, 0x2b, 0x7c, 0xc5, 0xc8, 0x12, 0x5c, 0x14, + 0x32, 0x93, 0x45, 0xa1, 0x34, 0xd5, 0x00, 0xcd, 0x69, 0x21, 0x12, 0x91, 0xb1, 0x48, 0xf8, 0x8a, + 0x91, 0x25, 0xd0, 0x2a, 0x9c, 0x0f, 0x99, 0xd9, 0x27, 0xdd, 0x3d, 0x46, 0xfb, 0xc4, 0x0b, 0xa5, + 0x6a, 0xca, 0xbe, 0x2e, 0x82, 0xbb, 0x69, 0xac, 0x3d, 0xc3, 0x47, 0xf8, 0xed, 0x18, 0x03, 0xe5, + 0x53, 0x39, 0x1b, 0xda, 0x63, 0xd3, 0x75, 0xba, 0x26, 0xa3, 0x01, 0xe7, 0xda, 0xf9, 0x97, 0x5c, + 0x33, 0x03, 0x75, 0xe0, 0x6c, 0x3e, 0xe8, 0x3f, 0xc2, 0x3a, 0xfe, 0xbf, 0x94, 0x09, 0xac, 0x70, + 0x8c, 0x35, 0xa7, 0xa8, 0x4c, 0x50, 0x84, 0x63, 0x8a, 0x39, 0x34, 0x15, 0xd6, 0x77, 0x0a, 0x7c, + 0xa4, 0x1a, 0x67, 0x26, 0x2a, 0x05, 0x45, 0xe3, 0x5a, 0xbe, 0xbd, 0x38, 0x5a, 0x01, 0xce, 0xf0, + 0xe8, 0x1d, 0x06, 0xca, 0x47, 0x00, 0x97, 0x8a, 0x8f, 0xc2, 0x0e, 0x33, 0x19, 0x41, 0x8f, 0xe0, + 0x8c, 0x29, 0x7c, 0xce, 0x92, 0x2f, 0xd9, 0xc6, 0x4f, 0x97, 0xb8, 0x28, 0x54, 0x33, 0x27, 0xbc, + 0xef, 0xb1, 0x20, 0x36, 0xf2, 0x43, 0x56, 0x9e, 0xc1, 0xf9, 0x6b, 0x29, 0xb4, 0x08, 0x2b, 0xfc, + 0xaf, 0x14, 0x0b, 0xc6, 0x4d, 0x74, 0xbb, 0xb8, 0x5f, 0x73, 0xad, 0xc6, 0xaf, 0x3e, 0x98, 0xed, + 0x58, 0xbb, 0x7c, 0x07, 0xe8, 0xdb, 0x27, 0x43, 0x19, 0x9c, 0x0e, 0x65, 0x70, 0x36, 0x94, 0xc1, + 0xd7, 0xa1, 0x0c, 0xde, 0x9c, 0xcb, 0xa5, 0xd3, 0x73, 0xb9, 0x74, 0x76, 0x2e, 0x97, 0x9e, 0xb6, + 0x0a, 0x63, 0xe6, 0x87, 0xae, 0x79, 0x84, 0xbd, 0xa2, 0x41, 0x5f, 0xcb, 0x5f, 0xe5, 0xd7, 0x93, + 0xef, 0xb2, 0x55, 0x4d, 0xdf, 0xcc, 0x8d, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xd5, 0x85, + 0x15, 0xba, 0x05, 0x00, 0x00, +} + +func (this *MorseApplication) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MorseApplication) + if !ok { + that2, ok := that.(MorseApplication) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Address, that1.Address) { + return false + } + if !bytes.Equal(this.PublicKey, that1.PublicKey) { + return false + } + if this.Jailed != that1.Jailed { + return false + } + if this.Status != that1.Status { + return false + } + if this.StakedTokens != that1.StakedTokens { + return false + } + return true +} +func (this *MorseValidator) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MorseValidator) + if !ok { + that2, ok := that.(MorseValidator) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Address, that1.Address) { + return false + } + if !bytes.Equal(this.PublicKey, that1.PublicKey) { + return false + } + if this.Jailed != that1.Jailed { + return false + } + if this.Status != that1.Status { + return false + } + if this.StakedTokens != that1.StakedTokens { + return false + } + return true +} +func (m *MorseAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MorseAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MorseAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Coins) > 0 { + for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.PubKey != nil { + { + size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MorsePublicKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MorsePublicKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MorsePublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MorseApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MorseApplication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MorseApplication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StakedTokens) > 0 { + i -= len(m.StakedTokens) + copy(dAtA[i:], m.StakedTokens) + i = encodeVarintTypes(dAtA, i, uint64(len(m.StakedTokens))) + i-- + dAtA[i] = 0x32 + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MorseValidator) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MorseValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MorseValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StakedTokens) > 0 { + i -= len(m.StakedTokens) + copy(dAtA[i:], m.StakedTokens) + i = encodeVarintTypes(dAtA, i, uint64(len(m.StakedTokens))) + i-- + dAtA[i] = 0x3a + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Jailed { + i-- + if m.Jailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MorseAccountState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MorseAccountState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MorseAccountState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Accounts) > 0 { + keysForAccounts := make([]string, 0, len(m.Accounts)) + for k := range m.Accounts { + keysForAccounts = append(keysForAccounts, string(k)) + } + github_com_cosmos_gogoproto_sortkeys.Strings(keysForAccounts) + for iNdEx := len(keysForAccounts) - 1; iNdEx >= 0; iNdEx-- { + v := m.Accounts[string(keysForAccounts[iNdEx])] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(keysForAccounts[iNdEx]) + copy(dAtA[i:], keysForAccounts[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(keysForAccounts[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintTypes(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MorseAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.PubKey != nil { + l = m.PubKey.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *MorsePublicKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MorseApplication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + l = len(m.StakedTokens) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MorseValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Jailed { + n += 2 + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + l = len(m.StakedTokens) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MorseAccountState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for k, v := range m.Accounts { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MorseAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MorseAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MorseAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PubKey == nil { + m.PubKey = &MorsePublicKey{} + } + if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MorsePublicKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MorsePublicKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MorsePublicKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MorseApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MorseApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MorseApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakedTokens = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MorseValidator) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MorseValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MorseValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Jailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Jailed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakedTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakedTokens = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MorseAccountState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MorseAccountState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MorseAccountState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Accounts == nil { + m.Accounts = make(map[string]*MorseAccount) + } + var mapkey string + var mapvalue *MorseAccount + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTypes + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTypes + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &MorseAccount{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Accounts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/event.pb.go b/x/proof/types/event.pb.go new file mode 100644 index 000000000..8e467c0c5 --- /dev/null +++ b/x/proof/types/event.pb.go @@ -0,0 +1,1647 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/event.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventClaimCreated struct { + Claim *Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + NumRelays uint64 `protobuf:"varint,2,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + ClaimedUpokt *types.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` +} + +func (m *EventClaimCreated) Reset() { *m = EventClaimCreated{} } +func (m *EventClaimCreated) String() string { return proto.CompactTextString(m) } +func (*EventClaimCreated) ProtoMessage() {} +func (*EventClaimCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_dd4c19e04487fbec, []int{0} +} +func (m *EventClaimCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClaimCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventClaimCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClaimCreated.Merge(m, src) +} +func (m *EventClaimCreated) XXX_Size() int { + return m.Size() +} +func (m *EventClaimCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventClaimCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClaimCreated proto.InternalMessageInfo + +func (m *EventClaimCreated) GetClaim() *Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventClaimCreated) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventClaimCreated) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventClaimCreated) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventClaimCreated) GetClaimedUpokt() *types.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +// TODO_TEST: Add coverage for claim updates. +type EventClaimUpdated struct { + Claim *Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + NumRelays uint64 `protobuf:"varint,2,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + ClaimedUpokt *types.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` +} + +func (m *EventClaimUpdated) Reset() { *m = EventClaimUpdated{} } +func (m *EventClaimUpdated) String() string { return proto.CompactTextString(m) } +func (*EventClaimUpdated) ProtoMessage() {} +func (*EventClaimUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_dd4c19e04487fbec, []int{1} +} +func (m *EventClaimUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClaimUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventClaimUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClaimUpdated.Merge(m, src) +} +func (m *EventClaimUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventClaimUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventClaimUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClaimUpdated proto.InternalMessageInfo + +func (m *EventClaimUpdated) GetClaim() *Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventClaimUpdated) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventClaimUpdated) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventClaimUpdated) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventClaimUpdated) GetClaimedUpokt() *types.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +type EventProofSubmitted struct { + Claim *Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"` + NumRelays uint64 `protobuf:"varint,3,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + ClaimedUpokt *types.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` +} + +func (m *EventProofSubmitted) Reset() { *m = EventProofSubmitted{} } +func (m *EventProofSubmitted) String() string { return proto.CompactTextString(m) } +func (*EventProofSubmitted) ProtoMessage() {} +func (*EventProofSubmitted) Descriptor() ([]byte, []int) { + return fileDescriptor_dd4c19e04487fbec, []int{2} +} +func (m *EventProofSubmitted) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventProofSubmitted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventProofSubmitted) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventProofSubmitted.Merge(m, src) +} +func (m *EventProofSubmitted) XXX_Size() int { + return m.Size() +} +func (m *EventProofSubmitted) XXX_DiscardUnknown() { + xxx_messageInfo_EventProofSubmitted.DiscardUnknown(m) +} + +var xxx_messageInfo_EventProofSubmitted proto.InternalMessageInfo + +func (m *EventProofSubmitted) GetClaim() *Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventProofSubmitted) GetProof() *Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *EventProofSubmitted) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventProofSubmitted) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventProofSubmitted) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventProofSubmitted) GetClaimedUpokt() *types.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +// TODO_TEST: Add coverage for proof updates. +type EventProofUpdated struct { + Claim *Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"` + NumRelays uint64 `protobuf:"varint,3,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + ClaimedUpokt *types.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` +} + +func (m *EventProofUpdated) Reset() { *m = EventProofUpdated{} } +func (m *EventProofUpdated) String() string { return proto.CompactTextString(m) } +func (*EventProofUpdated) ProtoMessage() {} +func (*EventProofUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_dd4c19e04487fbec, []int{3} +} +func (m *EventProofUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventProofUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventProofUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventProofUpdated.Merge(m, src) +} +func (m *EventProofUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventProofUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventProofUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventProofUpdated proto.InternalMessageInfo + +func (m *EventProofUpdated) GetClaim() *Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventProofUpdated) GetProof() *Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *EventProofUpdated) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventProofUpdated) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventProofUpdated) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventProofUpdated) GetClaimedUpokt() *types.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +func init() { + proto.RegisterType((*EventClaimCreated)(nil), "poktroll.proof.EventClaimCreated") + proto.RegisterType((*EventClaimUpdated)(nil), "poktroll.proof.EventClaimUpdated") + proto.RegisterType((*EventProofSubmitted)(nil), "poktroll.proof.EventProofSubmitted") + proto.RegisterType((*EventProofUpdated)(nil), "poktroll.proof.EventProofUpdated") +} + +func init() { proto.RegisterFile("poktroll/proof/event.proto", fileDescriptor_dd4c19e04487fbec) } + +var fileDescriptor_dd4c19e04487fbec = []byte{ + // 451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0x1b, 0x7a, 0x3d, 0xe9, 0x0c, 0x9c, 0x74, 0xe1, 0x8f, 0x72, 0x45, 0x38, 0x27, 0xa6, + 0x5b, 0xce, 0x56, 0x41, 0xea, 0x07, 0x48, 0xd4, 0x8d, 0x01, 0x82, 0x2a, 0x21, 0x06, 0xaa, 0x24, + 0x35, 0x25, 0x6a, 0x6c, 0x47, 0x89, 0x5d, 0xe8, 0x27, 0x60, 0xe5, 0x1b, 0x21, 0x36, 0xc6, 0x8e, + 0x9d, 0x22, 0x94, 0x6e, 0xf9, 0x14, 0xc8, 0x76, 0x83, 0xda, 0x08, 0x90, 0x50, 0x25, 0x58, 0x3a, + 0xc5, 0x7e, 0x9f, 0xe7, 0xb1, 0x9d, 0xf7, 0x27, 0xcb, 0xa0, 0x9f, 0xf1, 0xb9, 0xc8, 0x79, 0x9a, + 0xe2, 0x2c, 0xe7, 0xfc, 0x1d, 0x26, 0x0b, 0xc2, 0x04, 0xca, 0x72, 0x2e, 0xb8, 0x7d, 0xde, 0x68, + 0x48, 0x6b, 0x7d, 0x18, 0xf3, 0x82, 0xf2, 0x02, 0x47, 0x61, 0x41, 0xf0, 0x62, 0x10, 0x11, 0x11, + 0x0e, 0x70, 0xcc, 0x13, 0x66, 0xfc, 0xfd, 0xfb, 0x33, 0x3e, 0xe3, 0x7a, 0x88, 0xd5, 0x68, 0x5b, + 0x6d, 0xef, 0x20, 0x96, 0x19, 0x29, 0x8c, 0xf6, 0xe4, 0x53, 0x17, 0x5c, 0x8c, 0xd4, 0x8e, 0x7e, + 0x1a, 0x26, 0xd4, 0xcf, 0x49, 0x28, 0xc8, 0xd4, 0x1e, 0x82, 0x5e, 0xac, 0xe6, 0x8e, 0x75, 0x65, + 0x5d, 0xdf, 0x7e, 0xfa, 0x00, 0xed, 0x9f, 0x03, 0x69, 0xb3, 0x77, 0x56, 0x97, 0xae, 0xf1, 0x05, + 0xe6, 0x63, 0xdf, 0x00, 0xc0, 0x24, 0x9d, 0xe4, 0x24, 0x0d, 0x97, 0x85, 0x73, 0xeb, 0xca, 0xba, + 0x3e, 0xf1, 0xce, 0xeb, 0xd2, 0xdd, 0xa9, 0x06, 0x67, 0x4c, 0xd2, 0x40, 0x0f, 0xed, 0xd7, 0xe0, + 0x52, 0x09, 0x3a, 0x4b, 0xa6, 0x93, 0x98, 0xd3, 0x4c, 0x0a, 0x32, 0x91, 0x2c, 0x11, 0x85, 0x73, + 0xa2, 0xd3, 0x8f, 0xeb, 0xd2, 0xfd, 0xbd, 0x29, 0x78, 0xc8, 0x24, 0xf5, 0x8d, 0xe2, 0x1b, 0x61, + 0xac, 0xea, 0xf6, 0x5b, 0xf0, 0x48, 0x85, 0x48, 0x21, 0x12, 0xaa, 0xfe, 0xa8, 0xb5, 0x76, 0x4f, + 0xaf, 0xed, 0xd6, 0xa5, 0xfb, 0x27, 0x5b, 0xe0, 0x30, 0x49, 0x47, 0x8d, 0xb6, 0xb7, 0xfe, 0x4b, + 0x70, 0xb7, 0x39, 0x90, 0x54, 0xbd, 0x71, 0x4e, 0x75, 0xa3, 0x2e, 0x91, 0x01, 0x84, 0x14, 0x20, + 0xb4, 0x05, 0x84, 0x7c, 0x9e, 0x30, 0xef, 0xa2, 0x2e, 0xdd, 0xfd, 0x4c, 0x70, 0x67, 0x3b, 0x1d, + 0xab, 0x59, 0x8b, 0xc4, 0x38, 0x9b, 0x1e, 0x49, 0xfc, 0x27, 0x12, 0x5f, 0xbb, 0xe0, 0x9e, 0x26, + 0xf1, 0x42, 0xb5, 0xf8, 0x95, 0x8c, 0x68, 0x22, 0x0e, 0x61, 0x31, 0x04, 0x3d, 0x6d, 0xd0, 0x18, + 0x7e, 0x91, 0xd3, 0xdb, 0x98, 0x9c, 0x2e, 0x04, 0xe6, 0xd3, 0x62, 0xd8, 0x3d, 0x32, 0xfc, 0x0b, + 0x86, 0x5f, 0x9a, 0xdb, 0xa4, 0x9b, 0x7b, 0xe8, 0x6d, 0x3a, 0x12, 0xfc, 0xe7, 0x04, 0xbd, 0xe7, + 0xdf, 0x2a, 0x68, 0xad, 0x2a, 0x68, 0xad, 0x2b, 0x68, 0x7d, 0xaf, 0xa0, 0xf5, 0x79, 0x03, 0x3b, + 0xab, 0x0d, 0xec, 0xac, 0x37, 0xb0, 0xf3, 0x06, 0xcd, 0x12, 0xf1, 0x5e, 0x46, 0x28, 0xe6, 0x14, + 0x2b, 0xfb, 0x0d, 0x23, 0xe2, 0x03, 0xcf, 0xe7, 0xf8, 0xe7, 0x5b, 0xf7, 0x71, 0xf7, 0xb5, 0x8b, + 0x4e, 0xf5, 0x73, 0xf7, 0xec, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x12, 0xa3, 0x30, 0x6e, + 0x07, 0x00, 0x00, +} + +func (m *EventClaimCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventClaimCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClaimCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x10 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventClaimUpdated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventClaimUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClaimUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x10 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventProofSubmitted) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventProofSubmitted) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventProofSubmitted) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x18 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventProofUpdated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventProofUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventProofUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x18 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventClaimCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventClaimUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventProofSubmitted) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventProofUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventClaimCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventClaimCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClaimCreated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventClaimUpdated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventClaimUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClaimUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventProofSubmitted) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventProofSubmitted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventProofSubmitted: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventProofUpdated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventProofUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventProofUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/genesis.pb.go b/x/proof/types/genesis.pb.go new file mode 100644 index 000000000..0b7160a14 --- /dev/null +++ b/x/proof/types/genesis.pb.go @@ -0,0 +1,448 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the proof module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + ClaimList []Claim `protobuf:"bytes,2,rep,name=claim_list,json=claimList,proto3" json:"claim_list"` + ProofList []Proof `protobuf:"bytes,3,rep,name=proof_list,json=proofList,proto3" json:"proof_list"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_2da3e253d01f195c, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetClaimList() []Claim { + if m != nil { + return m.ClaimList + } + return nil +} + +func (m *GenesisState) GetProofList() []Proof { + if m != nil { + return m.ProofList + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.proof.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/proof/genesis.proto", fileDescriptor_2da3e253d01f195c) } + +var fileDescriptor_2da3e253d01f195c = []byte{ + // 278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x28, 0xca, 0xcf, 0x4f, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc9, 0xea, 0x81, 0x65, 0xa5, + 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x89, 0x94, 0x48, 0x7a, 0x7e, 0x7a, + 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xa5, 0xd1, 0x8c, 0x2d, 0x48, 0x2c, 0x4a, 0xcc, 0x85, + 0x9a, 0x2a, 0x25, 0x85, 0x26, 0x59, 0x52, 0x59, 0x90, 0x0a, 0x95, 0x53, 0x3a, 0xc8, 0xc8, 0xc5, + 0xe3, 0x0e, 0x71, 0x43, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x25, 0x17, 0x1b, 0x44, 0xb3, 0x04, + 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x98, 0x1e, 0xaa, 0x9b, 0xf4, 0x02, 0xc0, 0xb2, 0x4e, 0x9c, + 0x27, 0xee, 0xc9, 0x33, 0xac, 0x78, 0xbe, 0x41, 0x8b, 0x31, 0x08, 0xaa, 0x41, 0xc8, 0x8a, 0x8b, + 0x2b, 0x39, 0x27, 0x31, 0x33, 0x37, 0x3e, 0x27, 0xb3, 0xb8, 0x44, 0x82, 0x49, 0x81, 0x59, 0x83, + 0xdb, 0x48, 0x14, 0x5d, 0xbb, 0x33, 0x48, 0x85, 0x13, 0x0b, 0x48, 0x77, 0x10, 0x27, 0x58, 0xb9, + 0x4f, 0x66, 0x71, 0x09, 0x48, 0x2f, 0x58, 0x1e, 0xa2, 0x97, 0x19, 0xbb, 0xde, 0x00, 0x10, 0x09, + 0xd3, 0x0b, 0x16, 0x02, 0xe9, 0x75, 0xf2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, + 0x1b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, + 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, + 0x73, 0xf5, 0x41, 0xe6, 0xe9, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0xc3, 0x43, 0xa5, + 0x02, 0x39, 0x5c, 0x92, 0xd8, 0xc0, 0x01, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x99, + 0x4c, 0x7b, 0xaa, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProofList) > 0 { + for iNdEx := len(m.ProofList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ProofList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ClaimList) > 0 { + for iNdEx := len(m.ClaimList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ClaimList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.ClaimList) > 0 { + for _, e := range m.ClaimList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ProofList) > 0 { + for _, e := range m.ProofList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimList = append(m.ClaimList, Claim{}) + if err := m.ClaimList[len(m.ClaimList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProofList = append(m.ProofList, Proof{}) + if err := m.ProofList[len(m.ProofList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/params.pb.go b/x/proof/types/params.pb.go new file mode 100644 index 000000000..9fb07ce08 --- /dev/null +++ b/x/proof/types/params.pb.go @@ -0,0 +1,537 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/params.proto + +package types + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // proof_request_probability is the probability of a session requiring a proof + // if it's cost (i.e. compute unit consumption) is below the ProofRequirementThreshold. + ProofRequestProbability float64 `protobuf:"fixed64,2,opt,name=proof_request_probability,json=proofRequestProbability,proto3" json:"proof_request_probability"` + // proof_requirement_threshold is the session cost (i.e. compute unit consumption) + // threshold which asserts that a session MUST have a corresponding proof when its cost + // is equal to or above the threshold. This is in contrast to the this requirement + // being determined probabilistically via ProofRequestProbability. + // + // TODO_MAINNET: Consider renaming this to `proof_requirement_threshold_upokt`. + ProofRequirementThreshold *types.Coin `protobuf:"bytes,3,opt,name=proof_requirement_threshold,json=proofRequirementThreshold,proto3" json:"proof_requirement_threshold"` + // proof_missing_penalty is the number of tokens (uPOKT) which should be slashed from a supplier + // when a proof is required (either via proof_requirement_threshold or proof_missing_penalty) + // but is not provided. + // TODO_MAINNET: Consider renaming this to `proof_missing_penalty_upokt`. + ProofMissingPenalty *types.Coin `protobuf:"bytes,4,opt,name=proof_missing_penalty,json=proofMissingPenalty,proto3" json:"proof_missing_penalty"` + // proof_submission_fee is the number of tokens (uPOKT) which should be paid by + // the supplier operator when submitting a proof. + // This is needed to account for the cost of storing proofs onchain and prevent + // spamming (i.e. sybil bloat attacks) the network with non-required proofs. + // TODO_MAINNET: Consider renaming this to `proof_submission_fee_upokt`. + ProofSubmissionFee *types.Coin `protobuf:"bytes,5,opt,name=proof_submission_fee,json=proofSubmissionFee,proto3" json:"proof_submission_fee"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_2ad689ad5bf3a2d7, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetProofRequestProbability() float64 { + if m != nil { + return m.ProofRequestProbability + } + return 0 +} + +func (m *Params) GetProofRequirementThreshold() *types.Coin { + if m != nil { + return m.ProofRequirementThreshold + } + return nil +} + +func (m *Params) GetProofMissingPenalty() *types.Coin { + if m != nil { + return m.ProofMissingPenalty + } + return nil +} + +func (m *Params) GetProofSubmissionFee() *types.Coin { + if m != nil { + return m.ProofSubmissionFee + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.proof.Params") +} + +func init() { proto.RegisterFile("poktroll/proof/params.proto", fileDescriptor_2ad689ad5bf3a2d7) } + +var fileDescriptor_2ad689ad5bf3a2d7 = []byte{ + // 389 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0xca, 0xd3, 0x40, + 0x14, 0x85, 0x3b, 0xfe, 0xda, 0x45, 0x04, 0xc1, 0x58, 0x69, 0xd2, 0xe2, 0xa4, 0xb8, 0x2a, 0x82, + 0x33, 0x54, 0x77, 0x2e, 0x2b, 0xb8, 0x52, 0x28, 0xd1, 0x8d, 0x6e, 0x42, 0x52, 0xa7, 0xc9, 0xd0, + 0x64, 0x6e, 0x9c, 0x99, 0xaa, 0xf5, 0x11, 0x5c, 0xf9, 0x08, 0x3e, 0x82, 0x8f, 0xe1, 0xb2, 0xb8, + 0xea, 0x2a, 0x48, 0xba, 0x50, 0xf2, 0x14, 0xd2, 0x99, 0xb4, 0x5d, 0x58, 0xed, 0x26, 0x0c, 0xe7, + 0xbb, 0xe7, 0x9c, 0x0b, 0xb9, 0xce, 0xb0, 0x84, 0xa5, 0x96, 0x90, 0xe7, 0xb4, 0x94, 0x00, 0x0b, + 0x5a, 0xc6, 0x32, 0x2e, 0x14, 0x29, 0x25, 0x68, 0x70, 0x6f, 0x1d, 0x20, 0x31, 0x70, 0x70, 0x3b, + 0x2e, 0xb8, 0x00, 0x6a, 0xbe, 0x76, 0x64, 0xd0, 0x4b, 0x21, 0x05, 0xf3, 0xa4, 0xfb, 0x57, 0xab, + 0xe2, 0x39, 0xa8, 0x02, 0x14, 0x4d, 0x62, 0xc5, 0xe8, 0xfb, 0x49, 0xc2, 0x74, 0x3c, 0xa1, 0x73, + 0xe0, 0xc2, 0xf2, 0xfb, 0x3f, 0xae, 0x9c, 0xee, 0xcc, 0x34, 0xb9, 0xaf, 0x1d, 0xdf, 0x84, 0x47, + 0x92, 0xbd, 0x5b, 0x31, 0xa5, 0xa3, 0x52, 0x42, 0x12, 0x27, 0x3c, 0xe7, 0x7a, 0xed, 0x5d, 0x1b, + 0xa1, 0x31, 0x9a, 0xde, 0x6b, 0xaa, 0xe0, 0xdf, 0x43, 0x61, 0xdf, 0xa0, 0xd0, 0x92, 0xd9, 0x09, + 0xb8, 0x9f, 0x9c, 0xe1, 0xc9, 0xc5, 0x25, 0x2b, 0x98, 0xd0, 0x91, 0xce, 0x24, 0x53, 0x19, 0xe4, + 0x6f, 0xbd, 0xab, 0x11, 0x1a, 0xdf, 0x7c, 0xe4, 0x13, 0xbb, 0x2b, 0xd9, 0xef, 0x4a, 0xda, 0x5d, + 0xc9, 0x53, 0xe0, 0x62, 0x1a, 0x34, 0x55, 0xf0, 0xbf, 0x84, 0xd0, 0x3f, 0x36, 0xb7, 0xec, 0xd5, + 0x01, 0xb9, 0x99, 0x73, 0xd7, 0x3a, 0x0b, 0xae, 0x14, 0x17, 0x69, 0x54, 0x32, 0x11, 0xe7, 0x7a, + 0xed, 0x5d, 0xbf, 0xd4, 0xea, 0x37, 0x55, 0x70, 0xde, 0x1b, 0xde, 0x31, 0xf2, 0x0b, 0xab, 0xce, + 0xac, 0xe8, 0x32, 0xa7, 0x67, 0xa7, 0xd5, 0x2a, 0x31, 0x06, 0x10, 0xd1, 0x82, 0x31, 0xef, 0xc6, + 0xa5, 0x22, 0xaf, 0xa9, 0x82, 0xb3, 0xd6, 0xd0, 0x35, 0xea, 0xcb, 0xa3, 0xf8, 0x8c, 0xb1, 0x27, + 0xa3, 0xdf, 0x5f, 0x03, 0xf4, 0xf9, 0xd7, 0xb7, 0x07, 0xfd, 0xe3, 0xc5, 0x7c, 0x6c, 0x6f, 0xc6, + 0xfe, 0xc9, 0xe9, 0xf3, 0xef, 0x35, 0x46, 0x9b, 0x1a, 0xa3, 0x6d, 0x8d, 0xd1, 0xcf, 0x1a, 0xa3, + 0x2f, 0x3b, 0xdc, 0xd9, 0xec, 0x70, 0x67, 0xbb, 0xc3, 0x9d, 0x37, 0x24, 0xe5, 0x3a, 0x5b, 0x25, + 0x64, 0x0e, 0x05, 0xdd, 0x27, 0x3c, 0x14, 0x4c, 0x7f, 0x00, 0xb9, 0xa4, 0x7f, 0xc5, 0xe9, 0x75, + 0xc9, 0x54, 0xd2, 0x35, 0x97, 0xf2, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0xa6, 0xe4, + 0x39, 0xa1, 0x02, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ProofRequestProbability != that1.ProofRequestProbability { + return false + } + if !this.ProofRequirementThreshold.Equal(that1.ProofRequirementThreshold) { + return false + } + if !this.ProofMissingPenalty.Equal(that1.ProofMissingPenalty) { + return false + } + if !this.ProofSubmissionFee.Equal(that1.ProofSubmissionFee) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProofSubmissionFee != nil { + { + size, err := m.ProofSubmissionFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.ProofMissingPenalty != nil { + { + size, err := m.ProofMissingPenalty.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.ProofRequirementThreshold != nil { + { + size, err := m.ProofRequirementThreshold.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ProofRequestProbability != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ProofRequestProbability)))) + i-- + dAtA[i] = 0x11 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ProofRequestProbability != 0 { + n += 9 + } + if m.ProofRequirementThreshold != nil { + l = m.ProofRequirementThreshold.Size() + n += 1 + l + sovParams(uint64(l)) + } + if m.ProofMissingPenalty != nil { + l = m.ProofMissingPenalty.Size() + n += 1 + l + sovParams(uint64(l)) + } + if m.ProofSubmissionFee != nil { + l = m.ProofSubmissionFee.Size() + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofRequestProbability", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.ProofRequestProbability = float64(math.Float64frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofRequirementThreshold", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProofRequirementThreshold == nil { + m.ProofRequirementThreshold = &types.Coin{} + } + if err := m.ProofRequirementThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofMissingPenalty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProofMissingPenalty == nil { + m.ProofMissingPenalty = &types.Coin{} + } + if err := m.ProofMissingPenalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofSubmissionFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProofSubmissionFee == nil { + m.ProofSubmissionFee = &types.Coin{} + } + if err := m.ProofSubmissionFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/query.pb.go b/x/proof/types/query.pb.go new file mode 100644 index 000000000..ebe21a473 --- /dev/null +++ b/x/proof/types/query.pb.go @@ -0,0 +1,2756 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetClaimRequest struct { + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + SupplierOperatorAddress string `protobuf:"bytes,2,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` +} + +func (m *QueryGetClaimRequest) Reset() { *m = QueryGetClaimRequest{} } +func (m *QueryGetClaimRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetClaimRequest) ProtoMessage() {} +func (*QueryGetClaimRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{2} +} +func (m *QueryGetClaimRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetClaimRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetClaimRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetClaimRequest.Merge(m, src) +} +func (m *QueryGetClaimRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetClaimRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetClaimRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetClaimRequest proto.InternalMessageInfo + +func (m *QueryGetClaimRequest) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *QueryGetClaimRequest) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +type QueryGetClaimResponse struct { + Claim Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` +} + +func (m *QueryGetClaimResponse) Reset() { *m = QueryGetClaimResponse{} } +func (m *QueryGetClaimResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetClaimResponse) ProtoMessage() {} +func (*QueryGetClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{3} +} +func (m *QueryGetClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetClaimResponse.Merge(m, src) +} +func (m *QueryGetClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetClaimResponse proto.InternalMessageInfo + +func (m *QueryGetClaimResponse) GetClaim() Claim { + if m != nil { + return m.Claim + } + return Claim{} +} + +type QueryAllClaimsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Types that are valid to be assigned to Filter: + // *QueryAllClaimsRequest_SupplierOperatorAddress + // *QueryAllClaimsRequest_SessionId + // *QueryAllClaimsRequest_SessionEndHeight + Filter isQueryAllClaimsRequest_Filter `protobuf_oneof:"filter"` +} + +func (m *QueryAllClaimsRequest) Reset() { *m = QueryAllClaimsRequest{} } +func (m *QueryAllClaimsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllClaimsRequest) ProtoMessage() {} +func (*QueryAllClaimsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{4} +} +func (m *QueryAllClaimsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllClaimsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllClaimsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllClaimsRequest.Merge(m, src) +} +func (m *QueryAllClaimsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllClaimsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllClaimsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllClaimsRequest proto.InternalMessageInfo + +type isQueryAllClaimsRequest_Filter interface { + isQueryAllClaimsRequest_Filter() + MarshalTo([]byte) (int, error) + Size() int +} + +type QueryAllClaimsRequest_SupplierOperatorAddress struct { + SupplierOperatorAddress string `protobuf:"bytes,2,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3,oneof" json:"supplier_operator_address,omitempty"` +} +type QueryAllClaimsRequest_SessionId struct { + SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` +} +type QueryAllClaimsRequest_SessionEndHeight struct { + SessionEndHeight uint64 `protobuf:"varint,4,opt,name=session_end_height,json=sessionEndHeight,proto3,oneof" json:"session_end_height,omitempty"` +} + +func (*QueryAllClaimsRequest_SupplierOperatorAddress) isQueryAllClaimsRequest_Filter() {} +func (*QueryAllClaimsRequest_SessionId) isQueryAllClaimsRequest_Filter() {} +func (*QueryAllClaimsRequest_SessionEndHeight) isQueryAllClaimsRequest_Filter() {} + +func (m *QueryAllClaimsRequest) GetFilter() isQueryAllClaimsRequest_Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (m *QueryAllClaimsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QueryAllClaimsRequest) GetSupplierOperatorAddress() string { + if x, ok := m.GetFilter().(*QueryAllClaimsRequest_SupplierOperatorAddress); ok { + return x.SupplierOperatorAddress + } + return "" +} + +func (m *QueryAllClaimsRequest) GetSessionId() string { + if x, ok := m.GetFilter().(*QueryAllClaimsRequest_SessionId); ok { + return x.SessionId + } + return "" +} + +func (m *QueryAllClaimsRequest) GetSessionEndHeight() uint64 { + if x, ok := m.GetFilter().(*QueryAllClaimsRequest_SessionEndHeight); ok { + return x.SessionEndHeight + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*QueryAllClaimsRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*QueryAllClaimsRequest_SupplierOperatorAddress)(nil), + (*QueryAllClaimsRequest_SessionId)(nil), + (*QueryAllClaimsRequest_SessionEndHeight)(nil), + } +} + +type QueryAllClaimsResponse struct { + Claims []Claim `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllClaimsResponse) Reset() { *m = QueryAllClaimsResponse{} } +func (m *QueryAllClaimsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllClaimsResponse) ProtoMessage() {} +func (*QueryAllClaimsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{5} +} +func (m *QueryAllClaimsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllClaimsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllClaimsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllClaimsResponse.Merge(m, src) +} +func (m *QueryAllClaimsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllClaimsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllClaimsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllClaimsResponse proto.InternalMessageInfo + +func (m *QueryAllClaimsResponse) GetClaims() []Claim { + if m != nil { + return m.Claims + } + return nil +} + +func (m *QueryAllClaimsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryGetProofRequest struct { + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + SupplierOperatorAddress string `protobuf:"bytes,2,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` +} + +func (m *QueryGetProofRequest) Reset() { *m = QueryGetProofRequest{} } +func (m *QueryGetProofRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetProofRequest) ProtoMessage() {} +func (*QueryGetProofRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{6} +} +func (m *QueryGetProofRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetProofRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetProofRequest.Merge(m, src) +} +func (m *QueryGetProofRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetProofRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetProofRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetProofRequest proto.InternalMessageInfo + +func (m *QueryGetProofRequest) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *QueryGetProofRequest) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +type QueryGetProofResponse struct { + Proof Proof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` +} + +func (m *QueryGetProofResponse) Reset() { *m = QueryGetProofResponse{} } +func (m *QueryGetProofResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetProofResponse) ProtoMessage() {} +func (*QueryGetProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{7} +} +func (m *QueryGetProofResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetProofResponse.Merge(m, src) +} +func (m *QueryGetProofResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetProofResponse proto.InternalMessageInfo + +func (m *QueryGetProofResponse) GetProof() Proof { + if m != nil { + return m.Proof + } + return Proof{} +} + +type QueryAllProofsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Types that are valid to be assigned to Filter: + // + // *QueryAllProofsRequest_SupplierOperatorAddress + // *QueryAllProofsRequest_SessionId + // *QueryAllProofsRequest_SessionEndHeight + Filter isQueryAllProofsRequest_Filter `protobuf_oneof:"filter"` +} + +func (m *QueryAllProofsRequest) Reset() { *m = QueryAllProofsRequest{} } +func (m *QueryAllProofsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllProofsRequest) ProtoMessage() {} +func (*QueryAllProofsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{8} +} +func (m *QueryAllProofsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProofsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllProofsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProofsRequest.Merge(m, src) +} +func (m *QueryAllProofsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProofsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProofsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProofsRequest proto.InternalMessageInfo + +type isQueryAllProofsRequest_Filter interface { + isQueryAllProofsRequest_Filter() + MarshalTo([]byte) (int, error) + Size() int +} + +type QueryAllProofsRequest_SupplierOperatorAddress struct { + SupplierOperatorAddress string `protobuf:"bytes,2,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3,oneof" json:"supplier_operator_address,omitempty"` +} +type QueryAllProofsRequest_SessionId struct { + SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` +} +type QueryAllProofsRequest_SessionEndHeight struct { + SessionEndHeight uint64 `protobuf:"varint,4,opt,name=session_end_height,json=sessionEndHeight,proto3,oneof" json:"session_end_height,omitempty"` +} + +func (*QueryAllProofsRequest_SupplierOperatorAddress) isQueryAllProofsRequest_Filter() {} +func (*QueryAllProofsRequest_SessionId) isQueryAllProofsRequest_Filter() {} +func (*QueryAllProofsRequest_SessionEndHeight) isQueryAllProofsRequest_Filter() {} + +func (m *QueryAllProofsRequest) GetFilter() isQueryAllProofsRequest_Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (m *QueryAllProofsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QueryAllProofsRequest) GetSupplierOperatorAddress() string { + if x, ok := m.GetFilter().(*QueryAllProofsRequest_SupplierOperatorAddress); ok { + return x.SupplierOperatorAddress + } + return "" +} + +func (m *QueryAllProofsRequest) GetSessionId() string { + if x, ok := m.GetFilter().(*QueryAllProofsRequest_SessionId); ok { + return x.SessionId + } + return "" +} + +func (m *QueryAllProofsRequest) GetSessionEndHeight() uint64 { + if x, ok := m.GetFilter().(*QueryAllProofsRequest_SessionEndHeight); ok { + return x.SessionEndHeight + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*QueryAllProofsRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*QueryAllProofsRequest_SupplierOperatorAddress)(nil), + (*QueryAllProofsRequest_SessionId)(nil), + (*QueryAllProofsRequest_SessionEndHeight)(nil), + } +} + +type QueryAllProofsResponse struct { + Proofs []Proof `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProofsResponse) Reset() { *m = QueryAllProofsResponse{} } +func (m *QueryAllProofsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllProofsResponse) ProtoMessage() {} +func (*QueryAllProofsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_452adc3cc4abc239, []int{9} +} +func (m *QueryAllProofsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProofsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllProofsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProofsResponse.Merge(m, src) +} +func (m *QueryAllProofsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProofsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProofsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProofsResponse proto.InternalMessageInfo + +func (m *QueryAllProofsResponse) GetProofs() []Proof { + if m != nil { + return m.Proofs + } + return nil +} + +func (m *QueryAllProofsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.proof.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.proof.QueryParamsResponse") + proto.RegisterType((*QueryGetClaimRequest)(nil), "poktroll.proof.QueryGetClaimRequest") + proto.RegisterType((*QueryGetClaimResponse)(nil), "poktroll.proof.QueryGetClaimResponse") + proto.RegisterType((*QueryAllClaimsRequest)(nil), "poktroll.proof.QueryAllClaimsRequest") + proto.RegisterType((*QueryAllClaimsResponse)(nil), "poktroll.proof.QueryAllClaimsResponse") + proto.RegisterType((*QueryGetProofRequest)(nil), "poktroll.proof.QueryGetProofRequest") + proto.RegisterType((*QueryGetProofResponse)(nil), "poktroll.proof.QueryGetProofResponse") + proto.RegisterType((*QueryAllProofsRequest)(nil), "poktroll.proof.QueryAllProofsRequest") + proto.RegisterType((*QueryAllProofsResponse)(nil), "poktroll.proof.QueryAllProofsResponse") +} + +func init() { proto.RegisterFile("poktroll/proof/query.proto", fileDescriptor_452adc3cc4abc239) } + +var fileDescriptor_452adc3cc4abc239 = []byte{ + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0x8f, 0xdb, 0x26, 0xfa, 0xe6, 0xbe, 0x12, 0x82, 0x23, 0x2d, 0x69, 0x00, 0xb7, 0x72, 0x7f, + 0x50, 0x15, 0xd5, 0x56, 0xdb, 0x09, 0x89, 0xa5, 0x41, 0xd0, 0xf2, 0x4b, 0x04, 0x97, 0x89, 0x25, + 0x72, 0x9a, 0xab, 0x6b, 0xd5, 0xf1, 0xb9, 0xf6, 0x05, 0xa8, 0xaa, 0x32, 0x30, 0xb0, 0xb0, 0x20, + 0x21, 0xf1, 0x37, 0xc0, 0xc6, 0xc0, 0x1f, 0xd1, 0xb1, 0x82, 0xa5, 0x13, 0x42, 0x29, 0x12, 0x33, + 0x1b, 0x23, 0xf2, 0xbb, 0x67, 0x12, 0x9b, 0xba, 0x29, 0x12, 0x03, 0x12, 0x8b, 0x65, 0xdf, 0xfb, + 0xbc, 0x77, 0x9f, 0xf7, 0xb9, 0xcf, 0x3d, 0x99, 0x54, 0x7c, 0xbe, 0x29, 0x02, 0xee, 0xba, 0x86, + 0x1f, 0x70, 0xbe, 0x6e, 0x6c, 0xb5, 0x59, 0xb0, 0xad, 0xfb, 0x01, 0x17, 0x9c, 0x9e, 0x8a, 0x63, + 0x3a, 0xc4, 0x2a, 0x67, 0xac, 0x96, 0xe3, 0x71, 0x03, 0x9e, 0x12, 0x52, 0x29, 0xd9, 0xdc, 0xe6, + 0xf0, 0x6a, 0x44, 0x6f, 0xb8, 0x7a, 0xc1, 0xe6, 0xdc, 0x76, 0x99, 0x61, 0xf9, 0x8e, 0x61, 0x79, + 0x1e, 0x17, 0x96, 0x70, 0xb8, 0x17, 0x62, 0x74, 0x74, 0x8d, 0x87, 0x2d, 0x1e, 0xd6, 0x65, 0x9a, + 0xfc, 0xc0, 0xd0, 0xac, 0xfc, 0x32, 0x1a, 0x56, 0xc8, 0x24, 0x15, 0xe3, 0xd1, 0x7c, 0x83, 0x09, + 0x6b, 0xde, 0xf0, 0x2d, 0xdb, 0xf1, 0xa0, 0x0e, 0x62, 0xcf, 0xa7, 0x98, 0xfb, 0x56, 0x60, 0xb5, + 0xe2, 0x42, 0xe9, 0xb6, 0xc4, 0xb6, 0xcf, 0x30, 0xa6, 0x95, 0x08, 0xbd, 0x1f, 0x95, 0xae, 0x41, + 0x82, 0xc9, 0xb6, 0xda, 0x2c, 0x14, 0x5a, 0x8d, 0x9c, 0x4d, 0xac, 0x86, 0x3e, 0xf7, 0x42, 0x46, + 0xaf, 0x90, 0x82, 0x2c, 0x5c, 0x56, 0xc6, 0x95, 0x99, 0xff, 0x17, 0x46, 0xf4, 0xa4, 0x28, 0xba, + 0xc4, 0x57, 0x8b, 0x7b, 0x9f, 0xc6, 0x72, 0x6f, 0xbe, 0xbe, 0x9b, 0x55, 0x4c, 0x4c, 0xd0, 0x5e, + 0x28, 0xa4, 0x04, 0x25, 0x97, 0x99, 0xb8, 0xe6, 0x5a, 0x4e, 0x0b, 0xb7, 0xa2, 0x17, 0x09, 0x09, + 0x59, 0x18, 0x3a, 0xdc, 0xab, 0x3b, 0x4d, 0xa8, 0x5b, 0x34, 0x8b, 0xb8, 0x72, 0xb3, 0x49, 0x1f, + 0x90, 0xd1, 0xb0, 0xed, 0xfb, 0xae, 0xc3, 0x82, 0x3a, 0xf7, 0x59, 0x60, 0x09, 0x1e, 0xd4, 0xad, + 0x66, 0x33, 0x60, 0x61, 0x58, 0x1e, 0x88, 0xd0, 0xd5, 0xf2, 0x87, 0xf7, 0x73, 0x25, 0x54, 0x6e, + 0x49, 0x46, 0x56, 0x45, 0xe0, 0x78, 0xb6, 0x79, 0x2e, 0x4e, 0xbd, 0x87, 0x99, 0x18, 0xd6, 0x6e, + 0x91, 0xe1, 0x14, 0x19, 0xec, 0x70, 0x9e, 0xe4, 0xd7, 0xa2, 0x05, 0x6c, 0x70, 0x38, 0xdd, 0x20, + 0xa0, 0xab, 0x43, 0x51, 0x7f, 0xa6, 0x44, 0x6a, 0xdf, 0x15, 0x2c, 0xb6, 0xe4, 0xba, 0x10, 0x8e, + 0x55, 0xa4, 0x37, 0x08, 0xe9, 0x1e, 0x14, 0x56, 0x9c, 0xd6, 0x91, 0x69, 0x74, 0xaa, 0xba, 0x34, + 0x18, 0x9e, 0xaa, 0x5e, 0xb3, 0x6c, 0x86, 0xb9, 0x66, 0x4f, 0x26, 0xbd, 0xda, 0x57, 0x83, 0x95, + 0x5c, 0x66, 0xaf, 0x74, 0x2c, 0x21, 0xf0, 0x20, 0xc2, 0x7b, 0x24, 0xd6, 0x09, 0x8d, 0x01, 0xcc, + 0x6b, 0xd6, 0x37, 0x98, 0x63, 0x6f, 0x88, 0xf2, 0xd0, 0xb8, 0x32, 0x33, 0xb4, 0x92, 0x33, 0x4f, + 0x63, 0xec, 0xba, 0xd7, 0x5c, 0x81, 0x48, 0xf5, 0x3f, 0x52, 0x58, 0x77, 0x5c, 0xc1, 0x02, 0xed, + 0xb5, 0x42, 0x46, 0xd2, 0xad, 0xa3, 0x90, 0x8b, 0xa4, 0x00, 0xf2, 0x44, 0x56, 0x19, 0xec, 0xa7, + 0x24, 0x42, 0xe9, 0x72, 0x42, 0xb0, 0x01, 0x10, 0xec, 0x52, 0x5f, 0xc1, 0xe4, 0x8e, 0xbd, 0x8a, + 0x25, 0xdc, 0x56, 0x8b, 0xb6, 0xfb, 0x5b, 0xdc, 0x86, 0x64, 0xba, 0x6e, 0x03, 0x31, 0xb2, 0xdc, + 0x06, 0xe8, 0xd8, 0x6d, 0xb0, 0x94, 0x70, 0x1b, 0x84, 0xff, 0x4d, 0xb7, 0xc5, 0xad, 0x77, 0xdd, + 0x06, 0xf2, 0x64, 0xba, 0xad, 0x57, 0x49, 0x84, 0xfe, 0x31, 0xb7, 0x2d, 0x7c, 0xcb, 0x93, 0x3c, + 0x10, 0xa3, 0x4f, 0x49, 0x41, 0x8e, 0x40, 0xaa, 0xa5, 0x19, 0xfc, 0x3a, 0x65, 0x2b, 0x13, 0xc7, + 0x62, 0xe4, 0x46, 0xda, 0xe5, 0x67, 0x1f, 0xbf, 0xbc, 0x1a, 0x98, 0xa2, 0x13, 0x46, 0x04, 0x9e, + 0xf3, 0x98, 0x78, 0xcc, 0x83, 0x4d, 0xe3, 0xc8, 0x79, 0x4f, 0xdf, 0x2a, 0x24, 0x0f, 0x17, 0x8b, + 0x4e, 0x1e, 0x59, 0x3b, 0x35, 0x7c, 0x2b, 0x53, 0x7d, 0x50, 0xc8, 0x61, 0x15, 0x38, 0xdc, 0xa5, + 0xb7, 0x8f, 0xe5, 0x00, 0x97, 0xd8, 0xd8, 0xe9, 0x1e, 0xff, 0xae, 0xb1, 0x93, 0xe9, 0xa4, 0x5d, + 0xfa, 0x5c, 0x21, 0xc5, 0x9f, 0x73, 0x83, 0x1e, 0xcd, 0x24, 0x3d, 0x52, 0x2b, 0xd3, 0xfd, 0x60, + 0xc8, 0x78, 0x16, 0x18, 0x4f, 0x52, 0xad, 0x3f, 0x63, 0x10, 0x0d, 0xfc, 0x91, 0x2d, 0x5a, 0xef, + 0x0c, 0xc9, 0x16, 0x2d, 0x71, 0xb9, 0x4f, 0x28, 0x9a, 0x7c, 0xfe, 0xae, 0x68, 0xd2, 0xfe, 0xd9, + 0xa2, 0x25, 0x26, 0x43, 0xb6, 0x68, 0xc9, 0x5b, 0x74, 0x42, 0xd1, 0xe0, 0x59, 0xbd, 0xb3, 0xd7, + 0x51, 0x95, 0xfd, 0x8e, 0xaa, 0x1c, 0x74, 0x54, 0xe5, 0x73, 0x47, 0x55, 0x5e, 0x1e, 0xaa, 0xb9, + 0xfd, 0x43, 0x35, 0x77, 0x70, 0xa8, 0xe6, 0x1e, 0xea, 0xb6, 0x23, 0x36, 0xda, 0x0d, 0x7d, 0x8d, + 0xb7, 0x32, 0x6a, 0x3d, 0xe9, 0xfd, 0x17, 0x69, 0x14, 0xe0, 0x67, 0x64, 0xf1, 0x47, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xd9, 0x4d, 0xb5, 0x56, 0x81, 0x09, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Claim items. + Claim(ctx context.Context, in *QueryGetClaimRequest, opts ...grpc.CallOption) (*QueryGetClaimResponse, error) + AllClaims(ctx context.Context, in *QueryAllClaimsRequest, opts ...grpc.CallOption) (*QueryAllClaimsResponse, error) + // Queries a list of Proof items. + Proof(ctx context.Context, in *QueryGetProofRequest, opts ...grpc.CallOption) (*QueryGetProofResponse, error) + AllProofs(ctx context.Context, in *QueryAllProofsRequest, opts ...grpc.CallOption) (*QueryAllProofsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Claim(ctx context.Context, in *QueryGetClaimRequest, opts ...grpc.CallOption) (*QueryGetClaimResponse, error) { + out := new(QueryGetClaimResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Query/Claim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllClaims(ctx context.Context, in *QueryAllClaimsRequest, opts ...grpc.CallOption) (*QueryAllClaimsResponse, error) { + out := new(QueryAllClaimsResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Query/AllClaims", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Proof(ctx context.Context, in *QueryGetProofRequest, opts ...grpc.CallOption) (*QueryGetProofResponse, error) { + out := new(QueryGetProofResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Query/Proof", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProofs(ctx context.Context, in *QueryAllProofsRequest, opts ...grpc.CallOption) (*QueryAllProofsResponse, error) { + out := new(QueryAllProofsResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Query/AllProofs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Claim items. + Claim(context.Context, *QueryGetClaimRequest) (*QueryGetClaimResponse, error) + AllClaims(context.Context, *QueryAllClaimsRequest) (*QueryAllClaimsResponse, error) + // Queries a list of Proof items. + Proof(context.Context, *QueryGetProofRequest) (*QueryGetProofResponse, error) + AllProofs(context.Context, *QueryAllProofsRequest) (*QueryAllProofsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Claim(ctx context.Context, req *QueryGetClaimRequest) (*QueryGetClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") +} +func (*UnimplementedQueryServer) AllClaims(ctx context.Context, req *QueryAllClaimsRequest) (*QueryAllClaimsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllClaims not implemented") +} +func (*UnimplementedQueryServer) Proof(ctx context.Context, req *QueryGetProofRequest) (*QueryGetProofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Proof not implemented") +} +func (*UnimplementedQueryServer) AllProofs(ctx context.Context, req *QueryAllProofsRequest) (*QueryAllProofsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProofs not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetClaimRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Claim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Query/Claim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Claim(ctx, req.(*QueryGetClaimRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllClaims_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllClaimsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllClaims(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Query/AllClaims", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllClaims(ctx, req.(*QueryAllClaimsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Proof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetProofRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Proof(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Query/Proof", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Proof(ctx, req.(*QueryGetProofRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProofs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProofsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProofs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Query/AllProofs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProofs(ctx, req.(*QueryAllProofsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.proof.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Claim", + Handler: _Query_Claim_Handler, + }, + { + MethodName: "AllClaims", + Handler: _Query_AllClaims_Handler, + }, + { + MethodName: "Proof", + Handler: _Query_Proof_Handler, + }, + { + MethodName: "AllProofs", + Handler: _Query_AllProofs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/proof/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetClaimRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetClaimRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetClaimRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SessionId) > 0 { + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetClaimResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllClaimsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllClaimsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllClaimsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Filter != nil { + { + size := m.Filter.Size() + i -= size + if _, err := m.Filter.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllClaimsRequest_SupplierOperatorAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllClaimsRequest_SupplierOperatorAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} +func (m *QueryAllClaimsRequest_SessionId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllClaimsRequest_SessionId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *QueryAllClaimsRequest_SessionEndHeight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllClaimsRequest_SessionEndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintQuery(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *QueryAllClaimsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllClaimsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllClaimsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Claims) > 0 { + for iNdEx := len(m.Claims) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Claims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGetProofRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetProofRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetProofRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SessionId) > 0 { + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetProofResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetProofResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllProofsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllProofsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProofsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Filter != nil { + { + size := m.Filter.Size() + i -= size + if _, err := m.Filter.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProofsRequest_SupplierOperatorAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProofsRequest_SupplierOperatorAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} +func (m *QueryAllProofsRequest_SessionId) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProofsRequest_SessionId) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *QueryAllProofsRequest_SessionEndHeight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProofsRequest_SessionEndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintQuery(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *QueryAllProofsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllProofsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProofsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Proofs) > 0 { + for iNdEx := len(m.Proofs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Proofs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetClaimRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Claim.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllClaimsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.Filter != nil { + n += m.Filter.Size() + } + return n +} + +func (m *QueryAllClaimsRequest_SupplierOperatorAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryAllClaimsRequest_SessionId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SessionId) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryAllClaimsRequest_SessionEndHeight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovQuery(uint64(m.SessionEndHeight)) + return n +} +func (m *QueryAllClaimsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Claims) > 0 { + for _, e := range m.Claims { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetProofRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetProofResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Proof.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllProofsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.Filter != nil { + n += m.Filter.Size() + } + return n +} + +func (m *QueryAllProofsRequest_SupplierOperatorAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryAllProofsRequest_SessionId) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SessionId) + n += 1 + l + sovQuery(uint64(l)) + return n +} +func (m *QueryAllProofsRequest_SessionEndHeight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovQuery(uint64(m.SessionEndHeight)) + return n +} +func (m *QueryAllProofsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Proofs) > 0 { + for _, e := range m.Proofs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetClaimRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetClaimRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetClaimRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetClaimResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllClaimsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllClaimsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllClaimsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = &QueryAllClaimsRequest_SupplierOperatorAddress{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = &QueryAllClaimsRequest_SessionId{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Filter = &QueryAllClaimsRequest_SessionEndHeight{v} + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllClaimsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllClaimsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllClaimsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claims", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Claims = append(m.Claims, Claim{}) + if err := m.Claims[len(m.Claims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetProofRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetProofRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetProofRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetProofResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetProofResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetProofResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProofsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllProofsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProofsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = &QueryAllProofsRequest_SupplierOperatorAddress{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = &QueryAllProofsRequest_SessionId{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Filter = &QueryAllProofsRequest_SessionEndHeight{v} + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProofsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllProofsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProofsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proofs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proofs = append(m.Proofs, Proof{}) + if err := m.Proofs[len(m.Proofs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/query.pb.gw.go b/x/proof/types/query.pb.gw.go new file mode 100644 index 000000000..28b7efa33 --- /dev/null +++ b/x/proof/types/query.pb.gw.go @@ -0,0 +1,565 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/proof/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Claim_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetClaimRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["session_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "session_id") + } + + protoReq.SessionId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "session_id", err) + } + + val, ok = pathParams["supplier_operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supplier_operator_address") + } + + protoReq.SupplierOperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supplier_operator_address", err) + } + + msg, err := client.Claim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Claim_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetClaimRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["session_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "session_id") + } + + protoReq.SessionId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "session_id", err) + } + + val, ok = pathParams["supplier_operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supplier_operator_address") + } + + protoReq.SupplierOperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supplier_operator_address", err) + } + + msg, err := server.Claim(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllClaims_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllClaims_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllClaimsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllClaims_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllClaims(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllClaims_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllClaimsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllClaims_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllClaims(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Proof_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetProofRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["session_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "session_id") + } + + protoReq.SessionId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "session_id", err) + } + + val, ok = pathParams["supplier_operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supplier_operator_address") + } + + protoReq.SupplierOperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supplier_operator_address", err) + } + + msg, err := client.Proof(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Proof_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetProofRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["session_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "session_id") + } + + protoReq.SessionId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "session_id", err) + } + + val, ok = pathParams["supplier_operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supplier_operator_address") + } + + protoReq.SupplierOperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supplier_operator_address", err) + } + + msg, err := server.Proof(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllProofs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllProofs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProofsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProofs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllProofs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllProofs_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProofsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProofs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllProofs(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Claim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Claim_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Claim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllClaims_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllClaims_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllClaims_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Proof_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Proof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProofs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllProofs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Claim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Claim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Claim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllClaims_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllClaims_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllClaims_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Proof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Proof_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Proof_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProofs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllProofs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "proof", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Claim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"pokt-network", "poktroll", "proof", "claim", "session_id", "supplier_operator_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllClaims_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "proof", "claim"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Proof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"pokt-network", "poktroll", "proof", "session_id", "supplier_operator_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllProofs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"pokt-network", "poktroll", "proof"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Claim_0 = runtime.ForwardResponseMessage + + forward_Query_AllClaims_0 = runtime.ForwardResponseMessage + + forward_Query_Proof_0 = runtime.ForwardResponseMessage + + forward_Query_AllProofs_0 = runtime.ForwardResponseMessage +) diff --git a/x/proof/types/tx.pb.go b/x/proof/types/tx.pb.go new file mode 100644 index 000000000..c533c5dd9 --- /dev/null +++ b/x/proof/types/tx.pb.go @@ -0,0 +1,2270 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/tx.proto + +package types + +import ( + context "context" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/pokt-network/poktroll/x/session/types" + _ "github.com/pokt-network/poktroll/x/shared/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type to update all params at once. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/proof parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // The (name, as_type) tuple must match the corresponding name and type as + // specified in the `Params`` message in `proof/params.proto.` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // *MsgUpdateParam_AsBytes + // *MsgUpdateParam_AsFloat + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{2} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsBytes struct { + AsBytes []byte `protobuf:"bytes,7,opt,name=as_bytes,json=asBytes,proto3,oneof" json:"as_bytes"` +} +type MsgUpdateParam_AsFloat struct { + AsFloat float64 `protobuf:"fixed64,8,opt,name=as_float,json=asFloat,proto3,oneof" json:"as_float"` +} +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,9,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin"` +} + +func (*MsgUpdateParam_AsBytes) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsFloat) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsBytes() []byte { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsBytes); ok { + return x.AsBytes + } + return nil +} + +func (m *MsgUpdateParam) GetAsFloat() float64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsFloat); ok { + return x.AsFloat + } + return 0 +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsBytes)(nil), + (*MsgUpdateParam_AsFloat)(nil), + (*MsgUpdateParam_AsCoin)(nil), + } +} + +// MsgUpdateParamResponse defines the response structure for executing a +// MsgUpdateParam message after a single param update. +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{3} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +type MsgCreateClaim struct { + SupplierOperatorAddress string `protobuf:"bytes,1,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` + SessionHeader *types1.SessionHeader `protobuf:"bytes,2,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + // root returned from smt.SMST#Root() + RootHash []byte `protobuf:"bytes,3,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` +} + +func (m *MsgCreateClaim) Reset() { *m = MsgCreateClaim{} } +func (m *MsgCreateClaim) String() string { return proto.CompactTextString(m) } +func (*MsgCreateClaim) ProtoMessage() {} +func (*MsgCreateClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{4} +} +func (m *MsgCreateClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgCreateClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateClaim.Merge(m, src) +} +func (m *MsgCreateClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateClaim proto.InternalMessageInfo + +func (m *MsgCreateClaim) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +func (m *MsgCreateClaim) GetSessionHeader() *types1.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *MsgCreateClaim) GetRootHash() []byte { + if m != nil { + return m.RootHash + } + return nil +} + +type MsgCreateClaimResponse struct { + Claim *Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"` +} + +func (m *MsgCreateClaimResponse) Reset() { *m = MsgCreateClaimResponse{} } +func (m *MsgCreateClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateClaimResponse) ProtoMessage() {} +func (*MsgCreateClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{5} +} +func (m *MsgCreateClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgCreateClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateClaimResponse.Merge(m, src) +} +func (m *MsgCreateClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateClaimResponse proto.InternalMessageInfo + +func (m *MsgCreateClaimResponse) GetClaim() *Claim { + if m != nil { + return m.Claim + } + return nil +} + +type MsgSubmitProof struct { + SupplierOperatorAddress string `protobuf:"bytes,1,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` + SessionHeader *types1.SessionHeader `protobuf:"bytes,2,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + // serialized version of *smt.SparseCompactMerkleClosestProof + Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` +} + +func (m *MsgSubmitProof) Reset() { *m = MsgSubmitProof{} } +func (m *MsgSubmitProof) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitProof) ProtoMessage() {} +func (*MsgSubmitProof) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{6} +} +func (m *MsgSubmitProof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgSubmitProof) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitProof.Merge(m, src) +} +func (m *MsgSubmitProof) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitProof) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitProof.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitProof proto.InternalMessageInfo + +func (m *MsgSubmitProof) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +func (m *MsgSubmitProof) GetSessionHeader() *types1.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *MsgSubmitProof) GetProof() []byte { + if m != nil { + return m.Proof + } + return nil +} + +type MsgSubmitProofResponse struct { + Proof *Proof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` +} + +func (m *MsgSubmitProofResponse) Reset() { *m = MsgSubmitProofResponse{} } +func (m *MsgSubmitProofResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitProofResponse) ProtoMessage() {} +func (*MsgSubmitProofResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_345e95e87511f6a6, []int{7} +} +func (m *MsgSubmitProofResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitProofResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgSubmitProofResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitProofResponse.Merge(m, src) +} +func (m *MsgSubmitProofResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitProofResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitProofResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitProofResponse proto.InternalMessageInfo + +func (m *MsgSubmitProofResponse) GetProof() *Proof { + if m != nil { + return m.Proof + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.proof.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.proof.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.proof.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.proof.MsgUpdateParamResponse") + proto.RegisterType((*MsgCreateClaim)(nil), "poktroll.proof.MsgCreateClaim") + proto.RegisterType((*MsgCreateClaimResponse)(nil), "poktroll.proof.MsgCreateClaimResponse") + proto.RegisterType((*MsgSubmitProof)(nil), "poktroll.proof.MsgSubmitProof") + proto.RegisterType((*MsgSubmitProofResponse)(nil), "poktroll.proof.MsgSubmitProofResponse") +} + +func init() { proto.RegisterFile("poktroll/proof/tx.proto", fileDescriptor_345e95e87511f6a6) } + +var fileDescriptor_345e95e87511f6a6 = []byte{ + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x4f, 0x4f, 0x13, 0x41, + 0x14, 0xef, 0x80, 0xfc, 0xe9, 0x14, 0x6b, 0xdc, 0x20, 0xfd, 0x83, 0x6e, 0x9b, 0x1e, 0xb4, 0x62, + 0xd8, 0x0d, 0x90, 0x98, 0xc8, 0x8d, 0x12, 0x49, 0x0f, 0x12, 0xc9, 0x22, 0x89, 0xf1, 0xd2, 0x4c, + 0xdb, 0xa1, 0xdd, 0xd0, 0xdd, 0xd9, 0xcc, 0x4c, 0x11, 0x6e, 0xc6, 0xa3, 0x27, 0x3e, 0x86, 0x47, + 0x0e, 0x5e, 0xfc, 0x06, 0x1c, 0x89, 0x27, 0x4e, 0xc4, 0x14, 0x13, 0x12, 0xf8, 0x12, 0x66, 0xfe, + 0x74, 0xbb, 0x5d, 0x0b, 0x18, 0x4f, 0x5e, 0xba, 0x33, 0xef, 0xf7, 0x7b, 0xaf, 0xef, 0xfd, 0xde, + 0xdb, 0xb7, 0x30, 0x13, 0x90, 0x3d, 0x4e, 0x49, 0xa7, 0x63, 0x07, 0x94, 0x90, 0x5d, 0x9b, 0x1f, + 0x58, 0x01, 0x25, 0x9c, 0x18, 0xe9, 0x3e, 0x60, 0x49, 0x20, 0xff, 0x10, 0x79, 0xae, 0x4f, 0x6c, + 0xf9, 0xab, 0x28, 0x79, 0xb3, 0x41, 0x98, 0x47, 0x98, 0x5d, 0x47, 0x0c, 0xdb, 0xfb, 0x4b, 0x75, + 0xcc, 0xd1, 0x92, 0xdd, 0x20, 0xae, 0xaf, 0xf1, 0x8c, 0xc6, 0x3d, 0xd6, 0xb2, 0xf7, 0x97, 0xc4, + 0x43, 0x03, 0x39, 0x05, 0xd4, 0xe4, 0xcd, 0x56, 0x17, 0x0d, 0xcd, 0xb6, 0x48, 0x8b, 0x28, 0xbb, + 0x38, 0x69, 0xeb, 0x7c, 0x2c, 0xcb, 0x00, 0x51, 0xe4, 0xf5, 0x5d, 0xf2, 0xf1, 0x12, 0x0e, 0x03, + 0xdc, 0xc7, 0x1e, 0x87, 0x18, 0xc3, 0x8c, 0xb9, 0xc4, 0x1f, 0x42, 0x9f, 0x0c, 0xd0, 0x36, 0xa2, + 0xb8, 0x69, 0x33, 0x4c, 0xf7, 0xdd, 0x06, 0x56, 0x70, 0xe9, 0x3b, 0x80, 0x0f, 0x36, 0x59, 0x6b, + 0x27, 0x68, 0x22, 0x8e, 0xb7, 0xe4, 0x5f, 0x1a, 0x2f, 0x61, 0x12, 0x75, 0x79, 0x9b, 0x50, 0x97, + 0x1f, 0x66, 0x41, 0x11, 0x94, 0x93, 0x95, 0xec, 0x8f, 0x6f, 0x8b, 0xb3, 0xba, 0x88, 0xb5, 0x66, + 0x93, 0x62, 0xc6, 0xb6, 0x39, 0x75, 0xfd, 0x96, 0x33, 0xa0, 0x1a, 0xaf, 0xe0, 0xa4, 0x4a, 0x3a, + 0x3b, 0x56, 0x04, 0xe5, 0xd4, 0xf2, 0x9c, 0x35, 0xac, 0xaf, 0xa5, 0xe2, 0x57, 0x92, 0x27, 0xe7, + 0x85, 0xc4, 0xd7, 0xcb, 0xe3, 0x05, 0xe0, 0x68, 0x87, 0xd5, 0x95, 0xcf, 0x97, 0xc7, 0x0b, 0x83, + 0x50, 0x5f, 0x2e, 0x8f, 0x17, 0x8a, 0x61, 0xe2, 0x07, 0xba, 0xe8, 0x58, 0x9e, 0xa5, 0x1c, 0xcc, + 0xc4, 0x4c, 0x0e, 0x66, 0x01, 0xf1, 0x19, 0x2e, 0x1d, 0x8d, 0xc1, 0xf4, 0x30, 0xf6, 0xcf, 0x55, + 0x19, 0xf0, 0x9e, 0x8f, 0x3c, 0x2c, 0x6b, 0x4a, 0x3a, 0xf2, 0x6c, 0x3c, 0x87, 0xd3, 0x88, 0xd5, + 0xea, 0x87, 0x1c, 0xb3, 0xec, 0x54, 0x11, 0x94, 0x67, 0x2a, 0x33, 0x57, 0xe7, 0x85, 0xd0, 0x56, + 0x4d, 0x38, 0x53, 0x88, 0x55, 0xc4, 0x51, 0x53, 0x77, 0x3b, 0x04, 0xf1, 0xec, 0x74, 0x11, 0x94, + 0x41, 0x48, 0x95, 0x36, 0x45, 0xdd, 0x10, 0x47, 0x63, 0x0d, 0x4e, 0x21, 0x56, 0x13, 0xc3, 0x95, + 0x4d, 0x4a, 0x01, 0x73, 0x96, 0x4e, 0x4e, 0x4c, 0x9f, 0xa5, 0xa7, 0xcf, 0x5a, 0x27, 0xae, 0x5f, + 0x49, 0x5d, 0x9d, 0x17, 0xfa, 0xec, 0x6a, 0xc2, 0x99, 0x44, 0x4c, 0x98, 0x57, 0xd3, 0xc3, 0x3a, + 0x56, 0x92, 0x32, 0xa4, 0x98, 0x87, 0x52, 0x15, 0xce, 0x0d, 0x2b, 0xd2, 0x17, 0xcb, 0xb0, 0xc2, + 0xbe, 0x81, 0xdb, 0xfa, 0xd6, 0x6f, 0x56, 0xe9, 0x1a, 0x48, 0x71, 0xd7, 0x29, 0x46, 0x1c, 0xaf, + 0x77, 0x90, 0xeb, 0x19, 0xef, 0x60, 0x8e, 0x75, 0x83, 0xa0, 0xe3, 0x62, 0x5a, 0x23, 0x01, 0xa6, + 0x88, 0x13, 0x5a, 0x43, 0x4a, 0xd2, 0x3b, 0xc5, 0xce, 0xf4, 0x5d, 0xdf, 0x6a, 0x4f, 0x0d, 0x1b, + 0x1b, 0x30, 0xad, 0x47, 0xba, 0xd6, 0xc6, 0xa8, 0x89, 0xa9, 0x1e, 0xac, 0xc2, 0x20, 0x41, 0x8d, + 0x5b, 0xdb, 0xea, 0x59, 0x95, 0x34, 0xe7, 0x3e, 0x8b, 0x5e, 0x8d, 0x79, 0x98, 0xa4, 0x84, 0xf0, + 0x5a, 0x1b, 0xb1, 0x76, 0x76, 0x5c, 0xf4, 0xcb, 0x99, 0x16, 0x86, 0x2a, 0x62, 0xed, 0x55, 0x53, + 0x48, 0x76, 0x73, 0xf6, 0xa5, 0xd7, 0x52, 0xb7, 0x48, 0xb1, 0xa1, 0x6e, 0x2f, 0xe0, 0x44, 0x43, + 0x18, 0xb4, 0x6c, 0x8f, 0xe2, 0xb2, 0x29, 0xb6, 0xe2, 0x94, 0x7e, 0x29, 0xd1, 0xb6, 0xbb, 0x75, + 0xcf, 0xe5, 0x5b, 0x02, 0xff, 0xcf, 0x45, 0x9b, 0x85, 0x13, 0xb2, 0x0c, 0x2d, 0x98, 0xba, 0xfc, + 0xa5, 0x5a, 0x91, 0x2a, 0xa3, 0x6a, 0xa9, 0x78, 0x37, 0xa8, 0xa5, 0xd8, 0x8a, 0xb3, 0x7c, 0x3d, + 0x06, 0xc7, 0x37, 0x59, 0xcb, 0x78, 0x0f, 0x67, 0x86, 0x56, 0x53, 0x21, 0xee, 0x15, 0x5b, 0x00, + 0xf9, 0x67, 0x77, 0x10, 0xc2, 0x74, 0x76, 0x60, 0x2a, 0x3a, 0xc0, 0xe6, 0x08, 0xbf, 0x08, 0x9e, + 0x7f, 0x7a, 0x3b, 0x1e, 0x0d, 0x1b, 0x6d, 0xf1, 0xa8, 0xb0, 0x11, 0x7c, 0x64, 0xd8, 0x51, 0xe2, + 0xed, 0xc0, 0x54, 0x74, 0x97, 0x99, 0xb7, 0x57, 0x39, 0x32, 0xec, 0x88, 0x37, 0x3f, 0x3f, 0xf1, + 0x49, 0x6c, 0xe1, 0xca, 0x9b, 0x93, 0x9e, 0x09, 0x4e, 0x7b, 0x26, 0x38, 0xeb, 0x99, 0xe0, 0x67, + 0xcf, 0x04, 0x47, 0x17, 0x66, 0xe2, 0xf4, 0xc2, 0x4c, 0x9c, 0x5d, 0x98, 0x89, 0x0f, 0x56, 0xcb, + 0xe5, 0xed, 0x6e, 0xdd, 0x6a, 0x10, 0xcf, 0x16, 0x61, 0x17, 0x7d, 0xcc, 0x3f, 0x12, 0xba, 0x67, + 0xff, 0xb1, 0xa0, 0xe5, 0x77, 0xa7, 0x3e, 0x29, 0xbf, 0x2c, 0x2b, 0xbf, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x35, 0xfa, 0xd8, 0x87, 0x77, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateClaim(ctx context.Context, in *MsgCreateClaim, opts ...grpc.CallOption) (*MsgCreateClaimResponse, error) + SubmitProof(ctx context.Context, in *MsgSubmitProof, opts ...grpc.CallOption) (*MsgSubmitProofResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateClaim(ctx context.Context, in *MsgCreateClaim, opts ...grpc.CallOption) (*MsgCreateClaimResponse, error) { + out := new(MsgCreateClaimResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Msg/CreateClaim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitProof(ctx context.Context, in *MsgSubmitProof, opts ...grpc.CallOption) (*MsgSubmitProofResponse, error) { + out := new(MsgSubmitProofResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Msg/SubmitProof", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.proof.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + CreateClaim(context.Context, *MsgCreateClaim) (*MsgCreateClaimResponse, error) + SubmitProof(context.Context, *MsgSubmitProof) (*MsgSubmitProofResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) CreateClaim(ctx context.Context, req *MsgCreateClaim) (*MsgCreateClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateClaim not implemented") +} +func (*UnimplementedMsgServer) SubmitProof(ctx context.Context, req *MsgSubmitProof) (*MsgSubmitProofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitProof not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateClaim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Msg/CreateClaim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateClaim(ctx, req.(*MsgCreateClaim)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitProof) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitProof(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Msg/SubmitProof", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitProof(ctx, req.(*MsgSubmitProof)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.proof.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.proof.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "CreateClaim", + Handler: _Msg_CreateClaim_Handler, + }, + { + MethodName: "SubmitProof", + Handler: _Msg_SubmitProof_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/proof/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsBytes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsBytes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsBytes != nil { + i -= len(m.AsBytes) + copy(dAtA[i:], m.AsBytes) + i = encodeVarintTx(dAtA, i, uint64(len(m.AsBytes))) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsFloat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsFloat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsFloat)))) + i-- + dAtA[i] = 0x41 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RootHash) > 0 { + i -= len(m.RootHash) + copy(dAtA[i:], m.RootHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.RootHash))) + i-- + dAtA[i] = 0x1a + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateClaimResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitProof) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitProof) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0x1a + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitProofResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitProofResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitProofResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsBytes != nil { + l = len(m.AsBytes) + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParam_AsFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RootHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitProof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Proof) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitProofResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.AsType = &MsgUpdateParam_AsBytes{v} + iNdEx = postIndex + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AsFloat", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AsType = &MsgUpdateParam_AsFloat{float64(math.Float64frombits(v))} + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateClaim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types1.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) + if m.RootHash == nil { + m.RootHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateClaimResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitProof) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitProof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitProof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types1.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) + if m.Proof == nil { + m.Proof = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitProofResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitProofResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitProofResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/proof/types/types.pb.go b/x/proof/types/types.pb.go new file mode 100644 index 000000000..088ac987e --- /dev/null +++ b/x/proof/types/types.pb.go @@ -0,0 +1,791 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/proof/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/session/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ProofRequirementReason int32 + +const ( + ProofRequirementReason_NOT_REQUIRED ProofRequirementReason = 0 + ProofRequirementReason_PROBABILISTIC ProofRequirementReason = 1 + ProofRequirementReason_THRESHOLD ProofRequirementReason = 2 +) + +var ProofRequirementReason_name = map[int32]string{ + 0: "NOT_REQUIRED", + 1: "PROBABILISTIC", + 2: "THRESHOLD", +} + +var ProofRequirementReason_value = map[string]int32{ + "NOT_REQUIRED": 0, + "PROBABILISTIC": 1, + "THRESHOLD": 2, +} + +func (x ProofRequirementReason) String() string { + return proto.EnumName(ProofRequirementReason_name, int32(x)) +} + +func (ProofRequirementReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b75ef15dfd4d6998, []int{0} +} + +type ClaimProofStage int32 + +const ( + ClaimProofStage_CLAIMED ClaimProofStage = 0 + ClaimProofStage_PROVEN ClaimProofStage = 1 + ClaimProofStage_SETTLED ClaimProofStage = 2 + ClaimProofStage_EXPIRED ClaimProofStage = 3 +) + +var ClaimProofStage_name = map[int32]string{ + 0: "CLAIMED", + 1: "PROVEN", + 2: "SETTLED", + 3: "EXPIRED", +} + +var ClaimProofStage_value = map[string]int32{ + "CLAIMED": 0, + "PROVEN": 1, + "SETTLED": 2, + "EXPIRED": 3, +} + +func (x ClaimProofStage) String() string { + return proto.EnumName(ClaimProofStage_name, int32(x)) +} + +func (ClaimProofStage) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b75ef15dfd4d6998, []int{1} +} + +type Proof struct { + // Address of the supplier's operator that submitted this proof. + SupplierOperatorAddress string `protobuf:"bytes,1,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` + // The session header of the session that this claim is for. + SessionHeader *types.SessionHeader `protobuf:"bytes,2,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + // The serialized SMST compacted proof from the `#ClosestProof()` method. + ClosestMerkleProof []byte `protobuf:"bytes,3,opt,name=closest_merkle_proof,json=closestMerkleProof,proto3" json:"closest_merkle_proof,omitempty"` +} + +func (m *Proof) Reset() { *m = Proof{} } +func (m *Proof) String() string { return proto.CompactTextString(m) } +func (*Proof) ProtoMessage() {} +func (*Proof) Descriptor() ([]byte, []int) { + return fileDescriptor_b75ef15dfd4d6998, []int{0} +} +func (m *Proof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Proof) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proof.Merge(m, src) +} +func (m *Proof) XXX_Size() int { + return m.Size() +} +func (m *Proof) XXX_DiscardUnknown() { + xxx_messageInfo_Proof.DiscardUnknown(m) +} + +var xxx_messageInfo_Proof proto.InternalMessageInfo + +func (m *Proof) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +func (m *Proof) GetSessionHeader() *types.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *Proof) GetClosestMerkleProof() []byte { + if m != nil { + return m.ClosestMerkleProof + } + return nil +} + +// Claim is the serialized object stored onchain for claims pending to be proven +type Claim struct { + SupplierOperatorAddress string `protobuf:"bytes,1,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` + // The session header of the session that this claim is for. + SessionHeader *types.SessionHeader `protobuf:"bytes,2,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + // Root hash returned from smt.SMST#Root(). + RootHash []byte `protobuf:"bytes,3,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"` +} + +func (m *Claim) Reset() { *m = Claim{} } +func (m *Claim) String() string { return proto.CompactTextString(m) } +func (*Claim) ProtoMessage() {} +func (*Claim) Descriptor() ([]byte, []int) { + return fileDescriptor_b75ef15dfd4d6998, []int{1} +} +func (m *Claim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Claim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Claim) XXX_Merge(src proto.Message) { + xxx_messageInfo_Claim.Merge(m, src) +} +func (m *Claim) XXX_Size() int { + return m.Size() +} +func (m *Claim) XXX_DiscardUnknown() { + xxx_messageInfo_Claim.DiscardUnknown(m) +} + +var xxx_messageInfo_Claim proto.InternalMessageInfo + +func (m *Claim) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +func (m *Claim) GetSessionHeader() *types.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *Claim) GetRootHash() []byte { + if m != nil { + return m.RootHash + } + return nil +} + +func init() { + proto.RegisterEnum("poktroll.proof.ProofRequirementReason", ProofRequirementReason_name, ProofRequirementReason_value) + proto.RegisterEnum("poktroll.proof.ClaimProofStage", ClaimProofStage_name, ClaimProofStage_value) + proto.RegisterType((*Proof)(nil), "poktroll.proof.Proof") + proto.RegisterType((*Claim)(nil), "poktroll.proof.Claim") +} + +func init() { proto.RegisterFile("poktroll/proof/types.proto", fileDescriptor_b75ef15dfd4d6998) } + +var fileDescriptor_b75ef15dfd4d6998 = []byte{ + // 452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x92, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xb3, 0xa9, 0x5a, 0xc8, 0xb6, 0x29, 0x66, 0x15, 0x41, 0x1a, 0x90, 0x89, 0x7a, 0x8a, + 0x2a, 0xd5, 0x46, 0xf0, 0x04, 0xf9, 0x63, 0x14, 0x4b, 0x6e, 0x1d, 0xd6, 0x06, 0x21, 0x2e, 0x96, + 0x9b, 0x2c, 0xb6, 0x15, 0xdb, 0x63, 0x76, 0x37, 0x02, 0xde, 0x82, 0x87, 0xe1, 0x09, 0x38, 0x71, + 0xac, 0xb8, 0xd0, 0x23, 0x72, 0x5e, 0x04, 0x79, 0xed, 0x46, 0x79, 0x04, 0x4e, 0xf6, 0xcc, 0x6f, + 0xe6, 0x9b, 0xfd, 0x46, 0x83, 0x07, 0x05, 0xac, 0x25, 0x87, 0x34, 0x35, 0x0b, 0x0e, 0xf0, 0xc9, + 0x94, 0xdf, 0x0a, 0x26, 0x8c, 0x82, 0x83, 0x04, 0x72, 0x7a, 0xcf, 0x0c, 0xc5, 0x06, 0x67, 0x4b, + 0x10, 0x19, 0x88, 0x40, 0x51, 0xb3, 0x0e, 0xea, 0xd2, 0xc1, 0xf3, 0x9d, 0x8c, 0x60, 0x42, 0x24, + 0x90, 0xef, 0x0b, 0x0d, 0x7a, 0x11, 0x44, 0x50, 0x77, 0x55, 0x7f, 0x75, 0xf6, 0xfc, 0x0f, 0xc2, + 0x87, 0x8b, 0x4a, 0x98, 0xf8, 0xf8, 0x4c, 0x6c, 0x8a, 0x22, 0x4d, 0x18, 0x0f, 0xa0, 0x60, 0x3c, + 0x94, 0xc0, 0x83, 0x70, 0xb5, 0xe2, 0x4c, 0x88, 0x3e, 0x1a, 0xa2, 0x51, 0x67, 0xd2, 0xff, 0xfd, + 0xe3, 0xb2, 0xd7, 0x8c, 0x1c, 0xd7, 0xc4, 0x93, 0x3c, 0xc9, 0x23, 0xfa, 0xf4, 0xbe, 0xd5, 0x6d, + 0x3a, 0x1b, 0x4c, 0xde, 0xe0, 0xd3, 0xe6, 0x31, 0x41, 0xcc, 0xc2, 0x15, 0xe3, 0xfd, 0xf6, 0x10, + 0x8d, 0x8e, 0x5f, 0xbd, 0x30, 0x76, 0xbe, 0x1a, 0x6e, 0x78, 0xf5, 0x77, 0xae, 0xca, 0x68, 0x57, + 0xec, 0x87, 0xe4, 0x25, 0xee, 0x2d, 0x53, 0x10, 0x4c, 0xc8, 0x20, 0x63, 0x7c, 0x9d, 0xb2, 0x40, + 0xad, 0xa3, 0x7f, 0x30, 0x44, 0xa3, 0x13, 0x4a, 0x1a, 0x76, 0xa5, 0x90, 0xf2, 0x73, 0xfe, 0x13, + 0xe1, 0xc3, 0x69, 0x1a, 0x26, 0xd9, 0x7f, 0xee, 0xec, 0x19, 0xee, 0x70, 0x00, 0x19, 0xc4, 0xa1, + 0x88, 0x1b, 0x3b, 0x0f, 0xab, 0xc4, 0x3c, 0x14, 0xf1, 0x85, 0x83, 0x9f, 0x28, 0x37, 0x94, 0x7d, + 0xde, 0x24, 0x9c, 0x65, 0x2c, 0x97, 0x94, 0x85, 0x02, 0x72, 0xa2, 0xe1, 0x93, 0x6b, 0xd7, 0x0f, + 0xa8, 0xf5, 0xf6, 0x9d, 0x4d, 0xad, 0x99, 0xd6, 0x22, 0x8f, 0x71, 0x77, 0x41, 0xdd, 0xc9, 0x78, + 0x62, 0x3b, 0xb6, 0xe7, 0xdb, 0x53, 0x0d, 0x91, 0x2e, 0xee, 0xf8, 0x73, 0x6a, 0x79, 0x73, 0xd7, + 0x99, 0x69, 0xed, 0x8b, 0x19, 0x7e, 0xa4, 0x36, 0xa2, 0x24, 0x3d, 0x19, 0x46, 0x8c, 0x1c, 0xe3, + 0x07, 0x53, 0x67, 0x6c, 0x5f, 0x29, 0x05, 0x8c, 0x8f, 0x16, 0xd4, 0x7d, 0x6f, 0x5d, 0x6b, 0xa8, + 0x02, 0x9e, 0xe5, 0xfb, 0x8e, 0x35, 0xd3, 0xda, 0x55, 0x60, 0x7d, 0x58, 0xa8, 0x39, 0x07, 0x13, + 0xe7, 0x57, 0xa9, 0xa3, 0xdb, 0x52, 0x47, 0x77, 0xa5, 0x8e, 0xfe, 0x96, 0x3a, 0xfa, 0xbe, 0xd5, + 0x5b, 0xb7, 0x5b, 0xbd, 0x75, 0xb7, 0xd5, 0x5b, 0x1f, 0x8d, 0x28, 0x91, 0xf1, 0xe6, 0xc6, 0x58, + 0x42, 0x66, 0x56, 0x8b, 0xb8, 0xcc, 0x99, 0xfc, 0x02, 0x7c, 0x6d, 0xee, 0x8e, 0xf3, 0xeb, 0xfe, + 0x95, 0xdf, 0x1c, 0xa9, 0x3b, 0x7c, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x74, 0x9b, 0x7a, 0x80, + 0x04, 0x03, 0x00, 0x00, +} + +func (m *Proof) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Proof) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClosestMerkleProof) > 0 { + i -= len(m.ClosestMerkleProof) + copy(dAtA[i:], m.ClosestMerkleProof) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ClosestMerkleProof))) + i-- + dAtA[i] = 0x1a + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Claim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Claim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Claim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RootHash) > 0 { + i -= len(m.RootHash) + copy(dAtA[i:], m.RootHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.RootHash))) + i-- + dAtA[i] = 0x1a + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Proof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ClosestMerkleProof) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Claim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RootHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Proof) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Proof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClosestMerkleProof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClosestMerkleProof = append(m.ClosestMerkleProof[:0], dAtA[iNdEx:postIndex]...) + if m.ClosestMerkleProof == nil { + m.ClosestMerkleProof = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Claim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Claim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Claim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) + if m.RootHash == nil { + m.RootHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/event.pb.go b/x/service/types/event.pb.go new file mode 100644 index 000000000..b85ba4263 --- /dev/null +++ b/x/service/types/event.pb.go @@ -0,0 +1,495 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/event.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventRelayMiningDifficultyUpdated is an event emitted whenever the relay mining difficulty is updated +// for a given service. +type EventRelayMiningDifficultyUpdated struct { + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + PrevTargetHashHexEncoded string `protobuf:"bytes,2,opt,name=prev_target_hash_hex_encoded,json=prevTargetHashHexEncoded,proto3" json:"prev_target_hash_hex_encoded,omitempty"` + NewTargetHashHexEncoded string `protobuf:"bytes,3,opt,name=new_target_hash_hex_encoded,json=newTargetHashHexEncoded,proto3" json:"new_target_hash_hex_encoded,omitempty"` + PrevNumRelaysEma uint64 `protobuf:"varint,4,opt,name=prev_num_relays_ema,json=prevNumRelaysEma,proto3" json:"prev_num_relays_ema,omitempty"` + NewNumRelaysEma uint64 `protobuf:"varint,5,opt,name=new_num_relays_ema,json=newNumRelaysEma,proto3" json:"new_num_relays_ema,omitempty"` +} + +func (m *EventRelayMiningDifficultyUpdated) Reset() { *m = EventRelayMiningDifficultyUpdated{} } +func (m *EventRelayMiningDifficultyUpdated) String() string { return proto.CompactTextString(m) } +func (*EventRelayMiningDifficultyUpdated) ProtoMessage() {} +func (*EventRelayMiningDifficultyUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_a49225ecd38336fe, []int{0} +} +func (m *EventRelayMiningDifficultyUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRelayMiningDifficultyUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventRelayMiningDifficultyUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRelayMiningDifficultyUpdated.Merge(m, src) +} +func (m *EventRelayMiningDifficultyUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventRelayMiningDifficultyUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventRelayMiningDifficultyUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRelayMiningDifficultyUpdated proto.InternalMessageInfo + +func (m *EventRelayMiningDifficultyUpdated) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *EventRelayMiningDifficultyUpdated) GetPrevTargetHashHexEncoded() string { + if m != nil { + return m.PrevTargetHashHexEncoded + } + return "" +} + +func (m *EventRelayMiningDifficultyUpdated) GetNewTargetHashHexEncoded() string { + if m != nil { + return m.NewTargetHashHexEncoded + } + return "" +} + +func (m *EventRelayMiningDifficultyUpdated) GetPrevNumRelaysEma() uint64 { + if m != nil { + return m.PrevNumRelaysEma + } + return 0 +} + +func (m *EventRelayMiningDifficultyUpdated) GetNewNumRelaysEma() uint64 { + if m != nil { + return m.NewNumRelaysEma + } + return 0 +} + +func init() { + proto.RegisterType((*EventRelayMiningDifficultyUpdated)(nil), "poktroll.service.EventRelayMiningDifficultyUpdated") +} + +func init() { proto.RegisterFile("poktroll/service/event.proto", fileDescriptor_a49225ecd38336fe) } + +var fileDescriptor_a49225ecd38336fe = []byte{ + // 320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x30, + 0x14, 0xc7, 0x97, 0x39, 0x85, 0xe5, 0xe2, 0xa8, 0x82, 0x45, 0x67, 0x98, 0x9e, 0x06, 0xb2, 0x55, + 0xf0, 0x2a, 0x1e, 0xc4, 0xc1, 0x3c, 0xb8, 0xc3, 0xd0, 0x8b, 0x97, 0x90, 0xb5, 0x6f, 0x6d, 0x58, + 0x9b, 0x94, 0x34, 0x5d, 0xb7, 0x6f, 0xe1, 0x07, 0xf0, 0x03, 0x79, 0xdc, 0x71, 0x47, 0xe9, 0xbe, + 0x88, 0x24, 0xab, 0x43, 0x44, 0x6f, 0x21, 0xff, 0xdf, 0xef, 0x3d, 0xde, 0x7b, 0xb8, 0x9d, 0xca, + 0x99, 0x56, 0x32, 0x8e, 0xbd, 0x0c, 0xd4, 0x9c, 0xfb, 0xe0, 0xc1, 0x1c, 0x84, 0xee, 0xa7, 0x4a, + 0x6a, 0xe9, 0xb4, 0xbe, 0xd3, 0x7e, 0x95, 0x9e, 0x1e, 0x87, 0x32, 0x94, 0x36, 0xf4, 0xcc, 0x6b, + 0xcb, 0x5d, 0xbe, 0xd7, 0xf1, 0xc5, 0xc0, 0x78, 0x63, 0x88, 0xd9, 0xf2, 0x89, 0x0b, 0x2e, 0xc2, + 0x07, 0x3e, 0x9d, 0x72, 0x3f, 0x8f, 0xf5, 0xf2, 0x25, 0x0d, 0x98, 0x86, 0xc0, 0x39, 0xc7, 0xb8, + 0x2a, 0x43, 0x79, 0xe0, 0xa2, 0x0e, 0xea, 0x36, 0xc7, 0xcd, 0xea, 0xe7, 0x31, 0x70, 0xee, 0x70, + 0x3b, 0x55, 0x30, 0xa7, 0x9a, 0xa9, 0x10, 0x34, 0x8d, 0x58, 0x16, 0xd1, 0x08, 0x16, 0x14, 0x84, + 0x2f, 0x03, 0x08, 0xdc, 0xba, 0x15, 0x5c, 0xc3, 0x3c, 0x5b, 0x64, 0xc8, 0xb2, 0x68, 0x08, 0x8b, + 0xc1, 0x36, 0x77, 0x6e, 0xf1, 0x99, 0x80, 0xe2, 0x5f, 0x7d, 0xcf, 0xea, 0x27, 0x02, 0x8a, 0x3f, + 0xed, 0x1e, 0x3e, 0xb2, 0xdd, 0x45, 0x9e, 0x50, 0x65, 0xa6, 0xc8, 0x28, 0x24, 0xcc, 0x6d, 0x74, + 0x50, 0xb7, 0x31, 0x6e, 0x99, 0x68, 0x94, 0x27, 0x76, 0xbc, 0x6c, 0x90, 0x30, 0xe7, 0x0a, 0x3b, + 0xa6, 0xd9, 0x2f, 0x7a, 0xdf, 0xd2, 0x87, 0x02, 0x8a, 0x9f, 0xf0, 0xfd, 0xe8, 0xa3, 0x24, 0x68, + 0x55, 0x12, 0xb4, 0x2e, 0x09, 0xfa, 0x2c, 0x09, 0x7a, 0xdb, 0x90, 0xda, 0x6a, 0x43, 0x6a, 0xeb, + 0x0d, 0xa9, 0xbd, 0x5e, 0x87, 0x5c, 0x47, 0xf9, 0xa4, 0xef, 0xcb, 0xc4, 0x33, 0xfb, 0xee, 0x09, + 0xd0, 0x85, 0x54, 0x33, 0x6f, 0x77, 0x9a, 0xc5, 0xee, 0x38, 0x7a, 0x99, 0x42, 0x36, 0x39, 0xb0, + 0x5b, 0xbf, 0xf9, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x37, 0x95, 0x7d, 0xbd, 0x01, 0x00, 0x00, +} + +func (m *EventRelayMiningDifficultyUpdated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRelayMiningDifficultyUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRelayMiningDifficultyUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NewNumRelaysEma != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NewNumRelaysEma)) + i-- + dAtA[i] = 0x28 + } + if m.PrevNumRelaysEma != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.PrevNumRelaysEma)) + i-- + dAtA[i] = 0x20 + } + if len(m.NewTargetHashHexEncoded) > 0 { + i -= len(m.NewTargetHashHexEncoded) + copy(dAtA[i:], m.NewTargetHashHexEncoded) + i = encodeVarintEvent(dAtA, i, uint64(len(m.NewTargetHashHexEncoded))) + i-- + dAtA[i] = 0x1a + } + if len(m.PrevTargetHashHexEncoded) > 0 { + i -= len(m.PrevTargetHashHexEncoded) + copy(dAtA[i:], m.PrevTargetHashHexEncoded) + i = encodeVarintEvent(dAtA, i, uint64(len(m.PrevTargetHashHexEncoded))) + i-- + dAtA[i] = 0x12 + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRelayMiningDifficultyUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.PrevTargetHashHexEncoded) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.NewTargetHashHexEncoded) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.PrevNumRelaysEma != 0 { + n += 1 + sovEvent(uint64(m.PrevNumRelaysEma)) + } + if m.NewNumRelaysEma != 0 { + n += 1 + sovEvent(uint64(m.NewNumRelaysEma)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRelayMiningDifficultyUpdated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRelayMiningDifficultyUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRelayMiningDifficultyUpdated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrevTargetHashHexEncoded", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrevTargetHashHexEncoded = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewTargetHashHexEncoded", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewTargetHashHexEncoded = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PrevNumRelaysEma", wireType) + } + m.PrevNumRelaysEma = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PrevNumRelaysEma |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewNumRelaysEma", wireType) + } + m.NewNumRelaysEma = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NewNumRelaysEma |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/genesis.pb.go b/x/service/types/genesis.pb.go new file mode 100644 index 000000000..f31fb606f --- /dev/null +++ b/x/service/types/genesis.pb.go @@ -0,0 +1,452 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the service module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + ServiceList []types.Service `protobuf:"bytes,2,rep,name=service_list,json=serviceList,proto3" json:"service_list"` + RelayMiningDifficultyList []RelayMiningDifficulty `protobuf:"bytes,3,rep,name=relayMiningDifficultyList,proto3" json:"relayMiningDifficultyList"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_b6c2ff81e712a1a4, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetServiceList() []types.Service { + if m != nil { + return m.ServiceList + } + return nil +} + +func (m *GenesisState) GetRelayMiningDifficultyList() []RelayMiningDifficulty { + if m != nil { + return m.RelayMiningDifficultyList + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.service.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/service/genesis.proto", fileDescriptor_b6c2ff81e712a1a4) } + +var fileDescriptor_b6c2ff81e712a1a4 = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xeb, 0x41, + 0xe5, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x48, 0x7a, + 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0x31, 0x8c, 0x2e, 0x48, 0x2c, 0x4a, + 0xcc, 0x2d, 0xc6, 0x94, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0x81, 0xa9, 0x82, 0x4a, 0xeb, 0x61, 0xe8, + 0x2e, 0x4a, 0xcd, 0x49, 0xac, 0x8c, 0xcf, 0xcd, 0xcc, 0xcb, 0xcc, 0x4b, 0x8f, 0x4f, 0xc9, 0x4c, + 0x4b, 0xcb, 0x4c, 0x2e, 0xcd, 0x29, 0xa9, 0x84, 0xa8, 0x57, 0xfa, 0xcd, 0xc8, 0xc5, 0xe3, 0x0e, + 0x71, 0x7a, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x35, 0x17, 0x1b, 0xc4, 0x3e, 0x09, 0x46, 0x05, + 0x46, 0x0d, 0x6e, 0x23, 0x09, 0x3d, 0x74, 0xaf, 0xe8, 0x05, 0x80, 0xe5, 0x9d, 0x38, 0x4f, 0xdc, + 0x93, 0x67, 0x58, 0xf1, 0x7c, 0x83, 0x16, 0x63, 0x10, 0x54, 0x8b, 0x90, 0x23, 0x17, 0x0f, 0x54, + 0x51, 0x7c, 0x4e, 0x66, 0x71, 0x89, 0x04, 0x93, 0x02, 0x33, 0x9a, 0x11, 0x60, 0x37, 0xeb, 0x05, + 0x43, 0x14, 0x39, 0xb1, 0x80, 0x8c, 0x08, 0xe2, 0x86, 0xea, 0xf1, 0xc9, 0x2c, 0x2e, 0x11, 0xca, + 0xe6, 0x92, 0x04, 0xbb, 0xd8, 0x17, 0xec, 0x60, 0x17, 0xb8, 0x7b, 0x41, 0x92, 0x12, 0xcc, 0x60, + 0xf3, 0xd4, 0x31, 0x9d, 0x14, 0x84, 0x4d, 0x0b, 0xd4, 0x78, 0xdc, 0xe6, 0x39, 0xf9, 0x9d, 0x78, + 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x8d, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, + 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x06, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x20, 0x1b, 0x75, 0xf3, 0x52, 0x4b, 0xca, + 0xf3, 0x8b, 0xb2, 0xf5, 0xe1, 0x61, 0x5c, 0x01, 0x0f, 0xe5, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, + 0x36, 0x70, 0xa0, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x34, 0x0b, 0xbf, 0x1f, 0x02, + 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayMiningDifficultyList) > 0 { + for iNdEx := len(m.RelayMiningDifficultyList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RelayMiningDifficultyList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.ServiceList) > 0 { + for iNdEx := len(m.ServiceList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ServiceList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.ServiceList) > 0 { + for _, e := range m.ServiceList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.RelayMiningDifficultyList) > 0 { + for _, e := range m.RelayMiningDifficultyList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceList = append(m.ServiceList, types.Service{}) + if err := m.ServiceList[len(m.ServiceList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayMiningDifficultyList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayMiningDifficultyList = append(m.RelayMiningDifficultyList, RelayMiningDifficulty{}) + if err := m.RelayMiningDifficultyList[len(m.RelayMiningDifficultyList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/params.pb.go b/x/service/types/params.pb.go new file mode 100644 index 000000000..5f7693d39 --- /dev/null +++ b/x/service/types/params.pb.go @@ -0,0 +1,401 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/params.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // The amount of uPOKT required to add a new service. + // This will be deducted from the signer's account balance, + // and transferred to the pocket network foundation. + AddServiceFee *types.Coin `protobuf:"bytes,1,opt,name=add_service_fee,json=addServiceFee,proto3" json:"add_service_fee" yaml:"add_service_fee"` + // target_num_relays is the target for the EMA of the number of relays per session. + // Per service, onchain relay mining difficulty will be adjusted to maintain this target. + TargetNumRelays uint64 `protobuf:"varint,2,opt,name=target_num_relays,json=targetNumRelays,proto3" json:"target_num_relays" yaml:"target_num_relays"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_69b5d0104478b383, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetAddServiceFee() *types.Coin { + if m != nil { + return m.AddServiceFee + } + return nil +} + +func (m *Params) GetTargetNumRelays() uint64 { + if m != nil { + return m.TargetNumRelays + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.service.Params") +} + +func init() { proto.RegisterFile("poktroll/service/params.proto", fileDescriptor_69b5d0104478b383) } + +var fileDescriptor_69b5d0104478b383 = []byte{ + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4a, 0xc3, 0x40, + 0x18, 0xc7, 0x7b, 0x22, 0x1d, 0x22, 0x52, 0x5b, 0x44, 0xda, 0x82, 0x97, 0x92, 0xa9, 0x08, 0xcd, + 0x59, 0xdd, 0x3a, 0x56, 0x70, 0x2c, 0x52, 0x37, 0x41, 0xc2, 0x25, 0x39, 0x63, 0x68, 0x2e, 0x5f, + 0xb8, 0xbb, 0x56, 0xfb, 0x0a, 0x4e, 0x3e, 0x82, 0x8f, 0xe0, 0x63, 0x38, 0x76, 0xec, 0x14, 0x24, + 0x1d, 0x94, 0x8e, 0xdd, 0x05, 0x69, 0x2e, 0x76, 0x68, 0x5d, 0x8e, 0x8f, 0xff, 0xef, 0xee, 0xf7, + 0x71, 0x7f, 0xe3, 0x34, 0x81, 0x91, 0x12, 0x10, 0x45, 0x44, 0x32, 0x31, 0x09, 0x3d, 0x46, 0x12, + 0x2a, 0x28, 0x97, 0x76, 0x22, 0x40, 0x41, 0xed, 0xe8, 0x0f, 0xdb, 0x05, 0x6e, 0x56, 0x29, 0x0f, + 0x63, 0x20, 0xf9, 0xa9, 0x2f, 0x35, 0x8f, 0x03, 0x08, 0x20, 0x1f, 0xc9, 0x7a, 0x2a, 0x52, 0xec, + 0x81, 0xe4, 0x20, 0x89, 0x4b, 0x25, 0x23, 0x93, 0xae, 0xcb, 0x14, 0xed, 0x12, 0x0f, 0xc2, 0x58, + 0x73, 0xeb, 0x07, 0x19, 0xe5, 0x9b, 0x7c, 0x57, 0x2d, 0x31, 0x2a, 0xd4, 0xf7, 0x9d, 0x62, 0x85, + 0xf3, 0xc0, 0x58, 0x1d, 0xb5, 0x50, 0xfb, 0xe0, 0xa2, 0x61, 0x6b, 0x89, 0xbd, 0x96, 0xd8, 0x85, + 0xc4, 0xbe, 0x82, 0x30, 0xee, 0x77, 0x96, 0xa9, 0xb9, 0xfd, 0x6a, 0x95, 0x9a, 0x27, 0x53, 0xca, + 0xa3, 0x9e, 0xb5, 0x05, 0xac, 0xe1, 0x21, 0xf5, 0xfd, 0x5b, 0x1d, 0x5c, 0x33, 0x56, 0xbb, 0x37, + 0xaa, 0x8a, 0x8a, 0x80, 0x29, 0x27, 0x1e, 0x73, 0x47, 0xb0, 0x88, 0x4e, 0x65, 0x7d, 0xaf, 0x85, + 0xda, 0xfb, 0xfd, 0xee, 0x32, 0x35, 0x77, 0xe1, 0x2a, 0x35, 0xeb, 0x5a, 0xbd, 0x83, 0xac, 0x61, + 0x45, 0x67, 0x83, 0x31, 0x1f, 0xe6, 0x49, 0xcf, 0xfa, 0x7e, 0x33, 0xd1, 0xcb, 0xd7, 0xfb, 0x59, + 0x63, 0x53, 0xef, 0xf3, 0xa6, 0x60, 0xfd, 0xe9, 0xfe, 0xe0, 0x23, 0xc3, 0x68, 0x96, 0x61, 0x34, + 0xcf, 0x30, 0xfa, 0xcc, 0x30, 0x7a, 0x5d, 0xe0, 0xd2, 0x6c, 0x81, 0x4b, 0xf3, 0x05, 0x2e, 0xdd, + 0x9d, 0x07, 0xa1, 0x7a, 0x1c, 0xbb, 0xb6, 0x07, 0x9c, 0xac, 0x1d, 0x9d, 0x98, 0xa9, 0x27, 0x10, + 0x23, 0xf2, 0x8f, 0x50, 0x4d, 0x13, 0x26, 0xdd, 0x72, 0x5e, 0xeb, 0xe5, 0x6f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xcf, 0xf3, 0x1c, 0x51, 0xd2, 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.AddServiceFee.Equal(that1.AddServiceFee) { + return false + } + if this.TargetNumRelays != that1.TargetNumRelays { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TargetNumRelays != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.TargetNumRelays)) + i-- + dAtA[i] = 0x10 + } + if m.AddServiceFee != nil { + { + size, err := m.AddServiceFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AddServiceFee != nil { + l = m.AddServiceFee.Size() + n += 1 + l + sovParams(uint64(l)) + } + if m.TargetNumRelays != 0 { + n += 1 + sovParams(uint64(m.TargetNumRelays)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddServiceFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AddServiceFee == nil { + m.AddServiceFee = &types.Coin{} + } + if err := m.AddServiceFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetNumRelays", wireType) + } + m.TargetNumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetNumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/query.pb.go b/x/service/types/query.pb.go new file mode 100644 index 000000000..15d6ffb31 --- /dev/null +++ b/x/service/types/query.pb.go @@ -0,0 +1,2197 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/shared/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetServiceRequest struct { + // TODO_IMPROVE: We could support getting services by name. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryGetServiceRequest) Reset() { *m = QueryGetServiceRequest{} } +func (m *QueryGetServiceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetServiceRequest) ProtoMessage() {} +func (*QueryGetServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{2} +} +func (m *QueryGetServiceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetServiceRequest.Merge(m, src) +} +func (m *QueryGetServiceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetServiceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetServiceRequest proto.InternalMessageInfo + +func (m *QueryGetServiceRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type QueryGetServiceResponse struct { + Service types.Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service"` +} + +func (m *QueryGetServiceResponse) Reset() { *m = QueryGetServiceResponse{} } +func (m *QueryGetServiceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetServiceResponse) ProtoMessage() {} +func (*QueryGetServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{3} +} +func (m *QueryGetServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetServiceResponse.Merge(m, src) +} +func (m *QueryGetServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetServiceResponse proto.InternalMessageInfo + +func (m *QueryGetServiceResponse) GetService() types.Service { + if m != nil { + return m.Service + } + return types.Service{} +} + +type QueryAllServicesRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllServicesRequest) Reset() { *m = QueryAllServicesRequest{} } +func (m *QueryAllServicesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllServicesRequest) ProtoMessage() {} +func (*QueryAllServicesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{4} +} +func (m *QueryAllServicesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllServicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllServicesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllServicesRequest.Merge(m, src) +} +func (m *QueryAllServicesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllServicesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllServicesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllServicesRequest proto.InternalMessageInfo + +func (m *QueryAllServicesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllServicesResponse struct { + Service []types.Service `protobuf:"bytes,1,rep,name=service,proto3" json:"service"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllServicesResponse) Reset() { *m = QueryAllServicesResponse{} } +func (m *QueryAllServicesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllServicesResponse) ProtoMessage() {} +func (*QueryAllServicesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{5} +} +func (m *QueryAllServicesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllServicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllServicesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllServicesResponse.Merge(m, src) +} +func (m *QueryAllServicesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllServicesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllServicesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllServicesResponse proto.InternalMessageInfo + +func (m *QueryAllServicesResponse) GetService() []types.Service { + if m != nil { + return m.Service + } + return nil +} + +func (m *QueryAllServicesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryGetRelayMiningDifficultyRequest struct { + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` +} + +func (m *QueryGetRelayMiningDifficultyRequest) Reset() { *m = QueryGetRelayMiningDifficultyRequest{} } +func (m *QueryGetRelayMiningDifficultyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetRelayMiningDifficultyRequest) ProtoMessage() {} +func (*QueryGetRelayMiningDifficultyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{6} +} +func (m *QueryGetRelayMiningDifficultyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetRelayMiningDifficultyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetRelayMiningDifficultyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetRelayMiningDifficultyRequest.Merge(m, src) +} +func (m *QueryGetRelayMiningDifficultyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetRelayMiningDifficultyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetRelayMiningDifficultyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetRelayMiningDifficultyRequest proto.InternalMessageInfo + +func (m *QueryGetRelayMiningDifficultyRequest) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +type QueryGetRelayMiningDifficultyResponse struct { + RelayMiningDifficulty RelayMiningDifficulty `protobuf:"bytes,1,opt,name=relayMiningDifficulty,proto3" json:"relayMiningDifficulty"` +} + +func (m *QueryGetRelayMiningDifficultyResponse) Reset() { *m = QueryGetRelayMiningDifficultyResponse{} } +func (m *QueryGetRelayMiningDifficultyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetRelayMiningDifficultyResponse) ProtoMessage() {} +func (*QueryGetRelayMiningDifficultyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{7} +} +func (m *QueryGetRelayMiningDifficultyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetRelayMiningDifficultyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetRelayMiningDifficultyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetRelayMiningDifficultyResponse.Merge(m, src) +} +func (m *QueryGetRelayMiningDifficultyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetRelayMiningDifficultyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetRelayMiningDifficultyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetRelayMiningDifficultyResponse proto.InternalMessageInfo + +func (m *QueryGetRelayMiningDifficultyResponse) GetRelayMiningDifficulty() RelayMiningDifficulty { + if m != nil { + return m.RelayMiningDifficulty + } + return RelayMiningDifficulty{} +} + +type QueryAllRelayMiningDifficultyRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllRelayMiningDifficultyRequest) Reset() { *m = QueryAllRelayMiningDifficultyRequest{} } +func (m *QueryAllRelayMiningDifficultyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllRelayMiningDifficultyRequest) ProtoMessage() {} +func (*QueryAllRelayMiningDifficultyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{8} +} +func (m *QueryAllRelayMiningDifficultyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllRelayMiningDifficultyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllRelayMiningDifficultyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllRelayMiningDifficultyRequest.Merge(m, src) +} +func (m *QueryAllRelayMiningDifficultyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllRelayMiningDifficultyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllRelayMiningDifficultyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllRelayMiningDifficultyRequest proto.InternalMessageInfo + +func (m *QueryAllRelayMiningDifficultyRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllRelayMiningDifficultyResponse struct { + RelayMiningDifficulty []RelayMiningDifficulty `protobuf:"bytes,1,rep,name=relayMiningDifficulty,proto3" json:"relayMiningDifficulty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllRelayMiningDifficultyResponse) Reset() { *m = QueryAllRelayMiningDifficultyResponse{} } +func (m *QueryAllRelayMiningDifficultyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllRelayMiningDifficultyResponse) ProtoMessage() {} +func (*QueryAllRelayMiningDifficultyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8a7bc9eee3e426, []int{9} +} +func (m *QueryAllRelayMiningDifficultyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllRelayMiningDifficultyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllRelayMiningDifficultyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllRelayMiningDifficultyResponse.Merge(m, src) +} +func (m *QueryAllRelayMiningDifficultyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllRelayMiningDifficultyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllRelayMiningDifficultyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllRelayMiningDifficultyResponse proto.InternalMessageInfo + +func (m *QueryAllRelayMiningDifficultyResponse) GetRelayMiningDifficulty() []RelayMiningDifficulty { + if m != nil { + return m.RelayMiningDifficulty + } + return nil +} + +func (m *QueryAllRelayMiningDifficultyResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.service.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.service.QueryParamsResponse") + proto.RegisterType((*QueryGetServiceRequest)(nil), "poktroll.service.QueryGetServiceRequest") + proto.RegisterType((*QueryGetServiceResponse)(nil), "poktroll.service.QueryGetServiceResponse") + proto.RegisterType((*QueryAllServicesRequest)(nil), "poktroll.service.QueryAllServicesRequest") + proto.RegisterType((*QueryAllServicesResponse)(nil), "poktroll.service.QueryAllServicesResponse") + proto.RegisterType((*QueryGetRelayMiningDifficultyRequest)(nil), "poktroll.service.QueryGetRelayMiningDifficultyRequest") + proto.RegisterType((*QueryGetRelayMiningDifficultyResponse)(nil), "poktroll.service.QueryGetRelayMiningDifficultyResponse") + proto.RegisterType((*QueryAllRelayMiningDifficultyRequest)(nil), "poktroll.service.QueryAllRelayMiningDifficultyRequest") + proto.RegisterType((*QueryAllRelayMiningDifficultyResponse)(nil), "poktroll.service.QueryAllRelayMiningDifficultyResponse") +} + +func init() { proto.RegisterFile("poktroll/service/query.proto", fileDescriptor_cc8a7bc9eee3e426) } + +var fileDescriptor_cc8a7bc9eee3e426 = []byte{ + // 689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x6b, 0xd4, 0x40, + 0x14, 0xde, 0xd9, 0xea, 0x96, 0x4e, 0x41, 0x74, 0x6c, 0x75, 0x59, 0x6a, 0x94, 0xd0, 0x1f, 0x6b, + 0xa5, 0x33, 0xb6, 0x85, 0x5a, 0x10, 0x84, 0x2e, 0xc5, 0xa2, 0xa0, 0xd4, 0xf4, 0xe6, 0xa5, 0xcc, + 0xee, 0x4e, 0xd3, 0xa1, 0xd9, 0x4c, 0x9a, 0x64, 0xab, 0xa5, 0xf4, 0x22, 0x1e, 0x3d, 0x08, 0xf5, + 0xea, 0xdd, 0xa3, 0x7f, 0x46, 0xc1, 0x4b, 0x41, 0x85, 0x9e, 0xa4, 0x6c, 0x05, 0xff, 0x0d, 0xd9, + 0xc9, 0x4b, 0x7f, 0x98, 0xa4, 0x69, 0xa5, 0x97, 0xdd, 0x90, 0xf9, 0xde, 0xfb, 0xbe, 0xef, 0xbd, + 0x37, 0x2f, 0x78, 0xc8, 0x53, 0x6b, 0xa1, 0xaf, 0x1c, 0x87, 0x05, 0xc2, 0xdf, 0x90, 0x0d, 0xc1, + 0xd6, 0xdb, 0xc2, 0xdf, 0xa4, 0x9e, 0xaf, 0x42, 0x45, 0xae, 0xc7, 0xa7, 0x14, 0x4e, 0x2b, 0x37, + 0x78, 0x4b, 0xba, 0x8a, 0xe9, 0xdf, 0x08, 0x54, 0x19, 0xb0, 0x95, 0xad, 0xf4, 0x23, 0xeb, 0x3e, + 0xc1, 0xdb, 0x21, 0x5b, 0x29, 0xdb, 0x11, 0x8c, 0x7b, 0x92, 0x71, 0xd7, 0x55, 0x21, 0x0f, 0xa5, + 0x72, 0x03, 0x38, 0x1d, 0x6f, 0xa8, 0xa0, 0xa5, 0x02, 0x56, 0xe7, 0x01, 0x30, 0xb2, 0x8d, 0xc9, + 0xba, 0x08, 0xf9, 0x24, 0xf3, 0xb8, 0x2d, 0x5d, 0x0d, 0x06, 0xec, 0x9d, 0x84, 0x44, 0x8f, 0xfb, + 0xbc, 0x15, 0x24, 0x8f, 0x57, 0xb9, 0x2f, 0x9a, 0x31, 0x0a, 0x8e, 0x69, 0x22, 0xda, 0x17, 0x0e, + 0xdf, 0x5c, 0x6e, 0x49, 0x57, 0xba, 0xf6, 0x72, 0x53, 0xae, 0xac, 0xc8, 0x46, 0xdb, 0x09, 0xc1, + 0xb2, 0x39, 0x80, 0xc9, 0xab, 0xae, 0x9e, 0x45, 0xcd, 0x61, 0x89, 0xf5, 0xb6, 0x08, 0x42, 0xd3, + 0xc2, 0x37, 0x4f, 0xbd, 0x0d, 0x3c, 0xe5, 0x06, 0x82, 0x3c, 0xc6, 0xa5, 0x48, 0x4b, 0x19, 0xdd, + 0x43, 0xd5, 0xfe, 0xa9, 0x32, 0xfd, 0xb7, 0x60, 0x34, 0x8a, 0xa8, 0xf5, 0xed, 0xfe, 0xba, 0x5b, + 0xf8, 0xf2, 0xe7, 0xeb, 0x38, 0xb2, 0x20, 0xc4, 0xac, 0xe2, 0x5b, 0x3a, 0xe7, 0x82, 0x08, 0x97, + 0x22, 0x30, 0xb0, 0x91, 0x6b, 0xb8, 0x28, 0x9b, 0x3a, 0x65, 0x9f, 0x55, 0x94, 0x4d, 0x73, 0x09, + 0xdf, 0x4e, 0x20, 0x41, 0xc1, 0x2c, 0xee, 0x05, 0xa6, 0x14, 0x09, 0xba, 0x1e, 0x14, 0x42, 0x6a, + 0x57, 0xba, 0x12, 0xac, 0x18, 0x6e, 0x72, 0x48, 0x3a, 0xe7, 0x38, 0x80, 0x88, 0xdd, 0x92, 0xa7, + 0x18, 0x1f, 0x77, 0x01, 0xf2, 0x8e, 0xd2, 0xa8, 0x65, 0xb4, 0xdb, 0x32, 0x1a, 0x0d, 0x09, 0xb4, + 0x8c, 0x2e, 0x72, 0x3b, 0xd6, 0x6e, 0x9d, 0x88, 0x34, 0x3f, 0x23, 0x5c, 0x4e, 0x72, 0xa4, 0x29, + 0xef, 0xb9, 0x80, 0x72, 0xb2, 0x70, 0x4a, 0x5e, 0x51, 0xcb, 0x1b, 0xcb, 0x95, 0x17, 0xd1, 0x9e, + 0xd2, 0x37, 0x8f, 0x87, 0xe3, 0xba, 0x5a, 0xdd, 0xa1, 0x78, 0xa1, 0x67, 0x62, 0xfe, 0x68, 0x24, + 0xe2, 0x7a, 0x0c, 0xe1, 0x3e, 0xe0, 0x7e, 0x16, 0xb7, 0xe5, 0xf8, 0x85, 0xf9, 0x01, 0xe1, 0x91, + 0x9c, 0x34, 0x60, 0xb9, 0x81, 0x07, 0xfd, 0x34, 0x00, 0x94, 0x78, 0x2c, 0x39, 0x3d, 0xa9, 0xf9, + 0xa0, 0x1e, 0xe9, 0xb9, 0x4c, 0x17, 0x4c, 0xcd, 0x39, 0xce, 0x99, 0xa6, 0x2e, 0xab, 0xc9, 0x3f, + 0x63, 0xfb, 0xd9, 0x84, 0xf9, 0xf6, 0x7b, 0x2e, 0xcb, 0xfe, 0xa5, 0x0d, 0xc7, 0xd4, 0x41, 0x09, + 0x5f, 0xd5, 0xbe, 0xc8, 0x7b, 0x84, 0x4b, 0xd1, 0x35, 0x26, 0xc3, 0x49, 0x8d, 0xc9, 0x6d, 0x51, + 0x19, 0xc9, 0x41, 0x45, 0x6c, 0xe6, 0xc4, 0xbb, 0xef, 0xbf, 0x77, 0x8a, 0x63, 0x64, 0x84, 0x75, + 0xe1, 0x13, 0xae, 0x08, 0xdf, 0x28, 0x7f, 0x8d, 0x65, 0xac, 0x3b, 0xb2, 0x83, 0x70, 0x2f, 0xdc, + 0x08, 0x52, 0xcd, 0x60, 0x48, 0xec, 0x92, 0xca, 0xfd, 0x73, 0x20, 0x41, 0xcf, 0xb4, 0xd6, 0x33, + 0x41, 0x1e, 0xe4, 0xe8, 0x89, 0xff, 0xb7, 0x64, 0x73, 0x9b, 0x7c, 0x42, 0xb8, 0xff, 0xc4, 0xf5, + 0x26, 0x59, 0x7c, 0xc9, 0x35, 0x53, 0x19, 0x3f, 0x0f, 0x14, 0xb4, 0x51, 0xad, 0xad, 0x4a, 0x46, + 0xcf, 0xa7, 0x8d, 0xfc, 0x40, 0x78, 0x30, 0x75, 0x7a, 0xc8, 0x4c, 0x76, 0x41, 0xce, 0xba, 0x2f, + 0x95, 0x47, 0x17, 0x8e, 0x03, 0xe9, 0xcf, 0xb5, 0xf4, 0x79, 0x52, 0xcb, 0x91, 0x9e, 0xf1, 0x5d, + 0x62, 0x5b, 0x47, 0xab, 0x66, 0x9b, 0x7c, 0x43, 0xb8, 0x9c, 0xca, 0x36, 0xe7, 0x38, 0x99, 0xce, + 0x72, 0x36, 0x41, 0xa6, 0xb3, 0xbc, 0x0b, 0x6d, 0x3e, 0xd1, 0xce, 0x66, 0xc9, 0xcc, 0xff, 0x39, + 0xab, 0xbd, 0xdc, 0xed, 0x18, 0x68, 0xaf, 0x63, 0xa0, 0xfd, 0x8e, 0x81, 0x0e, 0x3a, 0x06, 0xfa, + 0x78, 0x68, 0x14, 0xf6, 0x0e, 0x8d, 0xc2, 0xfe, 0xa1, 0x51, 0x78, 0xfd, 0xd0, 0x96, 0xe1, 0x6a, + 0xbb, 0x4e, 0x1b, 0xaa, 0x95, 0x91, 0xff, 0xed, 0x11, 0x43, 0xb8, 0xe9, 0x89, 0xa0, 0x5e, 0xd2, + 0x9f, 0xf0, 0xe9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x93, 0xde, 0x52, 0x8d, 0xd5, 0x08, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Service items. + Service(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error) + AllServices(ctx context.Context, in *QueryAllServicesRequest, opts ...grpc.CallOption) (*QueryAllServicesResponse, error) + // Queries a list of RelayMiningDifficulty items. + RelayMiningDifficulty(ctx context.Context, in *QueryGetRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryGetRelayMiningDifficultyResponse, error) + RelayMiningDifficultyAll(ctx context.Context, in *QueryAllRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryAllRelayMiningDifficultyResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Service(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error) { + out := new(QueryGetServiceResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Query/Service", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllServices(ctx context.Context, in *QueryAllServicesRequest, opts ...grpc.CallOption) (*QueryAllServicesResponse, error) { + out := new(QueryAllServicesResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Query/AllServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RelayMiningDifficulty(ctx context.Context, in *QueryGetRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryGetRelayMiningDifficultyResponse, error) { + out := new(QueryGetRelayMiningDifficultyResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Query/RelayMiningDifficulty", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) RelayMiningDifficultyAll(ctx context.Context, in *QueryAllRelayMiningDifficultyRequest, opts ...grpc.CallOption) (*QueryAllRelayMiningDifficultyResponse, error) { + out := new(QueryAllRelayMiningDifficultyResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Query/RelayMiningDifficultyAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Service items. + Service(context.Context, *QueryGetServiceRequest) (*QueryGetServiceResponse, error) + AllServices(context.Context, *QueryAllServicesRequest) (*QueryAllServicesResponse, error) + // Queries a list of RelayMiningDifficulty items. + RelayMiningDifficulty(context.Context, *QueryGetRelayMiningDifficultyRequest) (*QueryGetRelayMiningDifficultyResponse, error) + RelayMiningDifficultyAll(context.Context, *QueryAllRelayMiningDifficultyRequest) (*QueryAllRelayMiningDifficultyResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryGetServiceRequest) (*QueryGetServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") +} +func (*UnimplementedQueryServer) AllServices(ctx context.Context, req *QueryAllServicesRequest) (*QueryAllServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllServices not implemented") +} +func (*UnimplementedQueryServer) RelayMiningDifficulty(ctx context.Context, req *QueryGetRelayMiningDifficultyRequest) (*QueryGetRelayMiningDifficultyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RelayMiningDifficulty not implemented") +} +func (*UnimplementedQueryServer) RelayMiningDifficultyAll(ctx context.Context, req *QueryAllRelayMiningDifficultyRequest) (*QueryAllRelayMiningDifficultyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RelayMiningDifficultyAll not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Service(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Query/Service", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Service(ctx, req.(*QueryGetServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Query/AllServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllServices(ctx, req.(*QueryAllServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RelayMiningDifficulty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetRelayMiningDifficultyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RelayMiningDifficulty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Query/RelayMiningDifficulty", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RelayMiningDifficulty(ctx, req.(*QueryGetRelayMiningDifficultyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RelayMiningDifficultyAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllRelayMiningDifficultyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RelayMiningDifficultyAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Query/RelayMiningDifficultyAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RelayMiningDifficultyAll(ctx, req.(*QueryAllRelayMiningDifficultyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.service.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Service", + Handler: _Query_Service_Handler, + }, + { + MethodName: "AllServices", + Handler: _Query_AllServices_Handler, + }, + { + MethodName: "RelayMiningDifficulty", + Handler: _Query_RelayMiningDifficulty_Handler, + }, + { + MethodName: "RelayMiningDifficultyAll", + Handler: _Query_RelayMiningDifficultyAll_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/service/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetServiceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetServiceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetServiceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetServiceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllServicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllServicesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllServicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllServicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllServicesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllServicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Service) > 0 { + for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Service[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryGetRelayMiningDifficultyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetRelayMiningDifficultyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetRelayMiningDifficultyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetRelayMiningDifficultyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetRelayMiningDifficultyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetRelayMiningDifficultyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.RelayMiningDifficulty.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllRelayMiningDifficultyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllRelayMiningDifficultyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllRelayMiningDifficultyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllRelayMiningDifficultyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllRelayMiningDifficultyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllRelayMiningDifficultyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.RelayMiningDifficulty) > 0 { + for iNdEx := len(m.RelayMiningDifficulty) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RelayMiningDifficulty[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetServiceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetServiceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Service.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllServicesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllServicesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Service) > 0 { + for _, e := range m.Service { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetRelayMiningDifficultyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetRelayMiningDifficultyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.RelayMiningDifficulty.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllRelayMiningDifficultyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllRelayMiningDifficultyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RelayMiningDifficulty) > 0 { + for _, e := range m.RelayMiningDifficulty { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetServiceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetServiceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllServicesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllServicesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllServicesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllServicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = append(m.Service, types.Service{}) + if err := m.Service[len(m.Service)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetRelayMiningDifficultyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetRelayMiningDifficultyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetRelayMiningDifficultyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetRelayMiningDifficultyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetRelayMiningDifficultyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetRelayMiningDifficultyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayMiningDifficulty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RelayMiningDifficulty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllRelayMiningDifficultyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllRelayMiningDifficultyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllRelayMiningDifficultyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllRelayMiningDifficultyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllRelayMiningDifficultyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllRelayMiningDifficultyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayMiningDifficulty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayMiningDifficulty = append(m.RelayMiningDifficulty, RelayMiningDifficulty{}) + if err := m.RelayMiningDifficulty[len(m.RelayMiningDifficulty)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/query.pb.gw.go b/x/service/types/query.pb.gw.go new file mode 100644 index 000000000..f39c1c38d --- /dev/null +++ b/x/service/types/query.pb.gw.go @@ -0,0 +1,521 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/service/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetServiceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetServiceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.Service(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllServices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllServicesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllServices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllServices_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllServicesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllServices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllServices(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_RelayMiningDifficulty_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetRelayMiningDifficultyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["serviceId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serviceId") + } + + protoReq.ServiceId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serviceId", err) + } + + msg, err := client.RelayMiningDifficulty(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RelayMiningDifficulty_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetRelayMiningDifficultyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["serviceId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serviceId") + } + + protoReq.ServiceId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serviceId", err) + } + + msg, err := server.RelayMiningDifficulty(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_RelayMiningDifficultyAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_RelayMiningDifficultyAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllRelayMiningDifficultyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RelayMiningDifficultyAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RelayMiningDifficultyAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RelayMiningDifficultyAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllRelayMiningDifficultyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RelayMiningDifficultyAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RelayMiningDifficultyAll(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Service_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllServices_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RelayMiningDifficulty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RelayMiningDifficulty_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayMiningDifficulty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RelayMiningDifficultyAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RelayMiningDifficultyAll_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayMiningDifficultyAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Service_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllServices_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RelayMiningDifficulty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RelayMiningDifficulty_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayMiningDifficulty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RelayMiningDifficultyAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RelayMiningDifficultyAll_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayMiningDifficultyAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "service", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pokt-network", "poktroll", "service", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"pokt-network", "poktroll", "service"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RelayMiningDifficulty_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"pokt-network", "poktroll", "service", "relay_mining_difficulty", "serviceId"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RelayMiningDifficultyAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "service", "relay_mining_difficulty"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Service_0 = runtime.ForwardResponseMessage + + forward_Query_AllServices_0 = runtime.ForwardResponseMessage + + forward_Query_RelayMiningDifficulty_0 = runtime.ForwardResponseMessage + + forward_Query_RelayMiningDifficultyAll_0 = runtime.ForwardResponseMessage +) diff --git a/x/service/types/relay.pb.go b/x/service/types/relay.pb.go new file mode 100644 index 000000000..9a1129ac5 --- /dev/null +++ b/x/service/types/relay.pb.go @@ -0,0 +1,1370 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/relay.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/session/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Relay contains both the RelayRequest (signed by the Application) and the RelayResponse (signed by the Supplier). +// The serialized tuple is inserted into the SMST leaves as values in the Claim/Proof lifecycle. +type Relay struct { + Req *RelayRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` + Res *RelayResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` +} + +func (m *Relay) Reset() { *m = Relay{} } +func (m *Relay) String() string { return proto.CompactTextString(m) } +func (*Relay) ProtoMessage() {} +func (*Relay) Descriptor() ([]byte, []int) { + return fileDescriptor_38cf3e40553b40a1, []int{0} +} +func (m *Relay) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Relay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Relay) XXX_Merge(src proto.Message) { + xxx_messageInfo_Relay.Merge(m, src) +} +func (m *Relay) XXX_Size() int { + return m.Size() +} +func (m *Relay) XXX_DiscardUnknown() { + xxx_messageInfo_Relay.DiscardUnknown(m) +} + +var xxx_messageInfo_Relay proto.InternalMessageInfo + +func (m *Relay) GetReq() *RelayRequest { + if m != nil { + return m.Req + } + return nil +} + +func (m *Relay) GetRes() *RelayResponse { + if m != nil { + return m.Res + } + return nil +} + +// RelayRequestMetadata contains the metadata for a RelayRequest. +type RelayRequestMetadata struct { + SessionHeader *types.SessionHeader `protobuf:"bytes,1,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + // The request signature is a serialized ring signature that may have been + // by either the application itself or one of the gateways that the + // application has delegated to. The signature is made using the ring of the + // application in both cases. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // TODO_MAINNET: make sure we're checking/verifying this address onchain (if needed). + // Relevant conversation: https://github.com/pokt-network/poktroll/pull/567#discussion_r1628722168 + // + // The supplier operator address the relay is sent to. It is being used on the + // RelayMiner to route to the correct supplier. + SupplierOperatorAddress string `protobuf:"bytes,3,opt,name=supplier_operator_address,json=supplierOperatorAddress,proto3" json:"supplier_operator_address,omitempty"` +} + +func (m *RelayRequestMetadata) Reset() { *m = RelayRequestMetadata{} } +func (m *RelayRequestMetadata) String() string { return proto.CompactTextString(m) } +func (*RelayRequestMetadata) ProtoMessage() {} +func (*RelayRequestMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_38cf3e40553b40a1, []int{1} +} +func (m *RelayRequestMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelayRequestMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RelayRequestMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayRequestMetadata.Merge(m, src) +} +func (m *RelayRequestMetadata) XXX_Size() int { + return m.Size() +} +func (m *RelayRequestMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_RelayRequestMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_RelayRequestMetadata proto.InternalMessageInfo + +func (m *RelayRequestMetadata) GetSessionHeader() *types.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *RelayRequestMetadata) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +func (m *RelayRequestMetadata) GetSupplierOperatorAddress() string { + if m != nil { + return m.SupplierOperatorAddress + } + return "" +} + +// RelayRequest holds the request details for a relay. +type RelayRequest struct { + Meta RelayRequestMetadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"` + // payload is the serialized payload for the request. + // The payload is passed directly to the service and as such can be any + // format that the service supports: JSON-RPC, REST, gRPC, etc. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *RelayRequest) Reset() { *m = RelayRequest{} } +func (m *RelayRequest) String() string { return proto.CompactTextString(m) } +func (*RelayRequest) ProtoMessage() {} +func (*RelayRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_38cf3e40553b40a1, []int{2} +} +func (m *RelayRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RelayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayRequest.Merge(m, src) +} +func (m *RelayRequest) XXX_Size() int { + return m.Size() +} +func (m *RelayRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RelayRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RelayRequest proto.InternalMessageInfo + +func (m *RelayRequest) GetMeta() RelayRequestMetadata { + if m != nil { + return m.Meta + } + return RelayRequestMetadata{} +} + +func (m *RelayRequest) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +// RelayResponse contains the response details for a RelayRequest. +type RelayResponse struct { + Meta RelayResponseMetadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"` + // payload is the serialized payload for the response. + // The payload is passed directly from the service and as such can be any + // format the service responds with: JSON-RPC, REST, gRPC, etc. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *RelayResponse) Reset() { *m = RelayResponse{} } +func (m *RelayResponse) String() string { return proto.CompactTextString(m) } +func (*RelayResponse) ProtoMessage() {} +func (*RelayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_38cf3e40553b40a1, []int{3} +} +func (m *RelayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RelayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayResponse.Merge(m, src) +} +func (m *RelayResponse) XXX_Size() int { + return m.Size() +} +func (m *RelayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RelayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RelayResponse proto.InternalMessageInfo + +func (m *RelayResponse) GetMeta() RelayResponseMetadata { + if m != nil { + return m.Meta + } + return RelayResponseMetadata{} +} + +func (m *RelayResponse) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +// RelayResponseMetadata contains the metadata for a RelayResponse. +type RelayResponseMetadata struct { + SessionHeader *types.SessionHeader `protobuf:"bytes,1,opt,name=session_header,json=sessionHeader,proto3" json:"session_header,omitempty"` + SupplierOperatorSignature []byte `protobuf:"bytes,2,opt,name=supplier_operator_signature,json=supplierOperatorSignature,proto3" json:"supplier_operator_signature,omitempty"` +} + +func (m *RelayResponseMetadata) Reset() { *m = RelayResponseMetadata{} } +func (m *RelayResponseMetadata) String() string { return proto.CompactTextString(m) } +func (*RelayResponseMetadata) ProtoMessage() {} +func (*RelayResponseMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_38cf3e40553b40a1, []int{4} +} +func (m *RelayResponseMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelayResponseMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RelayResponseMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayResponseMetadata.Merge(m, src) +} +func (m *RelayResponseMetadata) XXX_Size() int { + return m.Size() +} +func (m *RelayResponseMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_RelayResponseMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_RelayResponseMetadata proto.InternalMessageInfo + +func (m *RelayResponseMetadata) GetSessionHeader() *types.SessionHeader { + if m != nil { + return m.SessionHeader + } + return nil +} + +func (m *RelayResponseMetadata) GetSupplierOperatorSignature() []byte { + if m != nil { + return m.SupplierOperatorSignature + } + return nil +} + +func init() { + proto.RegisterType((*Relay)(nil), "poktroll.service.Relay") + proto.RegisterType((*RelayRequestMetadata)(nil), "poktroll.service.RelayRequestMetadata") + proto.RegisterType((*RelayRequest)(nil), "poktroll.service.RelayRequest") + proto.RegisterType((*RelayResponse)(nil), "poktroll.service.RelayResponse") + proto.RegisterType((*RelayResponseMetadata)(nil), "poktroll.service.RelayResponseMetadata") +} + +func init() { proto.RegisterFile("poktroll/service/relay.proto", fileDescriptor_38cf3e40553b40a1) } + +var fileDescriptor_38cf3e40553b40a1 = []byte{ + // 435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xf6, 0xd2, 0x02, 0xea, 0xd2, 0x22, 0xb4, 0x0a, 0xc2, 0x29, 0xd5, 0xb6, 0xf2, 0x01, 0x7a, + 0xa9, 0x5d, 0xe0, 0x8e, 0x68, 0x0e, 0x88, 0x0b, 0x20, 0x39, 0x9c, 0xb8, 0x58, 0x9b, 0x78, 0xe4, + 0x98, 0x38, 0xde, 0xcd, 0xee, 0x1a, 0xc8, 0x5b, 0xf0, 0x06, 0xbc, 0x04, 0x0f, 0x91, 0x63, 0x94, + 0x53, 0x4e, 0x08, 0x39, 0x2f, 0x82, 0xbc, 0x5e, 0x07, 0x27, 0xfc, 0x09, 0x89, 0x93, 0x3d, 0xf3, + 0xcd, 0xb7, 0xdf, 0xcc, 0x37, 0x1a, 0x7c, 0x22, 0xf8, 0x58, 0x4b, 0x9e, 0x65, 0x81, 0x02, 0xf9, + 0x3e, 0x1d, 0x42, 0x20, 0x21, 0x63, 0x33, 0x5f, 0x48, 0xae, 0x39, 0xb9, 0xd3, 0xa0, 0xbe, 0x45, + 0x8f, 0xbb, 0x43, 0xae, 0x26, 0x5c, 0x45, 0x06, 0x0f, 0xea, 0xa0, 0x2e, 0x3e, 0xee, 0x24, 0x3c, + 0xe1, 0x75, 0xbe, 0xfa, 0xb3, 0xd9, 0xb6, 0x80, 0x52, 0x29, 0xcf, 0x03, 0x3d, 0x13, 0x60, 0x39, + 0x5e, 0x86, 0xaf, 0x87, 0x95, 0x1e, 0xb9, 0xc4, 0x7b, 0x12, 0xa6, 0x2e, 0x3a, 0x43, 0xe7, 0xb7, + 0x1e, 0x53, 0x7f, 0x57, 0xd7, 0x37, 0x55, 0x21, 0x4c, 0x0b, 0x50, 0x3a, 0xac, 0x4a, 0xc9, 0xa3, + 0x8a, 0xa1, 0xdc, 0x6b, 0x86, 0x71, 0xfa, 0x5b, 0x86, 0x12, 0x3c, 0x57, 0x50, 0x51, 0x94, 0xb7, + 0x44, 0xb8, 0xd3, 0x7e, 0xe8, 0x25, 0x68, 0x16, 0x33, 0xcd, 0xc8, 0x73, 0x7c, 0xdb, 0x76, 0x17, + 0x8d, 0x80, 0xc5, 0x20, 0x6d, 0x23, 0x5b, 0xcf, 0x1a, 0xdc, 0xef, 0xd7, 0xdf, 0x17, 0xa6, 0x2c, + 0x3c, 0x52, 0xed, 0x90, 0x9c, 0xe0, 0x03, 0x95, 0x26, 0x39, 0xd3, 0x85, 0x04, 0xd3, 0xd9, 0x61, + 0xf8, 0x23, 0x41, 0xde, 0xe0, 0xae, 0x2a, 0x84, 0xc8, 0x52, 0x90, 0x11, 0x17, 0x20, 0x99, 0xe6, + 0x32, 0x62, 0x71, 0x2c, 0x41, 0x29, 0x77, 0xef, 0x0c, 0x9d, 0x1f, 0xf4, 0xdc, 0xe5, 0x97, 0x8b, + 0x8e, 0x75, 0xf5, 0xaa, 0x46, 0xfa, 0x5a, 0xa6, 0x79, 0x12, 0xde, 0x6b, 0xa8, 0xaf, 0x2d, 0xd3, + 0xc2, 0xde, 0x3b, 0x7c, 0xd8, 0x9e, 0x89, 0x3c, 0xc3, 0xfb, 0x13, 0xd0, 0xcc, 0x4e, 0xf0, 0xe0, + 0xcf, 0x56, 0x36, 0x0e, 0xf4, 0xf6, 0xe7, 0x5f, 0x4f, 0x9d, 0xd0, 0x30, 0x89, 0x8b, 0x6f, 0x0a, + 0x36, 0xcb, 0x38, 0x8b, 0xed, 0x0c, 0x4d, 0xe8, 0x65, 0xf8, 0x68, 0xcb, 0x56, 0x72, 0xb5, 0x25, + 0xf6, 0xf0, 0x2f, 0x5b, 0xf8, 0x47, 0xb5, 0xcf, 0x08, 0xdf, 0xfd, 0x25, 0xff, 0xbf, 0xed, 0xeb, + 0x29, 0xbe, 0xff, 0xf3, 0x46, 0x76, 0x37, 0xd8, 0xdd, 0x75, 0xbe, 0xdf, 0x14, 0xf4, 0x5e, 0xcd, + 0x4b, 0x8a, 0x16, 0x25, 0x45, 0xab, 0x92, 0xa2, 0x6f, 0x25, 0x45, 0x9f, 0xd6, 0xd4, 0x59, 0xac, + 0xa9, 0xb3, 0x5a, 0x53, 0xe7, 0xed, 0x65, 0x92, 0xea, 0x51, 0x31, 0xf0, 0x87, 0x7c, 0x12, 0x54, + 0x7d, 0x5d, 0xe4, 0xa0, 0x3f, 0x70, 0x39, 0x0e, 0x36, 0x27, 0xf1, 0x71, 0x73, 0x75, 0xe6, 0x28, + 0x06, 0x37, 0xcc, 0x55, 0x3c, 0xf9, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x43, 0xeb, 0x94, 0x5b, 0x96, + 0x03, 0x00, 0x00, +} + +func (m *Relay) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Relay) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Relay) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Req != nil { + { + size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RelayRequestMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelayRequestMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelayRequestMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplierOperatorAddress) > 0 { + i -= len(m.SupplierOperatorAddress) + copy(dAtA[i:], m.SupplierOperatorAddress) + i = encodeVarintRelay(dAtA, i, uint64(len(m.SupplierOperatorAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintRelay(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RelayRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelayRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintRelay(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RelayResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelayResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintRelay(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *RelayResponseMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelayResponseMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelayResponseMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplierOperatorSignature) > 0 { + i -= len(m.SupplierOperatorSignature) + copy(dAtA[i:], m.SupplierOperatorSignature) + i = encodeVarintRelay(dAtA, i, uint64(len(m.SupplierOperatorSignature))) + i-- + dAtA[i] = 0x12 + } + if m.SessionHeader != nil { + { + size, err := m.SessionHeader.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRelay(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRelay(dAtA []byte, offset int, v uint64) int { + offset -= sovRelay(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Relay) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Req != nil { + l = m.Req.Size() + n += 1 + l + sovRelay(uint64(l)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovRelay(uint64(l)) + } + return n +} + +func (m *RelayRequestMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovRelay(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovRelay(uint64(l)) + } + l = len(m.SupplierOperatorAddress) + if l > 0 { + n += 1 + l + sovRelay(uint64(l)) + } + return n +} + +func (m *RelayRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Meta.Size() + n += 1 + l + sovRelay(uint64(l)) + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovRelay(uint64(l)) + } + return n +} + +func (m *RelayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Meta.Size() + n += 1 + l + sovRelay(uint64(l)) + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovRelay(uint64(l)) + } + return n +} + +func (m *RelayResponseMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SessionHeader != nil { + l = m.SessionHeader.Size() + n += 1 + l + sovRelay(uint64(l)) + } + l = len(m.SupplierOperatorSignature) + if l > 0 { + n += 1 + l + sovRelay(uint64(l)) + } + return n +} + +func sovRelay(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRelay(x uint64) (n int) { + return sovRelay(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Relay) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Relay: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Relay: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Req == nil { + m.Req = &RelayRequest{} + } + if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &RelayResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelay(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelay + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelayRequestMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelayRequestMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelayRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelay(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelay + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelayRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelayRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelay(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelay + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelayResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelay(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelay + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelayResponseMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelayResponseMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelayResponseMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionHeader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SessionHeader == nil { + m.SessionHeader = &types.SessionHeader{} + } + if err := m.SessionHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelay + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRelay + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelay + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorSignature = append(m.SupplierOperatorSignature[:0], dAtA[iNdEx:postIndex]...) + if m.SupplierOperatorSignature == nil { + m.SupplierOperatorSignature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelay(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelay + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRelay(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelay + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelay + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelay + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRelay + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRelay + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRelay + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRelay = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRelay = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRelay = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/relay_mining_difficulty.pb.go b/x/service/types/relay_mining_difficulty.pb.go new file mode 100644 index 000000000..988d3ad48 --- /dev/null +++ b/x/service/types/relay_mining_difficulty.pb.go @@ -0,0 +1,456 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/relay_mining_difficulty.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// RelayMiningDifficulty is a message used to store the onchain Relay Mining +// difficulty associated with a specific service ID. +// TODO_TECHDEBT: Embed this message in the Service message. +type RelayMiningDifficulty struct { + // The service ID the relay mining difficulty is associated with. + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + // The block height at which this relay mining difficulty was computed. + // This is needed to determine how much time has passed since the last time + // the exponential moving average was computed. + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + // The exponential moving average of the number of relays for this service. + NumRelaysEma uint64 `protobuf:"varint,3,opt,name=num_relays_ema,json=numRelaysEma,proto3" json:"num_relays_ema,omitempty"` + // The target hash determining the difficulty to mine relays for this service. + // For example, if we use sha256 to hash the (RelayRequest,ReqlayResponse) tuple, + // and the difficulty has 4 leading zero bits, then the target hash would be: + // 0b0000111... (until 32 bytes are filled up). + TargetHash []byte `protobuf:"bytes,4,opt,name=target_hash,json=targetHash,proto3" json:"target_hash,omitempty"` +} + +func (m *RelayMiningDifficulty) Reset() { *m = RelayMiningDifficulty{} } +func (m *RelayMiningDifficulty) String() string { return proto.CompactTextString(m) } +func (*RelayMiningDifficulty) ProtoMessage() {} +func (*RelayMiningDifficulty) Descriptor() ([]byte, []int) { + return fileDescriptor_a9633b1df92612ec, []int{0} +} +func (m *RelayMiningDifficulty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelayMiningDifficulty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *RelayMiningDifficulty) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelayMiningDifficulty.Merge(m, src) +} +func (m *RelayMiningDifficulty) XXX_Size() int { + return m.Size() +} +func (m *RelayMiningDifficulty) XXX_DiscardUnknown() { + xxx_messageInfo_RelayMiningDifficulty.DiscardUnknown(m) +} + +var xxx_messageInfo_RelayMiningDifficulty proto.InternalMessageInfo + +func (m *RelayMiningDifficulty) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *RelayMiningDifficulty) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *RelayMiningDifficulty) GetNumRelaysEma() uint64 { + if m != nil { + return m.NumRelaysEma + } + return 0 +} + +func (m *RelayMiningDifficulty) GetTargetHash() []byte { + if m != nil { + return m.TargetHash + } + return nil +} + +func init() { + proto.RegisterType((*RelayMiningDifficulty)(nil), "poktroll.service.RelayMiningDifficulty") +} + +func init() { + proto.RegisterFile("poktroll/service/relay_mining_difficulty.proto", fileDescriptor_a9633b1df92612ec) +} + +var fileDescriptor_a9633b1df92612ec = []byte{ + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xc1, 0x4a, 0xf4, 0x30, + 0x14, 0x85, 0x27, 0xff, 0x0c, 0x3f, 0x4c, 0x66, 0x10, 0x29, 0x0a, 0x45, 0x30, 0x56, 0x71, 0xd1, + 0x8d, 0xad, 0xe0, 0x1b, 0x88, 0xc2, 0xb8, 0xd0, 0x45, 0x97, 0x6e, 0x42, 0xda, 0x66, 0x92, 0xd0, + 0xa6, 0x29, 0x49, 0xaa, 0xf6, 0x2d, 0x7c, 0x04, 0x1f, 0xc7, 0xe5, 0x2c, 0x67, 0x29, 0xed, 0x8b, + 0x48, 0x33, 0xb5, 0xbb, 0xf0, 0xe5, 0xdc, 0x73, 0xef, 0x39, 0x30, 0xaa, 0x55, 0x61, 0xb5, 0x2a, + 0xcb, 0xd8, 0x50, 0xfd, 0x26, 0x32, 0x1a, 0x6b, 0x5a, 0x92, 0x16, 0x4b, 0x51, 0x89, 0x8a, 0xe1, + 0x5c, 0x6c, 0xb7, 0x22, 0x6b, 0x4a, 0xdb, 0x46, 0xb5, 0x56, 0x56, 0x79, 0xc7, 0x7f, 0xfa, 0x68, + 0xd4, 0x9f, 0x9d, 0x30, 0xc5, 0x94, 0xfb, 0x8c, 0x87, 0xd7, 0x41, 0x77, 0xf5, 0x05, 0xe0, 0x69, + 0x32, 0x38, 0x3d, 0x3b, 0xa3, 0x87, 0xc9, 0xc7, 0x3b, 0x87, 0x70, 0x1c, 0xc5, 0x22, 0xf7, 0x41, + 0x00, 0xc2, 0x65, 0xb2, 0x1c, 0xc9, 0x53, 0xee, 0x5d, 0xc2, 0x75, 0x5a, 0xaa, 0xac, 0xc0, 0x9c, + 0x0a, 0xc6, 0xad, 0xff, 0x2f, 0x00, 0xe1, 0x3c, 0x59, 0x39, 0xb6, 0x71, 0xc8, 0xbb, 0x86, 0x47, + 0x55, 0x23, 0xb1, 0x3b, 0xd4, 0x60, 0x2a, 0x89, 0x3f, 0x0f, 0x40, 0xb8, 0x48, 0xd6, 0x55, 0x23, + 0xdd, 0x4e, 0xf3, 0x28, 0x89, 0x77, 0x01, 0x57, 0x96, 0x68, 0x46, 0x2d, 0xe6, 0xc4, 0x70, 0x7f, + 0x11, 0x80, 0x70, 0x9d, 0xc0, 0x03, 0xda, 0x10, 0xc3, 0xef, 0x5f, 0xbe, 0x3b, 0x04, 0x76, 0x1d, + 0x02, 0xfb, 0x0e, 0x81, 0x9f, 0x0e, 0x81, 0xcf, 0x1e, 0xcd, 0x76, 0x3d, 0x9a, 0xed, 0x7b, 0x34, + 0x7b, 0xbd, 0x65, 0xc2, 0xf2, 0x26, 0x8d, 0x32, 0x25, 0xe3, 0x21, 0xf3, 0x4d, 0x45, 0xed, 0xbb, + 0xd2, 0x45, 0x3c, 0x15, 0xf6, 0x31, 0x55, 0x66, 0xdb, 0x9a, 0x9a, 0xf4, 0xbf, 0x4b, 0x7e, 0xf7, + 0x1b, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x5c, 0x12, 0x62, 0x53, 0x01, 0x00, 0x00, +} + +func (m *RelayMiningDifficulty) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelayMiningDifficulty) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelayMiningDifficulty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TargetHash) > 0 { + i -= len(m.TargetHash) + copy(dAtA[i:], m.TargetHash) + i = encodeVarintRelayMiningDifficulty(dAtA, i, uint64(len(m.TargetHash))) + i-- + dAtA[i] = 0x22 + } + if m.NumRelaysEma != 0 { + i = encodeVarintRelayMiningDifficulty(dAtA, i, uint64(m.NumRelaysEma)) + i-- + dAtA[i] = 0x18 + } + if m.BlockHeight != 0 { + i = encodeVarintRelayMiningDifficulty(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintRelayMiningDifficulty(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRelayMiningDifficulty(dAtA []byte, offset int, v uint64) int { + offset -= sovRelayMiningDifficulty(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *RelayMiningDifficulty) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovRelayMiningDifficulty(uint64(l)) + } + if m.BlockHeight != 0 { + n += 1 + sovRelayMiningDifficulty(uint64(m.BlockHeight)) + } + if m.NumRelaysEma != 0 { + n += 1 + sovRelayMiningDifficulty(uint64(m.NumRelaysEma)) + } + l = len(m.TargetHash) + if l > 0 { + n += 1 + l + sovRelayMiningDifficulty(uint64(l)) + } + return n +} + +func sovRelayMiningDifficulty(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRelayMiningDifficulty(x uint64) (n int) { + return sovRelayMiningDifficulty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RelayMiningDifficulty) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelayMiningDifficulty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelayMiningDifficulty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRelayMiningDifficulty + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRelayMiningDifficulty + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelaysEma", wireType) + } + m.NumRelaysEma = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelaysEma |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRelayMiningDifficulty + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthRelayMiningDifficulty + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetHash = append(m.TargetHash[:0], dAtA[iNdEx:postIndex]...) + if m.TargetHash == nil { + m.TargetHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRelayMiningDifficulty(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRelayMiningDifficulty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRelayMiningDifficulty(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRelayMiningDifficulty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRelayMiningDifficulty + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRelayMiningDifficulty + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRelayMiningDifficulty + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRelayMiningDifficulty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRelayMiningDifficulty = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRelayMiningDifficulty = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/service/types/tx.pb.go b/x/service/types/tx.pb.go new file mode 100644 index 000000000..5d7dd88e7 --- /dev/null +++ b/x/service/types/tx.pb.go @@ -0,0 +1,1645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/service/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/pokt-network/poktroll/x/shared/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/service parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // The (name, as_type) tuple must match the corresponding name and type as + // specified in the `Params` message in `proof/params.proto.` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // *MsgUpdateParam_AsCoin + // *MsgUpdateParam_AsUint64 + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{2} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin"` +} +type MsgUpdateParam_AsUint64 struct { + AsUint64 uint64 `protobuf:"varint,4,opt,name=as_uint64,json=asUint64,proto3,oneof" json:"as_uint64"` +} + +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsUint64) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +func (m *MsgUpdateParam) GetAsUint64() uint64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsUint64); ok { + return x.AsUint64 + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsCoin)(nil), + (*MsgUpdateParam_AsUint64)(nil), + } +} + +// MsgUpdateParamResponse defines the response structure for executing a +// MsgUpdateParam message after a single param update. +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{3} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +// MsgAddService defines a message for adding a new message to the network. +// Services can be added by any actor in the network making them truly +// permissionless. +type MsgAddService struct { + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + Service types1.Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service"` +} + +func (m *MsgAddService) Reset() { *m = MsgAddService{} } +func (m *MsgAddService) String() string { return proto.CompactTextString(m) } +func (*MsgAddService) ProtoMessage() {} +func (*MsgAddService) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{4} +} +func (m *MsgAddService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgAddService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddService.Merge(m, src) +} +func (m *MsgAddService) XXX_Size() int { + return m.Size() +} +func (m *MsgAddService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddService.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddService proto.InternalMessageInfo + +func (m *MsgAddService) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgAddService) GetService() types1.Service { + if m != nil { + return m.Service + } + return types1.Service{} +} + +type MsgAddServiceResponse struct { + Service *types1.Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` +} + +func (m *MsgAddServiceResponse) Reset() { *m = MsgAddServiceResponse{} } +func (m *MsgAddServiceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddServiceResponse) ProtoMessage() {} +func (*MsgAddServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_31ba9559706e649e, []int{5} +} +func (m *MsgAddServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgAddServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddServiceResponse.Merge(m, src) +} +func (m *MsgAddServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddServiceResponse proto.InternalMessageInfo + +func (m *MsgAddServiceResponse) GetService() *types1.Service { + if m != nil { + return m.Service + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.service.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.service.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.service.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.service.MsgUpdateParamResponse") + proto.RegisterType((*MsgAddService)(nil), "poktroll.service.MsgAddService") + proto.RegisterType((*MsgAddServiceResponse)(nil), "poktroll.service.MsgAddServiceResponse") +} + +func init() { proto.RegisterFile("poktroll/service/tx.proto", fileDescriptor_31ba9559706e649e) } + +var fileDescriptor_31ba9559706e649e = []byte{ + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, + 0x18, 0xf6, 0xb5, 0xf9, 0xb5, 0x3f, 0x5f, 0xff, 0x00, 0x56, 0xa1, 0x8e, 0x25, 0x9c, 0xe0, 0x85, + 0x50, 0x51, 0xbb, 0x2d, 0x50, 0xa1, 0x22, 0x86, 0x9a, 0xa5, 0x02, 0x05, 0x21, 0x57, 0x45, 0x02, + 0x21, 0x45, 0x97, 0xf8, 0xe4, 0x58, 0xad, 0x7d, 0x96, 0xef, 0x92, 0xb6, 0x1b, 0x62, 0x64, 0xe2, + 0x03, 0xc0, 0xce, 0x98, 0x81, 0x95, 0xbd, 0x63, 0xc5, 0xd4, 0x29, 0x42, 0xc9, 0x10, 0xd4, 0x4f, + 0x81, 0x6c, 0x9f, 0x9d, 0x3a, 0x89, 0x1a, 0x89, 0x25, 0xb9, 0x7b, 0x9f, 0xe7, 0x7d, 0x9f, 0xf7, + 0xdf, 0x19, 0x16, 0x03, 0x72, 0xc8, 0x42, 0x72, 0x74, 0x64, 0x50, 0x1c, 0xb6, 0xdd, 0x06, 0x36, + 0xd8, 0x89, 0x1e, 0x84, 0x84, 0x11, 0xe9, 0x66, 0x0a, 0xe9, 0x1c, 0x52, 0x6e, 0x21, 0xcf, 0xf5, + 0x89, 0x11, 0xff, 0x26, 0x24, 0x45, 0x6d, 0x10, 0xea, 0x11, 0x6a, 0xd4, 0x11, 0xc5, 0x46, 0x7b, + 0xb3, 0x8e, 0x19, 0xda, 0x34, 0x1a, 0xc4, 0xf5, 0x39, 0xbe, 0xca, 0x71, 0x8f, 0x3a, 0x46, 0x7b, + 0x33, 0xfa, 0xe3, 0x40, 0x31, 0x01, 0x6a, 0xf1, 0xcd, 0x48, 0x2e, 0x1c, 0x5a, 0x71, 0x88, 0x43, + 0x12, 0x7b, 0x74, 0xe2, 0xd6, 0xbb, 0x63, 0x99, 0x06, 0x28, 0x44, 0x1e, 0x1d, 0x87, 0x9b, 0x28, + 0xc4, 0x76, 0xca, 0x4a, 0x60, 0xed, 0x27, 0x80, 0x37, 0xaa, 0xd4, 0x39, 0x08, 0x6c, 0xc4, 0xf0, + 0x9b, 0xd8, 0x51, 0xda, 0x86, 0x22, 0x6a, 0xb1, 0x26, 0x09, 0x5d, 0x76, 0x2a, 0x83, 0x32, 0xa8, + 0x88, 0xa6, 0xfc, 0xeb, 0xc7, 0xfa, 0x0a, 0x4f, 0x66, 0xd7, 0xb6, 0x43, 0x4c, 0xe9, 0x3e, 0x0b, + 0x5d, 0xdf, 0xb1, 0x86, 0x54, 0xe9, 0x19, 0x9c, 0x4b, 0xa4, 0xe5, 0x99, 0x32, 0xa8, 0x2c, 0x6c, + 0xc9, 0xfa, 0x68, 0xa7, 0xf4, 0x44, 0xc1, 0x14, 0xcf, 0xba, 0x25, 0xe1, 0xfb, 0xa0, 0xb3, 0x06, + 0x2c, 0xee, 0xb2, 0xf3, 0xe4, 0xd3, 0xa0, 0xb3, 0x36, 0x0c, 0xf6, 0x79, 0xd0, 0x59, 0xd3, 0xb2, + 0xd4, 0x4f, 0xb2, 0xda, 0x46, 0x72, 0xd5, 0x8a, 0x70, 0x75, 0xc4, 0x64, 0x61, 0x1a, 0x10, 0x9f, + 0x62, 0xed, 0x0f, 0x80, 0xcb, 0x79, 0xec, 0x9f, 0x2b, 0x93, 0x60, 0xc1, 0x47, 0x1e, 0x8e, 0xeb, + 0x12, 0xad, 0xf8, 0x2c, 0xed, 0xc2, 0x79, 0x44, 0x6b, 0xd1, 0x48, 0xe5, 0xd9, 0xb8, 0xdc, 0xa2, + 0xce, 0xc3, 0x44, 0x33, 0xd7, 0xf9, 0xcc, 0xf5, 0x17, 0xc4, 0xf5, 0xcd, 0x85, 0xcb, 0x6e, 0x29, + 0x65, 0xef, 0x09, 0xd6, 0x1c, 0xa2, 0x91, 0x59, 0x7a, 0x08, 0x45, 0x44, 0x6b, 0x2d, 0xd7, 0x67, + 0xdb, 0x8f, 0xe5, 0x42, 0x19, 0x54, 0x0a, 0xe6, 0xd2, 0x65, 0xb7, 0x34, 0x34, 0xee, 0x09, 0xd6, + 0xff, 0x88, 0x1e, 0xc4, 0xe7, 0x9d, 0xe5, 0x7c, 0x87, 0x4c, 0x31, 0x4e, 0x80, 0x9d, 0x06, 0x58, + 0x7b, 0x09, 0xef, 0xe4, 0x2b, 0x4d, 0x9b, 0x20, 0x6d, 0x64, 0x33, 0x01, 0xd7, 0xcf, 0x24, 0x1d, + 0x84, 0xf6, 0x15, 0xc0, 0xa5, 0x2a, 0x75, 0x76, 0x6d, 0x7b, 0x3f, 0x21, 0x48, 0xcf, 0xe1, 0x12, + 0x39, 0xf6, 0x71, 0x58, 0x43, 0x49, 0x7f, 0xa6, 0x76, 0x6e, 0x31, 0xa6, 0x73, 0x9b, 0xf4, 0x14, + 0xce, 0x73, 0xa9, 0x09, 0x7b, 0x11, 0xef, 0xa4, 0xce, 0x95, 0xcc, 0x42, 0xb4, 0x17, 0x56, 0x4a, + 0xdf, 0x91, 0xa2, 0x8a, 0xf3, 0xda, 0xda, 0x2b, 0x78, 0x3b, 0x97, 0x5d, 0x56, 0xe9, 0xd6, 0x50, + 0x06, 0x5c, 0x2f, 0x93, 0x09, 0x6c, 0x7d, 0x9b, 0x81, 0xb3, 0x55, 0xea, 0x48, 0x1f, 0xe0, 0x62, + 0xee, 0x05, 0xdc, 0x1b, 0xef, 0xd2, 0xc8, 0x96, 0x29, 0x0f, 0xa6, 0x52, 0xb2, 0xcc, 0xde, 0xc1, + 0x85, 0xab, 0x4b, 0x58, 0x9e, 0xe6, 0xa9, 0x54, 0xa6, 0x31, 0xb2, 0xd0, 0x6f, 0x21, 0xbc, 0x32, + 0xa8, 0xd2, 0x44, 0xbf, 0x21, 0x41, 0xb9, 0x3f, 0x85, 0x90, 0xc6, 0x55, 0xfe, 0xfb, 0x18, 0x3d, + 0x4e, 0xf3, 0xf5, 0x59, 0x4f, 0x05, 0xe7, 0x3d, 0x15, 0x5c, 0xf4, 0x54, 0xf0, 0xbb, 0xa7, 0x82, + 0x2f, 0x7d, 0x55, 0x38, 0xef, 0xab, 0xc2, 0x45, 0x5f, 0x15, 0xde, 0x6f, 0x38, 0x2e, 0x6b, 0xb6, + 0xea, 0x7a, 0x83, 0x78, 0x46, 0x14, 0x77, 0xdd, 0xc7, 0xec, 0x98, 0x84, 0x87, 0xc6, 0x84, 0x77, + 0x1b, 0xad, 0x29, 0xad, 0xcf, 0xc5, 0x1f, 0x9d, 0x47, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd8, + 0x94, 0xfb, 0x9f, 0x5e, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) + AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error) { + out := new(MsgAddServiceResponse) + err := c.cc.Invoke(ctx, "/poktroll.service.Msg/AddService", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) + AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} +func (*UnimplementedMsgServer) AddService(ctx context.Context, req *MsgAddService) (*MsgAddServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddService) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.service.Msg/AddService", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddService(ctx, req.(*MsgAddService)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.service.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + { + MethodName: "AddService", + Handler: _Msg_AddService_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/service/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsUint64) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsUint64) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.AsUint64)) + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddService) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddService) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddService) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddServiceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddServiceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParam_AsUint64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.AsUint64)) + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddService) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Service.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgAddServiceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Service != nil { + l = m.Service.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsUint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsType = &MsgUpdateParam_AsUint64{v} + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddService) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Service == nil { + m.Service = &types1.Service{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/genesis.pb.go b/x/session/types/genesis.pb.go new file mode 100644 index 000000000..f874492b5 --- /dev/null +++ b/x/session/types/genesis.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/session/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the session module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_eb011c8651a70d0e, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.session.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/session/genesis.proto", fileDescriptor_eb011c8651a70d0e) } + +var fileDescriptor_eb011c8651a70d0e = []byte{ + // 217 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0xd3, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xeb, 0x41, + 0xe5, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x48, 0x7a, + 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0x31, 0x8c, 0x2e, 0x48, 0x2c, 0x4a, + 0xcc, 0x85, 0x9a, 0xac, 0xe4, 0xcd, 0xc5, 0xe3, 0x0e, 0xb1, 0x2a, 0xb8, 0x24, 0xb1, 0x24, 0x55, + 0xc8, 0x9a, 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa1, 0x87, 0x6e, + 0xb5, 0x5e, 0x00, 0x58, 0xde, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, 0x31, + 0x06, 0x41, 0xb5, 0x38, 0xf9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x8d, 0x47, + 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, + 0xc7, 0x72, 0x0c, 0x51, 0x06, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, + 0x20, 0x43, 0x75, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0xe1, 0x2e, 0xac, 0x80, 0xbb, + 0xb1, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x46, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x5b, 0x35, 0xaa, 0xf9, 0x1f, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/params.pb.go b/x/session/types/params.pb.go new file mode 100644 index 000000000..cdfc92480 --- /dev/null +++ b/x/session/types/params.pb.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/session/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // num_suppliers_per_session is the maximun number of suppliers per session + // (applicaiton:supplier pair for a given session number). + NumSuppliersPerSession uint64 `protobuf:"varint,3,opt,name=num_suppliers_per_session,json=numSuppliersPerSession,proto3" json:"num_suppliers_per_session" yaml:"num_suppliers_per_session"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_b9edf07916909b5b, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetNumSuppliersPerSession() uint64 { + if m != nil { + return m.NumSuppliersPerSession + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.session.Params") +} + +func init() { proto.RegisterFile("poktroll/session/params.proto", fileDescriptor_b9edf07916909b5b) } + +var fileDescriptor_b9edf07916909b5b = []byte{ + // 247 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0xd3, 0x2f, 0x48, 0x2c, + 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x49, 0xeb, 0x41, 0xa5, + 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x48, 0x7a, 0x7e, + 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x44, 0x95, 0x56, 0x31, 0x72, 0xb1, 0x05, 0x80, 0xcd, + 0x12, 0xaa, 0xe1, 0x92, 0xcc, 0x2b, 0xcd, 0x8d, 0x2f, 0x2e, 0x2d, 0x28, 0xc8, 0xc9, 0x4c, 0x2d, + 0x2a, 0x8e, 0x2f, 0x48, 0x2d, 0x8a, 0x87, 0x1a, 0x28, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0xe2, 0xe4, + 0xf8, 0xea, 0x9e, 0x3c, 0x6e, 0x45, 0x9f, 0xee, 0xc9, 0x2b, 0x54, 0x26, 0xe6, 0xe6, 0x58, 0x29, + 0xe1, 0x54, 0xa2, 0x14, 0x24, 0x96, 0x57, 0x9a, 0x1b, 0x0c, 0x93, 0x0a, 0x48, 0x2d, 0x0a, 0x86, + 0x48, 0x58, 0x29, 0xbd, 0x58, 0x20, 0xcf, 0xd8, 0xf5, 0x7c, 0x83, 0x96, 0x24, 0xdc, 0xaf, 0x15, + 0x70, 0xdf, 0x42, 0x5c, 0xe8, 0xe4, 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, + 0xea, 0x83, 0xcc, 0xd0, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0xc7, 0x62, 0x60, 0x49, + 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x0c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4e, + 0x15, 0x44, 0x75, 0x5f, 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NumSuppliersPerSession != that1.NumSuppliersPerSession { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumSuppliersPerSession != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.NumSuppliersPerSession)) + i-- + dAtA[i] = 0x18 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumSuppliersPerSession != 0 { + n += 1 + sovParams(uint64(m.NumSuppliersPerSession)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumSuppliersPerSession", wireType) + } + m.NumSuppliersPerSession = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumSuppliersPerSession |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/query.pb.go b/x/session/types/query.pb.go new file mode 100644 index 000000000..ca446e8de --- /dev/null +++ b/x/session/types/query.pb.go @@ -0,0 +1,1008 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/session/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/pokt-network/poktroll/x/shared/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d59d2e9c0a875c89, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d59d2e9c0a875c89, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetSessionRequest struct { + ApplicationAddress string `protobuf:"bytes,1,opt,name=application_address,json=applicationAddress,proto3" json:"application_address,omitempty"` + ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *QueryGetSessionRequest) Reset() { *m = QueryGetSessionRequest{} } +func (m *QueryGetSessionRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetSessionRequest) ProtoMessage() {} +func (*QueryGetSessionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d59d2e9c0a875c89, []int{2} +} +func (m *QueryGetSessionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetSessionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSessionRequest.Merge(m, src) +} +func (m *QueryGetSessionRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSessionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSessionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSessionRequest proto.InternalMessageInfo + +func (m *QueryGetSessionRequest) GetApplicationAddress() string { + if m != nil { + return m.ApplicationAddress + } + return "" +} + +func (m *QueryGetSessionRequest) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *QueryGetSessionRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +type QueryGetSessionResponse struct { + Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` +} + +func (m *QueryGetSessionResponse) Reset() { *m = QueryGetSessionResponse{} } +func (m *QueryGetSessionResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetSessionResponse) ProtoMessage() {} +func (*QueryGetSessionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d59d2e9c0a875c89, []int{3} +} +func (m *QueryGetSessionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetSessionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSessionResponse.Merge(m, src) +} +func (m *QueryGetSessionResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSessionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSessionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSessionResponse proto.InternalMessageInfo + +func (m *QueryGetSessionResponse) GetSession() *Session { + if m != nil { + return m.Session + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.session.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.session.QueryParamsResponse") + proto.RegisterType((*QueryGetSessionRequest)(nil), "poktroll.session.QueryGetSessionRequest") + proto.RegisterType((*QueryGetSessionResponse)(nil), "poktroll.session.QueryGetSessionResponse") +} + +func init() { proto.RegisterFile("poktroll/session/query.proto", fileDescriptor_d59d2e9c0a875c89) } + +var fileDescriptor_d59d2e9c0a875c89 = []byte{ + // 485 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xae, 0x3b, 0x51, 0x54, 0x8f, 0x03, 0x78, 0x15, 0x64, 0xd5, 0x16, 0x46, 0xc4, 0x44, 0x99, + 0x68, 0x8c, 0xba, 0x23, 0x27, 0x7a, 0x81, 0x5d, 0x26, 0xc8, 0x6e, 0x5c, 0x22, 0x37, 0xb1, 0x52, + 0xab, 0x69, 0x5e, 0x66, 0xbb, 0xc0, 0xae, 0x88, 0x1f, 0x80, 0x84, 0xf8, 0x09, 0x20, 0x8e, 0x1c, + 0xf8, 0x11, 0x3b, 0x4e, 0x70, 0xd9, 0x09, 0xa1, 0x16, 0x89, 0xbf, 0x81, 0x6a, 0xbb, 0x82, 0x11, + 0xaa, 0x72, 0x89, 0x9c, 0xf7, 0x7d, 0xdf, 0x7b, 0xdf, 0xfb, 0x6c, 0xbc, 0x55, 0xc2, 0x48, 0x4b, + 0xc8, 0x73, 0xaa, 0xb8, 0x52, 0x02, 0x0a, 0x7a, 0x3c, 0xe1, 0xf2, 0x24, 0x2c, 0x25, 0x68, 0x20, + 0x57, 0x17, 0x68, 0xe8, 0xd0, 0xf6, 0x35, 0x36, 0x16, 0x05, 0x50, 0xf3, 0xb5, 0xa4, 0x76, 0x2b, + 0x83, 0x0c, 0xcc, 0x91, 0xce, 0x4f, 0xae, 0xba, 0x95, 0x01, 0x64, 0x39, 0xa7, 0xac, 0x14, 0x94, + 0x15, 0x05, 0x68, 0xa6, 0x05, 0x14, 0xca, 0xa1, 0x9b, 0x09, 0xa8, 0x31, 0xa8, 0xd8, 0xca, 0xec, + 0x8f, 0x83, 0xb6, 0x2b, 0x8e, 0x4a, 0x26, 0xd9, 0x78, 0x01, 0x57, 0x0d, 0xeb, 0x93, 0x92, 0xff, + 0x43, 0x3c, 0x64, 0x92, 0xa7, 0x54, 0x71, 0xf9, 0x5c, 0x24, 0xdc, 0xc2, 0x41, 0x0b, 0x93, 0xa7, + 0xf3, 0xf5, 0x9e, 0x98, 0x8e, 0x11, 0x3f, 0x9e, 0x70, 0xa5, 0x83, 0x08, 0x6f, 0x5c, 0xa8, 0xaa, + 0x12, 0x0a, 0xc5, 0xc9, 0x03, 0xdc, 0xb0, 0x93, 0x3d, 0xb4, 0x83, 0x3a, 0xeb, 0x3d, 0x2f, 0xfc, + 0x3b, 0x8d, 0xd0, 0x2a, 0xfa, 0xcd, 0xd3, 0x6f, 0x37, 0x6b, 0x1f, 0x7f, 0x7e, 0xda, 0x43, 0x91, + 0x93, 0x04, 0xef, 0x11, 0xbe, 0x6e, 0x9a, 0x3e, 0xe2, 0xfa, 0xc8, 0xb2, 0xdd, 0x38, 0x72, 0x80, + 0x37, 0x58, 0x59, 0xe6, 0x22, 0x31, 0x89, 0xc4, 0x2c, 0x4d, 0x25, 0x57, 0x76, 0x48, 0xb3, 0xef, + 0x7d, 0xf9, 0xdc, 0x6d, 0xb9, 0x3c, 0x1e, 0x5a, 0xe4, 0x48, 0x4b, 0x51, 0x64, 0x11, 0xf9, 0x43, + 0xe4, 0x10, 0xb2, 0x8d, 0xb1, 0x5b, 0x30, 0x16, 0xa9, 0x57, 0x9f, 0x77, 0x88, 0x9a, 0xae, 0x72, + 0x90, 0x92, 0x5b, 0xf8, 0xca, 0x20, 0x87, 0x64, 0x14, 0x0f, 0xb9, 0xc8, 0x86, 0xda, 0x5b, 0xdb, + 0x41, 0x9d, 0xb5, 0x68, 0xdd, 0xd4, 0x1e, 0x9b, 0x52, 0x70, 0x88, 0x6f, 0x54, 0x6c, 0xba, 0xfd, + 0xf7, 0xf1, 0x65, 0xb7, 0xa7, 0x0b, 0x60, 0xb3, 0x1a, 0xc0, 0x42, 0xb3, 0x60, 0xf6, 0x3e, 0xd4, + 0xf1, 0x25, 0xd3, 0x90, 0xbc, 0x46, 0xb8, 0x61, 0xf3, 0x21, 0xb7, 0xab, 0xc2, 0xea, 0x35, 0xb4, + 0x77, 0x57, 0xb0, 0xac, 0xad, 0xa0, 0xfb, 0xea, 0xeb, 0x8f, 0xb7, 0xf5, 0x3b, 0x64, 0x97, 0xce, + 0xe9, 0xdd, 0x82, 0xeb, 0x17, 0x20, 0x47, 0x74, 0xc9, 0xab, 0x21, 0xef, 0x10, 0xc6, 0xbf, 0x97, + 0x23, 0x9d, 0x25, 0x43, 0x2a, 0xd7, 0xd4, 0xbe, 0xfb, 0x1f, 0x4c, 0x67, 0xa9, 0x67, 0x2c, 0xdd, + 0x23, 0x7b, 0x2b, 0x2c, 0x65, 0x5c, 0xc7, 0xee, 0xdc, 0x3f, 0x3c, 0x9d, 0xfa, 0xe8, 0x6c, 0xea, + 0xa3, 0xf3, 0xa9, 0x8f, 0xbe, 0x4f, 0x7d, 0xf4, 0x66, 0xe6, 0xd7, 0xce, 0x66, 0x7e, 0xed, 0x7c, + 0xe6, 0xd7, 0x9e, 0xdd, 0xcf, 0x84, 0x1e, 0x4e, 0x06, 0x61, 0x02, 0xe3, 0x25, 0x3d, 0x5f, 0x5e, + 0x7c, 0xff, 0x83, 0x86, 0x79, 0xe1, 0xfb, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x71, 0x8a, 0x02, + 0x58, 0xd1, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries the session given app_address, service and block_height. + GetSession(ctx context.Context, in *QueryGetSessionRequest, opts ...grpc.CallOption) (*QueryGetSessionResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.session.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) GetSession(ctx context.Context, in *QueryGetSessionRequest, opts ...grpc.CallOption) (*QueryGetSessionResponse, error) { + out := new(QueryGetSessionResponse) + err := c.cc.Invoke(ctx, "/poktroll.session.Query/GetSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries the session given app_address, service and block_height. + GetSession(context.Context, *QueryGetSessionRequest) (*QueryGetSessionResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) GetSession(ctx context.Context, req *QueryGetSessionRequest) (*QueryGetSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.session.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.session.Query/GetSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetSession(ctx, req.(*QueryGetSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.session.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "GetSession", + Handler: _Query_GetSession_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/session/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetSessionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSessionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSessionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApplicationAddress) > 0 { + i -= len(m.ApplicationAddress) + copy(dAtA[i:], m.ApplicationAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ApplicationAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetSessionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSessionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Session != nil { + { + size, err := m.Session.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetSessionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ApplicationAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockHeight != 0 { + n += 1 + sovQuery(uint64(m.BlockHeight)) + } + return n +} + +func (m *QueryGetSessionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Session != nil { + l = m.Session.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSessionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSessionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSessionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApplicationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSessionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSessionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSessionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Session", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Session == nil { + m.Session = &Session{} + } + if err := m.Session.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/query.pb.gw.go b/x/session/types/query.pb.gw.go new file mode 100644 index 000000000..235d1d10a --- /dev/null +++ b/x/session/types/query.pb.gw.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/session/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetSession_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetSession_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSessionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetSession_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSessionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetSession(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetSession_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "session", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "session", "get_session"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_GetSession_0 = runtime.ForwardResponseMessage +) diff --git a/x/session/types/tx.pb.go b/x/session/types/tx.pb.go new file mode 100644 index 000000000..e249c935a --- /dev/null +++ b/x/session/types/tx.pb.go @@ -0,0 +1,1114 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/session/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/session parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_0b53e8fbf6b46fb6, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0b53e8fbf6b46fb6, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // *MsgUpdateParam_AsUint64 + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_0b53e8fbf6b46fb6, []int{2} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsUint64 struct { + AsUint64 uint64 `protobuf:"varint,3,opt,name=as_uint64,json=asUint64,proto3,oneof" json:"as_uint64"` +} + +func (*MsgUpdateParam_AsUint64) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsUint64() uint64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsUint64); ok { + return x.AsUint64 + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsUint64)(nil), + } +} + +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0b53e8fbf6b46fb6, []int{3} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.session.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.session.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.session.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.session.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/session/tx.proto", fileDescriptor_0b53e8fbf6b46fb6) } + +var fileDescriptor_0b53e8fbf6b46fb6 = []byte{ + // 462 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0xd3, 0x2f, 0xa9, 0xd0, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x49, 0xe9, 0x41, 0xa5, 0xa4, 0x04, 0x13, 0x73, + 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x78, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0xb1, + 0x7e, 0x6e, 0x71, 0xba, 0x7e, 0x99, 0x21, 0x88, 0x82, 0x4a, 0x48, 0x42, 0x24, 0xe2, 0xc1, 0x3c, + 0x7d, 0x08, 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, 0xa2, 0xb2, + 0x18, 0x2e, 0x29, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x6a, 0x52, 0x3a, 0xce, 0xc8, 0xc5, 0xef, 0x5b, + 0x9c, 0x1e, 0x5a, 0x90, 0x92, 0x58, 0x92, 0x1a, 0x00, 0x96, 0x11, 0x32, 0xe3, 0xe2, 0x4c, 0x2c, + 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0x2c, 0xa9, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, + 0xb4, 0x45, 0x57, 0x04, 0x6a, 0x9b, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, 0x70, 0x49, 0x51, + 0x66, 0x5e, 0x7a, 0x10, 0x42, 0xa9, 0x90, 0x2b, 0x17, 0x1b, 0xc4, 0x6c, 0x09, 0x26, 0x05, 0x46, + 0x0d, 0x6e, 0x23, 0x09, 0x3d, 0x74, 0xaf, 0xea, 0x41, 0x6c, 0x70, 0x12, 0x3e, 0x71, 0x4f, 0x9e, + 0xe1, 0xd5, 0x3d, 0x79, 0xa8, 0xfa, 0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, 0x41, 0x39, 0x56, 0xa6, + 0x4d, 0xcf, 0x37, 0x68, 0x21, 0x8c, 0xed, 0x7a, 0xbe, 0x41, 0x4b, 0x09, 0xee, 0x89, 0x0a, 0xb8, + 0x37, 0xd0, 0x5c, 0xad, 0x24, 0xc9, 0x25, 0x8e, 0x26, 0x14, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, + 0x9c, 0xaa, 0xb4, 0x94, 0x91, 0x8b, 0x0f, 0x55, 0x8e, 0x6c, 0x3f, 0x0a, 0x71, 0xb1, 0xe4, 0x25, + 0xe6, 0xa6, 0x82, 0x7d, 0xc8, 0x19, 0x04, 0x66, 0x0b, 0xe9, 0x70, 0x71, 0x26, 0x16, 0xc7, 0x97, + 0x66, 0xe6, 0x95, 0x98, 0x99, 0x48, 0x30, 0x2b, 0x30, 0x6a, 0xb0, 0x38, 0xf1, 0xbe, 0xba, 0x27, + 0x8f, 0x10, 0xf4, 0x60, 0x08, 0xe2, 0x48, 0x2c, 0x0e, 0x05, 0xb3, 0xad, 0xf8, 0x50, 0xbd, 0xe7, + 0xc4, 0xc9, 0xc5, 0x9e, 0x58, 0x1c, 0x5f, 0x52, 0x59, 0x90, 0xaa, 0xe4, 0xc5, 0x25, 0x86, 0xea, + 0x4c, 0x98, 0x0f, 0x84, 0x0c, 0xe0, 0x41, 0xcb, 0x88, 0x3f, 0x68, 0x61, 0xa1, 0x68, 0x74, 0x94, + 0x91, 0x8b, 0xd9, 0xb7, 0x38, 0x5d, 0x28, 0x86, 0x8b, 0x07, 0x25, 0x72, 0x15, 0x31, 0x75, 0xa2, + 0x05, 0x9b, 0x94, 0x26, 0x41, 0x25, 0x70, 0x77, 0x45, 0x72, 0x71, 0x23, 0x87, 0xaa, 0x02, 0x21, + 0x9d, 0x52, 0x1a, 0x84, 0x54, 0xc0, 0x8c, 0x96, 0x62, 0x6d, 0x00, 0xa5, 0x0a, 0x27, 0xbf, 0x13, + 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, + 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20, 0x3d, + 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x64, 0xb0, 0x6e, 0x5e, 0x6a, 0x49, + 0x79, 0x7e, 0x51, 0xb6, 0x3e, 0x96, 0x04, 0x03, 0x0a, 0xe2, 0xe2, 0x24, 0x36, 0x70, 0xba, 0x37, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x34, 0x4c, 0x07, 0x59, 0xa2, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.session.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.session.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.session.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.session.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.session.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/session/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsUint64) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsUint64) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.AsUint64)) + i-- + dAtA[i] = 0x18 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsUint64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.AsUint64)) + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsUint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsType = &MsgUpdateParam_AsUint64{v} + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/types.pb.go b/x/session/types/types.pb.go new file mode 100644 index 000000000..43295f939 --- /dev/null +++ b/x/session/types/types.pb.go @@ -0,0 +1,933 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/session/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/application/types" + types1 "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// SessionHeader is a lightweight header for a session that can be passed around. +// It is the minimal amount of data required to hydrate & retrieve all data relevant to the session. +type SessionHeader struct { + ApplicationAddress string `protobuf:"bytes,1,opt,name=application_address,json=applicationAddress,proto3" json:"application_address,omitempty"` + ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + // NOTE: session_id can be derived from the above values using onchain but is included in the header for convenience + SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + SessionStartBlockHeight int64 `protobuf:"varint,4,opt,name=session_start_block_height,json=sessionStartBlockHeight,proto3" json:"session_start_block_height,omitempty"` + // Note that`session_end_block_height` is a derivative of (`start` + `num_blocks_per_session`) + // as goverened by onchain params at the time of the session start. + // It is stored as an additional field to simplofy business logic in case + // the number of blocks_per_session changes during the session. + SessionEndBlockHeight int64 `protobuf:"varint,5,opt,name=session_end_block_height,json=sessionEndBlockHeight,proto3" json:"session_end_block_height,omitempty"` +} + +func (m *SessionHeader) Reset() { *m = SessionHeader{} } +func (m *SessionHeader) String() string { return proto.CompactTextString(m) } +func (*SessionHeader) ProtoMessage() {} +func (*SessionHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_4b2d9db41a667008, []int{0} +} +func (m *SessionHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SessionHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SessionHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_SessionHeader.Merge(m, src) +} +func (m *SessionHeader) XXX_Size() int { + return m.Size() +} +func (m *SessionHeader) XXX_DiscardUnknown() { + xxx_messageInfo_SessionHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_SessionHeader proto.InternalMessageInfo + +func (m *SessionHeader) GetApplicationAddress() string { + if m != nil { + return m.ApplicationAddress + } + return "" +} + +func (m *SessionHeader) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *SessionHeader) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *SessionHeader) GetSessionStartBlockHeight() int64 { + if m != nil { + return m.SessionStartBlockHeight + } + return 0 +} + +func (m *SessionHeader) GetSessionEndBlockHeight() int64 { + if m != nil { + return m.SessionEndBlockHeight + } + return 0 +} + +// Session is a fully hydrated session object that contains all the information for the Session +// and its parcipants. +type Session struct { + Header *SessionHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + SessionNumber int64 `protobuf:"varint,3,opt,name=session_number,json=sessionNumber,proto3" json:"session_number,omitempty"` + NumBlocksPerSession int64 `protobuf:"varint,4,opt,name=num_blocks_per_session,json=numBlocksPerSession,proto3" json:"num_blocks_per_session,omitempty"` + Application *types.Application `protobuf:"bytes,5,opt,name=application,proto3" json:"application,omitempty"` + Suppliers []*types1.Supplier `protobuf:"bytes,6,rep,name=suppliers,proto3" json:"suppliers,omitempty"` +} + +func (m *Session) Reset() { *m = Session{} } +func (m *Session) String() string { return proto.CompactTextString(m) } +func (*Session) ProtoMessage() {} +func (*Session) Descriptor() ([]byte, []int) { + return fileDescriptor_4b2d9db41a667008, []int{1} +} +func (m *Session) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Session) XXX_Merge(src proto.Message) { + xxx_messageInfo_Session.Merge(m, src) +} +func (m *Session) XXX_Size() int { + return m.Size() +} +func (m *Session) XXX_DiscardUnknown() { + xxx_messageInfo_Session.DiscardUnknown(m) +} + +var xxx_messageInfo_Session proto.InternalMessageInfo + +func (m *Session) GetHeader() *SessionHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *Session) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *Session) GetSessionNumber() int64 { + if m != nil { + return m.SessionNumber + } + return 0 +} + +func (m *Session) GetNumBlocksPerSession() int64 { + if m != nil { + return m.NumBlocksPerSession + } + return 0 +} + +func (m *Session) GetApplication() *types.Application { + if m != nil { + return m.Application + } + return nil +} + +func (m *Session) GetSuppliers() []*types1.Supplier { + if m != nil { + return m.Suppliers + } + return nil +} + +func init() { + proto.RegisterType((*SessionHeader)(nil), "poktroll.session.SessionHeader") + proto.RegisterType((*Session)(nil), "poktroll.session.Session") +} + +func init() { proto.RegisterFile("poktroll/session/types.proto", fileDescriptor_4b2d9db41a667008) } + +var fileDescriptor_4b2d9db41a667008 = []byte{ + // 468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x93, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0x9b, 0x16, 0x8a, 0xea, 0x6a, 0x08, 0x79, 0x03, 0xb2, 0x8a, 0x99, 0x32, 0x09, 0xa9, + 0x97, 0x25, 0xa8, 0x3b, 0xf4, 0xc0, 0x69, 0x45, 0x48, 0xeb, 0x65, 0x42, 0xe9, 0x8d, 0x4b, 0x94, + 0xc4, 0x56, 0x12, 0x35, 0xb1, 0x23, 0xdb, 0xe1, 0xe5, 0x4b, 0x20, 0x3e, 0x0c, 0x37, 0xbe, 0x00, + 0xc7, 0x89, 0xd3, 0x8e, 0x28, 0xfd, 0x22, 0x28, 0xb6, 0xb3, 0xa4, 0xd9, 0xcd, 0x79, 0x7e, 0xff, + 0xe7, 0xe5, 0x6f, 0x3f, 0x01, 0xaf, 0x0a, 0xb6, 0x93, 0x9c, 0x65, 0x99, 0x2b, 0x88, 0x10, 0x29, + 0xa3, 0xae, 0xfc, 0x5e, 0x10, 0xe1, 0x14, 0x9c, 0x49, 0x06, 0x9f, 0x35, 0xd4, 0x31, 0x74, 0x76, + 0x1a, 0x31, 0x91, 0x33, 0xe1, 0x2b, 0xee, 0xea, 0x0f, 0x2d, 0x9e, 0x9d, 0xb5, 0xa5, 0x92, 0x80, + 0x13, 0xec, 0x0a, 0xc2, 0xbf, 0xa4, 0x11, 0x31, 0x78, 0x7e, 0x8f, 0x83, 0xa2, 0xc8, 0xd2, 0x28, + 0x90, 0xbd, 0x6e, 0x33, 0xf4, 0xa0, 0x40, 0x59, 0x2b, 0x09, 0x37, 0xfc, 0x24, 0x66, 0x31, 0xd3, + 0x8d, 0xeb, 0x93, 0x8e, 0x9e, 0xff, 0x18, 0x82, 0xa3, 0xad, 0x9e, 0xee, 0x9a, 0x04, 0x98, 0x70, + 0xb8, 0x01, 0xc7, 0x9d, 0x16, 0x7e, 0x80, 0x31, 0x27, 0x42, 0xd8, 0xd6, 0xdc, 0x5a, 0x4c, 0xd6, + 0xf6, 0xdf, 0x5f, 0x17, 0x27, 0x66, 0xee, 0x2b, 0x4d, 0xb6, 0x92, 0xa7, 0x34, 0xf6, 0x60, 0x27, + 0xc9, 0x10, 0x78, 0x06, 0x80, 0x71, 0xe1, 0xa7, 0xd8, 0x1e, 0xd6, 0x15, 0xbc, 0x89, 0x89, 0x6c, + 0xb0, 0xc6, 0xaa, 0x75, 0x8d, 0x47, 0x0d, 0x56, 0x91, 0x0d, 0x86, 0xef, 0xc1, 0xac, 0xc1, 0x42, + 0x06, 0x5c, 0xfa, 0x61, 0xc6, 0xa2, 0x9d, 0x9f, 0x90, 0x34, 0x4e, 0xa4, 0xfd, 0x68, 0x6e, 0x2d, + 0x46, 0xde, 0x4b, 0xa3, 0xd8, 0xd6, 0x82, 0x75, 0xcd, 0xaf, 0x15, 0x86, 0x2b, 0x60, 0x37, 0xc9, + 0x84, 0xe2, 0xc3, 0xd4, 0xc7, 0x2a, 0xf5, 0xb9, 0xe1, 0x1f, 0x29, 0xee, 0x24, 0x9e, 0xff, 0x1e, + 0x82, 0x27, 0xe6, 0x42, 0xe0, 0x0a, 0x8c, 0x13, 0x75, 0x29, 0xca, 0xfd, 0x74, 0xf9, 0xda, 0xe9, + 0xbf, 0xa8, 0x73, 0x70, 0x77, 0x9e, 0x91, 0xf7, 0x9c, 0x0d, 0xfb, 0xce, 0xde, 0x82, 0xa7, 0x0d, + 0xa6, 0x65, 0x1e, 0x12, 0xae, 0xcc, 0x8f, 0xbc, 0x23, 0x13, 0xbd, 0x51, 0x41, 0x78, 0x09, 0x5e, + 0xd0, 0x32, 0xd7, 0xb3, 0x0b, 0xbf, 0x20, 0xdc, 0x37, 0xdc, 0x98, 0x3f, 0xa6, 0x65, 0xae, 0x46, + 0x17, 0x9f, 0x08, 0x6f, 0x66, 0xfe, 0x00, 0xa6, 0x9d, 0x97, 0x50, 0x5e, 0xa7, 0xcb, 0x37, 0xed, + 0xe0, 0x1d, 0xe8, 0x5c, 0xb5, 0x67, 0xaf, 0x9b, 0x05, 0x57, 0x60, 0xd2, 0x6c, 0x8f, 0xb0, 0xc7, + 0xf3, 0xd1, 0x62, 0xba, 0x3c, 0xed, 0x78, 0x57, 0xfb, 0xe5, 0x6c, 0x8d, 0xc2, 0x6b, 0xb5, 0xeb, + 0x9b, 0x3f, 0x15, 0xb2, 0x6e, 0x2b, 0x64, 0xdd, 0x55, 0xc8, 0xfa, 0x57, 0x21, 0xeb, 0xe7, 0x1e, + 0x0d, 0x6e, 0xf7, 0x68, 0x70, 0xb7, 0x47, 0x83, 0xcf, 0xef, 0xe2, 0x54, 0x26, 0x65, 0xe8, 0x44, + 0x2c, 0x77, 0xeb, 0x6a, 0x17, 0x94, 0xc8, 0xaf, 0x8c, 0xef, 0xdc, 0xfb, 0xd5, 0xfd, 0x76, 0xf8, + 0x23, 0x85, 0x63, 0xb5, 0xa5, 0x97, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x3f, 0x27, 0x80, + 0x69, 0x03, 0x00, 0x00, +} + +func (m *SessionHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SessionHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SessionHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SessionEndBlockHeight)) + i-- + dAtA[i] = 0x28 + } + if m.SessionStartBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SessionStartBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(m.SessionId) > 0 { + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApplicationAddress) > 0 { + i -= len(m.ApplicationAddress) + copy(dAtA[i:], m.ApplicationAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ApplicationAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Session) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Session) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Session) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Suppliers) > 0 { + for iNdEx := len(m.Suppliers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Suppliers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.Application != nil { + { + size, err := m.Application.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.NumBlocksPerSession != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.NumBlocksPerSession)) + i-- + dAtA[i] = 0x20 + } + if m.SessionNumber != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SessionNumber)) + i-- + dAtA[i] = 0x18 + } + if len(m.SessionId) > 0 { + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0x12 + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SessionHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ApplicationAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionStartBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.SessionStartBlockHeight)) + } + if m.SessionEndBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.SessionEndBlockHeight)) + } + return n +} + +func (m *Session) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SessionNumber != 0 { + n += 1 + sovTypes(uint64(m.SessionNumber)) + } + if m.NumBlocksPerSession != 0 { + n += 1 + sovTypes(uint64(m.NumBlocksPerSession)) + } + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Suppliers) > 0 { + for _, e := range m.Suppliers { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SessionHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SessionHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SessionHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApplicationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionStartBlockHeight", wireType) + } + m.SessionStartBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionStartBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndBlockHeight", wireType) + } + m.SessionEndBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Session) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Session: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Session: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &SessionHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionNumber", wireType) + } + m.SessionNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumBlocksPerSession", wireType) + } + m.NumBlocksPerSession = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumBlocksPerSession |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Application == nil { + m.Application = &types.Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Suppliers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Suppliers = append(m.Suppliers, &types1.Supplier{}) + if err := m.Suppliers[len(m.Suppliers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/genesis.pb.go b/x/shared/types/genesis.pb.go new file mode 100644 index 000000000..7fdfa5ca8 --- /dev/null +++ b/x/shared/types/genesis.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the shared module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0004d2eefa4b15, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.shared.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/shared/genesis.proto", fileDescriptor_7a0004d2eefa4b15) } + +var fileDescriptor_7a0004d2eefa4b15 = []byte{ + // 216 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, + 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x49, 0xeb, 0x41, 0xa4, + 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x8d, 0x94, 0x48, 0x7a, 0x7e, + 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0xd0, 0x0d, 0x2e, 0x48, 0x2c, 0x4a, 0xcc, + 0x85, 0x9a, 0xab, 0xe4, 0xc5, 0xc5, 0xe3, 0x0e, 0xb1, 0x28, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, + 0x8a, 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xae, 0x87, 0x66, 0xb1, + 0x5e, 0x00, 0x58, 0xda, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, + 0x41, 0x75, 0x38, 0xf9, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x8d, 0x47, 0x72, + 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, + 0x72, 0x0c, 0x51, 0xfa, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x20, + 0x33, 0x75, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xf5, 0xe1, 0xee, 0xab, 0x80, 0xb9, 0xb0, + 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x42, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xb7, 0x4b, 0x51, 0xdd, 0x1a, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/params.pb.go b/x/shared/types/params.pb.go new file mode 100644 index 000000000..d4447f61f --- /dev/null +++ b/x/shared/types/params.pb.go @@ -0,0 +1,671 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // num_blocks_per_session is the number of blocks between the session start & end heights. + NumBlocksPerSession uint64 `protobuf:"varint,1,opt,name=num_blocks_per_session,json=numBlocksPerSession,proto3" json:"num_blocks_per_session"` + // grace_period_end_offset_blocks is the number of blocks, after the session end height, + // during which the supplier can still service payable relays. + // Suppliers will need to recreate a claim for the previous session (if already created) to + // get paid for the additional relays. + GracePeriodEndOffsetBlocks uint64 `protobuf:"varint,2,opt,name=grace_period_end_offset_blocks,json=gracePeriodEndOffsetBlocks,proto3" json:"grace_period_end_offset_blocks"` + // claim_window_open_offset_blocks is the number of blocks after the session grace + // period height, at which the claim window opens. + ClaimWindowOpenOffsetBlocks uint64 `protobuf:"varint,3,opt,name=claim_window_open_offset_blocks,json=claimWindowOpenOffsetBlocks,proto3" json:"claim_window_open_offset_blocks"` + // claim_window_close_offset_blocks is the number of blocks after the claim window + // open height, at which the claim window closes. + ClaimWindowCloseOffsetBlocks uint64 `protobuf:"varint,4,opt,name=claim_window_close_offset_blocks,json=claimWindowCloseOffsetBlocks,proto3" json:"claim_window_close_offset_blocks"` + // proof_window_open_offset_blocks is the number of blocks after the claim window + // close height, at which the proof window opens. + ProofWindowOpenOffsetBlocks uint64 `protobuf:"varint,5,opt,name=proof_window_open_offset_blocks,json=proofWindowOpenOffsetBlocks,proto3" json:"proof_window_open_offset_blocks"` + // proof_window_close_offset_blocks is the number of blocks after the proof window + // open height, at which the proof window closes. + ProofWindowCloseOffsetBlocks uint64 `protobuf:"varint,6,opt,name=proof_window_close_offset_blocks,json=proofWindowCloseOffsetBlocks,proto3" json:"proof_window_close_offset_blocks"` + // supplier_unbonding_period_sessions is the number of sessions that a supplier must wait after + // unstaking before their staked assets are moved to their account balance. + // Onchain business logic requires, and ensures, that the corresponding block count of the unbonding + // period will exceed the end of any active claim & proof lifecycles. + SupplierUnbondingPeriodSessions uint64 `protobuf:"varint,7,opt,name=supplier_unbonding_period_sessions,json=supplierUnbondingPeriodSessions,proto3" json:"supplier_unbonding_period_sessions"` + // application_unbonding_period_sessions is the number of sessions that an application must wait after + // unstaking before their staked assets are moved to their account balance. + // Onchain business logic requires, and ensures, that the corresponding block count of the + // application unbonding period will exceed the end of its corresponding proof window close height. + ApplicationUnbondingPeriodSessions uint64 `protobuf:"varint,8,opt,name=application_unbonding_period_sessions,json=applicationUnbondingPeriodSessions,proto3" json:"application_unbonding_period_sessions"` + // The amount of upokt that a compute unit should translate to when settling a session. + // DEV_NOTE: This used to be under x/tokenomics but has been moved here to avoid cyclic dependencies. + ComputeUnitsToTokensMultiplier uint64 `protobuf:"varint,9,opt,name=compute_units_to_tokens_multiplier,json=computeUnitsToTokensMultiplier,proto3" json:"compute_units_to_tokens_multiplier" yaml:"compute_units_to_tokens_multiplier"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_ee6189c7aa51bbf5, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetNumBlocksPerSession() uint64 { + if m != nil { + return m.NumBlocksPerSession + } + return 0 +} + +func (m *Params) GetGracePeriodEndOffsetBlocks() uint64 { + if m != nil { + return m.GracePeriodEndOffsetBlocks + } + return 0 +} + +func (m *Params) GetClaimWindowOpenOffsetBlocks() uint64 { + if m != nil { + return m.ClaimWindowOpenOffsetBlocks + } + return 0 +} + +func (m *Params) GetClaimWindowCloseOffsetBlocks() uint64 { + if m != nil { + return m.ClaimWindowCloseOffsetBlocks + } + return 0 +} + +func (m *Params) GetProofWindowOpenOffsetBlocks() uint64 { + if m != nil { + return m.ProofWindowOpenOffsetBlocks + } + return 0 +} + +func (m *Params) GetProofWindowCloseOffsetBlocks() uint64 { + if m != nil { + return m.ProofWindowCloseOffsetBlocks + } + return 0 +} + +func (m *Params) GetSupplierUnbondingPeriodSessions() uint64 { + if m != nil { + return m.SupplierUnbondingPeriodSessions + } + return 0 +} + +func (m *Params) GetApplicationUnbondingPeriodSessions() uint64 { + if m != nil { + return m.ApplicationUnbondingPeriodSessions + } + return 0 +} + +func (m *Params) GetComputeUnitsToTokensMultiplier() uint64 { + if m != nil { + return m.ComputeUnitsToTokensMultiplier + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.shared.Params") +} + +func init() { proto.RegisterFile("poktroll/shared/params.proto", fileDescriptor_ee6189c7aa51bbf5) } + +var fileDescriptor_ee6189c7aa51bbf5 = []byte{ + // 524 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xbf, 0x6e, 0xd3, 0x40, + 0x1c, 0xc7, 0x6b, 0x28, 0xa1, 0x78, 0x41, 0x18, 0x84, 0xac, 0x34, 0xf2, 0x15, 0xf3, 0x47, 0x14, + 0x89, 0x78, 0x60, 0xeb, 0x18, 0xc4, 0x58, 0x25, 0x72, 0x5b, 0x21, 0xb1, 0x9c, 0x1c, 0xfb, 0xe2, + 0x9e, 0x62, 0xdf, 0xef, 0x74, 0x77, 0x56, 0xa8, 0xc4, 0x13, 0x30, 0xf1, 0x06, 0xb0, 0xb3, 0xf0, + 0x18, 0x8c, 0x1d, 0x3b, 0x59, 0x28, 0x19, 0x40, 0x1e, 0x79, 0x02, 0xe4, 0x73, 0xdc, 0x26, 0x29, + 0xa9, 0xb3, 0x44, 0xa7, 0xfb, 0x7e, 0xee, 0xf7, 0xc9, 0x57, 0x3e, 0x9d, 0xd9, 0xe1, 0x30, 0x56, + 0x02, 0x92, 0xc4, 0x93, 0xa7, 0x81, 0x20, 0x91, 0xc7, 0x03, 0x11, 0xa4, 0xb2, 0xcb, 0x05, 0x28, + 0xb0, 0xee, 0xd7, 0x69, 0xb7, 0x4a, 0xdb, 0x0f, 0x82, 0x94, 0x32, 0xf0, 0xf4, 0x6f, 0xc5, 0xb4, + 0x1f, 0xc5, 0x10, 0x83, 0x5e, 0x7a, 0xe5, 0xaa, 0xda, 0x75, 0xbf, 0xef, 0x98, 0xad, 0x81, 0x1e, + 0x65, 0xf5, 0xcd, 0xc7, 0x2c, 0x4b, 0xf1, 0x30, 0x81, 0x70, 0x2c, 0x31, 0x27, 0x02, 0x4b, 0x22, + 0x25, 0x05, 0x66, 0x1b, 0x7b, 0xc6, 0xcb, 0xed, 0x5e, 0xbb, 0xc8, 0xd1, 0x1a, 0xc2, 0x7f, 0xc8, + 0xb2, 0xb4, 0xa7, 0xb7, 0x07, 0x44, 0x1c, 0x55, 0x9b, 0xd6, 0xc8, 0x74, 0x62, 0x11, 0x84, 0xa4, + 0x24, 0x29, 0x44, 0x98, 0xb0, 0x08, 0xc3, 0x68, 0x24, 0x89, 0x9a, 0x8f, 0xb0, 0x6f, 0xe9, 0xc1, + 0x6e, 0x91, 0xa3, 0x06, 0xd2, 0x6f, 0xeb, 0x7c, 0xa0, 0xe3, 0x77, 0x2c, 0xea, 0xeb, 0xb0, 0x32, + 0x5a, 0xd4, 0x44, 0x61, 0x12, 0xd0, 0x14, 0x4f, 0x28, 0x8b, 0x60, 0x82, 0x81, 0x13, 0xb6, 0x22, + 0xba, 0xad, 0x45, 0x4f, 0x8b, 0x1c, 0x35, 0xa1, 0xfe, 0xae, 0x06, 0xde, 0xeb, 0xbc, 0xcf, 0x09, + 0x5b, 0x52, 0x25, 0xe6, 0xde, 0xd2, 0xf9, 0x30, 0x01, 0x49, 0x56, 0x5c, 0xdb, 0xda, 0xf5, 0xac, + 0xc8, 0x51, 0x23, 0xeb, 0x77, 0x16, 0x64, 0x6f, 0xcb, 0x7c, 0xb5, 0x18, 0x17, 0x00, 0xa3, 0x1b, + 0x8a, 0xdd, 0xb9, 0x2a, 0xd6, 0x80, 0xfa, 0xbb, 0x1a, 0x58, 0x5f, 0x6c, 0xe9, 0xfc, 0xff, 0x8a, + 0xb5, 0xae, 0x8a, 0x35, 0xb1, 0x7e, 0x67, 0x41, 0x76, 0xbd, 0x98, 0x34, 0x5d, 0x99, 0x71, 0x9e, + 0x50, 0x22, 0x70, 0xc6, 0x86, 0xc0, 0x22, 0xca, 0xe2, 0xfa, 0xe3, 0xcf, 0xef, 0x94, 0xb4, 0xef, + 0x6a, 0xdf, 0x8b, 0x22, 0x47, 0x1b, 0xd0, 0x3e, 0xaa, 0x99, 0x93, 0x1a, 0xa9, 0x6e, 0xcb, 0xfc, + 0x36, 0x4a, 0xeb, 0x93, 0xf9, 0x3c, 0x28, 0x89, 0x30, 0x50, 0x14, 0xd8, 0x0d, 0xde, 0x1d, 0xed, + 0xdd, 0x2f, 0x72, 0xb4, 0xd9, 0x01, 0xdf, 0x5d, 0xc0, 0xd6, 0xd9, 0xbf, 0x1a, 0xa6, 0x1b, 0x42, + 0xca, 0x33, 0x45, 0x70, 0xc6, 0xa8, 0x92, 0x58, 0x01, 0x56, 0x30, 0x26, 0x4c, 0xe2, 0x34, 0x4b, + 0x14, 0xd5, 0xff, 0xdd, 0xbe, 0xa7, 0xdd, 0x47, 0x65, 0xe7, 0x66, 0xfa, 0x6f, 0x8e, 0xf6, 0xcf, + 0x82, 0x34, 0x39, 0xd8, 0x80, 0x75, 0x7d, 0x67, 0x0e, 0x9d, 0x94, 0xcc, 0x31, 0x1c, 0x6b, 0xe2, + 0xf0, 0x12, 0x38, 0x78, 0xf2, 0xe7, 0x1b, 0x32, 0x3e, 0xff, 0xfe, 0xf1, 0xca, 0xbe, 0x7c, 0x6b, + 0x3e, 0xd6, 0xaf, 0x4d, 0xf5, 0x44, 0xf4, 0x0e, 0x7f, 0x4e, 0x1d, 0xe3, 0x7c, 0xea, 0x18, 0x17, + 0x53, 0xc7, 0xf8, 0x35, 0x75, 0x8c, 0x2f, 0x33, 0x67, 0xeb, 0x7c, 0xe6, 0x6c, 0x5d, 0xcc, 0x9c, + 0xad, 0x0f, 0x5e, 0x4c, 0xd5, 0x69, 0x36, 0xec, 0x86, 0x90, 0x7a, 0xe5, 0x88, 0xd7, 0x8c, 0xa8, + 0x09, 0x88, 0xb1, 0x77, 0x7d, 0x9e, 0x3a, 0xe3, 0x44, 0x0e, 0x5b, 0xfa, 0x0d, 0x7a, 0xf3, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0x80, 0xd1, 0x33, 0x73, 0xdd, 0x04, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NumBlocksPerSession != that1.NumBlocksPerSession { + return false + } + if this.GracePeriodEndOffsetBlocks != that1.GracePeriodEndOffsetBlocks { + return false + } + if this.ClaimWindowOpenOffsetBlocks != that1.ClaimWindowOpenOffsetBlocks { + return false + } + if this.ClaimWindowCloseOffsetBlocks != that1.ClaimWindowCloseOffsetBlocks { + return false + } + if this.ProofWindowOpenOffsetBlocks != that1.ProofWindowOpenOffsetBlocks { + return false + } + if this.ProofWindowCloseOffsetBlocks != that1.ProofWindowCloseOffsetBlocks { + return false + } + if this.SupplierUnbondingPeriodSessions != that1.SupplierUnbondingPeriodSessions { + return false + } + if this.ApplicationUnbondingPeriodSessions != that1.ApplicationUnbondingPeriodSessions { + return false + } + if this.ComputeUnitsToTokensMultiplier != that1.ComputeUnitsToTokensMultiplier { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ComputeUnitsToTokensMultiplier != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ComputeUnitsToTokensMultiplier)) + i-- + dAtA[i] = 0x48 + } + if m.ApplicationUnbondingPeriodSessions != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ApplicationUnbondingPeriodSessions)) + i-- + dAtA[i] = 0x40 + } + if m.SupplierUnbondingPeriodSessions != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.SupplierUnbondingPeriodSessions)) + i-- + dAtA[i] = 0x38 + } + if m.ProofWindowCloseOffsetBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ProofWindowCloseOffsetBlocks)) + i-- + dAtA[i] = 0x30 + } + if m.ProofWindowOpenOffsetBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ProofWindowOpenOffsetBlocks)) + i-- + dAtA[i] = 0x28 + } + if m.ClaimWindowCloseOffsetBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ClaimWindowCloseOffsetBlocks)) + i-- + dAtA[i] = 0x20 + } + if m.ClaimWindowOpenOffsetBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ClaimWindowOpenOffsetBlocks)) + i-- + dAtA[i] = 0x18 + } + if m.GracePeriodEndOffsetBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.GracePeriodEndOffsetBlocks)) + i-- + dAtA[i] = 0x10 + } + if m.NumBlocksPerSession != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.NumBlocksPerSession)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumBlocksPerSession != 0 { + n += 1 + sovParams(uint64(m.NumBlocksPerSession)) + } + if m.GracePeriodEndOffsetBlocks != 0 { + n += 1 + sovParams(uint64(m.GracePeriodEndOffsetBlocks)) + } + if m.ClaimWindowOpenOffsetBlocks != 0 { + n += 1 + sovParams(uint64(m.ClaimWindowOpenOffsetBlocks)) + } + if m.ClaimWindowCloseOffsetBlocks != 0 { + n += 1 + sovParams(uint64(m.ClaimWindowCloseOffsetBlocks)) + } + if m.ProofWindowOpenOffsetBlocks != 0 { + n += 1 + sovParams(uint64(m.ProofWindowOpenOffsetBlocks)) + } + if m.ProofWindowCloseOffsetBlocks != 0 { + n += 1 + sovParams(uint64(m.ProofWindowCloseOffsetBlocks)) + } + if m.SupplierUnbondingPeriodSessions != 0 { + n += 1 + sovParams(uint64(m.SupplierUnbondingPeriodSessions)) + } + if m.ApplicationUnbondingPeriodSessions != 0 { + n += 1 + sovParams(uint64(m.ApplicationUnbondingPeriodSessions)) + } + if m.ComputeUnitsToTokensMultiplier != 0 { + n += 1 + sovParams(uint64(m.ComputeUnitsToTokensMultiplier)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumBlocksPerSession", wireType) + } + m.NumBlocksPerSession = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumBlocksPerSession |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodEndOffsetBlocks", wireType) + } + m.GracePeriodEndOffsetBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GracePeriodEndOffsetBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimWindowOpenOffsetBlocks", wireType) + } + m.ClaimWindowOpenOffsetBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClaimWindowOpenOffsetBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimWindowCloseOffsetBlocks", wireType) + } + m.ClaimWindowCloseOffsetBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClaimWindowCloseOffsetBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofWindowOpenOffsetBlocks", wireType) + } + m.ProofWindowOpenOffsetBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProofWindowOpenOffsetBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofWindowCloseOffsetBlocks", wireType) + } + m.ProofWindowCloseOffsetBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProofWindowCloseOffsetBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierUnbondingPeriodSessions", wireType) + } + m.SupplierUnbondingPeriodSessions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SupplierUnbondingPeriodSessions |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationUnbondingPeriodSessions", wireType) + } + m.ApplicationUnbondingPeriodSessions = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ApplicationUnbondingPeriodSessions |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ComputeUnitsToTokensMultiplier", wireType) + } + m.ComputeUnitsToTokensMultiplier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ComputeUnitsToTokensMultiplier |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/query.pb.go b/x/shared/types/query.pb.go new file mode 100644 index 000000000..d2df1f2c8 --- /dev/null +++ b/x/shared/types/query.pb.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6adee1148228eb7c, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6adee1148228eb7c, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.shared.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.shared.QueryParamsResponse") +} + +func init() { proto.RegisterFile("poktroll/shared/query.proto", fileDescriptor_6adee1148228eb7c) } + +var fileDescriptor_6adee1148228eb7c = []byte{ + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x31, 0x4b, 0x03, 0x41, + 0x10, 0x85, 0x6f, 0x05, 0x03, 0x9e, 0x85, 0x78, 0x06, 0x94, 0x28, 0xab, 0xc4, 0x20, 0x12, 0xf4, + 0x86, 0xc4, 0xce, 0x32, 0xbd, 0x60, 0x52, 0xda, 0xed, 0xc5, 0xe5, 0x72, 0x24, 0xb7, 0xb3, 0xd9, + 0xdd, 0xa8, 0x29, 0xb5, 0xb5, 0x11, 0xfc, 0x13, 0x96, 0xfe, 0x8c, 0x94, 0x01, 0x9b, 0x54, 0x22, + 0x17, 0xc1, 0xbf, 0x21, 0xd9, 0xbd, 0x14, 0x26, 0x6a, 0x73, 0x0c, 0xf3, 0xde, 0xfb, 0xee, 0xcd, + 0xfa, 0xbb, 0x12, 0xbb, 0x46, 0x61, 0xaf, 0x07, 0xba, 0xc3, 0x14, 0xbf, 0x86, 0xfe, 0x80, 0xab, + 0x61, 0x28, 0x15, 0x1a, 0x0c, 0x36, 0xe6, 0x62, 0xe8, 0xc4, 0xd2, 0x26, 0x4b, 0x13, 0x81, 0x60, + 0xbf, 0xce, 0x53, 0x2a, 0xc6, 0x18, 0xa3, 0x1d, 0x61, 0x36, 0xe5, 0xdb, 0xbd, 0x18, 0x31, 0xee, + 0x71, 0x60, 0x32, 0x01, 0x26, 0x04, 0x1a, 0x66, 0x12, 0x14, 0x3a, 0x57, 0xab, 0x6d, 0xd4, 0x29, + 0x6a, 0x88, 0x98, 0xe6, 0xee, 0x87, 0x70, 0x53, 0x8b, 0xb8, 0x61, 0x35, 0x90, 0x2c, 0x4e, 0x84, + 0x35, 0xcf, 0x49, 0x8b, 0x05, 0x25, 0x53, 0x2c, 0xcd, 0x49, 0xe5, 0xa2, 0x1f, 0x34, 0x67, 0xf9, + 0x4b, 0xbb, 0x6c, 0xf1, 0xfe, 0x80, 0x6b, 0x53, 0x6e, 0xfa, 0x5b, 0x3f, 0xb6, 0x5a, 0xa2, 0xd0, + 0x3c, 0x38, 0xf7, 0x0b, 0x2e, 0xbc, 0x43, 0x0e, 0xc8, 0xf1, 0x7a, 0x7d, 0x3b, 0x5c, 0xb8, 0x2f, + 0x74, 0x81, 0xc6, 0xda, 0xe8, 0x7d, 0xdf, 0x7b, 0xf9, 0x7a, 0xad, 0x92, 0x56, 0x9e, 0xa8, 0x3f, + 0x12, 0x7f, 0xd5, 0x32, 0x83, 0x7b, 0xe2, 0x17, 0x9c, 0x2f, 0x38, 0x5c, 0x02, 0x2c, 0x97, 0x29, + 0x55, 0xfe, 0x37, 0xb9, 0x6e, 0xe5, 0x93, 0x87, 0xb7, 0xcf, 0xe7, 0x95, 0xa3, 0xa0, 0x02, 0x33, + 0xf7, 0xa9, 0xe0, 0xe6, 0x16, 0x55, 0x17, 0x7e, 0x3f, 0xbe, 0x71, 0x31, 0xca, 0x28, 0x19, 0x67, + 0x94, 0x4c, 0x32, 0x4a, 0x3e, 0x32, 0x4a, 0x9e, 0xa6, 0xd4, 0x1b, 0x4f, 0xa9, 0x37, 0x99, 0x52, + 0xef, 0x0a, 0xe2, 0xc4, 0x74, 0x06, 0x51, 0xd8, 0xc6, 0xf4, 0x0f, 0xda, 0xdd, 0x9c, 0x67, 0x86, + 0x92, 0xeb, 0xa8, 0x60, 0x1f, 0xf3, 0xec, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x24, 0xe8, 0x83, 0xee, + 0x0d, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.shared.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.shared.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.shared.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/shared/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/query.pb.gw.go b/x/shared/types/query.pb.gw.go new file mode 100644 index 000000000..8fdaf9bed --- /dev/null +++ b/x/shared/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/shared/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "shared", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/shared/types/service.pb.go b/x/shared/types/service.pb.go new file mode 100644 index 000000000..358154b9f --- /dev/null +++ b/x/shared/types/service.pb.go @@ -0,0 +1,1675 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/service.proto + +// NOTE that the `shared` package is not a Cosmos module, +// but rather a manually created package to resolve circular type dependencies. + +package types + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Enum to define RPC types +type RPCType int32 + +const ( + RPCType_UNKNOWN_RPC RPCType = 0 + RPCType_GRPC RPCType = 1 + RPCType_WEBSOCKET RPCType = 2 + RPCType_JSON_RPC RPCType = 3 + RPCType_REST RPCType = 4 +) + +var RPCType_name = map[int32]string{ + 0: "UNKNOWN_RPC", + 1: "GRPC", + 2: "WEBSOCKET", + 3: "JSON_RPC", + 4: "REST", +} + +var RPCType_value = map[string]int32{ + "UNKNOWN_RPC": 0, + "GRPC": 1, + "WEBSOCKET": 2, + "JSON_RPC": 3, + "REST": 4, +} + +func (x RPCType) String() string { + return proto.EnumName(RPCType_name, int32(x)) +} + +func (RPCType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{0} +} + +// Enum to define configuration options +// TODO_RESEARCH: Should these be configs, SLAs or something else? There will be more discussion once we get closer to implementing onchain QoS. +type ConfigOptions int32 + +const ( + ConfigOptions_UNKNOWN_CONFIG ConfigOptions = 0 + ConfigOptions_TIMEOUT ConfigOptions = 1 +) + +var ConfigOptions_name = map[int32]string{ + 0: "UNKNOWN_CONFIG", + 1: "TIMEOUT", +} + +var ConfigOptions_value = map[string]int32{ + "UNKNOWN_CONFIG": 0, + "TIMEOUT": 1, +} + +func (x ConfigOptions) String() string { + return proto.EnumName(ConfigOptions_name, int32(x)) +} + +func (ConfigOptions) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{1} +} + +// Service message to encapsulate unique and semantic identifiers for a service on the network +type Service struct { + // For example, what if we want to request a session for a certain service but with some additional configs that identify it? + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // TODO_BETA(@bryanchriswhite): Either remove this or rename it to alias. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The cost of a single relay for this service in terms of compute units. + // Must be used alongside the global 'compute_units_to_tokens_multipler' to calculate the cost of a relay for this service. + // cost_per_relay_for_specific_service = compute_units_per_relay_for_specific_service * compute_units_to_tokens_multipler_global_value + ComputeUnitsPerRelay uint64 `protobuf:"varint,3,opt,name=compute_units_per_relay,json=computeUnitsPerRelay,proto3" json:"compute_units_per_relay,omitempty"` + // The owner address that created the service. + // It is the address that receives rewards based on the Service's onchain usage + // It is the only address that can update the service configuration (e.g. compute_units_per_relay), + // or make other updates to it. + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` +} + +func (m *Service) Reset() { *m = Service{} } +func (m *Service) String() string { return proto.CompactTextString(m) } +func (*Service) ProtoMessage() {} +func (*Service) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{0} +} +func (m *Service) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Service) XXX_Merge(src proto.Message) { + xxx_messageInfo_Service.Merge(m, src) +} +func (m *Service) XXX_Size() int { + return m.Size() +} +func (m *Service) XXX_DiscardUnknown() { + xxx_messageInfo_Service.DiscardUnknown(m) +} + +var xxx_messageInfo_Service proto.InternalMessageInfo + +func (m *Service) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Service) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Service) GetComputeUnitsPerRelay() uint64 { + if m != nil { + return m.ComputeUnitsPerRelay + } + return 0 +} + +func (m *Service) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +// ApplicationServiceConfig holds the service configuration the application stakes for +type ApplicationServiceConfig struct { + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` +} + +func (m *ApplicationServiceConfig) Reset() { *m = ApplicationServiceConfig{} } +func (m *ApplicationServiceConfig) String() string { return proto.CompactTextString(m) } +func (*ApplicationServiceConfig) ProtoMessage() {} +func (*ApplicationServiceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{1} +} +func (m *ApplicationServiceConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplicationServiceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ApplicationServiceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationServiceConfig.Merge(m, src) +} +func (m *ApplicationServiceConfig) XXX_Size() int { + return m.Size() +} +func (m *ApplicationServiceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationServiceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationServiceConfig proto.InternalMessageInfo + +func (m *ApplicationServiceConfig) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +// SupplierServiceConfig holds the service configuration the supplier stakes for +type SupplierServiceConfig struct { + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + Endpoints []*SupplierEndpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` + RevShare []*ServiceRevenueShare `protobuf:"bytes,3,rep,name=rev_share,json=revShare,proto3" json:"rev_share,omitempty"` +} + +func (m *SupplierServiceConfig) Reset() { *m = SupplierServiceConfig{} } +func (m *SupplierServiceConfig) String() string { return proto.CompactTextString(m) } +func (*SupplierServiceConfig) ProtoMessage() {} +func (*SupplierServiceConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{2} +} +func (m *SupplierServiceConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupplierServiceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupplierServiceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupplierServiceConfig.Merge(m, src) +} +func (m *SupplierServiceConfig) XXX_Size() int { + return m.Size() +} +func (m *SupplierServiceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_SupplierServiceConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_SupplierServiceConfig proto.InternalMessageInfo + +func (m *SupplierServiceConfig) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *SupplierServiceConfig) GetEndpoints() []*SupplierEndpoint { + if m != nil { + return m.Endpoints + } + return nil +} + +func (m *SupplierServiceConfig) GetRevShare() []*ServiceRevenueShare { + if m != nil { + return m.RevShare + } + return nil +} + +// SupplierEndpoint message to hold service configuration details +type SupplierEndpoint struct { + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + RpcType RPCType `protobuf:"varint,2,opt,name=rpc_type,json=rpcType,proto3,enum=poktroll.shared.RPCType" json:"rpc_type,omitempty"` + Configs []*ConfigOption `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"` +} + +func (m *SupplierEndpoint) Reset() { *m = SupplierEndpoint{} } +func (m *SupplierEndpoint) String() string { return proto.CompactTextString(m) } +func (*SupplierEndpoint) ProtoMessage() {} +func (*SupplierEndpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{3} +} +func (m *SupplierEndpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupplierEndpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupplierEndpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupplierEndpoint.Merge(m, src) +} +func (m *SupplierEndpoint) XXX_Size() int { + return m.Size() +} +func (m *SupplierEndpoint) XXX_DiscardUnknown() { + xxx_messageInfo_SupplierEndpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_SupplierEndpoint proto.InternalMessageInfo + +func (m *SupplierEndpoint) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *SupplierEndpoint) GetRpcType() RPCType { + if m != nil { + return m.RpcType + } + return RPCType_UNKNOWN_RPC +} + +func (m *SupplierEndpoint) GetConfigs() []*ConfigOption { + if m != nil { + return m.Configs + } + return nil +} + +// ServiceRevenueShare message to hold revenue share configuration details +type ServiceRevenueShare struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + RevSharePercentage float32 `protobuf:"fixed32,2,opt,name=rev_share_percentage,json=revSharePercentage,proto3" json:"rev_share_percentage,omitempty"` +} + +func (m *ServiceRevenueShare) Reset() { *m = ServiceRevenueShare{} } +func (m *ServiceRevenueShare) String() string { return proto.CompactTextString(m) } +func (*ServiceRevenueShare) ProtoMessage() {} +func (*ServiceRevenueShare) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{4} +} +func (m *ServiceRevenueShare) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceRevenueShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceRevenueShare) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceRevenueShare.Merge(m, src) +} +func (m *ServiceRevenueShare) XXX_Size() int { + return m.Size() +} +func (m *ServiceRevenueShare) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceRevenueShare.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceRevenueShare proto.InternalMessageInfo + +func (m *ServiceRevenueShare) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ServiceRevenueShare) GetRevSharePercentage() float32 { + if m != nil { + return m.RevSharePercentage + } + return 0 +} + +// Key-value wrapper for config options, as proto maps can't be keyed by enums +type ConfigOption struct { + Key ConfigOptions `protobuf:"varint,1,opt,name=key,proto3,enum=poktroll.shared.ConfigOptions" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *ConfigOption) Reset() { *m = ConfigOption{} } +func (m *ConfigOption) String() string { return proto.CompactTextString(m) } +func (*ConfigOption) ProtoMessage() {} +func (*ConfigOption) Descriptor() ([]byte, []int) { + return fileDescriptor_302c2f793a11ae1e, []int{5} +} +func (m *ConfigOption) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConfigOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ConfigOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConfigOption.Merge(m, src) +} +func (m *ConfigOption) XXX_Size() int { + return m.Size() +} +func (m *ConfigOption) XXX_DiscardUnknown() { + xxx_messageInfo_ConfigOption.DiscardUnknown(m) +} + +var xxx_messageInfo_ConfigOption proto.InternalMessageInfo + +func (m *ConfigOption) GetKey() ConfigOptions { + if m != nil { + return m.Key + } + return ConfigOptions_UNKNOWN_CONFIG +} + +func (m *ConfigOption) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func init() { + proto.RegisterEnum("poktroll.shared.RPCType", RPCType_name, RPCType_value) + proto.RegisterEnum("poktroll.shared.ConfigOptions", ConfigOptions_name, ConfigOptions_value) + proto.RegisterType((*Service)(nil), "poktroll.shared.Service") + proto.RegisterType((*ApplicationServiceConfig)(nil), "poktroll.shared.ApplicationServiceConfig") + proto.RegisterType((*SupplierServiceConfig)(nil), "poktroll.shared.SupplierServiceConfig") + proto.RegisterType((*SupplierEndpoint)(nil), "poktroll.shared.SupplierEndpoint") + proto.RegisterType((*ServiceRevenueShare)(nil), "poktroll.shared.ServiceRevenueShare") + proto.RegisterType((*ConfigOption)(nil), "poktroll.shared.ConfigOption") +} + +func init() { proto.RegisterFile("poktroll/shared/service.proto", fileDescriptor_302c2f793a11ae1e) } + +var fileDescriptor_302c2f793a11ae1e = []byte{ + // 621 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xcd, 0x26, 0x81, 0x24, 0xd3, 0x36, 0xb5, 0x86, 0x20, 0x4c, 0xa5, 0x5a, 0x25, 0xe2, 0x50, + 0x55, 0x6a, 0x52, 0xa5, 0x42, 0x88, 0x03, 0x42, 0x6d, 0x14, 0xaa, 0x52, 0x35, 0x89, 0xd6, 0x29, + 0x95, 0xb8, 0x58, 0xae, 0xbd, 0xa4, 0x56, 0x13, 0xaf, 0xb5, 0xb6, 0x53, 0x22, 0x7e, 0x02, 0xf1, + 0x0b, 0xfc, 0x02, 0x27, 0xbe, 0x80, 0x63, 0xc5, 0xa9, 0x47, 0x94, 0xfe, 0x08, 0x5a, 0xaf, 0x1d, + 0xa0, 0x41, 0x20, 0x6e, 0xe3, 0x79, 0x6f, 0x66, 0xde, 0xbe, 0x1d, 0x2f, 0xac, 0x07, 0xfc, 0x22, + 0x12, 0x7c, 0x34, 0x6a, 0x86, 0xe7, 0xb6, 0x60, 0x6e, 0x33, 0x64, 0x62, 0xe2, 0x39, 0xac, 0x11, + 0x08, 0x1e, 0x71, 0x5c, 0xcd, 0xe0, 0x86, 0x82, 0xd7, 0x1e, 0x3a, 0x3c, 0x1c, 0xf3, 0xd0, 0x4a, + 0xe0, 0xa6, 0xfa, 0x50, 0xdc, 0xb5, 0xda, 0x90, 0x0f, 0xb9, 0xca, 0xcb, 0x48, 0x65, 0xeb, 0x9f, + 0x08, 0x94, 0x4c, 0xd5, 0x13, 0xab, 0x90, 0xf7, 0x5c, 0x9d, 0x6c, 0x90, 0xcd, 0x0a, 0xcd, 0x7b, + 0x2e, 0x22, 0x14, 0x7d, 0x7b, 0xcc, 0xf4, 0x7c, 0x92, 0x49, 0x62, 0x7c, 0x02, 0x0f, 0x1c, 0x3e, + 0x0e, 0xe2, 0x88, 0x59, 0xb1, 0xef, 0x45, 0xa1, 0x15, 0x30, 0x61, 0x09, 0x36, 0xb2, 0xa7, 0x7a, + 0x61, 0x83, 0x6c, 0x16, 0x69, 0x2d, 0x85, 0x4f, 0x24, 0xda, 0x67, 0x82, 0x4a, 0x0c, 0x9f, 0xc3, + 0x0a, 0xbf, 0xf4, 0x99, 0xb0, 0x6c, 0xd7, 0x15, 0x2c, 0x0c, 0xf5, 0xa2, 0xec, 0xb9, 0xaf, 0x7f, + 0xfb, 0xbc, 0x5d, 0x4b, 0x55, 0xee, 0x29, 0xc4, 0x8c, 0x84, 0xe7, 0x0f, 0xe9, 0x72, 0x42, 0x4f, + 0x73, 0xf5, 0x67, 0xa0, 0xef, 0x05, 0xc1, 0xc8, 0x73, 0xec, 0xc8, 0xe3, 0x7e, 0xaa, 0xb7, 0xcd, + 0xfd, 0xb7, 0xde, 0x10, 0xd7, 0x01, 0x52, 0x53, 0xac, 0xb9, 0xfa, 0x4a, 0x9a, 0x39, 0x74, 0xeb, + 0x5f, 0x08, 0xdc, 0x37, 0x63, 0x59, 0xcc, 0xc4, 0xff, 0x14, 0xe2, 0x0b, 0xa8, 0x30, 0xdf, 0x0d, + 0xb8, 0xe7, 0x47, 0xa1, 0x9e, 0xdf, 0x28, 0x6c, 0x2e, 0xb5, 0x1e, 0x35, 0x6e, 0xf9, 0xdd, 0xc8, + 0x3a, 0x77, 0x52, 0x26, 0xfd, 0x59, 0x83, 0x7b, 0x50, 0x11, 0x6c, 0x62, 0x25, 0x4c, 0xbd, 0x90, + 0x34, 0x78, 0xbc, 0xd8, 0x40, 0xcd, 0xa3, 0x6c, 0xc2, 0xfc, 0x98, 0x99, 0x32, 0x49, 0xcb, 0x82, + 0x4d, 0x92, 0xa8, 0xfe, 0x91, 0x80, 0x76, 0x7b, 0x04, 0x6a, 0x50, 0x88, 0xc5, 0x28, 0x15, 0x2c, + 0x43, 0xdc, 0x85, 0xb2, 0x08, 0x1c, 0x2b, 0x9a, 0x06, 0xea, 0xb2, 0xaa, 0x2d, 0x7d, 0x61, 0x10, + 0xed, 0xb7, 0x07, 0xd3, 0x80, 0xd1, 0x92, 0x08, 0x1c, 0x19, 0xe0, 0x53, 0x28, 0x39, 0x89, 0x11, + 0x61, 0x2a, 0x6e, 0x7d, 0xa1, 0x46, 0x19, 0xd5, 0x0b, 0xa4, 0xe9, 0x34, 0x63, 0xd7, 0xdf, 0xc3, + 0xbd, 0x3f, 0xa8, 0xc6, 0x16, 0x94, 0xb2, 0xcb, 0x25, 0xff, 0xb8, 0xdc, 0x8c, 0x88, 0x3b, 0x50, + 0x9b, 0x5b, 0x24, 0x37, 0xc9, 0x61, 0x7e, 0x64, 0x0f, 0xd5, 0x21, 0xf2, 0x14, 0x33, 0x1f, 0xfa, + 0x73, 0xa4, 0xfe, 0x1a, 0x96, 0x7f, 0x55, 0x85, 0x3b, 0x50, 0xb8, 0x60, 0xd3, 0x64, 0x62, 0xb5, + 0x65, 0xfc, 0xf5, 0x04, 0x21, 0x95, 0x54, 0xac, 0xc1, 0x9d, 0x89, 0x3d, 0x8a, 0xb3, 0xb5, 0x56, + 0x1f, 0x5b, 0x47, 0x50, 0x4a, 0x1d, 0xc2, 0x55, 0x58, 0x3a, 0xe9, 0x1e, 0x75, 0x7b, 0xa7, 0x5d, + 0x8b, 0xf6, 0xdb, 0x5a, 0x0e, 0xcb, 0x50, 0x3c, 0x90, 0x11, 0xc1, 0x15, 0xa8, 0x9c, 0x76, 0xf6, + 0xcd, 0x5e, 0xfb, 0xa8, 0x33, 0xd0, 0xf2, 0xb8, 0x0c, 0xe5, 0x57, 0x66, 0x4f, 0xd1, 0x0a, 0x92, + 0x46, 0x3b, 0xe6, 0x40, 0x2b, 0x6e, 0xed, 0xc0, 0xca, 0x6f, 0x83, 0x11, 0xa1, 0x9a, 0xb5, 0x6c, + 0xf7, 0xba, 0x2f, 0x0f, 0x0f, 0xb4, 0x1c, 0x2e, 0x41, 0x69, 0x70, 0x78, 0xdc, 0xe9, 0x9d, 0x0c, + 0x34, 0xb2, 0x7f, 0xfc, 0x75, 0x66, 0x90, 0xab, 0x99, 0x41, 0xae, 0x67, 0x06, 0xf9, 0x3e, 0x33, + 0xc8, 0x87, 0x1b, 0x23, 0x77, 0x75, 0x63, 0xe4, 0xae, 0x6f, 0x8c, 0xdc, 0x9b, 0xe6, 0xd0, 0x8b, + 0xce, 0xe3, 0xb3, 0x86, 0xc3, 0xc7, 0x4d, 0x79, 0xc2, 0x6d, 0x9f, 0x45, 0x97, 0x5c, 0x5c, 0x34, + 0xe7, 0xaf, 0xc3, 0xbb, 0xec, 0x7d, 0x90, 0x3b, 0x10, 0x9e, 0xdd, 0x4d, 0x7e, 0xee, 0xdd, 0x1f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x19, 0xf1, 0x60, 0x3f, 0x04, 0x00, 0x00, +} + +func (m *Service) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Service) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintService(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x22 + } + if m.ComputeUnitsPerRelay != 0 { + i = encodeVarintService(dAtA, i, uint64(m.ComputeUnitsPerRelay)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintService(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintService(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ApplicationServiceConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationServiceConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ApplicationServiceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintService(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SupplierServiceConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SupplierServiceConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupplierServiceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RevShare) > 0 { + for iNdEx := len(m.RevShare) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RevShare[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Endpoints) > 0 { + for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintService(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SupplierEndpoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SupplierEndpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupplierEndpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Configs) > 0 { + for iNdEx := len(m.Configs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Configs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.RpcType != 0 { + i = encodeVarintService(dAtA, i, uint64(m.RpcType)) + i-- + dAtA[i] = 0x10 + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintService(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceRevenueShare) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceRevenueShare) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceRevenueShare) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RevSharePercentage != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.RevSharePercentage)))) + i-- + dAtA[i] = 0x15 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintService(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConfigOption) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConfigOption) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfigOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintService(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if m.Key != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Key)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Service) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.ComputeUnitsPerRelay != 0 { + n += 1 + sovService(uint64(m.ComputeUnitsPerRelay)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *ApplicationServiceConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *SupplierServiceConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if len(m.RevShare) > 0 { + for _, e := range m.RevShare { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + return n +} + +func (m *SupplierEndpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.RpcType != 0 { + n += 1 + sovService(uint64(m.RpcType)) + } + if len(m.Configs) > 0 { + for _, e := range m.Configs { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + return n +} + +func (m *ServiceRevenueShare) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.RevSharePercentage != 0 { + n += 5 + } + return n +} + +func (m *ConfigOption) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != 0 { + n += 1 + sovService(uint64(m.Key)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Service) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Service: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ComputeUnitsPerRelay", wireType) + } + m.ComputeUnitsPerRelay = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ComputeUnitsPerRelay |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationServiceConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationServiceConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationServiceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SupplierServiceConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SupplierServiceConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SupplierServiceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, &SupplierEndpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevShare", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RevShare = append(m.RevShare, &ServiceRevenueShare{}) + if err := m.RevShare[len(m.RevShare)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SupplierEndpoint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SupplierEndpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SupplierEndpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RpcType", wireType) + } + m.RpcType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RpcType |= RPCType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Configs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Configs = append(m.Configs, &ConfigOption{}) + if err := m.Configs[len(m.Configs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceRevenueShare) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceRevenueShare: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceRevenueShare: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field RevSharePercentage", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.RevSharePercentage = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigOption) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigOption: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Key |= ConfigOptions(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/supplier.pb.go b/x/shared/types/supplier.pb.go new file mode 100644 index 000000000..9c0287112 --- /dev/null +++ b/x/shared/types/supplier.pb.go @@ -0,0 +1,706 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/supplier.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_sortkeys "github.com/cosmos/gogoproto/sortkeys" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Supplier is the type defining the actor in Pocket Network that provides RPC services. +type Supplier struct { + // The address of the owner (i.e. staker, custodial) that owns the funds for staking. + // By default, this address is the one that receives all the rewards unless owtherwise specified. + // This property cannot be updated by the operator. + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // The operator address of the supplier operator (i.e. the one managing the offchain server). + // The operator address can update the supplier's configurations excluding the owner address. + // This property does not change over the supplier's lifespan, the supplier must be unstaked + // and re-staked to effectively update this value. + OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` + Stake *types.Coin `protobuf:"bytes,3,opt,name=stake,proto3" json:"stake,omitempty"` + Services []*SupplierServiceConfig `protobuf:"bytes,4,rep,name=services,proto3" json:"services,omitempty"` + // The session end height at which an actively unbonding supplier unbonds its stake. + // If the supplier did not unstake, this value will be 0. + UnstakeSessionEndHeight uint64 `protobuf:"varint,5,opt,name=unstake_session_end_height,json=unstakeSessionEndHeight,proto3" json:"unstake_session_end_height,omitempty"` + // services_activation_heights_map is a map of serviceIds to the height at + // which the staked supplier will become active for that service. + // Activation heights are session start heights. + ServicesActivationHeightsMap map[string]uint64 `protobuf:"bytes,6,rep,name=services_activation_heights_map,json=servicesActivationHeightsMap,proto3" json:"services_activation_heights_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (m *Supplier) Reset() { *m = Supplier{} } +func (m *Supplier) String() string { return proto.CompactTextString(m) } +func (*Supplier) ProtoMessage() {} +func (*Supplier) Descriptor() ([]byte, []int) { + return fileDescriptor_4a189b52ba503cf2, []int{0} +} +func (m *Supplier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Supplier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Supplier) XXX_Merge(src proto.Message) { + xxx_messageInfo_Supplier.Merge(m, src) +} +func (m *Supplier) XXX_Size() int { + return m.Size() +} +func (m *Supplier) XXX_DiscardUnknown() { + xxx_messageInfo_Supplier.DiscardUnknown(m) +} + +var xxx_messageInfo_Supplier proto.InternalMessageInfo + +func (m *Supplier) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *Supplier) GetOperatorAddress() string { + if m != nil { + return m.OperatorAddress + } + return "" +} + +func (m *Supplier) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +func (m *Supplier) GetServices() []*SupplierServiceConfig { + if m != nil { + return m.Services + } + return nil +} + +func (m *Supplier) GetUnstakeSessionEndHeight() uint64 { + if m != nil { + return m.UnstakeSessionEndHeight + } + return 0 +} + +func (m *Supplier) GetServicesActivationHeightsMap() map[string]uint64 { + if m != nil { + return m.ServicesActivationHeightsMap + } + return nil +} + +func init() { + proto.RegisterType((*Supplier)(nil), "poktroll.shared.Supplier") + proto.RegisterMapType((map[string]uint64)(nil), "poktroll.shared.Supplier.ServicesActivationHeightsMapEntry") +} + +func init() { proto.RegisterFile("poktroll/shared/supplier.proto", fileDescriptor_4a189b52ba503cf2) } + +var fileDescriptor_4a189b52ba503cf2 = []byte{ + // 453 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbf, 0x6e, 0x13, 0x31, + 0x18, 0x8f, 0x9b, 0xa4, 0x2a, 0x2e, 0xa8, 0xd5, 0x29, 0x12, 0xd7, 0x08, 0x4c, 0x60, 0x40, 0x59, + 0x6a, 0xab, 0x65, 0x41, 0x54, 0x0c, 0x4d, 0x54, 0x89, 0xa5, 0x42, 0xba, 0x6c, 0x2c, 0x27, 0x27, + 0x67, 0x2e, 0x56, 0x12, 0x7f, 0x27, 0x7f, 0x4e, 0x4a, 0x56, 0x9e, 0x80, 0x89, 0x27, 0xe1, 0x21, + 0x18, 0x2b, 0xa6, 0x8e, 0x28, 0x79, 0x11, 0x74, 0x67, 0x5f, 0x90, 0x40, 0xd0, 0xcd, 0x9f, 0x7f, + 0x7f, 0xee, 0xf7, 0x3b, 0x7f, 0x94, 0x15, 0x30, 0x73, 0x16, 0xe6, 0x73, 0x81, 0x53, 0x69, 0x55, + 0x26, 0x70, 0x59, 0x14, 0x73, 0xad, 0x2c, 0x2f, 0x2c, 0x38, 0x88, 0x8e, 0x6a, 0x9c, 0x7b, 0xbc, + 0x7b, 0x32, 0x01, 0x5c, 0x00, 0xa6, 0x15, 0x2c, 0xfc, 0xe0, 0xb9, 0x5d, 0xe6, 0x27, 0x31, 0x96, + 0xa8, 0xc4, 0xea, 0x6c, 0xac, 0x9c, 0x3c, 0x13, 0x13, 0xd0, 0x26, 0xe0, 0x4f, 0xff, 0xfa, 0x96, + 0xb2, 0x2b, 0x3d, 0x51, 0x01, 0xee, 0xe4, 0x90, 0x83, 0xb7, 0x2d, 0x4f, 0xfe, 0xf6, 0xc5, 0xd7, + 0x16, 0x3d, 0x18, 0x85, 0x4c, 0xd1, 0x5b, 0xfa, 0x08, 0x6e, 0x8c, 0xb2, 0xa9, 0xcc, 0x32, 0xab, + 0x10, 0x63, 0xd2, 0x23, 0xfd, 0x07, 0x83, 0xf8, 0xc7, 0xb7, 0xd3, 0x4e, 0x88, 0x72, 0xe9, 0x91, + 0x91, 0xb3, 0xda, 0xe4, 0xc9, 0xc3, 0x8a, 0x1e, 0xee, 0xa2, 0x21, 0x3d, 0x86, 0x42, 0x59, 0xe9, + 0xe0, 0xb7, 0xc3, 0xde, 0x3d, 0x0e, 0x47, 0xb5, 0xa2, 0x36, 0x11, 0xb4, 0x8d, 0x4e, 0xce, 0x54, + 0xdc, 0xec, 0x91, 0xfe, 0xe1, 0xf9, 0x09, 0x0f, 0xb2, 0xb2, 0x35, 0x0f, 0xad, 0xf9, 0x10, 0xb4, + 0x49, 0x3c, 0x2f, 0x1a, 0xd0, 0x83, 0x50, 0x14, 0xe3, 0x56, 0xaf, 0xd9, 0x3f, 0x3c, 0x7f, 0xc9, + 0xff, 0xf8, 0xab, 0xbc, 0x6e, 0x38, 0xf2, 0xc4, 0x21, 0x98, 0x8f, 0x3a, 0x4f, 0x76, 0xba, 0xe8, + 0x82, 0x76, 0x97, 0xa6, 0xb2, 0x4b, 0x51, 0x21, 0x6a, 0x30, 0xa9, 0x32, 0x59, 0x3a, 0x55, 0x3a, + 0x9f, 0xba, 0xb8, 0xdd, 0x23, 0xfd, 0x56, 0xf2, 0x38, 0x30, 0x46, 0x9e, 0x70, 0x65, 0xb2, 0x77, + 0x15, 0x1c, 0x7d, 0x26, 0xf4, 0x59, 0xed, 0x94, 0xca, 0x89, 0xd3, 0x2b, 0xe9, 0x4a, 0x07, 0xaf, + 0xc6, 0x74, 0x21, 0x8b, 0x78, 0xbf, 0x0a, 0x76, 0xf1, 0xcf, 0x60, 0x3c, 0x24, 0xc3, 0xcb, 0x9d, + 0xde, 0xbb, 0xe3, 0xb5, 0x2c, 0xae, 0x8c, 0xb3, 0xeb, 0xe4, 0x09, 0xfe, 0x87, 0xd2, 0x7d, 0x4f, + 0x9f, 0xdf, 0x6b, 0x11, 0x1d, 0xd3, 0xe6, 0x4c, 0xad, 0xfd, 0xab, 0x26, 0xe5, 0x31, 0xea, 0xd0, + 0xf6, 0x4a, 0xce, 0x97, 0xaa, 0x7a, 0xa7, 0x56, 0xe2, 0x87, 0x37, 0x7b, 0xaf, 0xc9, 0xe0, 0xfa, + 0xfb, 0x86, 0x91, 0xdb, 0x0d, 0x23, 0x77, 0x1b, 0x46, 0x7e, 0x6e, 0x18, 0xf9, 0xb2, 0x65, 0x8d, + 0xdb, 0x2d, 0x6b, 0xdc, 0x6d, 0x59, 0xe3, 0x83, 0xc8, 0xb5, 0x9b, 0x2e, 0xc7, 0x7c, 0x02, 0x0b, + 0x51, 0x76, 0x3a, 0x35, 0xca, 0xdd, 0x80, 0x9d, 0x89, 0xdd, 0x0e, 0x7e, 0xaa, 0xb7, 0xd0, 0xad, + 0x0b, 0x85, 0xe3, 0xfd, 0x6a, 0xdd, 0x5e, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x51, 0xcd, 0x0a, + 0x68, 0x11, 0x03, 0x00, 0x00, +} + +func (m *Supplier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Supplier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Supplier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ServicesActivationHeightsMap) > 0 { + keysForServicesActivationHeightsMap := make([]string, 0, len(m.ServicesActivationHeightsMap)) + for k := range m.ServicesActivationHeightsMap { + keysForServicesActivationHeightsMap = append(keysForServicesActivationHeightsMap, string(k)) + } + github_com_cosmos_gogoproto_sortkeys.Strings(keysForServicesActivationHeightsMap) + for iNdEx := len(keysForServicesActivationHeightsMap) - 1; iNdEx >= 0; iNdEx-- { + v := m.ServicesActivationHeightsMap[string(keysForServicesActivationHeightsMap[iNdEx])] + baseI := i + i = encodeVarintSupplier(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(keysForServicesActivationHeightsMap[iNdEx]) + copy(dAtA[i:], keysForServicesActivationHeightsMap[iNdEx]) + i = encodeVarintSupplier(dAtA, i, uint64(len(keysForServicesActivationHeightsMap[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintSupplier(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if m.UnstakeSessionEndHeight != 0 { + i = encodeVarintSupplier(dAtA, i, uint64(m.UnstakeSessionEndHeight)) + i-- + dAtA[i] = 0x28 + } + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSupplier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSupplier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintSupplier(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintSupplier(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSupplier(dAtA []byte, offset int, v uint64) int { + offset -= sovSupplier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Supplier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovSupplier(uint64(l)) + } + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovSupplier(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovSupplier(uint64(l)) + } + if len(m.Services) > 0 { + for _, e := range m.Services { + l = e.Size() + n += 1 + l + sovSupplier(uint64(l)) + } + } + if m.UnstakeSessionEndHeight != 0 { + n += 1 + sovSupplier(uint64(m.UnstakeSessionEndHeight)) + } + if len(m.ServicesActivationHeightsMap) > 0 { + for k, v := range m.ServicesActivationHeightsMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovSupplier(uint64(len(k))) + 1 + sovSupplier(uint64(v)) + n += mapEntrySize + 1 + sovSupplier(uint64(mapEntrySize)) + } + } + return n +} + +func sovSupplier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSupplier(x uint64) (n int) { + return sovSupplier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Supplier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Supplier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Supplier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSupplier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSupplier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSupplier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSupplier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSupplier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSupplier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSupplier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSupplier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, &SupplierServiceConfig{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnstakeSessionEndHeight", wireType) + } + m.UnstakeSessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnstakeSessionEndHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServicesActivationHeightsMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSupplier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSupplier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ServicesActivationHeightsMap == nil { + m.ServicesActivationHeightsMap = make(map[string]uint64) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthSupplier + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthSupplier + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSupplier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipSupplier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSupplier + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ServicesActivationHeightsMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSupplier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSupplier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSupplier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSupplier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSupplier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSupplier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSupplier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSupplier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSupplier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSupplier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSupplier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSupplier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/shared/types/tx.pb.go b/x/shared/types/tx.pb.go new file mode 100644 index 000000000..43f5398f5 --- /dev/null +++ b/x/shared/types/tx.pb.go @@ -0,0 +1,1262 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/shared/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_3f2a7564b43f4d89, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3f2a7564b43f4d89, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // *MsgUpdateParam_AsString + // *MsgUpdateParam_AsUint64 + // *MsgUpdateParam_AsBytes + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_3f2a7564b43f4d89, []int{2} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsString struct { + AsString string `protobuf:"bytes,3,opt,name=as_string,json=asString,proto3,oneof" json:"as_string"` +} +type MsgUpdateParam_AsUint64 struct { + AsUint64 uint64 `protobuf:"varint,6,opt,name=as_uint64,json=asUint64,proto3,oneof" json:"as_uint64"` +} +type MsgUpdateParam_AsBytes struct { + AsBytes []byte `protobuf:"bytes,7,opt,name=as_bytes,json=asBytes,proto3,oneof" json:"as_bytes"` +} + +func (*MsgUpdateParam_AsString) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsUint64) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsBytes) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsString() string { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsString); ok { + return x.AsString + } + return "" +} + +func (m *MsgUpdateParam) GetAsUint64() uint64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsUint64); ok { + return x.AsUint64 + } + return 0 +} + +func (m *MsgUpdateParam) GetAsBytes() []byte { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsBytes); ok { + return x.AsBytes + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsString)(nil), + (*MsgUpdateParam_AsUint64)(nil), + (*MsgUpdateParam_AsBytes)(nil), + } +} + +// MsgUpdateParamResponse defines the response structure for executing a +// MsgUpdateParam message after a single param update. +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3f2a7564b43f4d89, []int{3} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.shared.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.shared.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.shared.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.shared.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/shared/tx.proto", fileDescriptor_3f2a7564b43f4d89) } + +var fileDescriptor_3f2a7564b43f4d89 = []byte{ + // 502 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xf6, 0xd1, 0x92, 0xd4, 0xd7, 0xd0, 0x0a, 0xab, 0x22, 0xae, 0x85, 0x1c, 0x93, 0x05, 0x13, + 0x51, 0x9f, 0x28, 0x55, 0x87, 0x6c, 0x78, 0x2a, 0x43, 0x24, 0x64, 0x54, 0x21, 0x75, 0x89, 0x2e, + 0xcd, 0xc9, 0xb1, 0x5a, 0xfb, 0x2c, 0xdf, 0x05, 0x9a, 0x0d, 0x31, 0x32, 0xf1, 0x33, 0x18, 0x33, + 0xb0, 0x31, 0xb1, 0x75, 0xac, 0x98, 0x3a, 0x45, 0x28, 0x19, 0x22, 0xf5, 0x47, 0x20, 0xe4, 0x3b, + 0xdb, 0x21, 0x8e, 0x44, 0x24, 0x96, 0xe4, 0xdd, 0xf7, 0x7d, 0xef, 0xbb, 0xf7, 0xee, 0x3d, 0x43, + 0x3d, 0xa6, 0x17, 0x3c, 0xa1, 0x97, 0x97, 0x88, 0x0d, 0x70, 0x42, 0xfa, 0x88, 0x5f, 0x39, 0x71, + 0x42, 0x39, 0xd5, 0x76, 0x73, 0xc6, 0x91, 0x8c, 0xf1, 0x10, 0x87, 0x41, 0x44, 0x91, 0xf8, 0x95, + 0x1a, 0xa3, 0x7e, 0x4e, 0x59, 0x48, 0x19, 0x0a, 0x99, 0x8f, 0xde, 0xbf, 0x48, 0xff, 0x32, 0x62, + 0x5f, 0x12, 0x5d, 0x71, 0x42, 0xf2, 0x90, 0x51, 0x7b, 0x3e, 0xf5, 0xa9, 0xc4, 0xd3, 0x28, 0x43, + 0x1f, 0x97, 0xeb, 0x88, 0x71, 0x82, 0xc3, 0x2c, 0xa7, 0xf9, 0x1d, 0xc0, 0xdd, 0x0e, 0xf3, 0x4f, + 0xe3, 0x3e, 0xe6, 0xe4, 0x8d, 0x60, 0xb4, 0x63, 0xa8, 0xe2, 0x21, 0x1f, 0xd0, 0x24, 0xe0, 0x23, + 0x1d, 0x58, 0xc0, 0x56, 0x5d, 0xfd, 0xe7, 0xb7, 0x83, 0xbd, 0xec, 0xb2, 0x57, 0xfd, 0x7e, 0x42, + 0x18, 0x7b, 0xcb, 0x93, 0x20, 0xf2, 0xbd, 0x85, 0x54, 0x6b, 0xc3, 0x8a, 0xf4, 0xd6, 0xef, 0x59, + 0xc0, 0xde, 0x3e, 0xac, 0x3b, 0xa5, 0x46, 0x1d, 0x79, 0x81, 0xab, 0x5e, 0x4f, 0x1a, 0xca, 0xd7, + 0xf9, 0xb8, 0x05, 0xbc, 0x2c, 0xa3, 0x7d, 0xf4, 0x69, 0x3e, 0x6e, 0x2d, 0xbc, 0x3e, 0xcf, 0xc7, + 0xad, 0x27, 0x45, 0xe1, 0x57, 0x79, 0xe9, 0xa5, 0x4a, 0x9b, 0xfb, 0xb0, 0x5e, 0x82, 0x3c, 0xc2, + 0x62, 0x1a, 0x31, 0xd2, 0xfc, 0x0d, 0xe0, 0xce, 0x32, 0xf7, 0xdf, 0x7d, 0x69, 0x70, 0x33, 0xc2, + 0x21, 0x11, 0x5d, 0xa9, 0x9e, 0x88, 0xb5, 0xe7, 0x50, 0xc5, 0xac, 0xcb, 0x84, 0x56, 0xdf, 0x10, + 0x5e, 0x0f, 0xee, 0x26, 0x8d, 0x05, 0x78, 0xa2, 0x78, 0x5b, 0x38, 0x33, 0xcb, 0xd4, 0xc3, 0x20, + 0xe2, 0xc7, 0x47, 0x7a, 0xc5, 0x02, 0xf6, 0x66, 0xa1, 0x96, 0xa0, 0x54, 0x9f, 0x8a, 0x58, 0x7b, + 0x06, 0xb7, 0x30, 0xeb, 0xf6, 0x46, 0x9c, 0x30, 0xbd, 0x6a, 0x01, 0xbb, 0xe6, 0xd6, 0xee, 0x26, + 0x8d, 0x02, 0x3b, 0x51, 0xbc, 0x2a, 0x66, 0x6e, 0x1a, 0xb6, 0x77, 0x96, 0x9f, 0xcd, 0x55, 0x61, + 0x15, 0xb3, 0x2e, 0x1f, 0xc5, 0xa4, 0xf9, 0x1a, 0x3e, 0x5a, 0xee, 0x3f, 0x7f, 0x1a, 0x0d, 0x15, + 0x73, 0x02, 0xff, 0x9c, 0x53, 0x3e, 0x9c, 0xc3, 0x1f, 0x00, 0x6e, 0x74, 0x98, 0xaf, 0x9d, 0xc1, + 0xda, 0xd2, 0xa2, 0x58, 0x2b, 0x89, 0xa5, 0x69, 0x18, 0xf6, 0x3a, 0x45, 0x51, 0xd4, 0x3b, 0xb8, + 0xfd, 0xf7, 0xac, 0x1a, 0x6b, 0x12, 0x8d, 0xa7, 0x6b, 0x04, 0xb9, 0xb1, 0x71, 0xff, 0x63, 0xba, + 0x68, 0x6e, 0xe7, 0x7a, 0x6a, 0x82, 0x9b, 0xa9, 0x09, 0x6e, 0xa7, 0x26, 0xf8, 0x35, 0x35, 0xc1, + 0x97, 0x99, 0xa9, 0xdc, 0xcc, 0x4c, 0xe5, 0x76, 0x66, 0x2a, 0x67, 0xc8, 0x0f, 0xf8, 0x60, 0xd8, + 0x73, 0xce, 0x69, 0x88, 0x52, 0xdf, 0x83, 0x88, 0xf0, 0x0f, 0x34, 0xb9, 0x40, 0xab, 0x3b, 0x98, + 0x3e, 0x2e, 0xeb, 0x55, 0xc4, 0xe7, 0xf3, 0xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x11, + 0xde, 0xdb, 0xe6, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.shared.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.shared.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.shared.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.shared.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.shared.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/shared/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsString) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsString) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsString) + copy(dAtA[i:], m.AsString) + i = encodeVarintTx(dAtA, i, uint64(len(m.AsString))) + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsUint64) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsUint64) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.AsUint64)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsBytes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsBytes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsBytes != nil { + i -= len(m.AsBytes) + copy(dAtA[i:], m.AsBytes) + i = encodeVarintTx(dAtA, i, uint64(len(m.AsBytes))) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AsString) + n += 1 + l + sovTx(uint64(l)) + return n +} +func (m *MsgUpdateParam_AsUint64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.AsUint64)) + return n +} +func (m *MsgUpdateParam_AsBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsBytes != nil { + l = len(m.AsBytes) + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsType = &MsgUpdateParam_AsString{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsUint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsType = &MsgUpdateParam_AsUint64{v} + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.AsType = &MsgUpdateParam_AsBytes{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/supplier/types/event.pb.go b/x/supplier/types/event.pb.go new file mode 100644 index 000000000..a797d281b --- /dev/null +++ b/x/supplier/types/event.pb.go @@ -0,0 +1,1230 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/supplier/event.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type SupplierUnbondingReason int32 + +const ( + SupplierUnbondingReason_SUPPLIER_UNBONDING_REASON_UNSPECIFIED SupplierUnbondingReason = 0 + SupplierUnbondingReason_SUPPLIER_UNBONDING_REASON_VOLUNTARY SupplierUnbondingReason = 1 + SupplierUnbondingReason_SUPPLIER_UNBONDING_REASON_BELOW_MIN_STAKE SupplierUnbondingReason = 2 +) + +var SupplierUnbondingReason_name = map[int32]string{ + 0: "SUPPLIER_UNBONDING_REASON_UNSPECIFIED", + 1: "SUPPLIER_UNBONDING_REASON_VOLUNTARY", + 2: "SUPPLIER_UNBONDING_REASON_BELOW_MIN_STAKE", +} + +var SupplierUnbondingReason_value = map[string]int32{ + "SUPPLIER_UNBONDING_REASON_UNSPECIFIED": 0, + "SUPPLIER_UNBONDING_REASON_VOLUNTARY": 1, + "SUPPLIER_UNBONDING_REASON_BELOW_MIN_STAKE": 2, +} + +func (x SupplierUnbondingReason) String() string { + return proto.EnumName(SupplierUnbondingReason_name, int32(x)) +} + +func (SupplierUnbondingReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_22d2d1a82853ce0a, []int{0} +} + +// EventSupplierStaked is emitted when a supplier stake message is committed onchain. +type EventSupplierStaked struct { + Supplier *types.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier"` + // The session end height of the last session in which the supplier was staked. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventSupplierStaked) Reset() { *m = EventSupplierStaked{} } +func (m *EventSupplierStaked) String() string { return proto.CompactTextString(m) } +func (*EventSupplierStaked) ProtoMessage() {} +func (*EventSupplierStaked) Descriptor() ([]byte, []int) { + return fileDescriptor_22d2d1a82853ce0a, []int{0} +} +func (m *EventSupplierStaked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSupplierStaked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSupplierStaked) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSupplierStaked.Merge(m, src) +} +func (m *EventSupplierStaked) XXX_Size() int { + return m.Size() +} +func (m *EventSupplierStaked) XXX_DiscardUnknown() { + xxx_messageInfo_EventSupplierStaked.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSupplierStaked proto.InternalMessageInfo + +func (m *EventSupplierStaked) GetSupplier() *types.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +func (m *EventSupplierStaked) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +// EventSupplierUnbondingBegin is emitted when an application unstake message +// is committed onchain, indicating that the supplier will now begin unbonding. +type EventSupplierUnbondingBegin struct { + Supplier *types.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier"` + Reason SupplierUnbondingReason `protobuf:"varint,2,opt,name=reason,proto3,enum=poktroll.supplier.SupplierUnbondingReason" json:"reason"` + // The session end height of the last session in which the supplier unbonding began. + SessionEndHeight int64 `protobuf:"varint,3,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which supplier unbonding will end. + UnbondingEndHeight int64 `protobuf:"varint,4,opt,name=unbonding_end_height,json=unbondingEndHeight,proto3" json:"unbonding_end_height"` +} + +func (m *EventSupplierUnbondingBegin) Reset() { *m = EventSupplierUnbondingBegin{} } +func (m *EventSupplierUnbondingBegin) String() string { return proto.CompactTextString(m) } +func (*EventSupplierUnbondingBegin) ProtoMessage() {} +func (*EventSupplierUnbondingBegin) Descriptor() ([]byte, []int) { + return fileDescriptor_22d2d1a82853ce0a, []int{1} +} +func (m *EventSupplierUnbondingBegin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSupplierUnbondingBegin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSupplierUnbondingBegin) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSupplierUnbondingBegin.Merge(m, src) +} +func (m *EventSupplierUnbondingBegin) XXX_Size() int { + return m.Size() +} +func (m *EventSupplierUnbondingBegin) XXX_DiscardUnknown() { + xxx_messageInfo_EventSupplierUnbondingBegin.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSupplierUnbondingBegin proto.InternalMessageInfo + +func (m *EventSupplierUnbondingBegin) GetSupplier() *types.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +func (m *EventSupplierUnbondingBegin) GetReason() SupplierUnbondingReason { + if m != nil { + return m.Reason + } + return SupplierUnbondingReason_SUPPLIER_UNBONDING_REASON_UNSPECIFIED +} + +func (m *EventSupplierUnbondingBegin) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventSupplierUnbondingBegin) GetUnbondingEndHeight() int64 { + if m != nil { + return m.UnbondingEndHeight + } + return 0 +} + +// EventSupplierUnbondingEnd is emitted when an supplier has completed +// unbonding. The unbonding period is determined by the shared param, +// supplier_unbonding_period_sessions. +type EventSupplierUnbondingEnd struct { + Supplier *types.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier"` + Reason SupplierUnbondingReason `protobuf:"varint,2,opt,name=reason,proto3,enum=poktroll.supplier.SupplierUnbondingReason" json:"reason"` + // The session end height of the session in which the supplier unbonding endeded. + SessionEndHeight int64 `protobuf:"varint,3,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` + // The height at which supplier unbonding will end. + UnbondingEndHeight int64 `protobuf:"varint,4,opt,name=unbonding_end_height,json=unbondingEndHeight,proto3" json:"unbonding_end_height"` +} + +func (m *EventSupplierUnbondingEnd) Reset() { *m = EventSupplierUnbondingEnd{} } +func (m *EventSupplierUnbondingEnd) String() string { return proto.CompactTextString(m) } +func (*EventSupplierUnbondingEnd) ProtoMessage() {} +func (*EventSupplierUnbondingEnd) Descriptor() ([]byte, []int) { + return fileDescriptor_22d2d1a82853ce0a, []int{2} +} +func (m *EventSupplierUnbondingEnd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSupplierUnbondingEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSupplierUnbondingEnd) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSupplierUnbondingEnd.Merge(m, src) +} +func (m *EventSupplierUnbondingEnd) XXX_Size() int { + return m.Size() +} +func (m *EventSupplierUnbondingEnd) XXX_DiscardUnknown() { + xxx_messageInfo_EventSupplierUnbondingEnd.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSupplierUnbondingEnd proto.InternalMessageInfo + +func (m *EventSupplierUnbondingEnd) GetSupplier() *types.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +func (m *EventSupplierUnbondingEnd) GetReason() SupplierUnbondingReason { + if m != nil { + return m.Reason + } + return SupplierUnbondingReason_SUPPLIER_UNBONDING_REASON_UNSPECIFIED +} + +func (m *EventSupplierUnbondingEnd) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func (m *EventSupplierUnbondingEnd) GetUnbondingEndHeight() int64 { + if m != nil { + return m.UnbondingEndHeight + } + return 0 +} + +// EventSupplierUnbondingCanceled is emitted when an supplier which was unbonding +// successfully (re-)stakes before the unbonding period has elapsed. An EventSupplierStaked +// event will also be emitted immediately after this event. +type EventSupplierUnbondingCanceled struct { + Supplier *types.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier"` + // The exact height at which the supplier unbonding was canceled. + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height"` + // The session end height of the session in which the supplier unbonding was canceled. + SessionEndHeight int64 `protobuf:"varint,2,opt,name=session_end_height,json=sessionEndHeight,proto3" json:"session_end_height"` +} + +func (m *EventSupplierUnbondingCanceled) Reset() { *m = EventSupplierUnbondingCanceled{} } +func (m *EventSupplierUnbondingCanceled) String() string { return proto.CompactTextString(m) } +func (*EventSupplierUnbondingCanceled) ProtoMessage() {} +func (*EventSupplierUnbondingCanceled) Descriptor() ([]byte, []int) { + return fileDescriptor_22d2d1a82853ce0a, []int{3} +} +func (m *EventSupplierUnbondingCanceled) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSupplierUnbondingCanceled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSupplierUnbondingCanceled) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSupplierUnbondingCanceled.Merge(m, src) +} +func (m *EventSupplierUnbondingCanceled) XXX_Size() int { + return m.Size() +} +func (m *EventSupplierUnbondingCanceled) XXX_DiscardUnknown() { + xxx_messageInfo_EventSupplierUnbondingCanceled.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSupplierUnbondingCanceled proto.InternalMessageInfo + +func (m *EventSupplierUnbondingCanceled) GetSupplier() *types.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +func (m *EventSupplierUnbondingCanceled) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *EventSupplierUnbondingCanceled) GetSessionEndHeight() int64 { + if m != nil { + return m.SessionEndHeight + } + return 0 +} + +func init() { + proto.RegisterEnum("poktroll.supplier.SupplierUnbondingReason", SupplierUnbondingReason_name, SupplierUnbondingReason_value) + proto.RegisterType((*EventSupplierStaked)(nil), "poktroll.supplier.EventSupplierStaked") + proto.RegisterType((*EventSupplierUnbondingBegin)(nil), "poktroll.supplier.EventSupplierUnbondingBegin") + proto.RegisterType((*EventSupplierUnbondingEnd)(nil), "poktroll.supplier.EventSupplierUnbondingEnd") + proto.RegisterType((*EventSupplierUnbondingCanceled)(nil), "poktroll.supplier.EventSupplierUnbondingCanceled") +} + +func init() { proto.RegisterFile("poktroll/supplier/event.proto", fileDescriptor_22d2d1a82853ce0a) } + +var fileDescriptor_22d2d1a82853ce0a = []byte{ + // 511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xcd, 0xa4, 0x9f, 0xa2, 0x4f, 0x03, 0x42, 0xc1, 0x54, 0x90, 0x14, 0x31, 0xa9, 0x82, 0x10, + 0x6d, 0xa5, 0xda, 0x4a, 0x79, 0x82, 0x38, 0x19, 0xc0, 0x10, 0xec, 0xc8, 0xae, 0x41, 0xb0, 0xb1, + 0xec, 0x78, 0xe4, 0x58, 0x49, 0x67, 0x2c, 0xcf, 0xa4, 0xc0, 0x5b, 0xf0, 0x00, 0x2c, 0x78, 0x16, + 0xc4, 0x82, 0x1d, 0x5d, 0x76, 0x15, 0xa1, 0x64, 0x97, 0xa7, 0x40, 0xf1, 0x5f, 0xa8, 0x9a, 0x48, + 0x20, 0x65, 0xc9, 0xca, 0xe3, 0x73, 0xce, 0xdc, 0x39, 0xf7, 0x8c, 0xe6, 0xc2, 0x07, 0x11, 0x1b, + 0x89, 0x98, 0x8d, 0xc7, 0x0a, 0x9f, 0x44, 0xd1, 0x38, 0x24, 0xb1, 0x42, 0xce, 0x09, 0x15, 0x72, + 0x14, 0x33, 0xc1, 0xa4, 0xdb, 0x39, 0x2d, 0xe7, 0xf4, 0x5e, 0x7d, 0xc0, 0xf8, 0x19, 0xe3, 0x4e, + 0x22, 0x50, 0xd2, 0x9f, 0x54, 0xbd, 0xb7, 0x1b, 0xb0, 0x80, 0xa5, 0xf8, 0x72, 0x95, 0xa1, 0x28, + 0xd5, 0x28, 0x9e, 0xcb, 0x89, 0x72, 0xde, 0xf2, 0x88, 0x70, 0x5b, 0xca, 0x80, 0x85, 0x34, 0xe7, + 0x57, 0x16, 0x86, 0x6e, 0x4c, 0xfc, 0xc2, 0x49, 0xca, 0x37, 0xbf, 0x00, 0x78, 0x07, 0x2f, 0x3d, + 0x59, 0x19, 0x6e, 0x09, 0x77, 0x44, 0x7c, 0xa9, 0x03, 0xff, 0xcf, 0x95, 0x35, 0xb0, 0x0f, 0x0e, + 0x6e, 0x9c, 0xd4, 0xe5, 0x95, 0xdd, 0xa4, 0x94, 0x9c, 0x6f, 0x51, 0x6f, 0x2e, 0xa6, 0x8d, 0x42, + 0x6e, 0x16, 0x2b, 0xa9, 0x0b, 0x25, 0x4e, 0x38, 0x0f, 0x19, 0x75, 0x08, 0xf5, 0x9d, 0x21, 0x09, + 0x83, 0xa1, 0xa8, 0x95, 0xf7, 0xc1, 0xc1, 0x8e, 0x7a, 0x77, 0x31, 0x6d, 0xac, 0x61, 0xcd, 0x6a, + 0x86, 0x61, 0xea, 0x3f, 0x4f, 0x90, 0xe6, 0xb7, 0x32, 0xbc, 0x7f, 0xc5, 0xa2, 0x4d, 0x3d, 0x46, + 0xfd, 0x90, 0x06, 0x2a, 0x09, 0x42, 0xba, 0x1d, 0xab, 0x3a, 0xac, 0xc4, 0xc4, 0xe5, 0x8c, 0x26, + 0xf6, 0x6e, 0x9d, 0x1c, 0xc9, 0xd7, 0x2e, 0x47, 0xbe, 0x76, 0xbe, 0x99, 0xec, 0x50, 0xe1, 0x62, + 0xda, 0xc8, 0x76, 0x9b, 0xd9, 0x77, 0x43, 0xeb, 0x3b, 0x7f, 0xd7, 0xba, 0xf4, 0x02, 0xee, 0x4e, + 0xf2, 0xc3, 0x7e, 0xaf, 0xf3, 0x5f, 0x52, 0xa7, 0xb6, 0x98, 0x36, 0xd6, 0xf2, 0xa6, 0x54, 0xa0, + 0xab, 0x18, 0xbf, 0x96, 0x61, 0x7d, 0x7d, 0x8c, 0x98, 0xfa, 0xff, 0x42, 0xfc, 0xb3, 0x10, 0x7f, + 0x00, 0x88, 0xd6, 0x87, 0xd8, 0x71, 0xe9, 0x80, 0x8c, 0xb7, 0xf5, 0x72, 0x9a, 0xb0, 0x72, 0xa5, + 0xdb, 0x24, 0x9d, 0xcc, 0x57, 0xf6, 0xdd, 0xce, 0xeb, 0x3a, 0xfa, 0x0c, 0xe0, 0xbd, 0x0d, 0x77, + 0x22, 0x1d, 0xc2, 0x47, 0x96, 0xdd, 0xef, 0xf7, 0x34, 0x6c, 0x3a, 0xb6, 0xae, 0x1a, 0x7a, 0x57, + 0xd3, 0x9f, 0x39, 0x26, 0x6e, 0x5b, 0x86, 0xee, 0xd8, 0xba, 0xd5, 0xc7, 0x1d, 0xed, 0xa9, 0x86, + 0xbb, 0xd5, 0x92, 0xf4, 0x18, 0x3e, 0xdc, 0x2c, 0x7d, 0x6d, 0xf4, 0x6c, 0xfd, 0xb4, 0x6d, 0xbe, + 0xad, 0x02, 0xe9, 0x18, 0x1e, 0x6e, 0x16, 0xaa, 0xb8, 0x67, 0xbc, 0x71, 0x5e, 0x69, 0xba, 0x63, + 0x9d, 0xb6, 0x5f, 0xe2, 0x6a, 0x59, 0x35, 0xbe, 0xcf, 0x10, 0xb8, 0x98, 0x21, 0x70, 0x39, 0x43, + 0xe0, 0xe7, 0x0c, 0x81, 0x4f, 0x73, 0x54, 0xba, 0x98, 0xa3, 0xd2, 0xe5, 0x1c, 0x95, 0xde, 0xb5, + 0x82, 0x50, 0x0c, 0x27, 0x9e, 0x3c, 0x60, 0x67, 0xca, 0x32, 0xe3, 0x63, 0x4a, 0xc4, 0x7b, 0x16, + 0x8f, 0x94, 0x62, 0xea, 0x7d, 0x58, 0x8d, 0x5e, 0xf1, 0x31, 0x22, 0xdc, 0xab, 0x24, 0x73, 0xef, + 0xc9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xd0, 0xef, 0x2c, 0x9c, 0x05, 0x00, 0x00, +} + +func (m *EventSupplierStaked) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSupplierStaked) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSupplierStaked) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSupplierUnbondingBegin) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSupplierUnbondingBegin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSupplierUnbondingBegin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnbondingEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.UnbondingEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x18 + } + if m.Reason != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Reason)) + i-- + dAtA[i] = 0x10 + } + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSupplierUnbondingEnd) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSupplierUnbondingEnd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSupplierUnbondingEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnbondingEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.UnbondingEndHeight)) + i-- + dAtA[i] = 0x20 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x18 + } + if m.Reason != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Reason)) + i-- + dAtA[i] = 0x10 + } + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSupplierUnbondingCanceled) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSupplierUnbondingCanceled) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSupplierUnbondingCanceled) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if m.SessionEndHeight != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.SessionEndHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventSupplierStaked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + return n +} + +func (m *EventSupplierUnbondingBegin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Reason != 0 { + n += 1 + sovEvent(uint64(m.Reason)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.UnbondingEndHeight != 0 { + n += 1 + sovEvent(uint64(m.UnbondingEndHeight)) + } + return n +} + +func (m *EventSupplierUnbondingEnd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.Reason != 0 { + n += 1 + sovEvent(uint64(m.Reason)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.UnbondingEndHeight != 0 { + n += 1 + sovEvent(uint64(m.UnbondingEndHeight)) + } + return n +} + +func (m *EventSupplierUnbondingCanceled) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.SessionEndHeight != 0 { + n += 1 + sovEvent(uint64(m.SessionEndHeight)) + } + if m.Height != 0 { + n += 1 + sovEvent(uint64(m.Height)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventSupplierStaked) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSupplierStaked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSupplierStaked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSupplierUnbondingBegin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSupplierUnbondingBegin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSupplierUnbondingBegin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + m.Reason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reason |= SupplierUnbondingReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEndHeight", wireType) + } + m.UnbondingEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSupplierUnbondingEnd) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSupplierUnbondingEnd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSupplierUnbondingEnd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + m.Reason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Reason |= SupplierUnbondingReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEndHeight", wireType) + } + m.UnbondingEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSupplierUnbondingCanceled) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSupplierUnbondingCanceled: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSupplierUnbondingCanceled: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionEndHeight", wireType) + } + m.SessionEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SessionEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/supplier/types/genesis.pb.go b/x/supplier/types/genesis.pb.go new file mode 100644 index 000000000..75b27ed38 --- /dev/null +++ b/x/supplier/types/genesis.pb.go @@ -0,0 +1,386 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/supplier/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/shared/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the supplier module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + SupplierList []types.Supplier `protobuf:"bytes,2,rep,name=supplierList,proto3" json:"supplierList"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_c7fecde842e217fc, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetSupplierList() []types.Supplier { + if m != nil { + return m.SupplierList + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.supplier.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/supplier/genesis.proto", fileDescriptor_c7fecde842e217fc) } + +var fileDescriptor_c7fecde842e217fc = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x2e, 0x2d, 0x28, 0xc8, 0xc9, 0x4c, 0x2d, 0xd2, 0x4f, 0x4f, + 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x84, 0x29, 0xd0, + 0x83, 0x29, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x55, 0x52, 0x22, + 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x95, 0xc3, 0x34, 0xbc, 0x20, 0xb1, + 0x28, 0x31, 0xb7, 0x18, 0x53, 0x3e, 0x23, 0xb1, 0x28, 0x35, 0x05, 0xae, 0x0c, 0x22, 0xaf, 0x34, + 0x91, 0x91, 0x8b, 0xc7, 0x1d, 0xe2, 0x9a, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x1b, 0x2e, 0x36, + 0x88, 0x01, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x92, 0x7a, 0x18, 0xae, 0xd3, 0x0b, 0x00, + 0x2b, 0x70, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, 0x41, 0x50, 0x3d, + 0x42, 0xce, 0x5c, 0x3c, 0x30, 0x55, 0x3e, 0x99, 0xc5, 0x25, 0x12, 0x4c, 0x0a, 0xcc, 0x68, 0x66, + 0x80, 0x5d, 0xa1, 0x17, 0x0c, 0x55, 0xe4, 0xc4, 0x02, 0x32, 0x23, 0x08, 0x45, 0x93, 0x93, 0xff, + 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x98, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x32, 0x56, 0x37, 0x2f, 0xb5, + 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xee, 0xd3, 0x0a, 0x44, 0x58, 0x94, 0x54, 0x16, 0xa4, 0x16, + 0x27, 0xb1, 0x81, 0xfd, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x67, 0x25, 0x98, 0x6b, 0x8a, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplierList) > 0 { + for iNdEx := len(m.SupplierList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SupplierList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.SupplierList) > 0 { + for _, e := range m.SupplierList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierList = append(m.SupplierList, types.Supplier{}) + if err := m.SupplierList[len(m.SupplierList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/supplier/types/params.pb.go b/x/supplier/types/params.pb.go new file mode 100644 index 000000000..06b031634 --- /dev/null +++ b/x/supplier/types/params.pb.go @@ -0,0 +1,423 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/supplier/params.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // min_stake is the minimum amount of uPOKT that a supplier must stake to be + // included in network sessions and remain staked. + MinStake *types.Coin `protobuf:"bytes,1,opt,name=min_stake,json=minStake,proto3" json:"min_stake" yaml:"min_stake"` + // staking_fee is the fee charged by the protocol for staking a supplier. + StakingFee *types.Coin `protobuf:"bytes,2,opt,name=staking_fee,json=stakingFee,proto3" json:"staking_fee" yaml:"staking_fee"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_60f7a8031a8c22d5, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMinStake() *types.Coin { + if m != nil { + return m.MinStake + } + return nil +} + +func (m *Params) GetStakingFee() *types.Coin { + if m != nil { + return m.StakingFee + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.supplier.Params") +} + +func init() { proto.RegisterFile("poktroll/supplier/params.proto", fileDescriptor_60f7a8031a8c22d5) } + +var fileDescriptor_60f7a8031a8c22d5 = []byte{ + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0x2e, 0x2d, 0x28, 0xc8, 0xc9, 0x4c, 0x2d, 0xd2, 0x2f, 0x48, + 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x84, 0xc9, 0xeb, 0xc1, + 0xe4, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x95, 0x94, 0x48, 0x7a, + 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xe5, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x93, 0x12, 0x8b, 0x53, 0xf5, 0xcb, 0x0c, 0x93, 0x52, 0x4b, 0x12, 0x0d, 0xf5, 0x93, 0xf3, + 0x33, 0xf3, 0x20, 0xf2, 0x4a, 0xaf, 0x19, 0xb9, 0xd8, 0x02, 0xc0, 0x96, 0x09, 0x45, 0x72, 0x71, + 0xe6, 0x66, 0xe6, 0xc5, 0x17, 0x97, 0x24, 0x66, 0xa7, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, + 0x49, 0xea, 0x41, 0xb4, 0xeb, 0x81, 0xb4, 0xeb, 0x41, 0xb5, 0xeb, 0x39, 0xe7, 0x67, 0xe6, 0x39, + 0x29, 0xbe, 0xba, 0x27, 0x8f, 0x50, 0xff, 0xe9, 0x9e, 0xbc, 0x40, 0x65, 0x62, 0x6e, 0x8e, 0x95, + 0x12, 0x5c, 0x48, 0x29, 0x88, 0x23, 0x37, 0x33, 0x2f, 0x18, 0xc4, 0x14, 0x4a, 0xe4, 0xe2, 0x06, + 0x89, 0x65, 0xe6, 0xa5, 0xc7, 0xa7, 0xa5, 0xa6, 0x4a, 0x30, 0x11, 0x32, 0x5c, 0xf5, 0xd5, 0x3d, + 0x79, 0x64, 0x1d, 0x9f, 0xee, 0xc9, 0x0b, 0x41, 0x8c, 0x47, 0x12, 0x54, 0x0a, 0xe2, 0x82, 0xf2, + 0xdc, 0x52, 0x53, 0xad, 0x94, 0x5f, 0x2c, 0x90, 0x67, 0xec, 0x7a, 0xbe, 0x41, 0x4b, 0x0a, 0x1e, + 0x9a, 0x15, 0x88, 0xf0, 0x84, 0x78, 0xd1, 0xc9, 0xff, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, + 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, + 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, + 0xce, 0xcf, 0xd5, 0x07, 0x19, 0xa2, 0x9b, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0xcd, + 0xc4, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0x28, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xe0, 0x47, 0xa0, 0x65, 0xc3, 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.MinStake.Equal(that1.MinStake) { + return false + } + if !this.StakingFee.Equal(that1.StakingFee) { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StakingFee != nil { + { + size, err := m.StakingFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.MinStake != nil { + { + size, err := m.MinStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MinStake != nil { + l = m.MinStake.Size() + n += 1 + l + sovParams(uint64(l)) + } + if m.StakingFee != nil { + l = m.StakingFee.Size() + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStake == nil { + m.MinStake = &types.Coin{} + } + if err := m.MinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakingFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StakingFee == nil { + m.StakingFee = &types.Coin{} + } + if err := m.StakingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/supplier/types/query.pb.go b/x/supplier/types/query.pb.go new file mode 100644 index 000000000..fc4da1c09 --- /dev/null +++ b/x/supplier/types/query.pb.go @@ -0,0 +1,1370 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/supplier/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/shared/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryGetSupplierRequest struct { + OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` +} + +func (m *QueryGetSupplierRequest) Reset() { *m = QueryGetSupplierRequest{} } +func (m *QueryGetSupplierRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetSupplierRequest) ProtoMessage() {} +func (*QueryGetSupplierRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{2} +} +func (m *QueryGetSupplierRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSupplierRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetSupplierRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSupplierRequest.Merge(m, src) +} +func (m *QueryGetSupplierRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSupplierRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSupplierRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSupplierRequest proto.InternalMessageInfo + +func (m *QueryGetSupplierRequest) GetOperatorAddress() string { + if m != nil { + return m.OperatorAddress + } + return "" +} + +type QueryGetSupplierResponse struct { + Supplier types.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier"` +} + +func (m *QueryGetSupplierResponse) Reset() { *m = QueryGetSupplierResponse{} } +func (m *QueryGetSupplierResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetSupplierResponse) ProtoMessage() {} +func (*QueryGetSupplierResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{3} +} +func (m *QueryGetSupplierResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSupplierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryGetSupplierResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSupplierResponse.Merge(m, src) +} +func (m *QueryGetSupplierResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSupplierResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSupplierResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSupplierResponse proto.InternalMessageInfo + +func (m *QueryGetSupplierResponse) GetSupplier() types.Supplier { + if m != nil { + return m.Supplier + } + return types.Supplier{} +} + +type QueryAllSuppliersRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllSuppliersRequest) Reset() { *m = QueryAllSuppliersRequest{} } +func (m *QueryAllSuppliersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllSuppliersRequest) ProtoMessage() {} +func (*QueryAllSuppliersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{4} +} +func (m *QueryAllSuppliersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllSuppliersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllSuppliersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllSuppliersRequest.Merge(m, src) +} +func (m *QueryAllSuppliersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllSuppliersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllSuppliersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllSuppliersRequest proto.InternalMessageInfo + +func (m *QueryAllSuppliersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllSuppliersResponse struct { + Supplier []types.Supplier `protobuf:"bytes,1,rep,name=supplier,proto3" json:"supplier"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllSuppliersResponse) Reset() { *m = QueryAllSuppliersResponse{} } +func (m *QueryAllSuppliersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllSuppliersResponse) ProtoMessage() {} +func (*QueryAllSuppliersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7a8c18c53656bd0d, []int{5} +} +func (m *QueryAllSuppliersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllSuppliersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryAllSuppliersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllSuppliersResponse.Merge(m, src) +} +func (m *QueryAllSuppliersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllSuppliersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllSuppliersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllSuppliersResponse proto.InternalMessageInfo + +func (m *QueryAllSuppliersResponse) GetSupplier() []types.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +func (m *QueryAllSuppliersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.supplier.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.supplier.QueryParamsResponse") + proto.RegisterType((*QueryGetSupplierRequest)(nil), "poktroll.supplier.QueryGetSupplierRequest") + proto.RegisterType((*QueryGetSupplierResponse)(nil), "poktroll.supplier.QueryGetSupplierResponse") + proto.RegisterType((*QueryAllSuppliersRequest)(nil), "poktroll.supplier.QueryAllSuppliersRequest") + proto.RegisterType((*QueryAllSuppliersResponse)(nil), "poktroll.supplier.QueryAllSuppliersResponse") +} + +func init() { proto.RegisterFile("poktroll/supplier/query.proto", fileDescriptor_7a8c18c53656bd0d) } + +var fileDescriptor_7a8c18c53656bd0d = []byte{ + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0x16, 0xa2, 0xd6, 0x20, 0x41, 0x4d, 0x24, 0x92, 0x08, 0x0e, 0x74, 0x12, 0x21, + 0x0a, 0xd4, 0x26, 0x65, 0x2c, 0x0c, 0x4d, 0x25, 0x3a, 0x52, 0x92, 0x01, 0x89, 0x81, 0xca, 0x49, + 0xac, 0xeb, 0xa9, 0x97, 0xb3, 0x6b, 0x3b, 0x40, 0x85, 0x58, 0x58, 0x58, 0x91, 0x18, 0x99, 0xd8, + 0x3a, 0x32, 0xf0, 0x21, 0x3a, 0x56, 0xb0, 0x54, 0x0c, 0x08, 0x25, 0x48, 0x7c, 0x0d, 0x14, 0xdb, + 0x97, 0xa6, 0xdc, 0x45, 0x49, 0x97, 0xc8, 0xe7, 0xf7, 0xff, 0xbf, 0xf7, 0xf3, 0x7b, 0x4f, 0x81, + 0x37, 0x05, 0xdf, 0xd3, 0x92, 0x47, 0x11, 0x51, 0x7d, 0x21, 0xa2, 0x90, 0x49, 0xb2, 0xdf, 0x67, + 0xf2, 0x00, 0x0b, 0xc9, 0x35, 0x47, 0x2b, 0x49, 0x18, 0x27, 0xe1, 0xf2, 0x0a, 0xed, 0x85, 0x31, + 0x27, 0xe6, 0xd7, 0xaa, 0xca, 0x85, 0x80, 0x07, 0xdc, 0x1c, 0xc9, 0xe8, 0xe4, 0x6e, 0x6f, 0x04, + 0x9c, 0x07, 0x11, 0x23, 0x54, 0x84, 0x84, 0xc6, 0x31, 0xd7, 0x54, 0x87, 0x3c, 0x56, 0x2e, 0x5a, + 0xea, 0x70, 0xd5, 0xe3, 0x6a, 0xc7, 0xda, 0xec, 0x87, 0x0b, 0xd5, 0xec, 0x17, 0x69, 0x53, 0xc5, + 0x2c, 0x0d, 0x79, 0x55, 0x6f, 0x33, 0x4d, 0xeb, 0x44, 0xd0, 0x20, 0x8c, 0x4d, 0x1e, 0xa7, 0xf5, + 0x26, 0xb5, 0x89, 0xaa, 0xc3, 0xc3, 0x71, 0x3c, 0xfd, 0x3e, 0x41, 0x25, 0xed, 0xa9, 0x74, 0x7c, + 0x97, 0x4a, 0xd6, 0x1d, 0xcb, 0x6c, 0xdc, 0x2f, 0x40, 0xf4, 0x6c, 0x44, 0xb0, 0x6d, 0x4c, 0x4d, + 0xb6, 0xdf, 0x67, 0x4a, 0xfb, 0x2d, 0x78, 0xed, 0xcc, 0xad, 0x12, 0x3c, 0x56, 0x0c, 0x3d, 0x82, + 0x79, 0x9b, 0xbc, 0x08, 0x6e, 0x83, 0xea, 0xa5, 0xb5, 0x12, 0x4e, 0xb5, 0x0f, 0x5b, 0x4b, 0x63, + 0xf9, 0xe8, 0xd7, 0xad, 0xdc, 0xe1, 0xdf, 0xaf, 0x35, 0xd0, 0x74, 0x1e, 0xff, 0x25, 0xbc, 0x6e, + 0x92, 0x6e, 0x31, 0xdd, 0x72, 0x6a, 0x57, 0x0f, 0x6d, 0xc2, 0xab, 0x5c, 0x30, 0x49, 0x35, 0x97, + 0x3b, 0xb4, 0xdb, 0x95, 0x4c, 0xd9, 0x12, 0xcb, 0x8d, 0xe2, 0xf7, 0x6f, 0xab, 0x05, 0xd7, 0xbd, + 0x0d, 0x1b, 0x69, 0x69, 0x19, 0xc6, 0x41, 0xf3, 0x4a, 0xe2, 0x70, 0xd7, 0xfe, 0x73, 0x58, 0x4c, + 0xe7, 0x77, 0xe4, 0xeb, 0x70, 0x29, 0x21, 0xcc, 0x60, 0x37, 0x9d, 0xc1, 0x89, 0xa9, 0x71, 0x61, + 0xc4, 0xde, 0x1c, 0x1b, 0xfc, 0xb6, 0x4b, 0xbc, 0x11, 0x45, 0x89, 0x26, 0xe9, 0x14, 0x7a, 0x02, + 0xe1, 0xe9, 0xcc, 0x5c, 0xea, 0x0a, 0x76, 0xc0, 0xa3, 0xa1, 0x61, 0xbb, 0x6e, 0x6e, 0x74, 0x78, + 0x9b, 0x06, 0xcc, 0x79, 0x9b, 0x13, 0x4e, 0xff, 0x0b, 0x80, 0xa5, 0x8c, 0x22, 0x99, 0xf8, 0x8b, + 0xe7, 0xc2, 0x47, 0x5b, 0x67, 0x10, 0x17, 0x0c, 0xe2, 0xdd, 0x99, 0x88, 0xb6, 0xf2, 0x24, 0xe3, + 0xda, 0xcf, 0x45, 0x78, 0xd1, 0x30, 0xa2, 0x0f, 0x00, 0xe6, 0xed, 0xa0, 0xd1, 0x9d, 0x8c, 0x1d, + 0x48, 0x6f, 0x54, 0xb9, 0x32, 0x4b, 0x66, 0xeb, 0xf9, 0xf8, 0xfd, 0x8f, 0x3f, 0x9f, 0x16, 0xaa, + 0xa8, 0x42, 0x46, 0xfa, 0xd5, 0x98, 0xe9, 0xd7, 0x5c, 0xee, 0x91, 0x69, 0x5b, 0x8e, 0x0e, 0x01, + 0x5c, 0x4a, 0x5e, 0x8e, 0x6a, 0xd3, 0x8a, 0xa4, 0x57, 0xae, 0x7c, 0x6f, 0x2e, 0xad, 0xa3, 0xda, + 0x34, 0x54, 0x8f, 0xd1, 0xfa, 0x2c, 0xaa, 0xf1, 0xe1, 0xed, 0xff, 0xfb, 0xfc, 0x0e, 0x7d, 0x06, + 0xf0, 0xf2, 0xe4, 0x74, 0xd1, 0x54, 0x84, 0x8c, 0x45, 0x2b, 0xdf, 0x9f, 0x4f, 0xec, 0x80, 0x1f, + 0x18, 0xe0, 0x1a, 0xaa, 0xce, 0x0b, 0xdc, 0x78, 0x7a, 0x34, 0xf0, 0xc0, 0xf1, 0xc0, 0x03, 0x27, + 0x03, 0x0f, 0xfc, 0x1e, 0x78, 0xe0, 0xe3, 0xd0, 0xcb, 0x1d, 0x0f, 0xbd, 0xdc, 0xc9, 0xd0, 0xcb, + 0xbd, 0xa8, 0x07, 0xa1, 0xde, 0xed, 0xb7, 0x71, 0x87, 0xf7, 0xa6, 0x64, 0x7c, 0x73, 0x9a, 0x53, + 0x1f, 0x08, 0xa6, 0xda, 0x79, 0xf3, 0x07, 0xf3, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, + 0x67, 0x7e, 0xca, 0x82, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Supplier items. + Supplier(ctx context.Context, in *QueryGetSupplierRequest, opts ...grpc.CallOption) (*QueryGetSupplierResponse, error) + AllSuppliers(ctx context.Context, in *QueryAllSuppliersRequest, opts ...grpc.CallOption) (*QueryAllSuppliersResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Supplier(ctx context.Context, in *QueryGetSupplierRequest, opts ...grpc.CallOption) (*QueryGetSupplierResponse, error) { + out := new(QueryGetSupplierResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Query/Supplier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllSuppliers(ctx context.Context, in *QueryAllSuppliersRequest, opts ...grpc.CallOption) (*QueryAllSuppliersResponse, error) { + out := new(QueryAllSuppliersResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Query/AllSuppliers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Supplier items. + Supplier(context.Context, *QueryGetSupplierRequest) (*QueryGetSupplierResponse, error) + AllSuppliers(context.Context, *QueryAllSuppliersRequest) (*QueryAllSuppliersResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Supplier(ctx context.Context, req *QueryGetSupplierRequest) (*QueryGetSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Supplier not implemented") +} +func (*UnimplementedQueryServer) AllSuppliers(ctx context.Context, req *QueryAllSuppliersRequest) (*QueryAllSuppliersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllSuppliers not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Supplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSupplierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Supplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Query/Supplier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Supplier(ctx, req.(*QueryGetSupplierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllSuppliers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllSuppliersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllSuppliers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Query/AllSuppliers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllSuppliers(ctx, req.(*QueryAllSuppliersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.supplier.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Supplier", + Handler: _Query_Supplier_Handler, + }, + { + MethodName: "AllSuppliers", + Handler: _Query_AllSuppliers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/supplier/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetSupplierRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSupplierRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSupplierRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetSupplierResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSupplierResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSupplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllSuppliersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllSuppliersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllSuppliersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllSuppliersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllSuppliersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllSuppliersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Supplier) > 0 { + for iNdEx := len(m.Supplier) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Supplier[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetSupplierRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetSupplierResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Supplier.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllSuppliersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllSuppliersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Supplier) > 0 { + for _, e := range m.Supplier { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSupplierRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSupplierRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSupplierRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSupplierResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSupplierResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSupplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllSuppliersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllSuppliersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllSuppliersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllSuppliersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllSuppliersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllSuppliersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Supplier = append(m.Supplier, types.Supplier{}) + if err := m.Supplier[len(m.Supplier)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/supplier/types/query.pb.gw.go b/x/supplier/types/query.pb.gw.go new file mode 100644 index 000000000..2114c1d77 --- /dev/null +++ b/x/supplier/types/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/supplier/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Supplier_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSupplierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator_address") + } + + protoReq.OperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator_address", err) + } + + msg, err := client.Supplier(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Supplier_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSupplierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["operator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "operator_address") + } + + protoReq.OperatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "operator_address", err) + } + + msg, err := server.Supplier(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllSuppliers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllSuppliers_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllSuppliersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllSuppliers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllSuppliers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllSuppliers_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllSuppliersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllSuppliers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllSuppliers(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Supplier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Supplier_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Supplier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllSuppliers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllSuppliers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllSuppliers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Supplier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Supplier_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Supplier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllSuppliers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllSuppliers_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllSuppliers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "supplier", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Supplier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"pokt-network", "poktroll", "supplier", "operator_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllSuppliers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 2}, []string{"pokt-network", "poktroll", "supplier"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Supplier_0 = runtime.ForwardResponseMessage + + forward_Query_AllSuppliers_0 = runtime.ForwardResponseMessage +) diff --git a/x/supplier/types/tx.pb.go b/x/supplier/types/tx.pb.go new file mode 100644 index 000000000..59f71319f --- /dev/null +++ b/x/supplier/types/tx.pb.go @@ -0,0 +1,2189 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/supplier/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/pokt-network/poktroll/x/shared/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/supplier parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +type MsgStakeSupplier struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + OperatorAddress string `protobuf:"bytes,3,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` + Stake *types.Coin `protobuf:"bytes,4,opt,name=stake,proto3" json:"stake,omitempty"` + Services []*types1.SupplierServiceConfig `protobuf:"bytes,5,rep,name=services,proto3" json:"services,omitempty"` +} + +func (m *MsgStakeSupplier) Reset() { *m = MsgStakeSupplier{} } +func (m *MsgStakeSupplier) String() string { return proto.CompactTextString(m) } +func (*MsgStakeSupplier) ProtoMessage() {} +func (*MsgStakeSupplier) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{2} +} +func (m *MsgStakeSupplier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeSupplier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeSupplier) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeSupplier.Merge(m, src) +} +func (m *MsgStakeSupplier) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeSupplier) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeSupplier.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeSupplier proto.InternalMessageInfo + +func (m *MsgStakeSupplier) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgStakeSupplier) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgStakeSupplier) GetOperatorAddress() string { + if m != nil { + return m.OperatorAddress + } + return "" +} + +func (m *MsgStakeSupplier) GetStake() *types.Coin { + if m != nil { + return m.Stake + } + return nil +} + +func (m *MsgStakeSupplier) GetServices() []*types1.SupplierServiceConfig { + if m != nil { + return m.Services + } + return nil +} + +type MsgStakeSupplierResponse struct { + Supplier *types1.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"` +} + +func (m *MsgStakeSupplierResponse) Reset() { *m = MsgStakeSupplierResponse{} } +func (m *MsgStakeSupplierResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStakeSupplierResponse) ProtoMessage() {} +func (*MsgStakeSupplierResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{3} +} +func (m *MsgStakeSupplierResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStakeSupplierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgStakeSupplierResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStakeSupplierResponse.Merge(m, src) +} +func (m *MsgStakeSupplierResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStakeSupplierResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStakeSupplierResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStakeSupplierResponse proto.InternalMessageInfo + +func (m *MsgStakeSupplierResponse) GetSupplier() *types1.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +type MsgUnstakeSupplier struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` +} + +func (m *MsgUnstakeSupplier) Reset() { *m = MsgUnstakeSupplier{} } +func (m *MsgUnstakeSupplier) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeSupplier) ProtoMessage() {} +func (*MsgUnstakeSupplier) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{4} +} +func (m *MsgUnstakeSupplier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeSupplier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeSupplier) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeSupplier.Merge(m, src) +} +func (m *MsgUnstakeSupplier) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeSupplier) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeSupplier.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeSupplier proto.InternalMessageInfo + +func (m *MsgUnstakeSupplier) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgUnstakeSupplier) GetOperatorAddress() string { + if m != nil { + return m.OperatorAddress + } + return "" +} + +type MsgUnstakeSupplierResponse struct { + Supplier *types1.Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"` +} + +func (m *MsgUnstakeSupplierResponse) Reset() { *m = MsgUnstakeSupplierResponse{} } +func (m *MsgUnstakeSupplierResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnstakeSupplierResponse) ProtoMessage() {} +func (*MsgUnstakeSupplierResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{5} +} +func (m *MsgUnstakeSupplierResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnstakeSupplierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUnstakeSupplierResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnstakeSupplierResponse.Merge(m, src) +} +func (m *MsgUnstakeSupplierResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnstakeSupplierResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnstakeSupplierResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnstakeSupplierResponse proto.InternalMessageInfo + +func (m *MsgUnstakeSupplierResponse) GetSupplier() *types1.Supplier { + if m != nil { + return m.Supplier + } + return nil +} + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{6} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin,omitempty"` +} + +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsCoin)(nil), + } +} + +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{7} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.supplier.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.supplier.MsgUpdateParamsResponse") + proto.RegisterType((*MsgStakeSupplier)(nil), "poktroll.supplier.MsgStakeSupplier") + proto.RegisterType((*MsgStakeSupplierResponse)(nil), "poktroll.supplier.MsgStakeSupplierResponse") + proto.RegisterType((*MsgUnstakeSupplier)(nil), "poktroll.supplier.MsgUnstakeSupplier") + proto.RegisterType((*MsgUnstakeSupplierResponse)(nil), "poktroll.supplier.MsgUnstakeSupplierResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.supplier.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.supplier.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/supplier/tx.proto", fileDescriptor_63b974929807ef57) } + +var fileDescriptor_63b974929807ef57 = []byte{ + // 701 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0x8f, 0x9b, 0x36, 0xdf, 0xf6, 0xa5, 0x3f, 0x4f, 0xd5, 0xb7, 0xa9, 0x25, 0x4c, 0x71, 0x05, + 0x2a, 0x41, 0xf5, 0x91, 0x02, 0x1d, 0x2a, 0x18, 0x48, 0x17, 0x24, 0x54, 0x01, 0x0e, 0x2c, 0x20, + 0x51, 0x5d, 0x92, 0xc3, 0xb5, 0xda, 0xf8, 0xac, 0xbb, 0xeb, 0xaf, 0x0d, 0x31, 0x32, 0xb1, 0x20, + 0xf1, 0x27, 0x30, 0x30, 0x74, 0x60, 0x67, 0xad, 0x98, 0x2a, 0xa6, 0x4e, 0x08, 0xa5, 0x43, 0xff, + 0x0d, 0x64, 0xfb, 0xec, 0xd4, 0x49, 0xa8, 0x0b, 0x5d, 0x92, 0xbb, 0x7b, 0x9f, 0xf7, 0xb9, 0xf7, + 0x3e, 0xef, 0xbd, 0x33, 0xe8, 0x3e, 0xdb, 0x94, 0x9c, 0x6d, 0x6d, 0x61, 0xb1, 0xed, 0xfb, 0x5b, + 0x2e, 0xe5, 0x58, 0xee, 0x59, 0x3e, 0x67, 0x92, 0xa1, 0xa9, 0xd8, 0x66, 0xc5, 0x36, 0x7d, 0x8a, + 0xb4, 0x5c, 0x8f, 0xe1, 0xf0, 0x37, 0x42, 0xe9, 0x33, 0x0d, 0x26, 0x5a, 0x4c, 0xe0, 0x96, 0x70, + 0xf0, 0x4e, 0x25, 0xf8, 0x53, 0x86, 0xd9, 0xc8, 0xb0, 0x1e, 0xee, 0x70, 0xb4, 0x51, 0xa6, 0x69, + 0x87, 0x39, 0x2c, 0x3a, 0x0f, 0x56, 0xea, 0xd4, 0x50, 0x4c, 0x75, 0x22, 0x28, 0xde, 0xa9, 0xd4, + 0xa9, 0x24, 0x15, 0xdc, 0x60, 0xae, 0x17, 0xdb, 0x7b, 0x63, 0xf5, 0x09, 0x27, 0xad, 0x98, 0xf5, + 0x4a, 0xc7, 0xbe, 0x41, 0x38, 0x6d, 0x62, 0x41, 0xf9, 0x8e, 0xdb, 0xa0, 0xbd, 0xee, 0xca, 0xac, + 0x58, 0x22, 0xbb, 0xf9, 0x4d, 0x83, 0x89, 0x35, 0xe1, 0xbc, 0xf0, 0x9b, 0x44, 0xd2, 0xa7, 0x21, + 0x31, 0x5a, 0x86, 0x11, 0xb2, 0x2d, 0x37, 0x18, 0x77, 0xe5, 0x7e, 0x49, 0x9b, 0xd3, 0x16, 0x46, + 0xaa, 0xa5, 0x1f, 0x5f, 0x17, 0xa7, 0x55, 0x36, 0x0f, 0x9b, 0x4d, 0x4e, 0x85, 0xa8, 0x49, 0xee, + 0x7a, 0x8e, 0xdd, 0x81, 0xa2, 0xfb, 0x50, 0x88, 0x42, 0x2b, 0x0d, 0xcc, 0x69, 0x0b, 0xc5, 0xa5, + 0x59, 0xab, 0x47, 0x4b, 0x2b, 0xba, 0xa2, 0x3a, 0x72, 0xf8, 0xf3, 0x6a, 0xee, 0xf3, 0xe9, 0x41, + 0x59, 0xb3, 0x95, 0xcf, 0xca, 0xf2, 0xbb, 0xd3, 0x83, 0x72, 0x87, 0xed, 0xfd, 0xe9, 0x41, 0x79, + 0x3e, 0x09, 0x7e, 0xaf, 0x93, 0x7d, 0x57, 0xb4, 0xe6, 0x2c, 0xcc, 0x74, 0x1d, 0xd9, 0x54, 0xf8, + 0xcc, 0x13, 0xd4, 0xfc, 0x3e, 0x00, 0x93, 0x6b, 0xc2, 0xa9, 0x49, 0xb2, 0x49, 0x6b, 0xca, 0x1f, + 0xdd, 0x86, 0x82, 0x70, 0x1d, 0x8f, 0xf2, 0xcc, 0xd4, 0x14, 0x0e, 0x3d, 0x80, 0x31, 0xb6, 0xeb, + 0x51, 0xbe, 0x4e, 0x22, 0x73, 0x98, 0xde, 0x79, 0x8e, 0xa3, 0x21, 0x5c, 0x9d, 0xa1, 0x55, 0x98, + 0x64, 0x3e, 0xe5, 0x44, 0xb2, 0x0e, 0x43, 0x3e, 0x83, 0x61, 0x22, 0xf6, 0x88, 0x49, 0x30, 0x0c, + 0x89, 0x20, 0x8d, 0xd2, 0xa0, 0x92, 0x56, 0xb9, 0x05, 0x6d, 0x63, 0xa9, 0xb6, 0xb1, 0x56, 0x99, + 0xeb, 0xd9, 0x11, 0x0e, 0x55, 0x61, 0x58, 0x75, 0x82, 0x28, 0x0d, 0xcd, 0xe5, 0x17, 0x8a, 0x4b, + 0x37, 0xce, 0x94, 0x23, 0xec, 0x05, 0x2b, 0xd6, 0xa4, 0x16, 0x01, 0x57, 0x99, 0xf7, 0xc6, 0x75, + 0xec, 0xc4, 0x6f, 0xa5, 0x18, 0x94, 0x44, 0xa9, 0x60, 0x3e, 0x83, 0x52, 0xb7, 0x96, 0xb1, 0xd0, + 0xe8, 0x1e, 0x0c, 0xc7, 0xf5, 0x09, 0x55, 0x4d, 0xd7, 0x3e, 0x7d, 0x99, 0x9d, 0x40, 0xcd, 0x4f, + 0x1a, 0xa0, 0xa0, 0x76, 0x9e, 0xb8, 0x64, 0x85, 0xfa, 0x49, 0x3c, 0xf0, 0x97, 0x12, 0xa7, 0xb3, + 0xad, 0x81, 0xde, 0x1b, 0xd9, 0x65, 0xf3, 0xfd, 0xa2, 0xc1, 0x78, 0xba, 0x57, 0xff, 0x79, 0xd6, + 0x10, 0x0c, 0x7a, 0xa4, 0x45, 0xa3, 0x2c, 0xed, 0x70, 0x8d, 0xee, 0xc2, 0x7f, 0x44, 0xac, 0x07, + 0x6f, 0x47, 0xd8, 0x5f, 0xe7, 0x75, 0xc9, 0xa3, 0x9c, 0x5d, 0x20, 0x22, 0x58, 0xad, 0x8c, 0xa7, + 0xe7, 0xae, 0x3a, 0x0c, 0x05, 0x22, 0x9e, 0xef, 0xfb, 0xd4, 0x7c, 0x0c, 0xff, 0xa7, 0xa3, 0x4d, + 0xf2, 0xaf, 0x24, 0x93, 0xae, 0x65, 0x4c, 0x7a, 0x3c, 0xde, 0x4b, 0x1f, 0xf3, 0x90, 0x5f, 0x13, + 0x0e, 0x7a, 0x0d, 0xa3, 0xa9, 0xc7, 0xc6, 0xec, 0xe3, 0xda, 0x35, 0xcf, 0x7a, 0x39, 0x1b, 0x93, + 0x84, 0x46, 0x60, 0x2c, 0x3d, 0xef, 0xf3, 0xfd, 0x9d, 0x53, 0x20, 0xfd, 0xd6, 0x05, 0x40, 0xc9, + 0x15, 0x0e, 0x4c, 0x74, 0xb7, 0xec, 0xf5, 0x3f, 0x44, 0x98, 0x86, 0xe9, 0x8b, 0x17, 0x82, 0x25, + 0x17, 0xbd, 0x82, 0xe2, 0xd9, 0x5e, 0xb9, 0x96, 0x29, 0x83, 0x7e, 0x33, 0x13, 0x12, 0x93, 0xeb, + 0x43, 0x6f, 0x83, 0xe7, 0xb7, 0xfa, 0xe4, 0xb0, 0x6d, 0x68, 0x47, 0x6d, 0x43, 0x3b, 0x6e, 0x1b, + 0xda, 0xaf, 0xb6, 0xa1, 0x7d, 0x38, 0x31, 0x72, 0x47, 0x27, 0x46, 0xee, 0xf8, 0xc4, 0xc8, 0xbd, + 0xac, 0x38, 0xae, 0xdc, 0xd8, 0xae, 0x5b, 0x0d, 0xd6, 0xc2, 0x01, 0xf3, 0xa2, 0x47, 0xe5, 0x2e, + 0xe3, 0x9b, 0xb8, 0xdf, 0xcb, 0x2c, 0xf7, 0x7d, 0x2a, 0xea, 0x85, 0xf0, 0xc3, 0x72, 0xe7, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xe6, 0x12, 0x17, 0x65, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) + UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) { + out := new(MsgStakeSupplierResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Msg/StakeSupplier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) { + out := new(MsgUnstakeSupplierResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Msg/UnstakeSupplier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StakeSupplier(context.Context, *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) + UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) StakeSupplier(ctx context.Context, req *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakeSupplier not implemented") +} +func (*UnimplementedMsgServer) UnstakeSupplier(ctx context.Context, req *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnstakeSupplier not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StakeSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStakeSupplier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StakeSupplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Msg/StakeSupplier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StakeSupplier(ctx, req.(*MsgStakeSupplier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnstakeSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnstakeSupplier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnstakeSupplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Msg/UnstakeSupplier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnstakeSupplier(ctx, req.(*MsgUnstakeSupplier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.supplier.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StakeSupplier", + Handler: _Msg_StakeSupplier_Handler, + }, + { + MethodName: "UnstakeSupplier", + Handler: _Msg_UnstakeSupplier_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/supplier/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStakeSupplier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeSupplier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeSupplier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.Stake != nil { + { + size, err := m.Stake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStakeSupplierResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStakeSupplierResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStakeSupplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeSupplier) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeSupplier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeSupplier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnstakeSupplierResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUnstakeSupplierResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnstakeSupplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Supplier != nil { + { + size, err := m.Supplier.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStakeSupplier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Stake != nil { + l = m.Stake.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Services) > 0 { + for _, e := range m.Services { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgStakeSupplierResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeSupplier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnstakeSupplierResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Supplier != nil { + l = m.Supplier.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeSupplier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeSupplier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeSupplier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stake == nil { + m.Stake = &types.Coin{} + } + if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, &types1.SupplierServiceConfig{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStakeSupplierResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStakeSupplierResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStakeSupplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types1.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeSupplier) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeSupplier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeSupplier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnstakeSupplierResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUnstakeSupplierResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnstakeSupplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Supplier == nil { + m.Supplier = &types1.Supplier{} + } + if err := m.Supplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/event.pb.go b/x/tokenomics/types/event.pb.go new file mode 100644 index 000000000..3b486d01f --- /dev/null +++ b/x/tokenomics/types/event.pb.go @@ -0,0 +1,2063 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/event.proto + +package types + +import ( + fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/proof/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ClaimExpirationReason int32 + +const ( + ClaimExpirationReason_EXPIRATION_REASON_UNSPECIFIED ClaimExpirationReason = 0 + ClaimExpirationReason_PROOF_MISSING ClaimExpirationReason = 1 + ClaimExpirationReason_PROOF_INVALID ClaimExpirationReason = 2 +) + +var ClaimExpirationReason_name = map[int32]string{ + 0: "EXPIRATION_REASON_UNSPECIFIED", + 1: "PROOF_MISSING", + 2: "PROOF_INVALID", +} + +var ClaimExpirationReason_value = map[string]int32{ + "EXPIRATION_REASON_UNSPECIFIED": 0, + "PROOF_MISSING": 1, + "PROOF_INVALID": 2, +} + +func (x ClaimExpirationReason) String() string { + return proto.EnumName(ClaimExpirationReason_name, int32(x)) +} + +func (ClaimExpirationReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{0} +} + +// EventClaimExpired is an event emitted during settlement whenever a claim requiring +// an onchain proof doesn't have one. The claim cannot be settled, leading to that work +// never being rewarded. +type EventClaimExpired struct { + Claim *types.Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + // The reason why the claim expired, leading to a Supplier being penalized (i.e. burn). + ExpirationReason ClaimExpirationReason `protobuf:"varint,2,opt,name=expiration_reason,json=expirationReason,proto3,enum=poktroll.tokenomics.ClaimExpirationReason" json:"expiration_reason"` + //Number of relays claimed to be in the session tree. + NumRelays uint64 `protobuf:"varint,3,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + // Number of compute units claimed as a function of the number of relays + // and the compute units per relay for the particular service. + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + // Number of estimated compute units claimed as a function of the number of claimed + // compute units and the relay difficulty multiplier for the particular service. + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + // The uPOKT coin claimed to be rewarded for the work done as a function of + // the number of estimated compute units and the compute uints to token multiplier. + ClaimedUpokt *types1.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` +} + +func (m *EventClaimExpired) Reset() { *m = EventClaimExpired{} } +func (m *EventClaimExpired) String() string { return proto.CompactTextString(m) } +func (*EventClaimExpired) ProtoMessage() {} +func (*EventClaimExpired) Descriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{0} +} +func (m *EventClaimExpired) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClaimExpired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventClaimExpired) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClaimExpired.Merge(m, src) +} +func (m *EventClaimExpired) XXX_Size() int { + return m.Size() +} +func (m *EventClaimExpired) XXX_DiscardUnknown() { + xxx_messageInfo_EventClaimExpired.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClaimExpired proto.InternalMessageInfo + +func (m *EventClaimExpired) GetClaim() *types.Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventClaimExpired) GetExpirationReason() ClaimExpirationReason { + if m != nil { + return m.ExpirationReason + } + return ClaimExpirationReason_EXPIRATION_REASON_UNSPECIFIED +} + +func (m *EventClaimExpired) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventClaimExpired) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventClaimExpired) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventClaimExpired) GetClaimedUpokt() *types1.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +// EventClaimSettled is an event emitted whenever a claim is settled. +// The proof_required determines whether the claim requires a proof that has been submitted or not +type EventClaimSettled struct { + Claim *types.Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + // The reason why the claim was settled, leading to a Supplier being rewarded (i.e. mint). + ProofRequirement types.ProofRequirementReason `protobuf:"varint,2,opt,name=proof_requirement,json=proofRequirement,proto3,enum=poktroll.proof.ProofRequirementReason" json:"proof_requirement"` + // Number of relays claimed to be in the session tree. + NumRelays uint64 `protobuf:"varint,3,opt,name=num_relays,json=numRelays,proto3" json:"num_relays"` + // Number of compute units claimed as a function of the number of relays + // and the compute units per relay for the particular service. + NumClaimedComputeUnits uint64 `protobuf:"varint,4,opt,name=num_claimed_compute_units,json=numClaimedComputeUnits,proto3" json:"num_claimed_compute_units"` + // Number of estimated compute units claimed as a function of the number of claimed + // compute units and the relay difficulty multiplier for the particular service. + NumEstimatedComputeUnits uint64 `protobuf:"varint,5,opt,name=num_estimated_compute_units,json=numEstimatedComputeUnits,proto3" json:"num_estimated_compute_units"` + // The uPOKT coin claimed to be rewarded for the work done as a function of + // the number of estimated compute units and the compute uints to token multiplier. + ClaimedUpokt *types1.Coin `protobuf:"bytes,6,opt,name=claimed_upokt,json=claimedUpokt,proto3" json:"claimed_upokt"` + // SettlementResult holds mint, burn, and transfer operations on a per-claim basis. + SettlementResult ClaimSettlementResult `protobuf:"bytes,7,opt,name=settlement_result,json=settlementResult,proto3" json:"settlement_result"` +} + +func (m *EventClaimSettled) Reset() { *m = EventClaimSettled{} } +func (m *EventClaimSettled) String() string { return proto.CompactTextString(m) } +func (*EventClaimSettled) ProtoMessage() {} +func (*EventClaimSettled) Descriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{1} +} +func (m *EventClaimSettled) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventClaimSettled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventClaimSettled) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventClaimSettled.Merge(m, src) +} +func (m *EventClaimSettled) XXX_Size() int { + return m.Size() +} +func (m *EventClaimSettled) XXX_DiscardUnknown() { + xxx_messageInfo_EventClaimSettled.DiscardUnknown(m) +} + +var xxx_messageInfo_EventClaimSettled proto.InternalMessageInfo + +func (m *EventClaimSettled) GetClaim() *types.Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventClaimSettled) GetProofRequirement() types.ProofRequirementReason { + if m != nil { + return m.ProofRequirement + } + return types.ProofRequirementReason_NOT_REQUIRED +} + +func (m *EventClaimSettled) GetNumRelays() uint64 { + if m != nil { + return m.NumRelays + } + return 0 +} + +func (m *EventClaimSettled) GetNumClaimedComputeUnits() uint64 { + if m != nil { + return m.NumClaimedComputeUnits + } + return 0 +} + +func (m *EventClaimSettled) GetNumEstimatedComputeUnits() uint64 { + if m != nil { + return m.NumEstimatedComputeUnits + } + return 0 +} + +func (m *EventClaimSettled) GetClaimedUpokt() *types1.Coin { + if m != nil { + return m.ClaimedUpokt + } + return nil +} + +func (m *EventClaimSettled) GetSettlementResult() ClaimSettlementResult { + if m != nil { + return m.SettlementResult + } + return ClaimSettlementResult{} +} + +// EventApplicationOverserviced is emitted when an application has less stake than +// what a supplier is claiming (i.e. amount available for burning is insufficient). +// This means the following will ALWAYS be strictly true: effective_burn < expected_burn. +type EventApplicationOverserviced struct { + ApplicationAddr string `protobuf:"bytes,1,opt,name=application_addr,json=applicationAddr,proto3" json:"application_addr,omitempty"` + SupplierOperatorAddr string `protobuf:"bytes,2,opt,name=supplier_operator_addr,json=supplierOperatorAddr,proto3" json:"supplier_operator_addr,omitempty"` + // Expected burn is the amount the supplier is claiming for work done + // to service the application during the session. + // This is usually the amount in the Claim submitted. + ExpectedBurn *types1.Coin `protobuf:"bytes,3,opt,name=expected_burn,json=expectedBurn,proto3" json:"expected_burn,omitempty"` + // Effective burn is the amount that is actually being paid to the supplier + // for the work done. It is less than the expected burn (claim amount) and + // is a function of the relay mining algorithm. + // E.g. The application's stake divided by the number of suppliers in a session. + EffectiveBurn *types1.Coin `protobuf:"bytes,4,opt,name=effective_burn,json=effectiveBurn,proto3" json:"effective_burn,omitempty"` +} + +func (m *EventApplicationOverserviced) Reset() { *m = EventApplicationOverserviced{} } +func (m *EventApplicationOverserviced) String() string { return proto.CompactTextString(m) } +func (*EventApplicationOverserviced) ProtoMessage() {} +func (*EventApplicationOverserviced) Descriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{2} +} +func (m *EventApplicationOverserviced) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationOverserviced) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationOverserviced) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationOverserviced.Merge(m, src) +} +func (m *EventApplicationOverserviced) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationOverserviced) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationOverserviced.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationOverserviced proto.InternalMessageInfo + +func (m *EventApplicationOverserviced) GetApplicationAddr() string { + if m != nil { + return m.ApplicationAddr + } + return "" +} + +func (m *EventApplicationOverserviced) GetSupplierOperatorAddr() string { + if m != nil { + return m.SupplierOperatorAddr + } + return "" +} + +func (m *EventApplicationOverserviced) GetExpectedBurn() *types1.Coin { + if m != nil { + return m.ExpectedBurn + } + return nil +} + +func (m *EventApplicationOverserviced) GetEffectiveBurn() *types1.Coin { + if m != nil { + return m.EffectiveBurn + } + return nil +} + +// EventSupplierSlashed is emitted when a supplier is slashed for not providing, +// or provided invalid required proofs for claims. +type EventSupplierSlashed struct { + Claim *types.Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"` + // Amount slashed from the supplier's stake due to the expired claims. + // This is a function of the number of expired claims and proof missing penalty. + ProofMissingPenalty *types1.Coin `protobuf:"bytes,2,opt,name=proof_missing_penalty,json=proofMissingPenalty,proto3" json:"proof_missing_penalty,omitempty"` +} + +func (m *EventSupplierSlashed) Reset() { *m = EventSupplierSlashed{} } +func (m *EventSupplierSlashed) String() string { return proto.CompactTextString(m) } +func (*EventSupplierSlashed) ProtoMessage() {} +func (*EventSupplierSlashed) Descriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{3} +} +func (m *EventSupplierSlashed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSupplierSlashed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSupplierSlashed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSupplierSlashed.Merge(m, src) +} +func (m *EventSupplierSlashed) XXX_Size() int { + return m.Size() +} +func (m *EventSupplierSlashed) XXX_DiscardUnknown() { + xxx_messageInfo_EventSupplierSlashed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSupplierSlashed proto.InternalMessageInfo + +func (m *EventSupplierSlashed) GetClaim() *types.Claim { + if m != nil { + return m.Claim + } + return nil +} + +func (m *EventSupplierSlashed) GetProofMissingPenalty() *types1.Coin { + if m != nil { + return m.ProofMissingPenalty + } + return nil +} + +// EventApplicationReimbursementRequest is emitted when an application requests +// a reimbursement. +type EventApplicationReimbursementRequest struct { + ApplicationAddr string `protobuf:"bytes,1,opt,name=application_addr,json=applicationAddr,proto3" json:"application_addr,omitempty"` + SupplierOperatorAddr string `protobuf:"bytes,2,opt,name=supplier_operator_addr,json=supplierOperatorAddr,proto3" json:"supplier_operator_addr,omitempty"` + SupplierOwnerAddr string `protobuf:"bytes,3,opt,name=supplier_owner_addr,json=supplierOwnerAddr,proto3" json:"supplier_owner_addr,omitempty"` + ServiceId string `protobuf:"bytes,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` + SessionId string `protobuf:"bytes,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Amount *types1.Coin `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventApplicationReimbursementRequest) Reset() { *m = EventApplicationReimbursementRequest{} } +func (m *EventApplicationReimbursementRequest) String() string { return proto.CompactTextString(m) } +func (*EventApplicationReimbursementRequest) ProtoMessage() {} +func (*EventApplicationReimbursementRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a78874bbf91a58c7, []int{4} +} +func (m *EventApplicationReimbursementRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventApplicationReimbursementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventApplicationReimbursementRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventApplicationReimbursementRequest.Merge(m, src) +} +func (m *EventApplicationReimbursementRequest) XXX_Size() int { + return m.Size() +} +func (m *EventApplicationReimbursementRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EventApplicationReimbursementRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EventApplicationReimbursementRequest proto.InternalMessageInfo + +func (m *EventApplicationReimbursementRequest) GetApplicationAddr() string { + if m != nil { + return m.ApplicationAddr + } + return "" +} + +func (m *EventApplicationReimbursementRequest) GetSupplierOperatorAddr() string { + if m != nil { + return m.SupplierOperatorAddr + } + return "" +} + +func (m *EventApplicationReimbursementRequest) GetSupplierOwnerAddr() string { + if m != nil { + return m.SupplierOwnerAddr + } + return "" +} + +func (m *EventApplicationReimbursementRequest) GetServiceId() string { + if m != nil { + return m.ServiceId + } + return "" +} + +func (m *EventApplicationReimbursementRequest) GetSessionId() string { + if m != nil { + return m.SessionId + } + return "" +} + +func (m *EventApplicationReimbursementRequest) GetAmount() *types1.Coin { + if m != nil { + return m.Amount + } + return nil +} + +func init() { + proto.RegisterEnum("poktroll.tokenomics.ClaimExpirationReason", ClaimExpirationReason_name, ClaimExpirationReason_value) + proto.RegisterType((*EventClaimExpired)(nil), "poktroll.tokenomics.EventClaimExpired") + proto.RegisterType((*EventClaimSettled)(nil), "poktroll.tokenomics.EventClaimSettled") + proto.RegisterType((*EventApplicationOverserviced)(nil), "poktroll.tokenomics.EventApplicationOverserviced") + proto.RegisterType((*EventSupplierSlashed)(nil), "poktroll.tokenomics.EventSupplierSlashed") + proto.RegisterType((*EventApplicationReimbursementRequest)(nil), "poktroll.tokenomics.EventApplicationReimbursementRequest") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/event.proto", fileDescriptor_a78874bbf91a58c7) } + +var fileDescriptor_a78874bbf91a58c7 = []byte{ + // 852 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x3a, 0x69, 0x90, 0x87, 0x26, 0xd8, 0x9b, 0xa4, 0x72, 0x02, 0xf1, 0x06, 0x0b, 0xa1, + 0x50, 0xd4, 0x5d, 0xa5, 0x45, 0x1c, 0x11, 0xb6, 0xeb, 0xa2, 0x95, 0x88, 0xed, 0x8e, 0x09, 0xaa, + 0x38, 0xb0, 0xac, 0x77, 0x5f, 0xd2, 0x21, 0xbb, 0x33, 0xdb, 0x99, 0x59, 0x37, 0x39, 0xf2, 0x0d, + 0x10, 0x9f, 0x82, 0x8f, 0xd2, 0x63, 0x8f, 0x3d, 0x59, 0x28, 0x39, 0x20, 0xf9, 0x0b, 0x70, 0x45, + 0x33, 0xbb, 0xfe, 0x53, 0x3b, 0x24, 0x08, 0xc4, 0x8d, 0x8b, 0x3d, 0xf3, 0xde, 0xef, 0xf7, 0x9b, + 0xb7, 0xf3, 0x7b, 0x4f, 0x83, 0xac, 0x84, 0x9d, 0x49, 0xce, 0xa2, 0xc8, 0x91, 0xec, 0x0c, 0x28, + 0x8b, 0x49, 0x20, 0x1c, 0x18, 0x02, 0x95, 0x76, 0xc2, 0x99, 0x64, 0xe6, 0xe6, 0x04, 0x60, 0xcf, + 0x00, 0xbb, 0xb5, 0x80, 0x89, 0x98, 0x09, 0x67, 0xe0, 0x0b, 0x70, 0x86, 0x87, 0x03, 0x90, 0xfe, + 0xa1, 0x13, 0x30, 0x42, 0x33, 0xd2, 0xee, 0xd6, 0x29, 0x3b, 0x65, 0x7a, 0xe9, 0xa8, 0x55, 0x1e, + 0xdd, 0x9d, 0x9e, 0x95, 0x70, 0xc6, 0x4e, 0x1c, 0x79, 0x91, 0x80, 0xc8, 0x73, 0xd7, 0xd6, 0x31, + 0x07, 0xa8, 0xff, 0xb1, 0x82, 0x2a, 0x6d, 0x55, 0x57, 0x2b, 0xf2, 0x49, 0xdc, 0x3e, 0x4f, 0x08, + 0x87, 0xd0, 0xfc, 0x1c, 0xdd, 0x09, 0xd4, 0xbe, 0x6a, 0xec, 0x1b, 0x07, 0xef, 0x3e, 0xdc, 0xb6, + 0xa7, 0xd5, 0xea, 0x23, 0x6c, 0x0d, 0x6e, 0x96, 0xc6, 0x23, 0x2b, 0xc3, 0xe1, 0xec, 0xcf, 0xa4, + 0xa8, 0x02, 0x4a, 0xc2, 0x97, 0x84, 0x51, 0x8f, 0x83, 0x2f, 0x18, 0xad, 0x16, 0xf7, 0x8d, 0x83, + 0x8d, 0x87, 0xf7, 0xed, 0x6b, 0xbe, 0xd8, 0x9e, 0x9d, 0xaa, 0x29, 0x58, 0x33, 0x9a, 0xdb, 0xe3, + 0x91, 0xb5, 0x2c, 0x84, 0xcb, 0xb0, 0x00, 0x34, 0x1f, 0x20, 0x44, 0xd3, 0xd8, 0xe3, 0x10, 0xf9, + 0x17, 0xa2, 0xba, 0xb2, 0x6f, 0x1c, 0xac, 0x36, 0x37, 0xc6, 0x23, 0x6b, 0x2e, 0x8a, 0x4b, 0x34, + 0x8d, 0xb1, 0x5e, 0x9a, 0xcf, 0xd0, 0x8e, 0x4a, 0xe8, 0x5a, 0x21, 0xf4, 0x02, 0x16, 0x27, 0xa9, + 0x04, 0x2f, 0xa5, 0x44, 0x8a, 0xea, 0xaa, 0x66, 0xef, 0x8d, 0x47, 0xd6, 0x5f, 0x83, 0xf0, 0x3d, + 0x9a, 0xc6, 0xad, 0x2c, 0xd3, 0xca, 0x12, 0xc7, 0x2a, 0x6e, 0x7e, 0x8f, 0xde, 0x57, 0x24, 0x10, + 0x92, 0xc4, 0xbe, 0x5c, 0xd2, 0xbe, 0xa3, 0xb5, 0xad, 0xf1, 0xc8, 0xba, 0x09, 0x86, 0xab, 0x34, + 0x8d, 0xdb, 0x93, 0xdc, 0x5b, 0xfa, 0x4f, 0xd1, 0xfa, 0xa4, 0xa0, 0x54, 0xdd, 0x63, 0x75, 0x4d, + 0x1b, 0xb3, 0x63, 0x67, 0x1d, 0x63, 0xab, 0x8e, 0xb1, 0xf3, 0x8e, 0xb1, 0x5b, 0x8c, 0xd0, 0x66, + 0x65, 0x3c, 0xb2, 0xde, 0xe6, 0xe0, 0xbb, 0xf9, 0xf6, 0x58, 0xed, 0xea, 0xbf, 0xaf, 0xce, 0x3b, + 0xdf, 0x07, 0x29, 0xa3, 0x7f, 0xe1, 0xfc, 0x8f, 0xa8, 0xa2, 0x01, 0x1e, 0x87, 0x17, 0x29, 0xe1, + 0x10, 0x03, 0x95, 0xb9, 0xf3, 0x1f, 0x2f, 0x6a, 0xf4, 0xd4, 0x2f, 0x9e, 0xe1, 0xe6, 0x5d, 0x5f, + 0x12, 0xc1, 0xe5, 0x64, 0x01, 0xfe, 0xbf, 0xeb, 0xff, 0xdc, 0x75, 0x93, 0xa3, 0x8a, 0xd0, 0x56, + 0xab, 0x9b, 0xf4, 0x38, 0x88, 0x34, 0x92, 0xd5, 0x77, 0xb4, 0xec, 0x0d, 0x13, 0xda, 0x9f, 0x52, + 0xb0, 0x66, 0x34, 0x77, 0x5e, 0x8d, 0xac, 0x82, 0xf2, 0x6b, 0x49, 0x0c, 0x97, 0xc5, 0x02, 0xb8, + 0xfe, 0x53, 0x11, 0x7d, 0xa0, 0x3b, 0xad, 0x91, 0x24, 0x11, 0x09, 0xf4, 0x00, 0x77, 0x87, 0xc0, + 0x05, 0xf0, 0x21, 0x09, 0x20, 0x34, 0x3f, 0x41, 0x65, 0x7f, 0x96, 0xf2, 0xfc, 0x30, 0xe4, 0xba, + 0xff, 0x4a, 0xf8, 0xbd, 0xb9, 0x78, 0x23, 0x0c, 0xb9, 0xf9, 0x19, 0xba, 0x27, 0x52, 0x15, 0x03, + 0xee, 0xb1, 0x04, 0xb8, 0x2f, 0x19, 0xcf, 0x08, 0x45, 0x4d, 0xd8, 0x9a, 0x64, 0xbb, 0x79, 0x52, + 0xb3, 0xbe, 0x40, 0xeb, 0x70, 0x9e, 0x40, 0xa0, 0x2e, 0x7f, 0x90, 0x72, 0xaa, 0x9b, 0xe6, 0xa6, + 0x8b, 0xc4, 0x77, 0x27, 0xf8, 0x66, 0xca, 0xa9, 0xf9, 0x25, 0xda, 0x80, 0x93, 0x13, 0x08, 0x24, + 0x19, 0x42, 0x26, 0xb0, 0x7a, 0x9b, 0xc0, 0xfa, 0x94, 0xa0, 0x14, 0xea, 0xbf, 0x18, 0x68, 0x4b, + 0xdf, 0x41, 0x3f, 0xaf, 0xaf, 0x1f, 0xf9, 0xe2, 0x39, 0x84, 0xe6, 0xa7, 0x7f, 0x67, 0xe0, 0x26, + 0x53, 0x76, 0x84, 0xb6, 0xb3, 0x01, 0x89, 0x89, 0x10, 0x84, 0x9e, 0x7a, 0x09, 0x50, 0x3f, 0x92, + 0x17, 0xfa, 0xe3, 0x6f, 0x2c, 0x67, 0x53, 0xf3, 0x8e, 0x32, 0x5a, 0x2f, 0x63, 0xd5, 0x7f, 0x2d, + 0xa2, 0x8f, 0x16, 0x8d, 0xc1, 0x40, 0xe2, 0x41, 0xca, 0x45, 0x6e, 0xe0, 0x8b, 0x14, 0x84, 0xfc, + 0xef, 0x0d, 0xb2, 0xd1, 0xe6, 0x8c, 0xf5, 0x92, 0x42, 0x4e, 0x59, 0xd1, 0x94, 0xca, 0x94, 0xa2, + 0x32, 0x1a, 0xbf, 0x87, 0x50, 0xde, 0x3d, 0x1e, 0x09, 0xb5, 0x19, 0x25, 0x5c, 0xca, 0x23, 0x6e, + 0x98, 0xa5, 0x85, 0x50, 0xb5, 0x92, 0x50, 0xcf, 0xa1, 0x4e, 0xeb, 0x88, 0x1b, 0x9a, 0x87, 0x68, + 0xcd, 0x8f, 0x59, 0x4a, 0x6f, 0x1f, 0x28, 0x9c, 0x03, 0xef, 0xff, 0x80, 0xb6, 0xaf, 0x7d, 0xab, + 0xcc, 0x0f, 0xd1, 0x5e, 0xfb, 0x59, 0xcf, 0xc5, 0x8d, 0x6f, 0xdc, 0x6e, 0xc7, 0xc3, 0xed, 0x46, + 0xbf, 0xdb, 0xf1, 0x8e, 0x3b, 0xfd, 0x5e, 0xbb, 0xe5, 0x3e, 0x71, 0xdb, 0x8f, 0xcb, 0x05, 0xb3, + 0x82, 0xd6, 0x7b, 0xb8, 0xdb, 0x7d, 0xe2, 0x1d, 0xb9, 0xfd, 0xbe, 0xdb, 0xf9, 0xaa, 0x6c, 0xcc, + 0x42, 0x6e, 0xe7, 0xdb, 0xc6, 0xd7, 0xee, 0xe3, 0x72, 0xb1, 0xf9, 0xf4, 0xd5, 0x65, 0xcd, 0x78, + 0x7d, 0x59, 0x33, 0xde, 0x5c, 0xd6, 0x8c, 0xdf, 0x2e, 0x6b, 0xc6, 0xcf, 0x57, 0xb5, 0xc2, 0xeb, + 0xab, 0x5a, 0xe1, 0xcd, 0x55, 0xad, 0xf0, 0xdd, 0xa3, 0x53, 0x22, 0x9f, 0xa7, 0x03, 0x3b, 0x60, + 0xb1, 0xa3, 0x3a, 0xe4, 0x01, 0x05, 0xf9, 0x92, 0xf1, 0x33, 0x67, 0xfa, 0xc0, 0x9f, 0x2f, 0x3d, + 0xf1, 0x83, 0x35, 0xfd, 0xc6, 0x3f, 0xfa, 0x33, 0x00, 0x00, 0xff, 0xff, 0xe4, 0xb5, 0x1b, 0x6e, + 0x8e, 0x08, 0x00, 0x00, +} + +func (m *EventClaimExpired) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventClaimExpired) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClaimExpired) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x18 + } + if m.ExpirationReason != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ExpirationReason)) + i-- + dAtA[i] = 0x10 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventClaimSettled) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventClaimSettled) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventClaimSettled) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SettlementResult.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if m.ClaimedUpokt != nil { + { + size, err := m.ClaimedUpokt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.NumEstimatedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumEstimatedComputeUnits)) + i-- + dAtA[i] = 0x28 + } + if m.NumClaimedComputeUnits != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumClaimedComputeUnits)) + i-- + dAtA[i] = 0x20 + } + if m.NumRelays != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.NumRelays)) + i-- + dAtA[i] = 0x18 + } + if m.ProofRequirement != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.ProofRequirement)) + i-- + dAtA[i] = 0x10 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventApplicationOverserviced) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationOverserviced) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationOverserviced) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EffectiveBurn != nil { + { + size, err := m.EffectiveBurn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.ExpectedBurn != nil { + { + size, err := m.ExpectedBurn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.SupplierOperatorAddr) > 0 { + i -= len(m.SupplierOperatorAddr) + copy(dAtA[i:], m.SupplierOperatorAddr) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SupplierOperatorAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApplicationAddr) > 0 { + i -= len(m.ApplicationAddr) + copy(dAtA[i:], m.ApplicationAddr) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ApplicationAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSupplierSlashed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSupplierSlashed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSupplierSlashed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProofMissingPenalty != nil { + { + size, err := m.ProofMissingPenalty.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Claim != nil { + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventApplicationReimbursementRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventApplicationReimbursementRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventApplicationReimbursementRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != nil { + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.SessionId) > 0 { + i -= len(m.SessionId) + copy(dAtA[i:], m.SessionId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SessionId))) + i-- + dAtA[i] = 0x2a + } + if len(m.ServiceId) > 0 { + i -= len(m.ServiceId) + copy(dAtA[i:], m.ServiceId) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ServiceId))) + i-- + dAtA[i] = 0x22 + } + if len(m.SupplierOwnerAddr) > 0 { + i -= len(m.SupplierOwnerAddr) + copy(dAtA[i:], m.SupplierOwnerAddr) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SupplierOwnerAddr))) + i-- + dAtA[i] = 0x1a + } + if len(m.SupplierOperatorAddr) > 0 { + i -= len(m.SupplierOperatorAddr) + copy(dAtA[i:], m.SupplierOperatorAddr) + i = encodeVarintEvent(dAtA, i, uint64(len(m.SupplierOperatorAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApplicationAddr) > 0 { + i -= len(m.ApplicationAddr) + copy(dAtA[i:], m.ApplicationAddr) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ApplicationAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventClaimExpired) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.ExpirationReason != 0 { + n += 1 + sovEvent(uint64(m.ExpirationReason)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventClaimSettled) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.ProofRequirement != 0 { + n += 1 + sovEvent(uint64(m.ProofRequirement)) + } + if m.NumRelays != 0 { + n += 1 + sovEvent(uint64(m.NumRelays)) + } + if m.NumClaimedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumClaimedComputeUnits)) + } + if m.NumEstimatedComputeUnits != 0 { + n += 1 + sovEvent(uint64(m.NumEstimatedComputeUnits)) + } + if m.ClaimedUpokt != nil { + l = m.ClaimedUpokt.Size() + n += 1 + l + sovEvent(uint64(l)) + } + l = m.SettlementResult.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventApplicationOverserviced) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ApplicationAddr) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SupplierOperatorAddr) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.ExpectedBurn != nil { + l = m.ExpectedBurn.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.EffectiveBurn != nil { + l = m.EffectiveBurn.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventSupplierSlashed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Claim != nil { + l = m.Claim.Size() + n += 1 + l + sovEvent(uint64(l)) + } + if m.ProofMissingPenalty != nil { + l = m.ProofMissingPenalty.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventApplicationReimbursementRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ApplicationAddr) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SupplierOperatorAddr) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SupplierOwnerAddr) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ServiceId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.SessionId) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventClaimExpired) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventClaimExpired: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClaimExpired: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &types.Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationReason", wireType) + } + m.ExpirationReason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationReason |= ClaimExpirationReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types1.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventClaimSettled) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventClaimSettled: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventClaimSettled: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &types.Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofRequirement", wireType) + } + m.ProofRequirement = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProofRequirement |= types.ProofRequirementReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumRelays", wireType) + } + m.NumRelays = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumRelays |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumClaimedComputeUnits", wireType) + } + m.NumClaimedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumClaimedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumEstimatedComputeUnits", wireType) + } + m.NumEstimatedComputeUnits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumEstimatedComputeUnits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedUpokt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClaimedUpokt == nil { + m.ClaimedUpokt = &types1.Coin{} + } + if err := m.ClaimedUpokt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SettlementResult", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SettlementResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventApplicationOverserviced) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationOverserviced: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationOverserviced: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApplicationAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpectedBurn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpectedBurn == nil { + m.ExpectedBurn = &types1.Coin{} + } + if err := m.ExpectedBurn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveBurn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EffectiveBurn == nil { + m.EffectiveBurn = &types1.Coin{} + } + if err := m.EffectiveBurn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSupplierSlashed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSupplierSlashed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSupplierSlashed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Claim == nil { + m.Claim = &types.Claim{} + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofMissingPenalty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProofMissingPenalty == nil { + m.ProofMissingPenalty = &types1.Coin{} + } + if err := m.ProofMissingPenalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventApplicationReimbursementRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventApplicationReimbursementRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventApplicationReimbursementRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApplicationAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOperatorAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOperatorAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplierOwnerAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupplierOwnerAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Amount == nil { + m.Amount = &types1.Coin{} + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/genesis.pb.go b/x/tokenomics/types/genesis.pb.go new file mode 100644 index 000000000..b5fd44dff --- /dev/null +++ b/x/tokenomics/types/genesis.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the tokenomics module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_a4de321d172b0811, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "poktroll.tokenomics.GenesisState") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/genesis.proto", fileDescriptor_a4de321d172b0811) } + +var fileDescriptor_a4de321d172b0811 = []byte{ + // 220 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0xcb, 0xcf, 0xcd, 0x4c, 0x2e, 0xd6, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, + 0x29, 0xd1, 0x43, 0x28, 0x91, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x75, + 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x55, 0xc0, 0x66, 0x41, + 0x41, 0x62, 0x51, 0x62, 0x2e, 0xd4, 0x7c, 0x25, 0x3f, 0x2e, 0x1e, 0x77, 0x88, 0x85, 0xc1, 0x25, + 0x89, 0x25, 0xa9, 0x42, 0x76, 0x5c, 0x6c, 0x10, 0x79, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, + 0x69, 0x3d, 0x2c, 0x0e, 0xd0, 0x0b, 0x00, 0x2b, 0x71, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, + 0xf3, 0x0d, 0x5a, 0x8c, 0x41, 0x50, 0x5d, 0x4e, 0x81, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, + 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x71, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, + 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0x5c, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, 0x7d, 0xb8, + 0x3b, 0x2b, 0x90, 0x5d, 0x5a, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0xa9, 0x31, 0x20, + 0x00, 0x00, 0xff, 0xff, 0x26, 0x41, 0xdb, 0xc7, 0x2e, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/params.pb.go b/x/tokenomics/types/params.pb.go new file mode 100644 index 000000000..f2b933ebd --- /dev/null +++ b/x/tokenomics/types/params.pb.go @@ -0,0 +1,759 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/params.proto + +package types + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the tokenomics module. +type Params struct { + // mint_allocation_percentages represents the distribution of newly minted tokens, + // at the end of claim settlement, as a result of the Global Mint TLM. + MintAllocationPercentages MintAllocationPercentages `protobuf:"bytes,1,opt,name=mint_allocation_percentages,json=mintAllocationPercentages,proto3" json:"mint_allocation_proposer" yaml:"mint_allocation_percentages"` + // dao_reward_address is the address to which mint_allocation_dao percentage of the + // minted tokens are at the end of claim settlement. + DaoRewardAddress string `protobuf:"bytes,6,opt,name=dao_reward_address,json=daoRewardAddress,proto3" json:"dao_reward_address" yaml:"dao_reward_address"` + // global_inflation_per_claim is the percentage of a claim's claimable uPOKT amount which will be minted on settlement. + GlobalInflationPerClaim float64 `protobuf:"fixed64,7,opt,name=global_inflation_per_claim,json=globalInflationPerClaim,proto3" json:"global_inflation_per_claim" yaml:"global_inflation_per_claim"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_df10a06914fc6eee, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMintAllocationPercentages() MintAllocationPercentages { + if m != nil { + return m.MintAllocationPercentages + } + return MintAllocationPercentages{} +} + +func (m *Params) GetDaoRewardAddress() string { + if m != nil { + return m.DaoRewardAddress + } + return "" +} + +func (m *Params) GetGlobalInflationPerClaim() float64 { + if m != nil { + return m.GlobalInflationPerClaim + } + return 0 +} + +// MintAllocationPercentages represents the distribution of newly minted tokens, +// at the end of claim settlement, as a result of the Global Mint TLM. +type MintAllocationPercentages struct { + // dao is the percentage of the minted tokens which are sent + // to the DAO reward address during claim settlement. + Dao float64 `protobuf:"fixed64,1,opt,name=dao,proto3" json:"dao" yaml:"dao"` + // proposer is the percentage of the minted tokens which are sent + // to the block proposer account address during claim settlement. + Proposer float64 `protobuf:"fixed64,2,opt,name=proposer,proto3" json:"proposer" yaml:"proposer"` + // supplier is the percentage of the minted tokens which are sent + // to the block supplier account address during claim settlement. + Supplier float64 `protobuf:"fixed64,3,opt,name=supplier,proto3" json:"supplier" yaml:"supplier"` + // source_owner is the percentage of the minted tokens which are sent + // to the service source owner account address during claim settlement. + SourceOwner float64 `protobuf:"fixed64,4,opt,name=source_owner,json=sourceOwner,proto3" json:"source_owner" yaml:"source_owner"` + // allocation_application is the percentage of the minted tokens which are sent + // to the application account address during claim settlement. + Application float64 `protobuf:"fixed64,5,opt,name=application,proto3" json:"application" yaml:"application"` +} + +func (m *MintAllocationPercentages) Reset() { *m = MintAllocationPercentages{} } +func (m *MintAllocationPercentages) String() string { return proto.CompactTextString(m) } +func (*MintAllocationPercentages) ProtoMessage() {} +func (*MintAllocationPercentages) Descriptor() ([]byte, []int) { + return fileDescriptor_df10a06914fc6eee, []int{1} +} +func (m *MintAllocationPercentages) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MintAllocationPercentages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MintAllocationPercentages) XXX_Merge(src proto.Message) { + xxx_messageInfo_MintAllocationPercentages.Merge(m, src) +} +func (m *MintAllocationPercentages) XXX_Size() int { + return m.Size() +} +func (m *MintAllocationPercentages) XXX_DiscardUnknown() { + xxx_messageInfo_MintAllocationPercentages.DiscardUnknown(m) +} + +var xxx_messageInfo_MintAllocationPercentages proto.InternalMessageInfo + +func (m *MintAllocationPercentages) GetDao() float64 { + if m != nil { + return m.Dao + } + return 0 +} + +func (m *MintAllocationPercentages) GetProposer() float64 { + if m != nil { + return m.Proposer + } + return 0 +} + +func (m *MintAllocationPercentages) GetSupplier() float64 { + if m != nil { + return m.Supplier + } + return 0 +} + +func (m *MintAllocationPercentages) GetSourceOwner() float64 { + if m != nil { + return m.SourceOwner + } + return 0 +} + +func (m *MintAllocationPercentages) GetApplication() float64 { + if m != nil { + return m.Application + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "poktroll.tokenomics.Params") + proto.RegisterType((*MintAllocationPercentages)(nil), "poktroll.tokenomics.MintAllocationPercentages") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/params.proto", fileDescriptor_df10a06914fc6eee) } + +var fileDescriptor_df10a06914fc6eee = []byte{ + // 558 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6b, 0xd4, 0x4e, + 0x14, 0xde, 0x69, 0x7f, 0xbf, 0x5a, 0x53, 0x41, 0x4d, 0x2b, 0x66, 0xab, 0x64, 0xd6, 0x81, 0xd2, + 0x45, 0x68, 0x02, 0xf6, 0x56, 0x4f, 0xdd, 0x82, 0xa2, 0x22, 0x2e, 0x11, 0x2f, 0x5e, 0xc2, 0x6c, + 0x32, 0xc6, 0xb0, 0x49, 0x5e, 0x98, 0x64, 0x59, 0xf7, 0xe6, 0xd9, 0x93, 0x7f, 0x82, 0x47, 0x8f, + 0x1e, 0xc4, 0xbf, 0xa1, 0xc7, 0xa2, 0x97, 0x9e, 0x06, 0xd9, 0x05, 0x95, 0x1c, 0xf3, 0x17, 0x48, + 0x32, 0x9b, 0x6c, 0xa4, 0xbb, 0xbd, 0x84, 0x79, 0xdf, 0xf7, 0xbd, 0xef, 0x0d, 0xef, 0x9b, 0x28, + 0x9d, 0x18, 0x86, 0x29, 0x87, 0x20, 0x30, 0x53, 0x18, 0xb2, 0x08, 0x42, 0xdf, 0x49, 0xcc, 0x98, + 0x72, 0x1a, 0x26, 0x46, 0xcc, 0x21, 0x05, 0x75, 0xbb, 0x52, 0x18, 0x0b, 0xc5, 0xee, 0x4d, 0x1a, + 0xfa, 0x11, 0x98, 0xe5, 0x57, 0xea, 0x76, 0x77, 0x3c, 0xf0, 0xa0, 0x3c, 0x9a, 0xc5, 0x69, 0x8e, + 0xb6, 0x1d, 0x48, 0x42, 0x48, 0x6c, 0x49, 0xc8, 0x42, 0x52, 0xe4, 0xd7, 0xba, 0xb2, 0xd1, 0x2f, + 0x27, 0xa9, 0xdf, 0x90, 0x72, 0x27, 0xf4, 0xa3, 0xd4, 0xa6, 0x41, 0x00, 0x0e, 0x4d, 0x7d, 0x88, + 0xec, 0x98, 0x71, 0x87, 0x45, 0x29, 0xf5, 0x58, 0xa2, 0xa1, 0x0e, 0xea, 0x6e, 0x3d, 0x30, 0x8c, + 0x25, 0x57, 0x31, 0x9e, 0xfb, 0x51, 0x7a, 0x5c, 0xb7, 0xf5, 0x17, 0x5d, 0xbd, 0x47, 0xa7, 0x02, + 0xb7, 0x32, 0x81, 0xb5, 0x0b, 0xd6, 0x1c, 0x62, 0x48, 0x18, 0xcf, 0x05, 0x26, 0x13, 0x1a, 0x06, + 0x47, 0xe4, 0x92, 0xe1, 0xc4, 0x6a, 0x87, 0xab, 0x46, 0xa8, 0x13, 0x45, 0x75, 0x29, 0xd8, 0x9c, + 0x8d, 0x29, 0x77, 0x6d, 0xea, 0xba, 0x9c, 0x25, 0x89, 0xb6, 0xd1, 0x41, 0xdd, 0xab, 0xbd, 0x67, + 0x99, 0xc0, 0x4b, 0xd8, 0x5c, 0xe0, 0xb6, 0x1c, 0x7a, 0x91, 0x23, 0xdf, 0xbf, 0x1e, 0xec, 0xcc, + 0x97, 0x74, 0x2c, 0xa1, 0x97, 0x29, 0xf7, 0x23, 0xcf, 0xba, 0xe1, 0x52, 0xb0, 0x4a, 0xed, 0x1c, + 0x57, 0xdf, 0x23, 0x65, 0xd7, 0x0b, 0x60, 0x40, 0x03, 0xdb, 0x8f, 0xde, 0x04, 0xf5, 0xbd, 0x6d, + 0x27, 0xa0, 0x7e, 0xa8, 0x5d, 0xe9, 0xa0, 0x2e, 0xea, 0x9d, 0x64, 0x02, 0x5f, 0xa2, 0xca, 0x05, + 0xbe, 0x27, 0xef, 0xb2, 0x5a, 0x43, 0xac, 0xdb, 0x92, 0x7c, 0x52, 0x71, 0x7d, 0xc6, 0x4f, 0x0a, + 0xe6, 0x68, 0xef, 0xcf, 0x27, 0x8c, 0x3e, 0xfc, 0xfe, 0x72, 0xff, 0x6e, 0xfd, 0x8a, 0xde, 0x35, + 0xdf, 0x91, 0x4c, 0x97, 0xfc, 0x58, 0x53, 0xda, 0x2b, 0x53, 0x52, 0xf7, 0x95, 0x75, 0x97, 0x42, + 0x19, 0x31, 0xea, 0xdd, 0xca, 0x04, 0x2e, 0xca, 0x5c, 0x60, 0xa5, 0x5e, 0x12, 0xb1, 0x0a, 0x48, + 0x7d, 0xa8, 0x6c, 0x56, 0xc1, 0x69, 0x6b, 0xa5, 0x1a, 0x67, 0x02, 0x6f, 0x36, 0xc2, 0xbc, 0x2e, + 0x5b, 0x2a, 0x84, 0x58, 0x35, 0x59, 0x34, 0x27, 0xa3, 0x38, 0x0e, 0x7c, 0xc6, 0xb5, 0xf5, 0x45, + 0x73, 0x85, 0x2d, 0x9a, 0x2b, 0x84, 0x58, 0x35, 0xa9, 0x3e, 0x55, 0xae, 0x25, 0x30, 0xe2, 0x0e, + 0xb3, 0x61, 0x1c, 0x31, 0xae, 0xfd, 0x57, 0x1a, 0xec, 0x67, 0x02, 0xff, 0x83, 0xe7, 0x02, 0x6f, + 0xcf, 0x4d, 0x1a, 0x28, 0xb1, 0xb6, 0x64, 0xf9, 0xa2, 0xa8, 0xd4, 0xc7, 0xca, 0x16, 0x2d, 0x6c, + 0xe5, 0x22, 0xb4, 0xff, 0x4b, 0xab, 0xbd, 0x4c, 0xe0, 0x26, 0x9c, 0x0b, 0xac, 0x4a, 0xa7, 0x06, + 0x48, 0xac, 0xa6, 0xa4, 0xf7, 0xea, 0xf3, 0x54, 0x47, 0xa7, 0x53, 0x1d, 0x9d, 0x4d, 0x75, 0x74, + 0x3e, 0xd5, 0xd1, 0xcf, 0xa9, 0x8e, 0x3e, 0xce, 0xf4, 0xd6, 0xd9, 0x4c, 0x6f, 0x9d, 0xcf, 0xf4, + 0xd6, 0xeb, 0x43, 0xcf, 0x4f, 0xdf, 0x8e, 0x06, 0x86, 0x03, 0xa1, 0x59, 0x04, 0x74, 0x10, 0xb1, + 0x74, 0x0c, 0x7c, 0x68, 0x2e, 0x4f, 0x2b, 0x9d, 0xc4, 0x2c, 0x19, 0x6c, 0x94, 0x3f, 0xe7, 0xe1, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xd7, 0xde, 0x63, 0x19, 0x04, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.MintAllocationPercentages.Equal(&that1.MintAllocationPercentages) { + return false + } + if this.DaoRewardAddress != that1.DaoRewardAddress { + return false + } + if this.GlobalInflationPerClaim != that1.GlobalInflationPerClaim { + return false + } + return true +} +func (this *MintAllocationPercentages) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MintAllocationPercentages) + if !ok { + that2, ok := that.(MintAllocationPercentages) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Dao != that1.Dao { + return false + } + if this.Proposer != that1.Proposer { + return false + } + if this.Supplier != that1.Supplier { + return false + } + if this.SourceOwner != that1.SourceOwner { + return false + } + if this.Application != that1.Application { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GlobalInflationPerClaim != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GlobalInflationPerClaim)))) + i-- + dAtA[i] = 0x39 + } + if len(m.DaoRewardAddress) > 0 { + i -= len(m.DaoRewardAddress) + copy(dAtA[i:], m.DaoRewardAddress) + i = encodeVarintParams(dAtA, i, uint64(len(m.DaoRewardAddress))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.MintAllocationPercentages.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MintAllocationPercentages) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MintAllocationPercentages) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MintAllocationPercentages) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Application)))) + i-- + dAtA[i] = 0x29 + } + if m.SourceOwner != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SourceOwner)))) + i-- + dAtA[i] = 0x21 + } + if m.Supplier != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Supplier)))) + i-- + dAtA[i] = 0x19 + } + if m.Proposer != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Proposer)))) + i-- + dAtA[i] = 0x11 + } + if m.Dao != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Dao)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MintAllocationPercentages.Size() + n += 1 + l + sovParams(uint64(l)) + l = len(m.DaoRewardAddress) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + if m.GlobalInflationPerClaim != 0 { + n += 9 + } + return n +} + +func (m *MintAllocationPercentages) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dao != 0 { + n += 9 + } + if m.Proposer != 0 { + n += 9 + } + if m.Supplier != 0 { + n += 9 + } + if m.SourceOwner != 0 { + n += 9 + } + if m.Application != 0 { + n += 9 + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintAllocationPercentages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MintAllocationPercentages.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DaoRewardAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DaoRewardAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalInflationPerClaim", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.GlobalInflationPerClaim = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MintAllocationPercentages) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MintAllocationPercentages: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MintAllocationPercentages: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Dao", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Dao = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Proposer = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Supplier", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Supplier = float64(math.Float64frombits(v)) + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceOwner", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.SourceOwner = float64(math.Float64frombits(v)) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Application = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/query.pb.go b/x/tokenomics/types/query.pb.go new file mode 100644 index 000000000..51dc467a8 --- /dev/null +++ b/x/tokenomics/types/query.pb.go @@ -0,0 +1,531 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_19d6daded0c54373, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19d6daded0c54373, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.tokenomics.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.tokenomics.QueryParamsResponse") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/query.proto", fileDescriptor_19d6daded0c54373) } + +var fileDescriptor_19d6daded0c54373 = []byte{ + // 314 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xc8, 0xcf, 0x2e, + 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0xcb, 0xcf, 0xcd, 0x4c, 0x2e, 0xd6, + 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x29, 0xd0, + 0x43, 0x28, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x75, 0x52, 0x22, + 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x95, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, + 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, + 0x2b, 0x86, 0xca, 0x4a, 0x26, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xc7, 0x43, 0xb4, 0x41, 0x38, 0x50, + 0x29, 0x05, 0x6c, 0xee, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0xaa, 0x50, 0x12, 0xe1, 0x12, 0x0a, + 0x04, 0xb9, 0x33, 0x00, 0x2c, 0x18, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0x14, 0xca, 0x25, + 0x8c, 0x22, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x64, 0xc7, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, + 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xad, 0x87, 0xc5, 0x5b, 0x7a, 0x10, 0x4d, 0x4e, 0x9c, 0x27, + 0xee, 0xc9, 0x33, 0xac, 0x78, 0xbe, 0x41, 0x8b, 0x31, 0x08, 0xaa, 0xcb, 0x68, 0x3a, 0x23, 0x17, + 0x2b, 0xd8, 0x5c, 0xa1, 0x5e, 0x46, 0x2e, 0x36, 0x88, 0x3a, 0x21, 0x75, 0xac, 0x86, 0x60, 0x3a, + 0x4a, 0x4a, 0x83, 0xb0, 0x42, 0x88, 0x3b, 0x95, 0x0c, 0x9a, 0x2e, 0x3f, 0x99, 0xcc, 0xa4, 0x25, + 0xa4, 0xa1, 0x0f, 0xd2, 0xa1, 0x9b, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0x3b, 0x30, + 0x9c, 0x02, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, 0xc6, 0x07, + 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, + 0x28, 0xe3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x1c, 0x26, 0x56, 0x20, + 0x9b, 0x59, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x60, 0x63, 0x40, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x9f, 0xe5, 0xec, 0x63, 0x1c, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.tokenomics.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.tokenomics.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.tokenomics.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/tokenomics/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/query.pb.gw.go b/x/tokenomics/types/query.pb.gw.go new file mode 100644 index 000000000..08c31f3c5 --- /dev/null +++ b/x/tokenomics/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: poktroll/tokenomics/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "tokenomics", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/tokenomics/types/tx.pb.go b/x/tokenomics/types/tx.pb.go new file mode 100644 index 000000000..eb33636b4 --- /dev/null +++ b/x/tokenomics/types/tx.pb.go @@ -0,0 +1,1329 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/tx.proto + +package types + +import ( + context "context" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type to update all params at once. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/tokenomics parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_aa0f2fdbd9b6d7eb, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_aa0f2fdbd9b6d7eb, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // The (name, as_type) tuple must match the corresponding name and type as + // specified in the `Params` message in `proof/params.proto.` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // *MsgUpdateParam_AsMintAllocationPercentages + // *MsgUpdateParam_AsString + // *MsgUpdateParam_AsFloat + AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_aa0f2fdbd9b6d7eb, []int{2} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsMintAllocationPercentages struct { + AsMintAllocationPercentages *MintAllocationPercentages `protobuf:"bytes,3,opt,name=as_mint_allocation_percentages,json=asMintAllocationPercentages,proto3,oneof" json:"as_mint_allocation_percentages" yaml:"as_mint_allocation_percentages"` +} +type MsgUpdateParam_AsString struct { + AsString string `protobuf:"bytes,4,opt,name=as_string,json=asString,proto3,oneof" json:"as_string"` +} +type MsgUpdateParam_AsFloat struct { + AsFloat float64 `protobuf:"fixed64,5,opt,name=as_float,json=asFloat,proto3,oneof" json:"as_float"` +} + +func (*MsgUpdateParam_AsMintAllocationPercentages) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsString) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsFloat) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsMintAllocationPercentages() *MintAllocationPercentages { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsMintAllocationPercentages); ok { + return x.AsMintAllocationPercentages + } + return nil +} + +func (m *MsgUpdateParam) GetAsString() string { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsString); ok { + return x.AsString + } + return "" +} + +func (m *MsgUpdateParam) GetAsFloat() float64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsFloat); ok { + return x.AsFloat + } + return 0 +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsMintAllocationPercentages)(nil), + (*MsgUpdateParam_AsString)(nil), + (*MsgUpdateParam_AsFloat)(nil), + } +} + +// MsgUpdateParamResponse defines the response structure for executing a +// MsgUpdateParam message after a single param update. +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_aa0f2fdbd9b6d7eb, []int{3} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.tokenomics.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.tokenomics.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.tokenomics.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.tokenomics.MsgUpdateParamResponse") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/tx.proto", fileDescriptor_aa0f2fdbd9b6d7eb) } + +var fileDescriptor_aa0f2fdbd9b6d7eb = []byte{ + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xf6, 0x91, 0x7e, 0xf9, 0x5a, 0x8a, 0x30, 0x15, 0x35, 0x29, 0x72, 0x22, 0x43, 0xa5, 0x10, + 0x5a, 0x5b, 0x34, 0x12, 0x42, 0x19, 0x90, 0xea, 0x01, 0x45, 0x42, 0x41, 0xc5, 0x88, 0x85, 0xc5, + 0xba, 0x24, 0x87, 0x6b, 0xc5, 0xbe, 0xb3, 0x7c, 0x57, 0x68, 0x36, 0xc4, 0xc8, 0xc4, 0xc2, 0x7f, + 0x60, 0xcc, 0xc0, 0x2f, 0x80, 0xa5, 0x63, 0x61, 0xea, 0x14, 0xa1, 0x64, 0x88, 0x94, 0x91, 0x5f, + 0x80, 0xfc, 0x91, 0xb8, 0xae, 0x0c, 0x8d, 0x60, 0x49, 0xee, 0xde, 0xe7, 0xfd, 0x78, 0xde, 0xe7, + 0xde, 0xd7, 0xf0, 0xb6, 0x4f, 0xbb, 0x3c, 0xa0, 0xae, 0xab, 0x73, 0xda, 0xc5, 0x84, 0x7a, 0x4e, + 0x9b, 0xe9, 0xfc, 0x58, 0xf3, 0x03, 0xca, 0xa9, 0x74, 0x63, 0x8a, 0x6a, 0x29, 0x5a, 0xbc, 0x8e, + 0x3c, 0x87, 0x50, 0x3d, 0xfa, 0x8d, 0xfd, 0x8a, 0x9b, 0x6d, 0xca, 0x3c, 0xca, 0x74, 0x8f, 0xd9, + 0xfa, 0x9b, 0x07, 0xe1, 0x5f, 0x02, 0xdc, 0x8a, 0x01, 0x2b, 0xba, 0xe9, 0xf1, 0x25, 0x81, 0x36, + 0x6c, 0x6a, 0xd3, 0xd8, 0x1e, 0x9e, 0x12, 0x6b, 0x39, 0x8f, 0x8f, 0x8f, 0x02, 0xe4, 0x25, 0x71, + 0xea, 0x37, 0x00, 0xaf, 0x35, 0x99, 0xfd, 0xd2, 0xef, 0x20, 0x8e, 0x0f, 0x22, 0x44, 0x7a, 0x08, + 0x45, 0x74, 0xc4, 0x0f, 0x69, 0xe0, 0xf0, 0x9e, 0x0c, 0xca, 0xa0, 0x22, 0x1a, 0xf2, 0x8f, 0x2f, + 0xbb, 0x1b, 0x49, 0xc1, 0xfd, 0x4e, 0x27, 0xc0, 0x8c, 0xbd, 0xe0, 0x81, 0x43, 0x6c, 0x33, 0x75, + 0x95, 0x1e, 0xc3, 0xa5, 0x38, 0xb7, 0x7c, 0xa5, 0x0c, 0x2a, 0xab, 0x7b, 0x5b, 0x5a, 0x4e, 0xc3, + 0x5a, 0x5c, 0xc4, 0x10, 0x4f, 0x06, 0x25, 0xe1, 0xf3, 0xb8, 0x5f, 0x05, 0x66, 0x12, 0x55, 0x7f, + 0xf4, 0x7e, 0xdc, 0xaf, 0xa6, 0xf9, 0x3e, 0x8c, 0xfb, 0xd5, 0xed, 0x59, 0x03, 0xc7, 0xe7, 0x5b, + 0xb8, 0xc0, 0x58, 0x7d, 0x06, 0x37, 0x2f, 0x98, 0x4c, 0xcc, 0x7c, 0x4a, 0x18, 0x96, 0x6a, 0x33, + 0x52, 0xe0, 0x52, 0x52, 0x53, 0x26, 0xea, 0xa7, 0x02, 0x5c, 0xcf, 0x26, 0xfc, 0x67, 0x51, 0x24, + 0xb8, 0x40, 0x90, 0x87, 0x23, 0x49, 0x44, 0x33, 0x3a, 0x4b, 0x5f, 0x01, 0x54, 0x10, 0xb3, 0x3c, + 0x87, 0x70, 0x0b, 0xb9, 0x2e, 0x6d, 0x23, 0xee, 0x50, 0x62, 0xf9, 0x38, 0x68, 0x63, 0xc2, 0x91, + 0x8d, 0x99, 0x5c, 0x88, 0xc8, 0x6a, 0xb9, 0x64, 0x9b, 0x0e, 0xe1, 0xfb, 0xb3, 0xb0, 0x83, 0x34, + 0xca, 0x78, 0x3a, 0x19, 0x94, 0x2e, 0xc9, 0xfc, 0x6b, 0x50, 0xda, 0xee, 0x21, 0xcf, 0xad, 0xab, + 0x7f, 0xf7, 0x53, 0x1b, 0x82, 0xb9, 0x85, 0xd8, 0x1f, 0x6b, 0x49, 0x3b, 0x50, 0x44, 0xcc, 0x62, + 0x51, 0xc3, 0xf2, 0x42, 0x24, 0xc8, 0xd5, 0xc9, 0xa0, 0x94, 0x1a, 0x1b, 0x82, 0xb9, 0x82, 0x12, + 0x45, 0xa4, 0x7b, 0x70, 0x05, 0x31, 0xeb, 0xb5, 0x4b, 0x11, 0x97, 0x17, 0xcb, 0xa0, 0x02, 0x8c, + 0xb5, 0xc9, 0xa0, 0x34, 0xb3, 0x35, 0x04, 0x73, 0x19, 0xb1, 0x27, 0xe1, 0xb1, 0xbe, 0x9e, 0x1d, + 0x03, 0x43, 0x84, 0xcb, 0x88, 0x59, 0xbc, 0xe7, 0x63, 0xb5, 0x09, 0x6f, 0x66, 0x9f, 0xe5, 0xbf, + 0x9e, 0x79, 0xef, 0x3b, 0x80, 0x85, 0x26, 0xb3, 0xa5, 0x16, 0x5c, 0xcb, 0x2c, 0xc0, 0xdd, 0x7c, + 0xd9, 0xb3, 0x13, 0x56, 0xdc, 0x99, 0xc7, 0x6b, 0x46, 0xd0, 0x82, 0xab, 0xe7, 0xc7, 0xe9, 0xce, + 0x1c, 0xc1, 0xc5, 0xfb, 0x73, 0x38, 0x4d, 0x0b, 0x14, 0x17, 0xdf, 0x85, 0xcb, 0x64, 0x3c, 0x3f, + 0x19, 0x2a, 0xe0, 0x74, 0xa8, 0x80, 0xb3, 0xa1, 0x02, 0x7e, 0x0e, 0x15, 0xf0, 0x71, 0xa4, 0x08, + 0xa7, 0x23, 0x45, 0x38, 0x1b, 0x29, 0xc2, 0xab, 0x9a, 0xed, 0xf0, 0xc3, 0xa3, 0x96, 0xd6, 0xa6, + 0x9e, 0x1e, 0xe6, 0xde, 0x25, 0x98, 0xbf, 0xa5, 0x41, 0x57, 0xcf, 0xdf, 0xb3, 0x50, 0x74, 0xd6, + 0x5a, 0x8a, 0x3e, 0x15, 0xb5, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x0d, 0x78, 0xc9, 0xde, + 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/poktroll.tokenomics.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.tokenomics.Msg/UpdateParam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.tokenomics.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.tokenomics.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "poktroll.tokenomics.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "poktroll/tokenomics/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsMintAllocationPercentages) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsMintAllocationPercentages) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsMintAllocationPercentages != nil { + { + size, err := m.AsMintAllocationPercentages.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsString) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsString) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.AsString) + copy(dAtA[i:], m.AsString) + i = encodeVarintTx(dAtA, i, uint64(len(m.AsString))) + i-- + dAtA[i] = 0x22 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParam_AsFloat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsFloat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsFloat)))) + i-- + dAtA[i] = 0x29 + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsMintAllocationPercentages) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsMintAllocationPercentages != nil { + l = m.AsMintAllocationPercentages.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParam_AsString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AsString) + n += 1 + l + sovTx(uint64(l)) + return n +} +func (m *MsgUpdateParam_AsFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsMintAllocationPercentages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MintAllocationPercentages{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsMintAllocationPercentages{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AsType = &MsgUpdateParam_AsString{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AsFloat", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AsType = &MsgUpdateParam_AsFloat{float64(math.Float64frombits(v))} + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokenomics/types/types.pb.go b/x/tokenomics/types/types.pb.go new file mode 100644 index 000000000..1f3658b79 --- /dev/null +++ b/x/tokenomics/types/types.pb.go @@ -0,0 +1,1553 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: poktroll/tokenomics/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/pokt-network/poktroll/x/proof/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// SettlementOpReason is a distinct, tlm-specific causal reason for a given operation. +type SettlementOpReason int32 + +const ( + // UNSPECIFIED is the default value for SettlementOpReason, it is used as a field + // type for objects which need to distinguish whether a SettlementOpReason has been specified it or not. + SettlementOpReason_UNSPECIFIED SettlementOpReason = 0 + // Value transfer (credit/debit) + SettlementOpReason_TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_STAKE_MINT SettlementOpReason = 1 + SettlementOpReason_TLM_RELAY_BURN_EQUALS_MINT_APPLICATION_STAKE_BURN SettlementOpReason = 2 + // Inflation + SettlementOpReason_TLM_GLOBAL_MINT_INFLATION SettlementOpReason = 3 + // Reward distribution + SettlementOpReason_TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION SettlementOpReason = 4 + SettlementOpReason_TLM_GLOBAL_MINT_DAO_REWARD_DISTRIBUTION SettlementOpReason = 5 + SettlementOpReason_TLM_GLOBAL_MINT_PROPOSER_REWARD_DISTRIBUTION SettlementOpReason = 6 + SettlementOpReason_TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION SettlementOpReason = 7 + SettlementOpReason_TLM_GLOBAL_MINT_SOURCE_OWNER_REWARD_DISTRIBUTION SettlementOpReason = 8 + SettlementOpReason_TLM_GLOBAL_MINT_APPLICATION_REWARD_DISTRIBUTION SettlementOpReason = 9 + // Self-servicing mitigation + SettlementOpReason_TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_DAO_TRANSFER SettlementOpReason = 10 + // Penalization + SettlementOpReason_UNSPECIFIED_TLM_SUPPLIER_SLASH_MODULE_TRANSFER SettlementOpReason = 11 + SettlementOpReason_UNSPECIFIED_TLM_SUPPLIER_SLASH_STAKE_BURN SettlementOpReason = 12 + // Module accounting + SettlementOpReason_TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_MODULE_TRANSFER SettlementOpReason = 13 + SettlementOpReason_TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_MODULE_TRANSFER SettlementOpReason = 14 +) + +var SettlementOpReason_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_STAKE_MINT", + 2: "TLM_RELAY_BURN_EQUALS_MINT_APPLICATION_STAKE_BURN", + 3: "TLM_GLOBAL_MINT_INFLATION", + 4: "TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION", + 5: "TLM_GLOBAL_MINT_DAO_REWARD_DISTRIBUTION", + 6: "TLM_GLOBAL_MINT_PROPOSER_REWARD_DISTRIBUTION", + 7: "TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION", + 8: "TLM_GLOBAL_MINT_SOURCE_OWNER_REWARD_DISTRIBUTION", + 9: "TLM_GLOBAL_MINT_APPLICATION_REWARD_DISTRIBUTION", + 10: "TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_DAO_TRANSFER", + 11: "UNSPECIFIED_TLM_SUPPLIER_SLASH_MODULE_TRANSFER", + 12: "UNSPECIFIED_TLM_SUPPLIER_SLASH_STAKE_BURN", + 13: "TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_MODULE_TRANSFER", + 14: "TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_MODULE_TRANSFER", +} + +var SettlementOpReason_value = map[string]int32{ + "UNSPECIFIED": 0, + "TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_STAKE_MINT": 1, + "TLM_RELAY_BURN_EQUALS_MINT_APPLICATION_STAKE_BURN": 2, + "TLM_GLOBAL_MINT_INFLATION": 3, + "TLM_RELAY_BURN_EQUALS_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION": 4, + "TLM_GLOBAL_MINT_DAO_REWARD_DISTRIBUTION": 5, + "TLM_GLOBAL_MINT_PROPOSER_REWARD_DISTRIBUTION": 6, + "TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_DISTRIBUTION": 7, + "TLM_GLOBAL_MINT_SOURCE_OWNER_REWARD_DISTRIBUTION": 8, + "TLM_GLOBAL_MINT_APPLICATION_REWARD_DISTRIBUTION": 9, + "TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_DAO_TRANSFER": 10, + "UNSPECIFIED_TLM_SUPPLIER_SLASH_MODULE_TRANSFER": 11, + "UNSPECIFIED_TLM_SUPPLIER_SLASH_STAKE_BURN": 12, + "TLM_GLOBAL_MINT_SUPPLIER_SHAREHOLDER_REWARD_MODULE_TRANSFER": 13, + "TLM_GLOBAL_MINT_REIMBURSEMENT_REQUEST_ESCROW_MODULE_TRANSFER": 14, +} + +func (x SettlementOpReason) String() string { + return proto.EnumName(SettlementOpReason_name, int32(x)) +} + +func (SettlementOpReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6e327d53f335a53d, []int{0} +} + +// SettlementResult holds mint, burn, and transfer operations that result from a single claim settlement. +type ClaimSettlementResult struct { + Claim types.Claim `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim"` + Mints []MintBurnOp `protobuf:"bytes,2,rep,name=mints,proto3" json:"mints"` + Burns []MintBurnOp `protobuf:"bytes,3,rep,name=burns,proto3" json:"burns"` + ModToModTransfers []ModToModTransfer `protobuf:"bytes,4,rep,name=mod_to_mod_transfers,json=modToModTransfers,proto3" json:"mod_to_mod_transfers"` + ModToAcctTransfers []ModToAcctTransfer `protobuf:"bytes,5,rep,name=mod_to_acct_transfers,json=modToAcctTransfers,proto3" json:"mod_to_acct_transfers"` +} + +func (m *ClaimSettlementResult) Reset() { *m = ClaimSettlementResult{} } +func (m *ClaimSettlementResult) String() string { return proto.CompactTextString(m) } +func (*ClaimSettlementResult) ProtoMessage() {} +func (*ClaimSettlementResult) Descriptor() ([]byte, []int) { + return fileDescriptor_6e327d53f335a53d, []int{0} +} +func (m *ClaimSettlementResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClaimSettlementResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ClaimSettlementResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClaimSettlementResult.Merge(m, src) +} +func (m *ClaimSettlementResult) XXX_Size() int { + return m.Size() +} +func (m *ClaimSettlementResult) XXX_DiscardUnknown() { + xxx_messageInfo_ClaimSettlementResult.DiscardUnknown(m) +} + +var xxx_messageInfo_ClaimSettlementResult proto.InternalMessageInfo + +func (m *ClaimSettlementResult) GetClaim() types.Claim { + if m != nil { + return m.Claim + } + return types.Claim{} +} + +func (m *ClaimSettlementResult) GetMints() []MintBurnOp { + if m != nil { + return m.Mints + } + return nil +} + +func (m *ClaimSettlementResult) GetBurns() []MintBurnOp { + if m != nil { + return m.Burns + } + return nil +} + +func (m *ClaimSettlementResult) GetModToModTransfers() []ModToModTransfer { + if m != nil { + return m.ModToModTransfers + } + return nil +} + +func (m *ClaimSettlementResult) GetModToAcctTransfers() []ModToAcctTransfer { + if m != nil { + return m.ModToAcctTransfers + } + return nil +} + +// MintBurnOperation holds the parameters of a mint or burn operation. +type MintBurnOp struct { + OpReason SettlementOpReason `protobuf:"varint,1,opt,name=op_reason,json=opReason,proto3,enum=poktroll.tokenomics.SettlementOpReason" json:"op_reason"` + DestinationModule string `protobuf:"bytes,2,opt,name=DestinationModule,proto3" json:"destination_module"` + Coin types1.Coin `protobuf:"bytes,3,opt,name=coin,proto3" json:"coin"` +} + +func (m *MintBurnOp) Reset() { *m = MintBurnOp{} } +func (m *MintBurnOp) String() string { return proto.CompactTextString(m) } +func (*MintBurnOp) ProtoMessage() {} +func (*MintBurnOp) Descriptor() ([]byte, []int) { + return fileDescriptor_6e327d53f335a53d, []int{1} +} +func (m *MintBurnOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MintBurnOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MintBurnOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MintBurnOp.Merge(m, src) +} +func (m *MintBurnOp) XXX_Size() int { + return m.Size() +} +func (m *MintBurnOp) XXX_DiscardUnknown() { + xxx_messageInfo_MintBurnOp.DiscardUnknown(m) +} + +var xxx_messageInfo_MintBurnOp proto.InternalMessageInfo + +func (m *MintBurnOp) GetOpReason() SettlementOpReason { + if m != nil { + return m.OpReason + } + return SettlementOpReason_UNSPECIFIED +} + +func (m *MintBurnOp) GetDestinationModule() string { + if m != nil { + return m.DestinationModule + } + return "" +} + +func (m *MintBurnOp) GetCoin() types1.Coin { + if m != nil { + return m.Coin + } + return types1.Coin{} +} + +// ModToAcctTransfer holds the parameters of a module to account transfer operation. +type ModToAcctTransfer struct { + OpReason SettlementOpReason `protobuf:"varint,1,opt,name=op_reason,json=opReason,proto3,enum=poktroll.tokenomics.SettlementOpReason" json:"op_reason"` + SenderModule string `protobuf:"bytes,2,opt,name=SenderModule,proto3" json:"sender_module"` + RecipientAddress string `protobuf:"bytes,3,opt,name=RecipientAddress,proto3" json:"recipient_address"` + Coin types1.Coin `protobuf:"bytes,4,opt,name=coin,proto3" json:"coin"` +} + +func (m *ModToAcctTransfer) Reset() { *m = ModToAcctTransfer{} } +func (m *ModToAcctTransfer) String() string { return proto.CompactTextString(m) } +func (*ModToAcctTransfer) ProtoMessage() {} +func (*ModToAcctTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_6e327d53f335a53d, []int{2} +} +func (m *ModToAcctTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModToAcctTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ModToAcctTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModToAcctTransfer.Merge(m, src) +} +func (m *ModToAcctTransfer) XXX_Size() int { + return m.Size() +} +func (m *ModToAcctTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_ModToAcctTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_ModToAcctTransfer proto.InternalMessageInfo + +func (m *ModToAcctTransfer) GetOpReason() SettlementOpReason { + if m != nil { + return m.OpReason + } + return SettlementOpReason_UNSPECIFIED +} + +func (m *ModToAcctTransfer) GetSenderModule() string { + if m != nil { + return m.SenderModule + } + return "" +} + +func (m *ModToAcctTransfer) GetRecipientAddress() string { + if m != nil { + return m.RecipientAddress + } + return "" +} + +func (m *ModToAcctTransfer) GetCoin() types1.Coin { + if m != nil { + return m.Coin + } + return types1.Coin{} +} + +// ModToModTransfer holds the parameters of a module to module transfer operation. +type ModToModTransfer struct { + OpReason SettlementOpReason `protobuf:"varint,1,opt,name=op_reason,json=opReason,proto3,enum=poktroll.tokenomics.SettlementOpReason" json:"op_reason"` + SenderModule string `protobuf:"bytes,2,opt,name=SenderModule,proto3" json:"sender_module"` + RecipientModule string `protobuf:"bytes,3,opt,name=RecipientModule,proto3" json:"recipient_module"` + Coin types1.Coin `protobuf:"bytes,4,opt,name=coin,proto3" json:"coin"` +} + +func (m *ModToModTransfer) Reset() { *m = ModToModTransfer{} } +func (m *ModToModTransfer) String() string { return proto.CompactTextString(m) } +func (*ModToModTransfer) ProtoMessage() {} +func (*ModToModTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_6e327d53f335a53d, []int{3} +} +func (m *ModToModTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModToModTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ModToModTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModToModTransfer.Merge(m, src) +} +func (m *ModToModTransfer) XXX_Size() int { + return m.Size() +} +func (m *ModToModTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_ModToModTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_ModToModTransfer proto.InternalMessageInfo + +func (m *ModToModTransfer) GetOpReason() SettlementOpReason { + if m != nil { + return m.OpReason + } + return SettlementOpReason_UNSPECIFIED +} + +func (m *ModToModTransfer) GetSenderModule() string { + if m != nil { + return m.SenderModule + } + return "" +} + +func (m *ModToModTransfer) GetRecipientModule() string { + if m != nil { + return m.RecipientModule + } + return "" +} + +func (m *ModToModTransfer) GetCoin() types1.Coin { + if m != nil { + return m.Coin + } + return types1.Coin{} +} + +func init() { + proto.RegisterEnum("poktroll.tokenomics.SettlementOpReason", SettlementOpReason_name, SettlementOpReason_value) + proto.RegisterType((*ClaimSettlementResult)(nil), "poktroll.tokenomics.ClaimSettlementResult") + proto.RegisterType((*MintBurnOp)(nil), "poktroll.tokenomics.MintBurnOp") + proto.RegisterType((*ModToAcctTransfer)(nil), "poktroll.tokenomics.ModToAcctTransfer") + proto.RegisterType((*ModToModTransfer)(nil), "poktroll.tokenomics.ModToModTransfer") +} + +func init() { proto.RegisterFile("poktroll/tokenomics/types.proto", fileDescriptor_6e327d53f335a53d) } + +var fileDescriptor_6e327d53f335a53d = []byte{ + // 907 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdd, 0x6e, 0xe3, 0x44, + 0x18, 0x8d, 0x93, 0xb6, 0x6c, 0xa7, 0xed, 0x6e, 0x32, 0xb4, 0x28, 0xad, 0xd8, 0xb8, 0xaa, 0x04, + 0x5b, 0x7e, 0x6a, 0x6f, 0x5b, 0x56, 0x02, 0x76, 0xf9, 0xb1, 0x63, 0x77, 0x6b, 0xe1, 0xc4, 0xe9, + 0x38, 0x56, 0xb5, 0xdc, 0x58, 0x89, 0x33, 0x5b, 0xac, 0xc6, 0x9e, 0xc8, 0x33, 0x81, 0xe5, 0x2d, + 0xb8, 0xe7, 0x9a, 0x37, 0x40, 0xe2, 0x15, 0xf6, 0x8e, 0x15, 0x57, 0x7b, 0x15, 0xa1, 0x96, 0xab, + 0x3c, 0x05, 0xf2, 0xd8, 0x8d, 0xb3, 0x4e, 0x0a, 0x5b, 0x10, 0x12, 0x37, 0x9e, 0xce, 0x7c, 0xe7, + 0x9c, 0x6f, 0xbe, 0xd3, 0xa3, 0x68, 0x80, 0x38, 0x20, 0xe7, 0x2c, 0x22, 0xfd, 0xbe, 0xcc, 0xc8, + 0x39, 0x0e, 0x49, 0xe0, 0x7b, 0x54, 0x66, 0xdf, 0x0f, 0x30, 0x95, 0x06, 0x11, 0x61, 0x04, 0xbe, + 0x79, 0x05, 0x90, 0x32, 0xc0, 0x56, 0xcd, 0x23, 0x34, 0x20, 0x54, 0xee, 0x76, 0x28, 0x96, 0xbf, + 0xdd, 0xef, 0x62, 0xd6, 0xd9, 0x97, 0x3d, 0xe2, 0x87, 0x09, 0x69, 0x6b, 0x33, 0xa9, 0xbb, 0x7c, + 0x27, 0x27, 0x9b, 0xb4, 0xb4, 0x7e, 0x46, 0xce, 0x48, 0x72, 0x1e, 0xff, 0x95, 0x9e, 0x6e, 0x4d, + 0xae, 0x31, 0x88, 0x08, 0x79, 0x3a, 0x7d, 0x83, 0x9d, 0x5f, 0x4b, 0x60, 0xa3, 0xde, 0xef, 0xf8, + 0x81, 0x8d, 0x19, 0xeb, 0xe3, 0x00, 0x87, 0x0c, 0x61, 0x3a, 0xec, 0x33, 0xf8, 0x29, 0x58, 0xf4, + 0xe2, 0x42, 0x55, 0xd8, 0x16, 0x76, 0x57, 0x0e, 0x36, 0xa4, 0xc9, 0x5d, 0xb9, 0x8a, 0xc4, 0x59, + 0xea, 0xda, 0xf3, 0x91, 0x58, 0x18, 0x8f, 0xc4, 0x04, 0x8b, 0x92, 0x05, 0x6a, 0x60, 0x31, 0xf0, + 0x43, 0x46, 0xab, 0xc5, 0xed, 0xd2, 0xee, 0xca, 0x81, 0x28, 0xcd, 0x99, 0x53, 0x6a, 0xf8, 0x21, + 0x53, 0x87, 0x51, 0x68, 0x0d, 0x32, 0x15, 0xce, 0x42, 0xc9, 0x12, 0xab, 0x74, 0x87, 0x51, 0x48, + 0xab, 0xa5, 0x1b, 0xaa, 0x70, 0x16, 0x4a, 0x16, 0xc8, 0xc0, 0x7a, 0x40, 0x7a, 0x2e, 0x23, 0x2e, + 0x5f, 0xa2, 0x4e, 0x48, 0x9f, 0xe2, 0x88, 0x56, 0x17, 0xb8, 0xe8, 0x3b, 0xf3, 0x45, 0x49, 0xaf, + 0x4d, 0xe2, 0x4f, 0x8a, 0x56, 0xdf, 0x4e, 0xa5, 0xe7, 0x4a, 0xa1, 0x4a, 0x90, 0xc3, 0x53, 0xf8, + 0x0c, 0x6c, 0xa4, 0xd0, 0x8e, 0xe7, 0xb1, 0xa9, 0xb6, 0x8b, 0xbc, 0xed, 0xbb, 0xd7, 0xb7, 0x55, + 0x3c, 0x8f, 0x4d, 0xfa, 0xde, 0x4d, 0xfb, 0xce, 0x17, 0x43, 0x30, 0xc8, 0x33, 0xe8, 0xce, 0x1f, + 0x02, 0x00, 0x99, 0x29, 0xd0, 0x06, 0xcb, 0x64, 0xe0, 0x46, 0xb8, 0x43, 0x49, 0xc8, 0xff, 0x95, + 0xb7, 0x0f, 0xee, 0xcd, 0x6d, 0x9e, 0x05, 0xc0, 0x1a, 0x20, 0x0e, 0x57, 0xd7, 0xc6, 0x23, 0x31, + 0x63, 0xa3, 0x5b, 0x24, 0x2d, 0x40, 0x0d, 0x54, 0x34, 0x4c, 0x99, 0x1f, 0x76, 0x98, 0x4f, 0xc2, + 0x06, 0xe9, 0x0d, 0xfb, 0xb8, 0x5a, 0xdc, 0x16, 0x76, 0x97, 0xd5, 0xb7, 0xc6, 0x23, 0x11, 0xf6, + 0xb2, 0x62, 0x6c, 0xd5, 0xb0, 0x8f, 0xd1, 0x2c, 0x01, 0x3e, 0x04, 0x0b, 0x71, 0xac, 0xab, 0x25, + 0x1e, 0xb0, 0x4d, 0x29, 0x8d, 0x72, 0x9c, 0x7b, 0x29, 0xcd, 0xbd, 0x54, 0x27, 0x7e, 0xa8, 0xae, + 0xa6, 0x2e, 0x70, 0x38, 0xe2, 0xdf, 0x9d, 0x5f, 0x8a, 0xa0, 0x32, 0xe3, 0xd7, 0x7f, 0x33, 0xed, + 0x03, 0xb0, 0x6a, 0xe3, 0xb0, 0x87, 0xa3, 0x57, 0x06, 0xad, 0x8c, 0x47, 0xe2, 0x1a, 0xe5, 0xe7, + 0x57, 0x33, 0xbe, 0x02, 0x83, 0x4f, 0x40, 0x19, 0x61, 0xcf, 0x1f, 0xf8, 0x38, 0x64, 0x4a, 0xaf, + 0x17, 0x61, 0x4a, 0xf9, 0xa8, 0xcb, 0xea, 0xde, 0x78, 0x24, 0x56, 0xa2, 0xab, 0x9a, 0xdb, 0x49, + 0x8a, 0xbf, 0xfd, 0xbc, 0xb7, 0x9e, 0x5a, 0x90, 0xc2, 0x6d, 0x16, 0xf9, 0xe1, 0x19, 0x9a, 0x91, + 0x99, 0x38, 0xb7, 0xf0, 0x4f, 0x9c, 0xfb, 0xb1, 0x08, 0xca, 0xf9, 0x80, 0xff, 0xaf, 0x8c, 0xfb, + 0x1c, 0xdc, 0x99, 0x4c, 0x9c, 0x32, 0x13, 0xdf, 0xd6, 0xc7, 0x23, 0xb1, 0x9c, 0xf9, 0x96, 0x92, + 0xf3, 0xe0, 0x7f, 0xe5, 0xce, 0xfb, 0x3f, 0x2d, 0x01, 0x38, 0x3b, 0x23, 0xbc, 0x03, 0x56, 0x9c, + 0xa6, 0xdd, 0xd2, 0xeb, 0xc6, 0x91, 0xa1, 0x6b, 0xe5, 0x02, 0x3c, 0x00, 0x52, 0xdb, 0x6c, 0xb8, + 0x48, 0x37, 0x95, 0x27, 0xae, 0xea, 0xa0, 0xa6, 0xab, 0x9f, 0x38, 0x8a, 0x69, 0xbb, 0x0d, 0xa3, + 0xd9, 0x76, 0x6d, 0xa7, 0xd5, 0x32, 0x0d, 0x1d, 0xb9, 0x76, 0x5b, 0xf9, 0x4a, 0xe7, 0x67, 0x65, + 0x01, 0x3e, 0x00, 0xfb, 0x7f, 0xc1, 0x51, 0x62, 0x4a, 0x5d, 0x69, 0x1b, 0x56, 0x33, 0xa5, 0xc5, + 0x90, 0x72, 0x11, 0xde, 0x05, 0x9b, 0x31, 0xed, 0xb1, 0x69, 0xa9, 0x8a, 0x99, 0x60, 0x8d, 0xe6, + 0x91, 0xc9, 0x91, 0xe5, 0x12, 0x7c, 0x0c, 0xea, 0xaf, 0x75, 0x93, 0x63, 0x05, 0xe9, 0xc7, 0x96, + 0xa9, 0xe9, 0xc8, 0x45, 0xfa, 0xa9, 0x82, 0x34, 0x57, 0x33, 0xec, 0x36, 0x32, 0x54, 0x87, 0x0b, + 0x2d, 0xc0, 0x0f, 0xc0, 0xbd, 0x7c, 0x1f, 0x4d, 0xb1, 0xe6, 0x82, 0x17, 0xe1, 0x7d, 0xf0, 0x61, + 0x1e, 0xdc, 0x42, 0x56, 0xcb, 0xb2, 0xaf, 0x91, 0x5f, 0x82, 0x8f, 0xc0, 0xc7, 0x79, 0xc6, 0x6b, + 0x5f, 0xee, 0x0d, 0xf8, 0x11, 0xb8, 0x3f, 0xc3, 0xb6, 0x1c, 0x54, 0xd7, 0x5d, 0xeb, 0xb4, 0x79, + 0x0d, 0xeb, 0x16, 0x3c, 0x04, 0x72, 0x9e, 0x35, 0x6d, 0xf3, 0x3c, 0xd2, 0x32, 0xfc, 0x0c, 0x7c, + 0x92, 0x27, 0x21, 0xdd, 0x68, 0xa8, 0x0e, 0xb2, 0xf5, 0x86, 0xce, 0x77, 0x27, 0x8e, 0x6e, 0xb7, + 0x5d, 0xdd, 0xae, 0x23, 0xeb, 0x94, 0x9b, 0xd4, 0x46, 0x4a, 0xd3, 0x3e, 0xd2, 0x51, 0x19, 0xc4, + 0xc9, 0x98, 0x8a, 0x8a, 0x1b, 0x4b, 0x65, 0x73, 0x9a, 0x8a, 0x7d, 0xec, 0x36, 0x2c, 0xcd, 0x31, + 0xf5, 0x8c, 0xb3, 0x02, 0xf7, 0xc0, 0x7b, 0x7f, 0xc3, 0x99, 0x4a, 0xc4, 0x2a, 0xfc, 0x02, 0x3c, + 0xbc, 0x89, 0x95, 0xf9, 0x7e, 0x6b, 0xf0, 0x4b, 0xf0, 0xe8, 0x46, 0x23, 0xe6, 0x15, 0x6e, 0xab, + 0x27, 0xcf, 0x2f, 0x6a, 0xc2, 0x8b, 0x8b, 0x9a, 0xf0, 0xf2, 0xa2, 0x26, 0xfc, 0x7e, 0x51, 0x13, + 0x7e, 0xb8, 0xac, 0x15, 0x5e, 0x5c, 0xd6, 0x0a, 0x2f, 0x2f, 0x6b, 0x85, 0xaf, 0x0f, 0xcf, 0x7c, + 0xf6, 0xcd, 0xb0, 0x2b, 0x79, 0x24, 0x90, 0xe3, 0x5f, 0x91, 0xbd, 0x10, 0xb3, 0xef, 0x48, 0x74, + 0x2e, 0x4f, 0x9e, 0x22, 0xcf, 0x66, 0xde, 0x44, 0xdd, 0x25, 0xfe, 0x24, 0x39, 0xfc, 0x33, 0x00, + 0x00, 0xff, 0xff, 0x61, 0x74, 0xd8, 0x32, 0x37, 0x09, 0x00, 0x00, +} + +func (m *ClaimSettlementResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClaimSettlementResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClaimSettlementResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ModToAcctTransfers) > 0 { + for iNdEx := len(m.ModToAcctTransfers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ModToAcctTransfers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.ModToModTransfers) > 0 { + for iNdEx := len(m.ModToModTransfers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ModToModTransfers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Burns) > 0 { + for iNdEx := len(m.Burns) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Burns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Mints) > 0 { + for iNdEx := len(m.Mints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Claim.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MintBurnOp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MintBurnOp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MintBurnOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.DestinationModule) > 0 { + i -= len(m.DestinationModule) + copy(dAtA[i:], m.DestinationModule) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationModule))) + i-- + dAtA[i] = 0x12 + } + if m.OpReason != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.OpReason)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModToAcctTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModToAcctTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModToAcctTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.RecipientAddress) > 0 { + i -= len(m.RecipientAddress) + copy(dAtA[i:], m.RecipientAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.RecipientAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderModule) > 0 { + i -= len(m.SenderModule) + copy(dAtA[i:], m.SenderModule) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SenderModule))) + i-- + dAtA[i] = 0x12 + } + if m.OpReason != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.OpReason)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ModToModTransfer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ModToModTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModToModTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.RecipientModule) > 0 { + i -= len(m.RecipientModule) + copy(dAtA[i:], m.RecipientModule) + i = encodeVarintTypes(dAtA, i, uint64(len(m.RecipientModule))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderModule) > 0 { + i -= len(m.SenderModule) + copy(dAtA[i:], m.SenderModule) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SenderModule))) + i-- + dAtA[i] = 0x12 + } + if m.OpReason != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.OpReason)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ClaimSettlementResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Claim.Size() + n += 1 + l + sovTypes(uint64(l)) + if len(m.Mints) > 0 { + for _, e := range m.Mints { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Burns) > 0 { + for _, e := range m.Burns { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.ModToModTransfers) > 0 { + for _, e := range m.ModToModTransfers { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.ModToAcctTransfers) > 0 { + for _, e := range m.ModToAcctTransfers { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *MintBurnOp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OpReason != 0 { + n += 1 + sovTypes(uint64(m.OpReason)) + } + l = len(m.DestinationModule) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Coin.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *ModToAcctTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OpReason != 0 { + n += 1 + sovTypes(uint64(m.OpReason)) + } + l = len(m.SenderModule) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RecipientAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Coin.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *ModToModTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OpReason != 0 { + n += 1 + sovTypes(uint64(m.OpReason)) + } + l = len(m.SenderModule) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.RecipientModule) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Coin.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ClaimSettlementResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClaimSettlementResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClaimSettlementResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mints = append(m.Mints, MintBurnOp{}) + if err := m.Mints[len(m.Mints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Burns", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Burns = append(m.Burns, MintBurnOp{}) + if err := m.Burns[len(m.Burns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModToModTransfers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ModToModTransfers = append(m.ModToModTransfers, ModToModTransfer{}) + if err := m.ModToModTransfers[len(m.ModToModTransfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModToAcctTransfers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ModToAcctTransfers = append(m.ModToAcctTransfers, ModToAcctTransfer{}) + if err := m.ModToAcctTransfers[len(m.ModToAcctTransfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MintBurnOp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MintBurnOp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MintBurnOp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OpReason", wireType) + } + m.OpReason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OpReason |= SettlementOpReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationModule", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationModule = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModToAcctTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModToAcctTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModToAcctTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OpReason", wireType) + } + m.OpReason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OpReason |= SettlementOpReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderModule", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderModule = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipientAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ModToModTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ModToModTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModToModTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OpReason", wireType) + } + m.OpReason = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OpReason |= SettlementOpReason(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderModule", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderModule = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecipientModule", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecipientModule = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +)