planetmint-go/x/der/keeper/query_params.go
Jürgen Eckel ba8cd80ee3
added DER module
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2025-05-20 16:53:53 +02:00

20 lines
507 B
Go

package keeper
import (
"context"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/planetmint/planetmint-go/x/der/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
ctx := sdk.UnwrapSDKContext(goCtx)
return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil
}