0g-chain/x/das/v1/keeper/grpc_query.go
2024-04-24 15:10:22 +08:00

23 lines
494 B
Go

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
}