21 lines
483 B
Go
21 lines
483 B
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
"cosmos-test/x/cosmostest/types"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"google.golang.org/grpc/codes"
|
|
"google.golang.org/grpc/status"
|
|
)
|
|
|
|
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
|
|
if req == nil {
|
|
return nil, status.Error(codes.InvalidArgument, "invalid request")
|
|
}
|
|
ctx := sdk.UnwrapSDKContext(c)
|
|
|
|
return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil
|
|
}
|