feature/proxied registration (#26)

* chore: ignore mprocs configuration files

* feat(macaroon): add macaroon module

* chore: update module dependencies
This commit is contained in:
Prad Nukala
2024-09-26 18:01:49 -04:00
committed by GitHub
parent 5ef00c3910
commit 779a45121b
80 changed files with 15909 additions and 64 deletions
+29
View File
@@ -0,0 +1,29 @@
package keeper
import (
"context"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"cosmossdk.io/errors"
"github.com/onsonr/sonr/x/service/types"
)
type msgServer struct {
k Keeper
}
var _ types.MsgServer = msgServer{}
// NewMsgServerImpl returns an implementation of the module MsgServer interface.
func NewMsgServerImpl(keeper Keeper) types.MsgServer {
return &msgServer{k: keeper}
}
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
if ms.k.authority != msg.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority)
}
return nil, ms.k.Params.Set(ctx, msg.Params)
}