0g-chain/x/das/v1/keeper/grpc_query.go

23 lines
494 B
Go
Raw Normal View History

2024-05-01 06:08:58 +00:00
package keeper
import (
"context"
"github.com/0glabs/0g-chain/x/das/v1/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
var _ types.QueryServer = Keeper{}
func (k Keeper) NextRequestID(
c context.Context,
_ *types.QueryNextRequestIDRequest,
) (*types.QueryNextRequestIDResponse, error) {
ctx := sdk.UnwrapSDKContext(c)
nextRequestID, err := k.GetNextRequestID(ctx)
if err != nil {
return nil, err
}
return &types.QueryNextRequestIDResponse{NextRequestID: nextRequestID}, nil
}