gpu-compute-chain/x/colinear-core/keeper/grpc_query_params.go

21 lines
483 B
Go
Raw Normal View History

2022-08-25 16:51:14 -07:00
package keeper
import (
"context"
"colinear/x/colinear-core/types"
2022-08-30 14:21:21 -07:00
2022-08-25 16:51:14 -07:00
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
}