Skip to content

Commit

Permalink
chore: update docs (#14038) (#14039)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5567828)

Co-authored-by: atheeshp <[email protected]>
  • Loading branch information
mergify[bot] and atheeshp authored Nov 28, 2022
1 parent 599ad2f commit 2759c33
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions x/mint/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", "x/"+types.ModuleName)
}

// get the minter
// GetMinter returns the minter.
func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.MinterKey)
Expand All @@ -72,7 +72,7 @@ func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) {
return
}

// set the minter
// GetMinter sets the minter.
func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter) {
store := ctx.KVStore(k.storeKey)
bz := k.cdc.MustMarshal(&minter)
Expand Down
1 change: 1 addition & 0 deletions x/mint/keeper/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Migrator struct {
legacySubspace exported.Subspace
}

// NewMigrator returns Migrator instance for the state migration.
func NewMigrator(k Keeper, ss exported.Subspace) Migrator {
return Migrator{
keeper: k,
Expand Down
2 changes: 2 additions & 0 deletions x/mint/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

var _ types.MsgServer = msgServer{}

// msgServer is a wrapper of Keeper.
type msgServer struct {
Keeper
}
Expand All @@ -22,6 +23,7 @@ func NewMsgServerImpl(k Keeper) types.MsgServer {
}
}

// UpdateParams updates the params.
func (ms msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
if ms.authority != req.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, req.Authority)
Expand Down
1 change: 1 addition & 0 deletions x/mint/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/mint/MsgUpdateParams")
}

// RegisterInterfaces registers the interfaces types with the interface registry.
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
Expand Down
2 changes: 1 addition & 1 deletion x/mint/types/minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func DefaultInitialMinter() Minter {
)
}

// validate minter
// ValidateMinter does a basic validation on minter.
func ValidateMinter(minter Minter) error {
if minter.Inflation.IsNegative() {
return fmt.Errorf("mint parameter Inflation should be positive, is %s",
Expand Down
2 changes: 1 addition & 1 deletion x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func DefaultParams() Params {
}
}

// validate params
// Validate does the sanity check on the params.
func (p Params) Validate() error {
if err := validateMintDenom(p.MintDenom); err != nil {
return err
Expand Down

0 comments on commit 2759c33

Please sign in to comment.