refactor: rename msg_server.go to rpc.go

This commit is contained in:
Prad Nukala
2024-09-27 11:46:40 -04:00
parent dbac1e7059
commit fbf4819b5a
6 changed files with 0 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package keeper
import (
"context"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/sonr/x/macaroon/types"
)
var _ types.QueryServer = Querier{}
type Querier struct {
Keeper
}
func NewQuerier(keeper Keeper) Querier {
return Querier{Keeper: keeper}
}
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
ctx := sdk.UnwrapSDKContext(c)
p, err := k.Keeper.Params.Get(ctx)
if err != nil {
return nil, err
}
return &types.QueryParamsResponse{Params: &p}, nil
}