diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index 5d73e948f..2c70022cd 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -204,12 +204,10 @@ func (s *KeeperTestHelper) FinalizeAllPendingPackets(address string) int { s.T().Helper() // Query all pending packets by address querier := delayedackkeeper.NewQuerier(s.App.DelayedAckKeeper) - resp, err := querier.GetPendingPacketsByAddress(s.Ctx, &delayedacktypes.QueryPendingPacketsByAddressRequest{ - Address: address, - }) + packets, err := querier.Keeper.GetPendingPacketsByAddress(s.Ctx, address) s.Require().NoError(err) // Finalize all packets and return the num of finalized - for _, packet := range resp.RollappPackets { + for _, packet := range packets { handler := s.App.MsgServiceRouter().Handler(new(delayedacktypes.MsgFinalizePacket)) resp, err := handler(s.Ctx, &delayedacktypes.MsgFinalizePacket{ Sender: authtypes.NewModuleAddress(govtypes.ModuleName).String(), @@ -222,5 +220,5 @@ func (s *KeeperTestHelper) FinalizeAllPendingPackets(address string) int { s.Require().NoError(err) s.Require().NotNil(resp) } - return len(resp.RollappPackets) + return len(packets) } diff --git a/internal/collcompat/collections_pagination.go b/internal/collcompat/collections_pagination.go new file mode 100644 index 000000000..4d569f060 --- /dev/null +++ b/internal/collcompat/collections_pagination.go @@ -0,0 +1,402 @@ +// Copied from SDK 0.50 +package collcompat + +import ( + "context" + "errors" + + "cosmossdk.io/collections" + collcodec "cosmossdk.io/collections/codec" + "github.com/cosmos/cosmos-sdk/types/query" +) + +// WithCollectionPaginationPairPrefix applies a prefix to a collection, whose key is a collection.Pair, +// being paginated that needs prefixing. +func WithCollectionPaginationPairPrefix[K1, K2 any](prefix K1) func(o *CollectionsPaginateOptions[collections.Pair[K1, K2]]) { + return func(o *CollectionsPaginateOptions[collections.Pair[K1, K2]]) { + prefix := collections.PairPrefix[K1, K2](prefix) + o.Prefix = &prefix + } +} + +// WithCollectionPaginationTriplePrefix applies a prefix to a collection, whose key is a collection.Triple, +// being paginated that needs prefixing. +func WithCollectionPaginationTriplePrefix[K1, K2, K3 any](prefix K1) func(o *CollectionsPaginateOptions[collections.Triple[K1, K2, K3]]) { + return func(o *CollectionsPaginateOptions[collections.Triple[K1, K2, K3]]) { + prefix := collections.TriplePrefix[K1, K2, K3](prefix) + o.Prefix = &prefix + } +} + +// CollectionsPaginateOptions provides extra options for pagination in collections. +type CollectionsPaginateOptions[K any] struct { + // Prefix allows to optionally set a prefix for the pagination. + Prefix *K +} + +// Collection defines the minimum required API of a collection +// to work with pagination. +type Collection[K, V any] interface { + // IterateRaw allows to iterate over a raw set of byte keys. + IterateRaw(ctx context.Context, start, end []byte, order collections.Order) (collections.Iterator[K, V], error) + // KeyCodec exposes the KeyCodec of a collection, required to encode a collection key from and to bytes + // for pagination request and response. + KeyCodec() collcodec.KeyCodec[K] +} + +// CollectionPaginate follows the same logic as Paginate but for collection types. +// transformFunc is used to transform the result to a different type. +func CollectionPaginate[K, V any, C Collection[K, V], T any]( + ctx context.Context, + coll C, + pageReq *query.PageRequest, + transformFunc func(key K, value V) (T, error), + opts ...func(opt *CollectionsPaginateOptions[K]), +) ([]T, *query.PageResponse, error) { + return CollectionFilteredPaginate( + ctx, + coll, + pageReq, + nil, + transformFunc, + opts..., + ) +} + +// CollectionFilteredPaginate works in the same way as CollectionPaginate but allows to filter +// results using a predicateFunc. +// A nil predicateFunc means no filtering is applied and results are collected as is. +// TransformFunc is applied only to results which are in range of the pagination and allow +// to convert the result to a different type. +// NOTE: do not collect results using the values/keys passed to predicateFunc as they are not +// guaranteed to be in the pagination range requested. +func CollectionFilteredPaginate[K, V any, C Collection[K, V], T any]( + ctx context.Context, + coll C, + pageReq *query.PageRequest, + predicateFunc func(key K, value V) (include bool, err error), + transformFunc func(key K, value V) (T, error), + opts ...func(opt *CollectionsPaginateOptions[K]), +) (results []T, pageRes *query.PageResponse, err error) { + pageReq = initPageRequestDefaults(pageReq) + + offset := pageReq.Offset + key := pageReq.Key + limit := pageReq.Limit + countTotal := pageReq.CountTotal + reverse := pageReq.Reverse + + if offset > 0 && key != nil { + return nil, nil, errors.New("invalid request, either offset or key is expected, got both") + } + + opt := new(CollectionsPaginateOptions[K]) + for _, o := range opts { + o(opt) + } + + var prefix []byte + if opt.Prefix != nil { + prefix, err = encodeCollKey[K, V](coll, *opt.Prefix) + if err != nil { + return nil, nil, err + } + } + + if len(key) != 0 { + results, pageRes, err = collFilteredPaginateByKey(ctx, coll, prefix, key, reverse, limit, predicateFunc, transformFunc) + } else { + results, pageRes, err = collFilteredPaginateNoKey(ctx, coll, prefix, reverse, offset, limit, countTotal, predicateFunc, transformFunc) + } + // invalid iter error is ignored to retain Paginate behavior + if errors.Is(err, collections.ErrInvalidIterator) { + return results, new(query.PageResponse), nil + } + // strip the prefix from next key + if len(pageRes.NextKey) != 0 && prefix != nil { + pageRes.NextKey = pageRes.NextKey[len(prefix):] + } + return results, pageRes, err +} + +// collFilteredPaginateNoKey applies the provided pagination on the collection when the starting key is not set. +// If predicateFunc is nil no filtering is applied. +func collFilteredPaginateNoKey[K, V any, C Collection[K, V], T any]( + ctx context.Context, + coll C, + prefix []byte, + reverse bool, + offset uint64, + limit uint64, + countTotal bool, + predicateFunc func(K, V) (bool, error), + transformFunc func(K, V) (T, error), +) ([]T, *query.PageResponse, error) { + iterator, err := getCollIter[K, V](ctx, coll, prefix, nil, reverse) + if err != nil { + return nil, nil, err + } + defer iterator.Close() // nolint: errcheck + // we advance the iter equal to the provided offset + if !advanceIter(iterator, offset) { + return nil, nil, collections.ErrInvalidIterator + } + + var ( + count uint64 + nextKey []byte + results []T + ) + + for ; iterator.Valid(); iterator.Next() { + switch { + // first case, we still haven't found all the results up to the limit + case count < limit: + kv, err := iterator.KeyValue() + if err != nil { + return nil, nil, err + } + // if no predicate function is specified then we just include the result + if predicateFunc == nil { + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + count++ + + // if predicate function is defined we check if the result matches the filtering criteria + } else { + include, err := predicateFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + if include { + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + count++ + } + } + // second case, we found all the objects specified within the limit + case count == limit: + key, err := iterator.Key() + if err != nil { + return nil, nil, err + } + nextKey, err = encodeCollKey[K, V](coll, key) + if err != nil { + return nil, nil, err + } + // if count total was not specified, we return the next key only + if !countTotal { + return results, &query.PageResponse{ + NextKey: nextKey, + }, nil + } + // otherwise we fallthrough the third case + fallthrough + // this is the case in which we found all the required results + // but we need to count how many possible results exist in total. + // so we keep increasing the count until the iterator is fully consumed. + case count > limit: + if predicateFunc == nil { + count++ + + // if predicate function is defined we check if the result matches the filtering criteria + } else { + kv, err := iterator.KeyValue() + if err != nil { + return nil, nil, err + } + + include, err := predicateFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + if include { + count++ + } + } + } + } + + resp := &query.PageResponse{ + NextKey: nextKey, + } + + if countTotal { + resp.Total = count + offset + } + return results, resp, nil +} + +func advanceIter[I interface { + Next() + Valid() bool +}](iter I, offset uint64, +) bool { + for i := uint64(0); i < offset; i++ { + if !iter.Valid() { + return false + } + iter.Next() + } + return true +} + +// collFilteredPaginateByKey paginates a collection when a starting key +// is provided in the PageRequest. Predicate is applied only if not nil. +func collFilteredPaginateByKey[K, V any, C Collection[K, V], T any]( + ctx context.Context, + coll C, + prefix []byte, + key []byte, + reverse bool, + limit uint64, + predicateFunc func(key K, value V) (bool, error), + transformFunc func(key K, value V) (transformed T, err error), +) (results []T, pageRes *query.PageResponse, err error) { + iterator, err := getCollIter[K, V](ctx, coll, prefix, key, reverse) + if err != nil { + return nil, nil, err + } + defer iterator.Close() // nolint: errcheck + + var ( + count uint64 + nextKey []byte + ) + + for ; iterator.Valid(); iterator.Next() { + // if we reached the specified limit + // then we get the next key, and we exit the iteration. + if count == limit { + concreteKey, err := iterator.Key() + if err != nil { + return nil, nil, err + } + + nextKey, err = encodeCollKey[K, V](coll, concreteKey) + if err != nil { + return nil, nil, err + } + break + } + + kv, err := iterator.KeyValue() + if err != nil { + return nil, nil, err + } + // if no predicate is specified then we just append the result + if predicateFunc == nil { + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + // if predicate is applied we execute the predicate function + // and append only if predicateFunc yields true. + } else { + include, err := predicateFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + if include { + transformed, err := transformFunc(kv.Key, kv.Value) + if err != nil { + return nil, nil, err + } + results = append(results, transformed) + } + } + count++ + } + + return results, &query.PageResponse{ + NextKey: nextKey, + }, nil +} + +// initPageRequestDefaults initializes a PageRequest's defaults when those are not set. +func initPageRequestDefaults(pageRequest *query.PageRequest) *query.PageRequest { + // if the PageRequest is nil, use default PageRequest + if pageRequest == nil { + pageRequest = &query.PageRequest{} + } + + pageRequestCopy := *pageRequest + if len(pageRequestCopy.Key) == 0 { + pageRequestCopy.Key = nil + } + + if pageRequestCopy.Limit == 0 { + pageRequestCopy.Limit = query.DefaultLimit + + // count total results when the limit is zero/not supplied + pageRequestCopy.CountTotal = true + } + + return &pageRequestCopy +} + +// todo maybe move to collections? +func encodeCollKey[K, V any, C Collection[K, V]](coll C, key K) ([]byte, error) { + buffer := make([]byte, coll.KeyCodec().Size(key)) + _, err := coll.KeyCodec().Encode(buffer, key) + return buffer, err +} + +func getCollIter[K, V any, C Collection[K, V]](ctx context.Context, coll C, prefix, start []byte, reverse bool) (collections.Iterator[K, V], error) { + // TODO: maybe can be simplified + if reverse { + // if we are in reverse mode, we need to increase the start key + // to include the start key in the iteration. + start = PrefixEndBytes(append(prefix, start...)) + end := prefix + + return coll.IterateRaw(ctx, end, start, collections.OrderDescending) + } + var end []byte + if prefix != nil { + start = append(prefix, start...) + end = PrefixEndBytes(prefix) + } + return coll.IterateRaw(ctx, start, end, collections.OrderAscending) +} + +// PrefixEndBytes returns the []byte that would end a +// range query for all []byte with a certain prefix +// Deals with last byte of prefix being FF without overflowing +func PrefixEndBytes(prefix []byte) []byte { + if len(prefix) == 0 { + return nil + } + + end := make([]byte, len(prefix)) + copy(end, prefix) + + for { + if end[len(end)-1] != byte(255) { + end[len(end)-1]++ + break + } + + end = end[:len(end)-1] + + if len(end) == 0 { + end = nil + break + } + } + + return end +} + +// InclusiveEndBytes returns the []byte that would end a +// range query such that the input would be included +func InclusiveEndBytes(inclusiveBytes []byte) []byte { + return append(inclusiveBytes, byte(0x00)) +} diff --git a/proto/dymensionxyz/dymension/eibc/query.proto b/proto/dymensionxyz/dymension/eibc/query.proto index bc334f8fd..1e01072ea 100644 --- a/proto/dymensionxyz/dymension/eibc/query.proto +++ b/proto/dymensionxyz/dymension/eibc/query.proto @@ -60,6 +60,7 @@ message QueryDemandOrdersByStatusRequest { string denom = 7; // optional recipient address string recipient = 8; + cosmos.base.query.v1beta1.PageRequest pagination = 9; } enum FulfillmentState { @@ -78,4 +79,5 @@ message QueryGetDemandOrderResponse { message QueryDemandOrdersByStatusResponse { // A list of demand orders with the given status repeated DemandOrder demand_orders = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } \ No newline at end of file diff --git a/proto/dymensionxyz/dymension/iro/query.proto b/proto/dymensionxyz/dymension/iro/query.proto index 2ed1cd502..ca39ac3d0 100644 --- a/proto/dymensionxyz/dymension/iro/query.proto +++ b/proto/dymensionxyz/dymension/iro/query.proto @@ -6,6 +6,7 @@ import "cosmos_proto/cosmos.proto"; import "google/api/annotations.proto"; import "dymensionxyz/dymension/iro/iro.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/dymensionxyz/dymension/v3/x/iro/types"; @@ -70,11 +71,13 @@ message QueryParamsResponse { message QueryPlansRequest { // tradable_only is an optional flag to filter out plans that have not started yet, and that are not settled. bool tradable_only = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryPlanResponse is the response type for the Query/QueryPlan RPC method. message QueryPlansResponse { repeated Plan plans = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryPlanRequest is the request type for the Query/QueryPlan RPC method. diff --git a/proto/dymensionxyz/dymension/rollapp/query.proto b/proto/dymensionxyz/dymension/rollapp/query.proto index 90074a44a..b90f8b1c0 100644 --- a/proto/dymensionxyz/dymension/rollapp/query.proto +++ b/proto/dymensionxyz/dymension/rollapp/query.proto @@ -140,10 +140,12 @@ message QueryGetStateInfoResponse { message QueryRegisteredDenomsRequest { string rollappId = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; } message QueryRegisteredDenomsResponse { repeated string denoms = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryObsoleteDRSVersionsRequest {} diff --git a/proto/dymensionxyz/dymension/sequencer/query.proto b/proto/dymensionxyz/dymension/sequencer/query.proto index 67657eeb1..b166fbc52 100644 --- a/proto/dymensionxyz/dymension/sequencer/query.proto +++ b/proto/dymensionxyz/dymension/sequencer/query.proto @@ -88,19 +88,25 @@ message QuerySequencersResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryGetSequencersByRollappRequest { string rollappId = 1; } +message QueryGetSequencersByRollappRequest { + string rollappId = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} message QueryGetSequencersByRollappResponse { repeated Sequencer sequencers = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QueryGetSequencersByRollappByStatusRequest { string rollappId = 1; OperatingStatus status = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } message QueryGetSequencersByRollappByStatusResponse { repeated Sequencer sequencers = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // Request type for the GetProposerByRollapp RPC method. diff --git a/x/delayedack/keeper/grpc_query.go b/x/delayedack/keeper/grpc_query.go index 4bce04f22..56edfa19b 100644 --- a/x/delayedack/keeper/grpc_query.go +++ b/x/delayedack/keeper/grpc_query.go @@ -62,13 +62,13 @@ func (q Querier) GetPendingPacketsByAddress(goCtx context.Context, req *types.Qu ctx := sdk.UnwrapSDKContext(goCtx) // Get all pending rollapp packets until the latest finalized height - p, err := q.Keeper.GetPendingPacketsByAddress(ctx, req.Address) + p, pageResp, err := q.Keeper.GetPendingPacketsByAddressPaginated(ctx, req.Address, req.Pagination) if err != nil { return nil, fmt.Errorf("get pending packets by receiver %s: %w", req.Address, err) } return &types.QueryPendingPacketByAddressListResponse{ RollappPackets: p, - Pagination: nil, // TODO: handle pagination + Pagination: pageResp, }, nil } diff --git a/x/delayedack/keeper/invariants_test.go b/x/delayedack/keeper/invariants_test.go index 62ebe6a6b..106f15e23 100644 --- a/x/delayedack/keeper/invariants_test.go +++ b/x/delayedack/keeper/invariants_test.go @@ -2,10 +2,10 @@ package keeper_test import ( "github.com/cometbft/cometbft/libs/rand" - "github.com/dymensionxyz/dymension/v3/x/delayedack/keeper" "github.com/dymensionxyz/dymension/v3/app/apptesting" commontypes "github.com/dymensionxyz/dymension/v3/x/common/types" + "github.com/dymensionxyz/dymension/v3/x/delayedack/keeper" rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) diff --git a/x/delayedack/keeper/rollapp_packet.go b/x/delayedack/keeper/rollapp_packet.go index 32fb85012..8bd6ad7c8 100644 --- a/x/delayedack/keeper/rollapp_packet.go +++ b/x/delayedack/keeper/rollapp_packet.go @@ -5,10 +5,12 @@ import ( "cosmossdk.io/collections" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/dymensionxyz/gerr-cosmos/gerrc" + "github.com/dymensionxyz/dymension/v3/internal/collcompat" commontypes "github.com/dymensionxyz/dymension/v3/x/common/types" "github.com/dymensionxyz/dymension/v3/x/delayedack/types" ) @@ -77,6 +79,19 @@ func (k Keeper) GetPendingPacketsByAddress(ctx sdk.Context, receiver string) ([] return packets, nil } +// GetPendingPacketsByAddressPaginated retrieves rollapp packets from the KVStore by their receiver with pagination. +func (k Keeper) GetPendingPacketsByAddressPaginated(ctx sdk.Context, receiver string, pageReq *query.PageRequest) ([]commontypes.RollappPacket, *query.PageResponse, error) { + return collcompat.CollectionPaginate(ctx, k.pendingPacketsByAddress, pageReq, + func(key collections.Pair[string, []byte], _ collections.NoValue) (commontypes.RollappPacket, error) { + packet, err := k.GetRollappPacket(ctx, string(key.K2())) + if err != nil { + return commontypes.RollappPacket{}, err + } + return *packet, err + }, collcompat.WithCollectionPaginationPairPrefix[string, []byte](receiver), + ) +} + // GetRollappPacket retrieves a rollapp packet from the KVStore. func (k Keeper) GetRollappPacket(ctx sdk.Context, rollappPacketKey string) (*commontypes.RollappPacket, error) { store := ctx.KVStore(k.storeKey) diff --git a/x/eibc/client/cli/query_command_orders.go b/x/eibc/client/cli/query_command_orders.go index 8e320a222..36315fe08 100644 --- a/x/eibc/client/cli/query_command_orders.go +++ b/x/eibc/client/cli/query_command_orders.go @@ -26,12 +26,18 @@ func CmdListDemandOrdersByStatus() *cobra.Command { if !ok { return fmt.Errorf("invalid status: %s", args[0]) } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + request := &types.QueryDemandOrdersByStatusRequest{ - Status: commontypes.Status(status), - Type: commontypes.RollappPacket_UNDEFINED, // default to undefined, as '0' is a valid type + Status: commontypes.Status(status), + Type: commontypes.RollappPacket_UNDEFINED, // default to undefined, as '0' is a valid type + Pagination: pageReq, } - var err error request.RollappId, err = cmd.Flags().GetString("rollapp") if err != nil { return err diff --git a/x/eibc/keeper/grpc_query.go b/x/eibc/keeper/grpc_query.go index cd5ffe691..fc698de21 100644 --- a/x/eibc/keeper/grpc_query.go +++ b/x/eibc/keeper/grpc_query.go @@ -56,12 +56,15 @@ func (q Querier) DemandOrdersByStatus(goCtx context.Context, req *types.QueryDem return nil, status.Error(codes.InvalidArgument, "empty request") } // Get the demand orders by status, with optional filters - demandOrders, err := q.ListDemandOrdersByStatus(sdk.UnwrapSDKContext(goCtx), req.Status, int(req.Limit), filterOpts(req)...) + demandOrders, pageResp, err := q.ListDemandOrdersByStatusPaginated(sdk.UnwrapSDKContext(goCtx), req.Status, req.Pagination, filterOpts(req)...) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } // Construct the response - return &types.QueryDemandOrdersByStatusResponse{DemandOrders: demandOrders}, nil + return &types.QueryDemandOrdersByStatusResponse{ + DemandOrders: demandOrders, + Pagination: pageResp, + }, nil } func filterOpts(req *types.QueryDemandOrdersByStatusRequest) []filterOption { diff --git a/x/eibc/keeper/keeper.go b/x/eibc/keeper/keeper.go index 72e2e2db1..b790615bf 100644 --- a/x/eibc/keeper/keeper.go +++ b/x/eibc/keeper/keeper.go @@ -5,8 +5,10 @@ import ( "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/dymensionxyz/sdk-utils/utils/uevent" @@ -198,6 +200,48 @@ outer: return list, nil } +func (k Keeper) ListDemandOrdersByStatusPaginated( + ctx sdk.Context, + status commontypes.Status, + pageReq *query.PageRequest, + opts ...filterOption, +) (list []*types.DemandOrder, pageResp *query.PageResponse, err error) { + store := ctx.KVStore(k.storeKey) + + var statusPrefix []byte + switch status { + case commontypes.Status_PENDING: + statusPrefix = types.PendingDemandOrderKeyPrefix + case commontypes.Status_FINALIZED: + statusPrefix = types.FinalizedDemandOrderKeyPrefix + default: + err = fmt.Errorf("invalid demand order status: %s", status) + return + } + + prefixStore := prefix.NewStore(store, statusPrefix) + + if pageReq == nil { + pageReq = &query.PageRequest{} + } + + pageResp, err = query.Paginate(prefixStore, pageReq, func(key []byte, value []byte) error { + var val types.DemandOrder + if err := k.cdc.Unmarshal(value, &val); err != nil { + return err + } + for _, opt := range opts { + if !opt(val) { + return nil + } + } + list = append(list, &val) + return nil + }) + + return +} + /* -------------------------------------------------------------------------- */ /* Hooks handling */ /* -------------------------------------------------------------------------- */ diff --git a/x/eibc/types/query.pb.go b/x/eibc/types/query.pb.go index 6008389f3..afe439c88 100644 --- a/x/eibc/types/query.pb.go +++ b/x/eibc/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -205,7 +205,8 @@ type QueryDemandOrdersByStatusRequest struct { // optional denom Denom string `protobuf:"bytes,7,opt,name=denom,proto3" json:"denom,omitempty"` // optional recipient address - Recipient string `protobuf:"bytes,8,opt,name=recipient,proto3" json:"recipient,omitempty"` + Recipient string `protobuf:"bytes,8,opt,name=recipient,proto3" json:"recipient,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,9,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDemandOrdersByStatusRequest) Reset() { *m = QueryDemandOrdersByStatusRequest{} } @@ -297,6 +298,13 @@ func (m *QueryDemandOrdersByStatusRequest) GetRecipient() string { return "" } +func (m *QueryDemandOrdersByStatusRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + // QueryGetDemandOrderResponse is the response type for the Query/GetDemandOrder RPC method. type QueryGetDemandOrderResponse struct { // demand order with the given id @@ -346,7 +354,8 @@ func (m *QueryGetDemandOrderResponse) GetDemandOrder() *DemandOrder { // QueryDemandOrdersByStatusResponse is the response type for the Query/GetDemandOrdersByStatus RPC method. type QueryDemandOrdersByStatusResponse struct { // A list of demand orders with the given status - DemandOrders []*DemandOrder `protobuf:"bytes,1,rep,name=demand_orders,json=demandOrders,proto3" json:"demand_orders,omitempty"` + DemandOrders []*DemandOrder `protobuf:"bytes,1,rep,name=demand_orders,json=demandOrders,proto3" json:"demand_orders,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryDemandOrdersByStatusResponse) Reset() { *m = QueryDemandOrdersByStatusResponse{} } @@ -389,6 +398,13 @@ func (m *QueryDemandOrdersByStatusResponse) GetDemandOrders() []*DemandOrder { return nil } +func (m *QueryDemandOrdersByStatusResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterEnum("dymensionxyz.dymension.eibc.FulfillmentState", FulfillmentState_name, FulfillmentState_value) proto.RegisterType((*QueryParamsRequest)(nil), "dymensionxyz.dymension.eibc.QueryParamsRequest") @@ -404,52 +420,55 @@ func init() { } var fileDescriptor_d85bfe71ceb5f8dc = []byte{ - // 714 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x4f, 0x13, 0x4f, - 0x14, 0xef, 0x96, 0xb6, 0xdf, 0x6f, 0x87, 0x5f, 0x75, 0xec, 0x61, 0x53, 0xb0, 0x62, 0x09, 0xb1, - 0x41, 0xdd, 0xa1, 0x25, 0xfe, 0x48, 0x0c, 0x26, 0x34, 0x6d, 0x4d, 0x03, 0x22, 0xae, 0x92, 0x18, - 0x2e, 0x64, 0xdb, 0x1d, 0xea, 0xe8, 0xee, 0xce, 0xb2, 0x3b, 0x25, 0xac, 0x84, 0x8b, 0x57, 0x2f, - 0x26, 0x5e, 0xfc, 0x4b, 0x3c, 0xf9, 0x07, 0x70, 0x24, 0x7a, 0xf1, 0x64, 0x0c, 0xf8, 0x87, 0x98, - 0x9d, 0x99, 0xc2, 0x8a, 0xb0, 0x05, 0x6f, 0x7d, 0xaf, 0xef, 0xf3, 0xde, 0xe7, 0xf3, 0xd9, 0x37, - 0x0f, 0xdc, 0x34, 0x03, 0x1b, 0x3b, 0x3e, 0xa1, 0xce, 0x4e, 0xf0, 0x16, 0x1d, 0x07, 0x08, 0x93, - 0x76, 0x07, 0x6d, 0xf5, 0xb0, 0x17, 0x68, 0xae, 0x47, 0x19, 0x85, 0x13, 0xd1, 0x42, 0xed, 0x38, - 0xd0, 0xc2, 0xc2, 0x42, 0xbe, 0x4b, 0xbb, 0x94, 0xd7, 0xa1, 0xf0, 0x97, 0x80, 0x14, 0x26, 0xbb, - 0x94, 0x76, 0x2d, 0x8c, 0x0c, 0x97, 0x20, 0xc3, 0x71, 0x28, 0x33, 0x18, 0xa1, 0x8e, 0x2f, 0xff, - 0x9d, 0xed, 0x50, 0xdf, 0xa6, 0x3e, 0x6a, 0x1b, 0x3e, 0x16, 0x93, 0xd0, 0x76, 0xa5, 0x8d, 0x99, - 0x51, 0x41, 0xae, 0xd1, 0x25, 0x0e, 0x2f, 0x96, 0xb5, 0xe5, 0x38, 0x96, 0xae, 0xe1, 0x19, 0x76, - 0xbf, 0xab, 0x16, 0x57, 0x69, 0x62, 0xdb, 0x70, 0xcc, 0x0d, 0xea, 0x99, 0xd8, 0xeb, 0xb3, 0x38, - 0xa7, 0xbe, 0x43, 0x6d, 0x9b, 0x3a, 0xc8, 0x67, 0x06, 0xeb, 0xf5, 0x7b, 0x57, 0xe3, 0x6b, 0x3d, - 0x6a, 0x59, 0x86, 0xeb, 0x6e, 0xb8, 0x46, 0xe7, 0x0d, 0x66, 0x02, 0x53, 0xca, 0x03, 0xf8, 0x2c, - 0xd4, 0xb6, 0xca, 0x49, 0xea, 0x78, 0xab, 0x87, 0x7d, 0x56, 0x7a, 0x09, 0xae, 0xfe, 0x91, 0xf5, - 0x5d, 0xea, 0xf8, 0x18, 0x2e, 0x82, 0x8c, 0x10, 0xa3, 0x2a, 0x53, 0x4a, 0x79, 0xb8, 0x3a, 0xad, - 0xc5, 0x98, 0xae, 0x09, 0x70, 0x2d, 0xb5, 0xff, 0xe3, 0x7a, 0x42, 0x97, 0xc0, 0xd2, 0x6d, 0x50, - 0xe0, 0x9d, 0x1f, 0x63, 0x56, 0xe7, 0x6a, 0x9f, 0x86, 0x62, 0xe5, 0x5c, 0x38, 0x06, 0x92, 0xc4, - 0xe4, 0xcd, 0xb3, 0x7a, 0x92, 0x98, 0xa5, 0xf7, 0x43, 0x60, 0x8a, 0x97, 0x47, 0x6a, 0xfd, 0x5a, - 0xf0, 0x9c, 0xab, 0xee, 0x83, 0x16, 0x40, 0x46, 0xd8, 0xc0, 0x81, 0x63, 0xd5, 0x99, 0xf3, 0x58, - 0x09, 0x1f, 0x34, 0x89, 0x96, 0x20, 0xd8, 0x00, 0x29, 0x16, 0xb8, 0x58, 0x4d, 0x72, 0x70, 0x65, - 0x00, 0x58, 0x17, 0x26, 0xae, 0x0a, 0x0f, 0x5f, 0x04, 0x2e, 0xd6, 0x39, 0x1c, 0x5e, 0x03, 0xa0, - 0x6f, 0x30, 0x31, 0xd5, 0x21, 0x2e, 0x21, 0x2b, 0x33, 0x2d, 0x13, 0xe6, 0x41, 0xda, 0x22, 0x36, - 0x61, 0x6a, 0x6a, 0x4a, 0x29, 0xa7, 0x75, 0x11, 0xc0, 0x75, 0x70, 0x65, 0xb3, 0x67, 0x6d, 0x12, - 0xcb, 0xb2, 0xb1, 0xc3, 0x36, 0x42, 0x46, 0x58, 0x4d, 0x73, 0x22, 0x77, 0x62, 0xbd, 0x6d, 0x9e, - 0xa0, 0x42, 0x39, 0x58, 0xcf, 0x6d, 0x9e, 0xca, 0xc0, 0x49, 0x90, 0x95, 0x39, 0xec, 0xa9, 0x19, - 0xc1, 0xe7, 0x38, 0x11, 0xf2, 0x31, 0xb1, 0x43, 0x6d, 0xf5, 0x3f, 0xfe, 0x8f, 0x08, 0x42, 0x8c, - 0x87, 0x3b, 0xc4, 0x25, 0xd8, 0x61, 0xea, 0xff, 0x52, 0x43, 0x3f, 0x51, 0x7a, 0x0d, 0x26, 0xce, - 0xfc, 0x76, 0x72, 0x3b, 0x96, 0xc0, 0x48, 0x74, 0x81, 0xe5, 0x8e, 0x94, 0x63,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0xca, 0xcf, 0xc3, 0xa2, 0xf2, 0xe1, 0xa8, 0x98, 0x38, 0x38, 0x2a, 0x26, 0xbe, - 0x1f, 0x15, 0x13, 0xeb, 0x95, 0x2e, 0x61, 0xaf, 0x7a, 0xed, 0xf0, 0x00, 0x9d, 0xd7, 0x78, 0x7b, - 0x1e, 0xed, 0x88, 0xee, 0xe1, 0x29, 0xf2, 0xdb, 0x19, 0x7e, 0xdb, 0xe7, 0x7f, 0x07, 0x00, 0x00, - 0xff, 0xff, 0xf2, 0x62, 0x5e, 0xac, 0x3d, 0x07, 0x00, 0x00, + // 759 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x4e, 0x13, 0x41, + 0x14, 0xee, 0x96, 0xb6, 0xda, 0xe1, 0xaf, 0x8e, 0xbd, 0xd8, 0x14, 0xac, 0x58, 0x82, 0x34, 0xa8, + 0x3b, 0xb4, 0xc4, 0x9f, 0xc4, 0x60, 0x42, 0xd3, 0x96, 0x34, 0x20, 0xe2, 0x2a, 0x89, 0xe1, 0x86, + 0x6c, 0xbb, 0x43, 0x1d, 0xed, 0xee, 0x2c, 0xbb, 0x53, 0x42, 0x25, 0xdc, 0xf8, 0x04, 0x26, 0xde, + 0xf8, 0x24, 0xde, 0xe8, 0x03, 0x70, 0x49, 0xe4, 0xc6, 0x2b, 0x63, 0xc0, 0x07, 0x31, 0x3b, 0x33, + 0xa5, 0x0b, 0xc2, 0x16, 0xbc, 0x63, 0x4e, 0xcf, 0x77, 0xce, 0xf7, 0x7d, 0x7b, 0xce, 0x01, 0x4c, + 0x9b, 0x1d, 0x0b, 0xdb, 0x1e, 0xa1, 0xf6, 0x4e, 0xe7, 0x03, 0x3a, 0x79, 0x20, 0x4c, 0xea, 0x0d, + 0xb4, 0xd5, 0xc6, 0x6e, 0x47, 0x73, 0x5c, 0xca, 0x28, 0x1c, 0x0b, 0x26, 0x6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0x66, 0xee, 0x70, 0x00, 0x4c, 0xf0, 0xf4, 0x40, 0xae, 0x57, 0xea, 0xbc, + 0xe2, 0xaa, 0xbb, 0xa0, 0x79, 0x90, 0x10, 0x36, 0x70, 0xe0, 0x48, 0x71, 0xea, 0x22, 0x56, 0xc2, + 0x07, 0x4d, 0xa2, 0x25, 0x08, 0x56, 0x40, 0x8c, 0x75, 0x1c, 0xac, 0x46, 0x39, 0xb8, 0xd0, 0x07, + 0xac, 0x0b, 0x13, 0x57, 0x85, 0x87, 0xaf, 0x3b, 0x0e, 0xd6, 0x39, 0x1c, 0xde, 0x02, 0xa0, 0x6b, + 0x30, 0x31, 0xd5, 0x01, 0x2e, 0x21, 0x29, 0x23, 0x35, 0x13, 0xa6, 0x41, 0xbc, 0x45, 0x2c, 0xc2, + 0xd4, 0xd8, 0x84, 0x92, 0x8f, 0xeb, 0xe2, 0x01, 0xd7, 0xc1, 0x8d, 0xcd, 0x76, 0x6b, 0x93, 0xb4, + 0x5a, 0x16, 0xb6, 0xd9, 0x86, 0xcf, 0x08, 0xab, 0x71, 0x4e, 0xe4, 0x41, 0xa8, 0xb7, 0xd5, 0x1e, + 0xca, 0x97, 0x83, 0xf5, 0xd4, 0xe6, 0x99, 0x08, 0x1c, 0x07, 0x49, 0x19, 0xc3, 0xae, 0x9a, 0x10, + 0x7c, 0x4e, 0x02, 0x3e, 0x1f, 0x13, 0xdb, 0xd4, 0x52, 0xaf, 0xf1, 0x5f, 0xc4, 0xc3, 0xc7, 0xb8, + 0xb8, 0x41, 0x1c, 0x82, 0x6d, 0xa6, 0x5e, 0x97, 0x1a, 0xba, 0x01, 0x58, 0x05, 0xa0, 0x37, 0xf9, + 0x6a, 0x92, 0x8f, 0xc0, 0x5d, 0x4d, 0xac, 0x89, 0xe6, 0xaf, 0x89, 0x26, 0x16, 0x52, 0xae, 0x89, + 0xb6, 0x6a, 0x34, 0xb1, 0xfc, 0x48, 0x7a, 0x00, 0x99, 0x7b, 0x07, 0xc6, 0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0xcc, 0xb3, 0xff, 0x85, 0x4b, 0x3d, 0x4f, 0xb9, 0x9e, 0x87, 0x70, 0xee, 0xd2, + 0x7a, 0x3c, 0xb4, 0x2b, 0xce, 0xe2, 0x5e, 0x69, 0x69, 0xff, 0x28, 0xab, 0x1c, 0x1c, 0x65, 0x95, + 0xdf, 0x47, 0x59, 0xe5, 0xd3, 0x71, 0x36, 0x72, 0x70, 0x9c, 0x8d, 0xfc, 0x3c, 0xce, 0x46, 0xd6, + 0x0b, 0x4d, 0xc2, 0xde, 0xb6, 0xeb, 0xfe, 0x49, 0xbc, 0xa8, 0xf0, 0xf6, 0x1c, 0xda, 0x11, 0xd5, + 0xfd, 0xe3, 0xe8, 0xd5, 0x13, 0xfc, 0xbf, 0xcd, 0xdc, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, + 0xa6, 0xf2, 0x65, 0xcf, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -716,6 +735,18 @@ func (m *QueryDemandOrdersByStatusRequest) MarshalToSizedBuffer(dAtA []byte) (in _ = 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] = 0x4a + } if len(m.Recipient) > 0 { i -= len(m.Recipient) copy(dAtA[i:], m.Recipient) @@ -822,6 +853,18 @@ func (m *QueryDemandOrdersByStatusResponse) MarshalToSizedBuffer(dAtA []byte) (i _ = 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.DemandOrders) > 0 { for iNdEx := len(m.DemandOrders) - 1; iNdEx >= 0; iNdEx-- { { @@ -917,6 +960,10 @@ func (m *QueryDemandOrdersByStatusRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -945,6 +992,10 @@ func (m *QueryDemandOrdersByStatusResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1402,6 +1453,42 @@ func (m *QueryDemandOrdersByStatusRequest) Unmarshal(dAtA []byte) error { } m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + 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:]) @@ -1572,6 +1659,42 @@ func (m *QueryDemandOrdersByStatusResponse) Unmarshal(dAtA []byte) error { 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:]) diff --git a/x/iro/cli/query.go b/x/iro/cli/query.go index 3aeb3fe68..9fe70552b 100644 --- a/x/iro/cli/query.go +++ b/x/iro/cli/query.go @@ -51,8 +51,14 @@ func CmdQueryPlans() *cobra.Command { return err } + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + res, err := queryClient.QueryPlans(cmd.Context(), &types.QueryPlansRequest{ TradableOnly: tradableOnly, + Pagination: pageReq, }) if err != nil { return err @@ -62,6 +68,7 @@ func CmdQueryPlans() *cobra.Command { }, } + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) flags.AddQueryFlagsToCmd(cmd) cmd.Flags().BoolP(FlagTradableOnly, "t", false, "Query only tradable plans") return cmd diff --git a/x/iro/keeper/iro.go b/x/iro/keeper/iro.go index 0ea7aa971..0be71ab29 100644 --- a/x/iro/keeper/iro.go +++ b/x/iro/keeper/iro.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/dymensionxyz/dymension/v3/x/iro/types" ) @@ -83,6 +84,29 @@ func (k Keeper) GetAllPlans(ctx sdk.Context, tradableOnly bool) (list []types.Pl return } +func (k Keeper) GetAllPlansPaginated(ctx sdk.Context, tradableOnly bool, pageReq *query.PageRequest) (list []types.Plan, pageRes *query.PageResponse, err error) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.PlanKeyPrefix) + + pageRes, err = query.Paginate(store, pageReq, func(key []byte, value []byte) error { + var val types.Plan + if er := k.cdc.Unmarshal(value, &val); er != nil { + return er + } + + if tradableOnly && (val.IsSettled() || val.StartTime.After(ctx.BlockTime())) { + return nil + } + + list = append(list, val) + return nil + }) + if err != nil { + return + } + + return +} + // SetLastPlanId sets the last plan ID in the store func (k Keeper) SetLastPlanId(ctx sdk.Context, lastPlanId uint64) { store := ctx.KVStore(k.storeKey) diff --git a/x/iro/keeper/query.go b/x/iro/keeper/query.go index f550ff6ed..17b0a7f47 100644 --- a/x/iro/keeper/query.go +++ b/x/iro/keeper/query.go @@ -122,7 +122,12 @@ func (k Keeper) QueryPlans(goCtx context.Context, req *types.QueryPlansRequest) return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryPlansResponse{Plans: k.GetAllPlans(ctx, req.TradableOnly)}, nil + plans, pageRes, err := k.GetAllPlansPaginated(ctx, req.TradableOnly, req.Pagination) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryPlansResponse{Plans: plans, Pagination: pageRes}, nil } // QuerySpotPrice implements types.QueryServer. diff --git a/x/iro/types/query.pb.go b/x/iro/types/query.pb.go index 85b7e74b2..4de0f530d 100644 --- a/x/iro/types/query.pb.go +++ b/x/iro/types/query.pb.go @@ -9,6 +9,7 @@ import ( _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -118,7 +119,8 @@ func (m *QueryParamsResponse) GetParams() Params { // QueryPlanRequest is the request type for the Query/QueryPlan RPC method. type QueryPlansRequest struct { // tradable_only is an optional flag to filter out plans that have not started yet, and that are not settled. - TradableOnly bool `protobuf:"varint,1,opt,name=tradable_only,json=tradableOnly,proto3" json:"tradable_only,omitempty"` + TradableOnly bool `protobuf:"varint,1,opt,name=tradable_only,json=tradableOnly,proto3" json:"tradable_only,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPlansRequest) Reset() { *m = QueryPlansRequest{} } @@ -161,9 +163,17 @@ func (m *QueryPlansRequest) GetTradableOnly() bool { return false } +func (m *QueryPlansRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + // QueryPlanResponse is the response type for the Query/QueryPlan RPC method. type QueryPlansResponse struct { - Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryPlansResponse) Reset() { *m = QueryPlansResponse{} } @@ -206,6 +216,13 @@ func (m *QueryPlansResponse) GetPlans() []Plan { return nil } +func (m *QueryPlansResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QueryPlanRequest is the request type for the Query/QueryPlan RPC method. type QueryPlanRequest struct { PlanId string `protobuf:"bytes,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` @@ -770,63 +787,66 @@ func init() { } var fileDescriptor_ae2c72bd0c23c1c0 = []byte{ - // 885 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x4d, 0x4f, 0xf4, 0x54, - 0x14, 0xc7, 0xa7, 0x0f, 0xc3, 0x28, 0x87, 0x47, 0xa3, 0x57, 0xd4, 0xa1, 0xd1, 0x79, 0xf0, 0x3e, - 0x84, 0x20, 0x30, 0xbd, 0xcc, 0xf0, 0x12, 0x5f, 0x58, 0xc0, 0x40, 0x4c, 0x46, 0xa3, 0x62, 0x35, - 0x31, 0xba, 0xb0, 0xe9, 0xb4, 0x75, 0x6c, 0x68, 0x7b, 0x4b, 0xdb, 0x21, 0x54, 0xc2, 0x42, 0x3f, - 0x81, 0x89, 0xd1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, 0xd5, 0xa3, 0x8a, 0x2a, 0x74, 0xf8, 0x35, 0x78, - 0x96, 0x17, 0x76, 0x74, 0x2f, 0xed, 0x86, 0x1e, 0xc3, 0x53, 0x51, 0xa0, 0x9b, 0x7a, 0xcf, 0xb1, - 0x34, 0xea, 0x39, 0x31, 0xab, 0xfe, 0xa4, 0xfa, 0x30, 0x0d, 0xbe, 0xef, 0x39, 0x31, 0x56, 0x53, - 0x50, 0xae, 0x14, 0x44, 0x3b, 0x30, 0xed, 0x27, 0x81, 0xba, 0xb4, 0x30, 0xb5, 0x3c, 0xdb, 0x5e, - 0xc8, 0x05, 0x72, 0x74, 0x4f, 0xe0, 0x70, 0x11, 0x5e, 0x85, 0x67, 0x86, 0x35, 0x53, 0x98, 0x17, - 0xe1, 0x89, 0xe4, 0x50, 0xb3, 0x4d, 0x86, 0x31, 0xa3, 0xd6, 0x92, 0xc7, 0xae, 0x89, 0xbb, 0x19, - 0xf4, 0x61, 0xff, 0x4d, 0xa8, 0x26, 0xc7, 0xe2, 0x3e, 0x0a, 0xdb, 0xab, 0x2c, 0x1b, 0xbf, 0x01, - 0xf3, 0xc3, 0x52, 0x9d, 0x58, 0xa5, 0x8e, 0xa3, 0xfb, 0x7e, 0x0a, 0xf0, 0x32, 0x40, 0xc0, 0x23, - 0x23, 0x86, 0x19, 0x11, 0xe9, 0x9a, 0x58, 0x05, 0xf9, 0x2e, 0xed, 0x7f, 0xe2, 0x59, 0x87, 0xe7, - 0x59, 0xcd, 0x0f, 0x7d, 0x1a, 0x1d, 0x06, 0xb6, 0x61, 0x15, 0x5e, 0xc6, 0x67, 0xf0, 0xc2, 0x6d, - 0x85, 0x20, 0x38, 0x80, 0x69, 0x3f, 0x09, 0x70, 0x41, 0x47, 0x49, 0xee, 0xfb, 0x8f, 0xab, 0x47, - 0x4b, 0x7d, 0x3b, 0xfa, 0x62, 0xd0, 0x53, 0x0c, 0xea, 0x8a, 0x25, 0x17, 0x7f, 0x9a, 0xa1, 0x79, - 0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, 0x72, 0xfc, 0x97, 0xbb, 0x1d, 0xfa, 0x5e, 0x02, 0x18, 0x99, - 0x16, 0x6a, 0x16, 0xf7, 0xca, 0xd8, 0xa2, 0xac, 0x94, 0x4d, 0x17, 0x64, 0xaf, 0x32, 0xb2, 0xc7, - 0xe8, 0x95, 0x5c, 0x32, 0x46, 0xf2, 0xa3, 0x04, 0x33, 0xc3, 0x0a, 0x68, 0xad, 0x54, 0xa3, 0x14, - 0xab, 0x59, 0x32, 0x5b, 0x50, 0x6d, 0x30, 0xaa, 0x26, 0x5a, 0x2d, 0xa4, 0x22, 0x67, 0x62, 0x99, - 0xce, 0xd1, 0xaf, 0x52, 0xc6, 0xed, 0x87, 0x2e, 0x87, 0xb6, 0x4a, 0xb5, 0xbe, 0xed, 0xa8, 0xf2, - 0xf6, 0xa4, 0x32, 0x81, 0xbe, 0xc7, 0xd0, 0xdf, 0x44, 0xaf, 0x17, 0xa2, 0x6b, 0xbd, 0x58, 0x13, - 0x16, 0x4d, 0xce, 0x46, 0xee, 0x7d, 0x8e, 0x7e, 0x96, 0xe0, 0xe9, 0x71, 0xa3, 0x44, 0xad, 0x42, - 0x9a, 0xdb, 0x36, 0x2c, 0xb7, 0x27, 0x91, 0x4c, 0x74, 0xef, 0x89, 0x24, 0x73, 0xef, 0x3f, 0xa4, - 0x7b, 0x91, 0x78, 0x5e, 0x89, 0xbd, 0xc8, 0xb8, 0x73, 0x89, 0xbd, 0xc8, 0x1a, 0x29, 0x6e, 0x33, - 0xbe, 0x35, 0xb4, 0x92, 0xc7, 0x97, 0x78, 0x68, 0x06, 0xef, 0x17, 0x49, 0x58, 0x72, 0xd6, 0xd7, - 0xd0, 0x66, 0x61, 0xe3, 0x3b, 0xdc, 0x57, 0xde, 0x9a, 0x50, 0x25, 0xb0, 0x77, 0x18, 0xf6, 0x36, - 0xda, 0xcc, 0xc3, 0xe6, 0xae, 0xa9, 0x7d, 0x4e, 0x03, 0xcd, 0x8c, 0xdd, 0xcc, 0x00, 0x3f, 0x49, - 0xf0, 0x30, 0x6b, 0x8c, 0xa8, 0xd8, 0x7e, 0xc6, 0x2d, 0x57, 0x5e, 0x2f, 0x2f, 0x10, 0xc4, 0x5b, - 0x8c, 0x98, 0xa0, 0x66, 0xee, 0x45, 0x73, 0xd1, 0x08, 0xb5, 0xf3, 0xf6, 0xc5, 0x75, 0x43, 0xba, - 0xbc, 0x6e, 0x48, 0x7f, 0x5d, 0x37, 0xa4, 0x6f, 0x6e, 0x1a, 0x95, 0xcb, 0x9b, 0x46, 0xe5, 0xf7, - 0x9b, 0x46, 0xe5, 0xd3, 0xf5, 0x8c, 0x57, 0xdf, 0x53, 0xf2, 0x64, 0x83, 0x9c, 0xf2, 0x9b, 0x48, - 0x9c, 0xbb, 0x57, 0x63, 0xff, 0x6b, 0x6e, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x12, 0xdf, - 0x0a, 0x46, 0x0b, 0x00, 0x00, + // 941 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0xc7, 0xe3, 0x26, 0x59, 0xc8, 0x4b, 0x41, 0x30, 0x04, 0xd8, 0x58, 0xb0, 0x0d, 0xd3, 0x2a, + 0x94, 0xb4, 0xeb, 0xc9, 0x6e, 0x92, 0x4a, 0x40, 0x0f, 0xed, 0x26, 0x2a, 0x5a, 0x10, 0x10, 0x0c, + 0x12, 0x82, 0x03, 0xd6, 0xac, 0x3d, 0x2c, 0x56, 0x6d, 0x8f, 0x6b, 0x7b, 0xab, 0x9a, 0xaa, 0x12, + 0xf0, 0x17, 0x20, 0x21, 0xb8, 0x00, 0x77, 0x0e, 0xfc, 0x0d, 0x1c, 0x51, 0x8f, 0x95, 0xb8, 0x20, + 0x90, 0x2a, 0x94, 0xf0, 0x87, 0x20, 0xcf, 0x8c, 0xbd, 0xde, 0x90, 0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, 0xc9, 0x5f, 0x68, 0xca, 0xba, 0x86, 0x76, 0x6b, 0x0b, 0x9f, 0xa2, 0xbe, 0xfa, 0xde, 0x9c, + 0x51, 0x0a, 0xfb, 0xaa, 0xc0, 0xbe, 0x82, 0x76, 0xab, 0xb0, 0xa5, 0x6a, 0x5a, 0x9f, 0xf2, 0xc8, + 0x72, 0x52, 0xbf, 0xd4, 0xc0, 0x4f, 0x1a, 0x9c, 0x2d, 0x0b, 0x23, 0xaa, 0x97, 0x9f, 0x59, 0xc9, + 0xd5, 0xb7, 0x9b, 0x07, 0x28, 0xe2, 0x3d, 0x41, 0x4c, 0x50, 0xb7, 0x72, 0xd0, 0x32, 0x68, 0x8a, + 0x3a, 0x78, 0xf3, 0xfe, 0x51, 0x47, 0x7b, 0x70, 0xd4, 0xd1, 0xfe, 0x3a, 0xea, 0x68, 0x5f, 0x1f, + 0x77, 0x16, 0x1e, 0x1c, 0x77, 0x16, 0x7e, 0x3f, 0xee, 0x2c, 0x7c, 0xbc, 0x5d, 0xd2, 0xea, 0x47, + 0xa4, 0xbc, 0xbd, 0x43, 0xee, 0xc8, 0x49, 0x64, 0xca, 0x3d, 0x6a, 0x89, 0xd7, 0xdf, 0x9d, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x23, 0x92, 0xf2, 0xfa, 0x05, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1253,6 +1273,18 @@ func (m *QueryPlansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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 m.TradableOnly { i-- if m.TradableOnly { @@ -1286,6 +1318,18 @@ func (m *QueryPlansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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.Plans) > 0 { for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { { @@ -1761,6 +1805,10 @@ func (m *QueryPlansRequest) Size() (n int) { if m.TradableOnly { n += 2 } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1776,6 +1824,10 @@ func (m *QueryPlansResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2128,6 +2180,42 @@ func (m *QueryPlansRequest) Unmarshal(dAtA []byte) error { } } m.TradableOnly = bool(v != 0) + 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.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2212,6 +2300,42 @@ func (m *QueryPlansResponse) Unmarshal(dAtA []byte) error { 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:]) diff --git a/x/lightclient/types/tx.pb.go b/x/lightclient/types/tx.pb.go index 6fe674bcc..ba2f66701 100644 --- a/x/lightclient/types/tx.pb.go +++ b/x/lightclient/types/tx.pb.go @@ -33,6 +33,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // verify a client state and its consensus states against the rollapp // if it matches, set the client as the canonical client for the rollapp +// NOTE: this definition is also copied to the relayer code type MsgSetCanonicalClient struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // id of ibc client state diff --git a/x/rollapp/client/cli/query_registered_denoms.go b/x/rollapp/client/cli/query_registered_denoms.go index f0cbd2966..207113ec3 100644 --- a/x/rollapp/client/cli/query_registered_denoms.go +++ b/x/rollapp/client/cli/query_registered_denoms.go @@ -22,8 +22,14 @@ func CmdQueryRegisteredDenoms() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) rollappID := args[0] + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + res, err := queryClient.RegisteredDenoms(cmd.Context(), &types.QueryRegisteredDenomsRequest{ - RollappId: rollappID, + RollappId: rollappID, + Pagination: pageReq, }) if err != nil { return err @@ -33,6 +39,7 @@ func CmdQueryRegisteredDenoms() *cobra.Command { }, } + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) flags.AddQueryFlagsToCmd(cmd) return cmd diff --git a/x/rollapp/keeper/grpc_query_registered_denoms.go b/x/rollapp/keeper/grpc_query_registered_denoms.go index 80aaef16f..723cbfb0f 100644 --- a/x/rollapp/keeper/grpc_query_registered_denoms.go +++ b/x/rollapp/keeper/grpc_query_registered_denoms.go @@ -15,12 +15,13 @@ func (k Keeper) RegisteredDenoms(c context.Context, req *types.QueryRegisteredDe return nil, status.Error(codes.InvalidArgument, "invalid request") } - denoms, err := k.GetAllRegisteredDenoms(sdk.UnwrapSDKContext(c), req.RollappId) + denoms, pageResp, err := k.GetAllRegisteredDenomsPaginated(sdk.UnwrapSDKContext(c), req.RollappId, req.Pagination) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryRegisteredDenomsResponse{ - Denoms: denoms, + Denoms: denoms, + Pagination: pageResp, }, nil } diff --git a/x/rollapp/keeper/keeper.go b/x/rollapp/keeper/keeper.go index 60f88bc3f..41f3d80a2 100644 --- a/x/rollapp/keeper/keeper.go +++ b/x/rollapp/keeper/keeper.go @@ -41,7 +41,7 @@ type Keeper struct { transferKeeper TransferKeeper obsoleteDRSVersions collections.KeySet[uint32] - registeredRollappDenoms collections.KeySet[collections.Pair[string, string]] + registeredRollappDenoms collections.KeySet[collections.Pair[string, string]] // [ rollappID, denom ] // finalizationQueue is a map from creation height and rollapp to the finalization queue. // Key: (creation height, rollappID), Value: state indexes to finalize. // Contains a special index that helps reverse lookup: finalization queue (all available heights) by rollapp. diff --git a/x/rollapp/keeper/registered_denoms.go b/x/rollapp/keeper/registered_denoms.go index d8e4265de..d2eee64d0 100644 --- a/x/rollapp/keeper/registered_denoms.go +++ b/x/rollapp/keeper/registered_denoms.go @@ -5,6 +5,9 @@ import ( "cosmossdk.io/collections" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/dymensionxyz/dymension/v3/internal/collcompat" ) func (k Keeper) SetRegisteredDenom(ctx sdk.Context, rollappID, denom string) error { @@ -15,6 +18,14 @@ func (k Keeper) HasRegisteredDenom(ctx sdk.Context, rollappID, denom string) (bo return k.registeredRollappDenoms.Has(ctx, collections.Join(rollappID, denom)) } +func (k Keeper) GetAllRegisteredDenomsPaginated(ctx sdk.Context, rollappID string, pageReq *query.PageRequest) ([]string, *query.PageResponse, error) { + return collcompat.CollectionPaginate(ctx, k.registeredRollappDenoms, pageReq, + func(key collections.Pair[string, string], _ collections.NoValue) (string, error) { + return key.K1(), nil + }, collcompat.WithCollectionPaginationPairPrefix[string, string](rollappID), + ) +} + func (k Keeper) GetAllRegisteredDenoms(ctx sdk.Context, rollappID string) ([]string, error) { var denoms []string if err := k.IterateRegisteredDenoms(ctx, rollappID, func(denom string) (bool, error) { diff --git a/x/rollapp/types/query.pb.go b/x/rollapp/types/query.pb.go index f731e925c..1a29fa34e 100644 --- a/x/rollapp/types/query.pb.go +++ b/x/rollapp/types/query.pb.go @@ -690,7 +690,8 @@ func (m *QueryGetStateInfoResponse) GetStateInfo() StateInfo { } type QueryRegisteredDenomsRequest struct { - RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` + RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryRegisteredDenomsRequest) Reset() { *m = QueryRegisteredDenomsRequest{} } @@ -733,8 +734,16 @@ func (m *QueryRegisteredDenomsRequest) GetRollappId() string { return "" } +func (m *QueryRegisteredDenomsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryRegisteredDenomsResponse struct { - Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` + Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryRegisteredDenomsResponse) Reset() { *m = QueryRegisteredDenomsResponse{} } @@ -777,6 +786,13 @@ func (m *QueryRegisteredDenomsResponse) GetDenoms() []string { return nil } +func (m *QueryRegisteredDenomsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + type QueryObsoleteDRSVersionsRequest struct { } @@ -988,82 +1004,82 @@ func init() { } var fileDescriptor_00a0238fb38306fa = []byte{ - // 1188 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0xae, 0x13, 0xbf, 0x16, 0x35, 0x9a, 0x86, 0x10, 0xdc, 0xe0, 0x26, 0x8b, 0xd4, - 0xba, 0x05, 0x79, 0xe5, 0x04, 0x37, 0x8d, 0xd2, 0x94, 0x3a, 0x4a, 0x1b, 0x52, 0x4a, 0x09, 0x1b, - 0x28, 0x02, 0x84, 0xac, 0x75, 0x77, 0xb2, 0x59, 0xb4, 0xde, 0xdd, 0xee, 0x6c, 0xa2, 0xb8, 0x51, - 0x2e, 0x88, 0x33, 0x42, 0xe2, 0x5e, 0x89, 0x7f, 0x80, 0x2b, 0x67, 0xc4, 0x25, 0x42, 0x1c, 0x2a, - 0x71, 0x80, 0x0b, 0x08, 0x25, 0xfc, 0x0f, 0x5c, 0x91, 0x67, 0xde, 0xae, 0x7f, 0xc4, 0xf6, 0x6e, - 0x0c, 0xa7, 0x78, 0x26, 0xef, 0x7d, 0xf3, 0x7d, 0x33, 0xef, 0xd7, 0xc2, 0x0d, 0xa3, 0x51, 0x67, - 0x0e, 0xb7, 0x5c, 0x67, 0xbf, 0xf1, 0x4c, 0x8d, 0x16, 0xaa, 0xef, 0xda, 0xb6, 0xee, 0x79, 0xea, - 0xd3, 0x5d, 0xe6, 0x37, 0x8a, 0x9e, 0xef, 0x06, 0x2e, 0xcd, 0xb7, 0xdb, 0x16, 0xa3, 0x45, 0x11, - 0x6d, 0x73, 0x93, 0xa6, 0x6b, 0xba, 0xc2, 0x54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54, 0x75, 0xcf, 0xe3, - 0xd3, 0xa9, 0x59, 0x52, 0x18, 0xd7, 0xc6, 0x9b, 0x1b, 0x15, 0xcf, 0xe3, 0xca, 0x47, 0x90, 0xef, - 0x02, 0x5d, 0x6d, 0xdc, 0xdb, 0xd8, 0x2c, 0x95, 0xcb, 0x21, 0xf8, 0x14, 0x64, 0x98, 0xe5, 0x95, - 0xca, 0x65, 0x81, 0x9c, 0xd6, 0x70, 0x35, 0x18, 0xf6, 0x13, 0xb8, 0x1c, 0xc2, 0x3e, 0xd4, 0x03, - 0xc6, 0x83, 0x77, 0x98, 0x65, 0xee, 0x04, 0xc9, 0x08, 0xcf, 0x40, 0x76, 0xdb, 0x72, 0x74, 0xdb, - 0x7a, 0xc6, 0x0c, 0x44, 0x6e, 0x6d, 0x28, 0x37, 0x61, 0xa6, 0x37, 0x34, 0x5e, 0xf6, 0x14, 0x64, - 0x76, 0xc4, 0x4e, 0xc8, 0x57, 0xae, 0x94, 0xcf, 0xe1, 0x4a, 0xa7, 0xdf, 0x56, 0x33, 0x6e, 0x36, - 0x1c, 0x83, 0xed, 0xff, 0x1f, 0xb4, 0xf6, 0x61, 0xb6, 0x3f, 0x3c, 0x52, 0xfb, 0x10, 0x80, 0x47, - 0xbb, 0x18, 0x0b, 0xc5, 0xb8, 0x58, 0x40, 0x9c, 0x6d, 0x57, 0x78, 0x61, 0x4c, 0xb4, 0xe1, 0x28, - 0xff, 0x10, 0x78, 0xe5, 0x54, 0x60, 0xe0, 0x89, 0xeb, 0x30, 0x86, 0x38, 0x78, 0xdc, 0xb5, 0xb8, - 0xe3, 0xc2, 0x28, 0x90, 0xe7, 0x84, 0xde, 0xf4, 0x11, 0x8c, 0xf1, 0xdd, 0x7a, 0x5d, 0xf7, 0x1b, - 0xd3, 0x99, 0x64, 0xbc, 0x11, 0x68, 0x4b, 0x7a, 0x85, 0x78, 0x08, 0x42, 0x57, 0x20, 0x2d, 0x02, - 0x67, 0x6c, 0x76, 0xb4, 0x70,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, 0x0f, - 0xa2, 0x08, 0x38, 0xa4, 0x3f, 0x11, 0xb8, 0xd8, 0x35, 0x13, 0xd0, 0x3b, 0x67, 0x64, 0xd2, 0x35, - 0x4c, 0x0c, 0xaf, 0x64, 0x51, 0x28, 0x29, 0x51, 0x35, 0x4e, 0x89, 0x9c, 0x4e, 0xd4, 0x03, 0xf9, - 0xf7, 0x90, 0x7e, 0x4f, 0x00, 0x10, 0xac, 0x62, 0xdb, 0x09, 0x9f, 0xe0, 0x54, 0x43, 0x49, 0x48, - 0xfc, 0x74, 0x23, 0x50, 0x54, 0x41, 0xfc, 0x3a, 0xbd, 0x96, 0xf0, 0x09, 0xe8, 0x2f, 0x04, 0x2e, - 0xb4, 0x0f, 0x36, 0x74, 0x39, 0xe9, 0x9d, 0xf5, 0x98, 0xb4, 0x72, 0xb7, 0x87, 0x73, 0x46, 0xf2, - 0x15, 0x41, 0x7e, 0x99, 0x2e, 0xc5, 0x91, 0xb7, 0x85, 0x77, 0x55, 0xd6, 0xfa, 0x8e, 0x28, 0xfa, - 0x83, 0xc0, 0x44, 0xf7, 0x40, 0x44, 0xdf, 0x3e, 0x1b, 0xab, 0x53, 0x93, 0x5a, 0xee, 0xee, 0xf0, - 0x00, 0x28, 0xed, 0xbe, 0x90, 0x76, 0x97, 0xde, 0x49, 0x28, 0x2d, 0xfc, 0xca, 0x30, 0xd8, 0x7e, - 0x87, 0xbe, 0x23, 0x02, 0xd9, 0xa8, 0xd9, 0xd0, 0x5b, 0x49, 0x79, 0x75, 0xf7, 0xda, 0xdc, 0xd2, - 0x10, 0x9e, 0x67, 0x95, 0xd2, 0xfa, 0x52, 0x6a, 0x97, 0xa0, 0x1e, 0x08, 0x55, 0x87, 0xf4, 0x67, - 0x02, 0x13, 0xdd, 0x6d, 0x8d, 0x26, 0x0b, 0xa0, 0x3e, 0xbd, 0x34, 0xb7, 0x32, 0xa4, 0x37, 0x2a, - 0x5b, 0x12, 0xca, 0x16, 0x68, 0x29, 0x36, 0x79, 0x22, 0x84, 0xaa, 0x6c, 0xb7, 0xf4, 0x37, 0x02, - 0x97, 0x7a, 0xf4, 0xd1, 0x84, 0xa1, 0xd7, 0xbf, 0x49, 0x27, 0x0c, 0xbd, 0x01, 0x2d, 0x5c, 0x59, - 0x11, 0xaa, 0x16, 0x69, 0x39, 0x4e, 0x95, 0x8b, 0x20, 0xd5, 0xf6, 0x8e, 0x4f, 0x9f, 0x13, 0x78, - 0xb9, 0x67, 0x27, 0xa5, 0x95, 0x44, 0xd4, 0x06, 0x4d, 0x05, 0xb9, 0xd5, 0xff, 0x02, 0x81, 0x13, - 0xeb, 0xa3, 0xa3, 0xe3, 0x3c, 0x79, 0x71, 0x9c, 0x27, 0x7f, 0x1d, 0xe7, 0xc9, 0x37, 0x27, 0xf9, - 0x91, 0x17, 0x27, 0xf9, 0x91, 0xdf, 0x4f, 0xf2, 0x23, 0x9f, 0xbe, 0x65, 0x5a, 0xc1, 0xce, 0x6e, - 0xad, 0xf8, 0xc4, 0xad, 0xf7, 0xd3, 0xbe, 0xb7, 0xa0, 0xee, 0x47, 0x17, 0x10, 0x34, 0x3c, 0xc6, - 0x6b, 0x19, 0xf1, 0xc9, 0xbd, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xd2, 0xff, 0xd0, - 0x10, 0x11, 0x00, 0x00, + // 1199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x38, 0x8e, 0x13, 0xbf, 0x14, 0x35, 0x9a, 0x86, 0x10, 0xdc, 0xe0, 0x26, 0x8b, 0xd4, + 0xba, 0x05, 0x79, 0xe5, 0x04, 0x37, 0x8d, 0x42, 0x4a, 0x1d, 0xa5, 0x09, 0x29, 0xa5, 0x84, 0x0d, + 0x14, 0x01, 0x42, 0xd6, 0xba, 0x3b, 0x71, 0x16, 0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67, 0xa7, 0xd9, 0xa1, + 0x3f, 0x4f, 0xb3, 0x43, 0x9f, 0xbd, 0x55, 0x35, 0xfd, 0xdd, 0xbd, 0x4a, 0xfe, 0x91, 0x53, 0xeb, + 0xa5, 0x7d, 0x7f, 0x41, 0x3d, 0x08, 0x2f, 0xc0, 0xaf, 0xbb, 0x8c, 0x57, 0x52, 0xe2, 0xbf, 0x00, + 0x0b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x0a, 0xfa, 0xcf, 0xa3, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2019,6 +2035,18 @@ func (m *QueryRegisteredDenomsRequest) MarshalToSizedBuffer(dAtA []byte) (int, e _ = 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.RollappId) > 0 { i -= len(m.RollappId) copy(dAtA[i:], m.RollappId) @@ -2049,6 +2077,18 @@ func (m *QueryRegisteredDenomsResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = 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.Denoms) > 0 { for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Denoms[iNdEx]) @@ -2105,20 +2145,20 @@ func (m *QueryObsoleteDRSVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (in var l int _ = l if len(m.DrsVersions) > 0 { - dAtA9 := make([]byte, len(m.DrsVersions)*10) - var j8 int + dAtA11 := make([]byte, len(m.DrsVersions)*10) + var j10 int for _, num := range m.DrsVersions { for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j8++ + j10++ } - dAtA9[j8] = uint8(num) - j8++ + dAtA11[j10] = uint8(num) + j10++ } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintQuery(dAtA, i, uint64(j8)) + i -= j10 + copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintQuery(dAtA, i, uint64(j10)) i-- dAtA[i] = 0xa } @@ -2419,6 +2459,10 @@ func (m *QueryRegisteredDenomsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2434,6 +2478,10 @@ func (m *QueryRegisteredDenomsResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3839,6 +3887,42 @@ func (m *QueryRegisteredDenomsRequest) Unmarshal(dAtA []byte) error { } m.RollappId = string(dAtA[iNdEx:postIndex]) 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.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3921,6 +4005,42 @@ func (m *QueryRegisteredDenomsResponse) Unmarshal(dAtA []byte) error { } m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) 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:]) diff --git a/x/sequencer/client/cli/query_sequencers_by_rollapp.go b/x/sequencer/client/cli/query_sequencers_by_rollapp.go index f86aa8fe7..1d5f2b8bd 100644 --- a/x/sequencer/client/cli/query_sequencers_by_rollapp.go +++ b/x/sequencer/client/cli/query_sequencers_by_rollapp.go @@ -16,8 +16,14 @@ func CmdShowSequencersByRollapp() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { argRollappId := args[0] + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + params := &types.QueryGetSequencersByRollappRequest{ - RollappId: argRollappId, + RollappId: argRollappId, + Pagination: pageReq, } clientCtx, err := client.GetClientQueryContext(cmd) @@ -35,6 +41,7 @@ func CmdShowSequencersByRollapp() *cobra.Command { }, } + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) flags.AddQueryFlagsToCmd(cmd) return cmd @@ -107,7 +114,14 @@ func CmdGetAllProposers() *cobra.Command { Use: "list-proposer", Short: "List all proposers", RunE: func(cmd *cobra.Command, args []string) error { - params := &types.QueryProposersRequest{} + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + params := &types.QueryProposersRequest{ + Pagination: pageReq, + } clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -124,6 +138,7 @@ func CmdGetAllProposers() *cobra.Command { }, } + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) flags.AddQueryFlagsToCmd(cmd) return cmd } diff --git a/x/sequencer/keeper/get_and_set.go b/x/sequencer/keeper/get_and_set.go index a4a9ea54b..bd49021ed 100644 --- a/x/sequencer/keeper/get_and_set.go +++ b/x/sequencer/keeper/get_and_set.go @@ -8,8 +8,10 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/dymensionxyz/dymension/v3/x/sequencer/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/dymensionxyz/gerr-cosmos/gerrc" + + "github.com/dymensionxyz/dymension/v3/x/sequencer/types" ) // SetSequencer : write to store indexed by address, and also by status @@ -66,15 +68,23 @@ func (k Keeper) RollappSequencers(ctx sdk.Context, rollappId string) []types.Seq return k.prefixSequencers(ctx, types.SequencersByRollappKey(rollappId)) } +func (k Keeper) RollappSequencersPaginated(ctx sdk.Context, rollappId string, pageReq *query.PageRequest) ([]types.Sequencer, *query.PageResponse, error) { + return k.prefixSequencersPaginated(ctx, types.SequencersByRollappKey(rollappId), pageReq) +} + func (k Keeper) RollappSequencersByStatus(ctx sdk.Context, rollappId string, status types.OperatingStatus) []types.Sequencer { return k.prefixSequencers(ctx, types.SequencersByRollappByStatusKey(rollappId, status)) } +func (k Keeper) RollappSequencersByStatusPaginated(ctx sdk.Context, rollappId string, status types.OperatingStatus, pageReq *query.PageRequest) ([]types.Sequencer, *query.PageResponse, error) { + return k.prefixSequencersPaginated(ctx, types.SequencersByRollappByStatusKey(rollappId, status), pageReq) +} + func (k Keeper) RollappBondedSequencers(ctx sdk.Context, rollappId string) []types.Sequencer { return k.RollappSequencersByStatus(ctx, rollappId, types.Bonded) } -func (k Keeper) AllSequencers(ctx sdk.Context) (list []types.Sequencer) { +func (k Keeper) AllSequencers(ctx sdk.Context) []types.Sequencer { return k.prefixSequencers(ctx, types.SequencersKeyPrefix) } @@ -84,7 +94,7 @@ func (k Keeper) prefixSequencers(ctx sdk.Context, prefixKey []byte) []types.Sequ defer it.Close() // nolint: errcheck - ret := []types.Sequencer{} + var ret []types.Sequencer for ; it.Valid(); it.Next() { var val types.Sequencer k.cdc.MustUnmarshal(it.Value(), &val) @@ -94,6 +104,26 @@ func (k Keeper) prefixSequencers(ctx sdk.Context, prefixKey []byte) []types.Sequ return ret } +func (k Keeper) prefixSequencersPaginated(ctx sdk.Context, prefixKey []byte, pageReq *query.PageRequest) ([]types.Sequencer, *query.PageResponse, error) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), prefixKey) + + var sequencers []types.Sequencer + + pageRes, err := query.Paginate(store, pageReq, func(key []byte, value []byte) error { + var val types.Sequencer + if err := k.cdc.Unmarshal(value, &val); err != nil { + return err + } + sequencers = append(sequencers, val) + return nil + }) + if err != nil { + return nil, nil, err + } + + return sequencers, pageRes, nil +} + // GetSequencer returns the sentinel sequencer if not found. Use GetRealSequencer if expecting // to get a real sequencer. func (k Keeper) GetSequencer(ctx sdk.Context, addr string) types.Sequencer { diff --git a/x/sequencer/keeper/grpc_query_sequencers_by_rollapp.go b/x/sequencer/keeper/grpc_query_sequencers_by_rollapp.go index 07d579ca1..e7ee26dda 100644 --- a/x/sequencer/keeper/grpc_query_sequencers_by_rollapp.go +++ b/x/sequencer/keeper/grpc_query_sequencers_by_rollapp.go @@ -6,8 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/dymensionxyz/dymension/v3/x/sequencer/types" "github.com/dymensionxyz/gerr-cosmos/gerrc" + + "github.com/dymensionxyz/dymension/v3/x/sequencer/types" ) func (k Keeper) SequencersByRollapp(c context.Context, req *types.QueryGetSequencersByRollappRequest) (*types.QueryGetSequencersByRollappResponse, error) { @@ -16,8 +17,13 @@ func (k Keeper) SequencersByRollapp(c context.Context, req *types.QueryGetSequen } ctx := sdk.UnwrapSDKContext(c) + sequencers, pagResp, err := k.RollappSequencersPaginated(ctx, req.RollappId, req.Pagination) + if err != nil { + return nil, err + } return &types.QueryGetSequencersByRollappResponse{ - Sequencers: k.RollappSequencers(ctx, req.RollappId), + Sequencers: sequencers, + Pagination: pagResp, }, nil } @@ -27,8 +33,13 @@ func (k Keeper) SequencersByRollappByStatus(c context.Context, req *types.QueryG } ctx := sdk.UnwrapSDKContext(c) + sequencers, pagResp, err := k.RollappSequencersByStatusPaginated(ctx, req.RollappId, req.Status, req.Pagination) + if err != nil { + return nil, err + } return &types.QueryGetSequencersByRollappByStatusResponse{ - Sequencers: k.RollappSequencersByStatus(ctx, req.RollappId, req.Status), + Sequencers: sequencers, + Pagination: pagResp, }, nil } diff --git a/x/sequencer/keeper/grpc_query_sequencers_by_rollapp_test.go b/x/sequencer/keeper/grpc_query_sequencers_by_rollapp_test.go index d38a8ecd7..3b95a7277 100644 --- a/x/sequencer/keeper/grpc_query_sequencers_by_rollapp_test.go +++ b/x/sequencer/keeper/grpc_query_sequencers_by_rollapp_test.go @@ -6,9 +6,10 @@ import ( "github.com/dymensionxyz/sdk-utils/utils/utest" "github.com/stretchr/testify/require" + "github.com/dymensionxyz/gerr-cosmos/gerrc" + "github.com/dymensionxyz/dymension/v3/testutil/nullify" "github.com/dymensionxyz/dymension/v3/x/sequencer/types" - "github.com/dymensionxyz/gerr-cosmos/gerrc" ) func (s *SequencerTestSuite) TestSequencersByRollappQuery() { @@ -62,9 +63,9 @@ func (s *SequencerTestSuite) TestSequencersByRollappQuery() { utest.IsErr(require.New(t), err, tc.err) } else { require.NoError(t, err) - require.Equal(t, - nullify.Fill(tc.response), - nullify.Fill(response), + require.ElementsMatch(t, + nullify.Fill(tc.response.Sequencers), + nullify.Fill(response.Sequencers), ) } }) diff --git a/x/sequencer/types/query.pb.go b/x/sequencer/types/query.pb.go index e5d24a7ee..b84924752 100644 --- a/x/sequencer/types/query.pb.go +++ b/x/sequencer/types/query.pb.go @@ -298,7 +298,8 @@ func (m *QuerySequencersResponse) GetPagination() *query.PageResponse { } type QueryGetSequencersByRollappRequest struct { - RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` + RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryGetSequencersByRollappRequest) Reset() { *m = QueryGetSequencersByRollappRequest{} } @@ -341,8 +342,16 @@ func (m *QueryGetSequencersByRollappRequest) GetRollappId() string { return "" } +func (m *QueryGetSequencersByRollappRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryGetSequencersByRollappResponse struct { - Sequencers []Sequencer `protobuf:"bytes,1,rep,name=sequencers,proto3" json:"sequencers"` + Sequencers []Sequencer `protobuf:"bytes,1,rep,name=sequencers,proto3" json:"sequencers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryGetSequencersByRollappResponse) Reset() { *m = QueryGetSequencersByRollappResponse{} } @@ -385,9 +394,17 @@ func (m *QueryGetSequencersByRollappResponse) GetSequencers() []Sequencer { return nil } +func (m *QueryGetSequencersByRollappResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + type QueryGetSequencersByRollappByStatusRequest struct { - RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` - Status OperatingStatus `protobuf:"varint,2,opt,name=status,proto3,enum=dymensionxyz.dymension.sequencer.OperatingStatus" json:"status,omitempty"` + RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` + Status OperatingStatus `protobuf:"varint,2,opt,name=status,proto3,enum=dymensionxyz.dymension.sequencer.OperatingStatus" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryGetSequencersByRollappByStatusRequest) Reset() { @@ -441,8 +458,16 @@ func (m *QueryGetSequencersByRollappByStatusRequest) GetStatus() OperatingStatus return Unbonded } +func (m *QueryGetSequencersByRollappByStatusRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + type QueryGetSequencersByRollappByStatusResponse struct { - Sequencers []Sequencer `protobuf:"bytes,1,rep,name=sequencers,proto3" json:"sequencers"` + Sequencers []Sequencer `protobuf:"bytes,1,rep,name=sequencers,proto3" json:"sequencers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryGetSequencersByRollappByStatusResponse) Reset() { @@ -489,6 +514,13 @@ func (m *QueryGetSequencersByRollappByStatusResponse) GetSequencers() []Sequence return nil } +func (m *QueryGetSequencersByRollappByStatusResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // Request type for the GetProposerByRollapp RPC method. type QueryGetProposerByRollappRequest struct { RollappId string `protobuf:"bytes,1,opt,name=rollappId,proto3" json:"rollappId,omitempty"` @@ -802,64 +834,65 @@ func init() { } var fileDescriptor_c6af1252721903a2 = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdd, 0x4e, 0xdb, 0x48, - 0x14, 0xce, 0xb0, 0xbb, 0xd1, 0xe6, 0xec, 0x8f, 0xd0, 0xc0, 0xee, 0xb2, 0x5e, 0x94, 0x65, 0xbd, - 0x7f, 0x28, 0x80, 0xcd, 0x5f, 0x0b, 0x14, 0xb5, 0xa5, 0x01, 0x12, 0xa1, 0x52, 0x08, 0xa1, 0x57, - 0x95, 0xaa, 0xd4, 0x21, 0x23, 0x37, 0x52, 0xe2, 0x31, 0xb6, 0x83, 0x92, 0x22, 0xa4, 0xaa, 0x7d, - 0x01, 0xa4, 0xaa, 0xcf, 0xd0, 0xfb, 0x56, 0x55, 0x5f, 0x01, 0xa9, 0xbd, 0x40, 0xea, 0x4d, 0xaf, - 0x2a, 0x04, 0xbd, 0x6f, 0x1f, 0xa1, 0xf2, 0x78, 0xec, 0x24, 0x24, 0xc4, 0xce, 0x0f, 0x77, 0xf6, - 0xf8, 0x9c, 0xef, 0x7c, 0xdf, 0x99, 0x99, 0xf3, 0x25, 0x30, 0x9e, 0xab, 0x14, 0x89, 0x66, 0xe6, - 0xa9, 0x56, 0xae, 0x3c, 0x92, 0xbd, 0x17, 0xd9, 0x24, 0xbb, 0x25, 0xa2, 0xed, 0x10, 0x43, 0xde, - 0x2d, 0x11, 0xa3, 0x22, 0xe9, 0x06, 0xb5, 0x28, 0x1e, 0xa9, 0x8d, 0x96, 0xbc, 0x17, 0xc9, 0x8b, - 0x16, 0x06, 0x55, 0xaa, 0x52, 0x16, 0x2c, 0xdb, 0x4f, 0x4e, 0x9e, 0x30, 0xac, 0x52, 0xaa, 0x16, - 0x88, 0xac, 0xe8, 0x79, 0x59, 0xd1, 0x34, 0x6a, 0x29, 0x56, 0x9e, 0x6a, 0x26, 0xff, 0x1a, 0xdb, - 0xa1, 0x66, 0x91, 0x9a, 0x72, 0x56, 0x31, 0x89, 0x53, 0x4e, 0xde, 0x9b, 0xca, 0x12, 0x4b, 0x99, - 0x92, 0x75, 0x45, 0xcd, 0x6b, 0x2c, 0x98, 0xc7, 0x4e, 0xf8, 0xf2, 0xd5, 0x15, 0x43, 0x29, 0xba, - 0xd0, 0x93, 0xbe, 0xe1, 0xde, 0x13, 0xcf, 0x98, 0xf3, 0xcd, 0xa0, 0x3a, 0x31, 0x14, 0x2b, 0xaf, - 0xa9, 0x19, 0xd3, 0x52, 0xac, 0x12, 0x2f, 0x25, 0x0e, 0x02, 0xde, 0xb2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04, 0x43, - 0x17, 0x79, 0x17, 0x4e, 0x04, 0xa7, 0xd8, 0xca, 0x43, 0x85, 0x64, 0xd7, 0x38, 0x5c, 0xee, 0x32, - 0x93, 0x7b, 0x1d, 0x2f, 0xfa, 0xcb, 0xb5, 0x4d, 0x35, 0xe3, 0x6a, 0xae, 0x93, 0xfc, 0x0a, 0x41, - 0xc4, 0xf3, 0x31, 0x3c, 0x17, 0x74, 0xb4, 0x9f, 0xf3, 0x56, 0x61, 0xbe, 0xfd, 0x44, 0xae, 0x62, - 0x86, 0xa9, 0x98, 0xc0, 0x63, 0x6d, 0x6c, 0x5a, 0x3c, 0x75, 0x74, 0x1a, 0x45, 0xc7, 0xa7, 0x51, - 0x74, 0x72, 0x1a, 0x45, 0x87, 0x67, 0xd1, 0xd0, 0xf1, 0x59, 0x34, 0xf4, 0xe1, 0x2c, 0x1a, 0xba, - 0x77, 0x55, 0xcd, 0x5b, 0x0f, 0x4b, 0x59, 0x69, 0x87, 0x16, 0x2f, 0x02, 0xdc, 0x9b, 0x91, 0xcb, - 0x35, 0xa8, 0x56, 0x45, 0x27, 0x66, 0x36, 0xcc, 0xfe, 0xb1, 0xcd, 0x7c, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0xc6, 0x93, 0x72, 0x1a, 0xfd, 0x0e, 0x00, 0x00, + // 921 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4b, 0x4f, 0x1b, 0x57, + 0x14, 0xf6, 0x35, 0xad, 0x55, 0x9f, 0x3e, 0x84, 0x2e, 0xb4, 0xa5, 0x53, 0xe4, 0xd2, 0xe9, 0x0b, + 0x19, 0x98, 0xe1, 0xd5, 0x02, 0x45, 0x6d, 0xa9, 0x01, 0x5b, 0xa8, 0x14, 0x8c, 0xe9, 0xaa, 0x52, + 0xe4, 0x8c, 0xf1, 0xd5, 0xc4, 0x92, 0x3d, 0x77, 0x98, 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9a, + 0xd5, 0xcf, 0xd8, 0xe1, 0xa6, 0x25, 0xde, 0x80, 0xa1, 0xba, 0x55, 0x53, 0xa7, 0x9a, 0x49, 0x70, + 0x12, 0x22, 0x0e, 0xcf, 0x11, 0x34, 0x86, 0xc6, 0x3f, 0x9d, 0x1d, 0x97, 0xfc, 0x3a, 0x2b, 0x39, + 0x08, 0x89, 0x8f, 0x4e, 0xdf, 0x7c, 0x17, 0xca, 0xf0, 0x6c, 0x31, 0x09, 0x23, 0x0c, 0x3e, 0x45, + 0xac, 0x5d, 0x37, 0x92, 0x97, 0xc6, 0x71, 0x18, 0xf4, 0xb2, 0xff, 0xce, 0xe7, 0x0d, 0x62, 0x3a, + 0xd5, 0xa2, 0x99, 0xa6, 0x75, 0xb1, 0x08, 0xdf, 0xb4, 0xc0, 0xe1, 0x64, 0xb7, 0x21, 0xea, 0x25, + 0x70, 0xbe, 0x13, 0xfe, 0x7c, 0x3d, 0x1c, 0x4e, 0xb9, 0x8a, 0x21, 0xde, 0x84, 0xaf, 0x58, 0x35, + 0x2f, 0xc4, 0x6d, 0x17, 0x4e, 0x02, 0x54, 0xb7, 0x9c, 0xd7, 0xfa, 0x59, 0x72, 0xce, 0x87, 0x64, + 0x9f, 0x0f, 0xc9, 0x39, 0x8e, 0xfc, 0x7c, 0x48, 0x69, 0x45, 0x25, 0x3c, 0x37, 0x53, 0x93, 0x29, + 0x3e, 0x46, 0xf0, 0x75, 0x53, 0x09, 0x2e, 0x67, 0x07, 0xc0, 0xa3, 0x62, 0x77, 0x64, 0xa0, 0x3b, + 0x3d, 0x35, 0x20, 0x38, 0x55, 0x47, 0x3b, 0xcc, 0x68, 0xff, 0xe2, 0x4b, 0xdb, 0xe1, 0x53, 0xc7, + 0xfb, 0x1e, 0x02, 0xb1, 0x69, 0x23, 0xcc, 0x44, 0x25, 0x43, 0x8b, 0x45, 0x45, 0xd7, 0xdd, 0x36, + 0x8d, 0x42, 0xd4, 0x70, 0x56, 0x36, 0xf2, 0x7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 0xbc, 0x10, 0x60, 0xc2, 0xb8, 0x13, 0xb6, 0x6e, 0xd7, 0xdf, 0x23, 0x18, 0xb9, + 0xca, 0xbb, 0x70, 0x32, 0x38, 0xc5, 0x76, 0x1e, 0x2a, 0xa4, 0x7a, 0xc6, 0xe1, 0x72, 0x57, 0x99, + 0xdc, 0x3f, 0xf0, 0xb2, 0xbf, 0x5c, 0xdb, 0x54, 0xb3, 0xae, 0xe6, 0x3a, 0xc9, 0x8f, 0x10, 0x44, + 0x3d, 0x1f, 0xc3, 0x0b, 0x41, 0x47, 0x7b, 0x83, 0xb7, 0x0a, 0x8b, 0x9d, 0x27, 0x72, 0x15, 0x73, + 0x4c, 0xc5, 0x14, 0x9e, 0xe8, 0x60, 0xd3, 0x12, 0xe9, 0xd3, 0x8b, 0x18, 0x3a, 0xbb, 0x88, 0xa1, + 0xf3, 0x8b, 0x18, 0x3a, 0xb9, 0x8c, 0x85, 0xce, 0x2e, 0x63, 0xa1, 0x57, 0x97, 0xb1, 0xd0, 0xff, + 0xbf, 0xa9, 0x05, 0xeb, 0x56, 0x39, 0x27, 0xed, 0xd1, 0xd2, 0x55, 0x80, 0x07, 0x73, 0xf2, 0x61, + 0x0d, 0xaa, 0x55, 0xd1, 0x89, 0x99, 0x8b, 0xb0, 0x7f, 0xb5, 0x73, 0x1f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x48, 0x7a, 0xae, 0x35, 0x21, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1433,6 +1466,18 @@ func (m *QueryGetSequencersByRollappRequest) MarshalToSizedBuffer(dAtA []byte) ( _ = 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.RollappId) > 0 { i -= len(m.RollappId) copy(dAtA[i:], m.RollappId) @@ -1463,6 +1508,18 @@ func (m *QueryGetSequencersByRollappResponse) MarshalToSizedBuffer(dAtA []byte) _ = 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.Sequencers) > 0 { for iNdEx := len(m.Sequencers) - 1; iNdEx >= 0; iNdEx-- { { @@ -1500,6 +1557,18 @@ func (m *QueryGetSequencersByRollappByStatusRequest) MarshalToSizedBuffer(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] = 0x1a + } if m.Status != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Status)) i-- @@ -1535,6 +1604,18 @@ func (m *QueryGetSequencersByRollappByStatusResponse) MarshalToSizedBuffer(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.Sequencers) > 0 { for iNdEx := len(m.Sequencers) - 1; iNdEx >= 0; iNdEx-- { { @@ -1863,6 +1944,10 @@ func (m *QueryGetSequencersByRollappRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1878,6 +1963,10 @@ func (m *QueryGetSequencersByRollappResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1894,6 +1983,10 @@ func (m *QueryGetSequencersByRollappByStatusRequest) Size() (n int) { if m.Status != 0 { n += 1 + sovQuery(uint64(m.Status)) } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1909,6 +2002,10 @@ func (m *QueryGetSequencersByRollappByStatusResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2570,6 +2667,42 @@ func (m *QueryGetSequencersByRollappRequest) Unmarshal(dAtA []byte) error { } m.RollappId = string(dAtA[iNdEx:postIndex]) 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.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2654,6 +2787,42 @@ func (m *QueryGetSequencersByRollappResponse) Unmarshal(dAtA []byte) error { 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:]) @@ -2755,6 +2924,42 @@ func (m *QueryGetSequencersByRollappByStatusRequest) Unmarshal(dAtA []byte) erro break } } + case 3: + 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:]) @@ -2839,6 +3044,42 @@ func (m *QueryGetSequencersByRollappByStatusResponse) Unmarshal(dAtA []byte) err 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:]) diff --git a/x/sequencer/types/query.pb.gw.go b/x/sequencer/types/query.pb.gw.go index 46fe6c481..6b55dfbed 100644 --- a/x/sequencer/types/query.pb.gw.go +++ b/x/sequencer/types/query.pb.gw.go @@ -141,6 +141,10 @@ func local_request_Query_Sequencers_0(ctx context.Context, marshaler runtime.Mar } +var ( + filter_Query_SequencersByRollapp_0 = &utilities.DoubleArray{Encoding: map[string]int{"rollappId": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_SequencersByRollapp_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetSequencersByRollappRequest var metadata runtime.ServerMetadata @@ -163,6 +167,13 @@ func request_Query_SequencersByRollapp_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rollappId", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SequencersByRollapp_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.SequencersByRollapp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -190,11 +201,22 @@ func local_request_Query_SequencersByRollapp_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "rollappId", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SequencersByRollapp_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.SequencersByRollapp(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Query_SequencersByRollappByStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"rollappId": 0, "status": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_Query_SequencersByRollappByStatus_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetSequencersByRollappByStatusRequest var metadata runtime.ServerMetadata @@ -231,6 +253,13 @@ func request_Query_SequencersByRollappByStatus_0(ctx context.Context, marshaler protoReq.Status = OperatingStatus(e) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SequencersByRollappByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.SequencersByRollappByStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -272,6 +301,13 @@ func local_request_Query_SequencersByRollappByStatus_0(ctx context.Context, mars protoReq.Status = OperatingStatus(e) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SequencersByRollappByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.SequencersByRollappByStatus(ctx, &protoReq) return msg, metadata, err