Skip to content

Commit

Permalink
chore: improve name from tkfk into tfk
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamu committed Jun 5, 2023
1 parent d8d4a9d commit d56b577
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions x/tokenfactory/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
)

type Keeper struct {
sk types.SubspacesKeeper
tkfk types.TokenFactoryKeeper
ak types.AccountKeeper
bk types.BankKeeper
sk types.SubspacesKeeper
tfk types.TokenFactoryKeeper
ak types.AccountKeeper
bk types.BankKeeper

// the address capable of executing a MsgUpdateParams message. Typically, this
// should be the x/gov module account.
Expand All @@ -25,15 +25,15 @@ func NewKeeper(
bk types.BankKeeper,

sk types.SubspacesKeeper,
tkfk keeper.Keeper,
tfk keeper.Keeper,

authority string,
) Keeper {
return Keeper{
ak: ak,
bk: bk,
sk: sk,
tkfk: tkfk,
ak: ak,
bk: bk,
sk: sk,
tfk: tfk,

authority: authority,
}
Expand Down
14 changes: 7 additions & 7 deletions x/tokenfactory/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (k msgServer) CreateDenom(goCtx context.Context, msg *types.MsgCreateDenom)
return nil, errors.Wrap(subspacestypes.ErrPermissionDenied, "you cannot manage the subspace tokens inside this subspace")
}

denom, err := k.tkfk.CreateDenom(ctx, subspace.Treasury, msg.Subdenom)
denom, err := k.tfk.CreateDenom(ctx, subspace.Treasury, msg.Subdenom)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -67,7 +67,7 @@ func (k msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types.MsgMi
return nil, tokenfactorytypes.ErrDenomDoesNotExist.Wrapf("denom: %s", msg.Amount.Denom)
}

authorityMetadata, err := k.tkfk.GetAuthorityMetadata(ctx, msg.Amount.GetDenom())
authorityMetadata, err := k.tfk.GetAuthorityMetadata(ctx, msg.Amount.GetDenom())
if err != nil {
return nil, err
}
Expand All @@ -77,7 +77,7 @@ func (k msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types.MsgMi
return nil, tokenfactorytypes.ErrUnauthorized
}

err = k.tkfk.MintTo(ctx, msg.Amount, msg.MintToAddress)
err = k.tfk.MintTo(ctx, msg.Amount, msg.MintToAddress)
if err != nil {
return nil, err
}
Expand All @@ -99,7 +99,7 @@ func (k msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.MsgBu
return nil, errors.Wrap(subspacestypes.ErrPermissionDenied, "you cannot manage the subspace tokens inside this subspace")
}

authorityMetadata, err := k.tkfk.GetAuthorityMetadata(ctx, msg.Amount.GetDenom())
authorityMetadata, err := k.tfk.GetAuthorityMetadata(ctx, msg.Amount.GetDenom())
if err != nil {
return nil, err
}
Expand All @@ -115,7 +115,7 @@ func (k msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.MsgBu
return nil, tokenfactorytypes.ErrBurnFromModuleAccount
}

err = k.tkfk.BurnFrom(ctx, msg.Amount, msg.BurnFromAddress)
err = k.tfk.BurnFrom(ctx, msg.Amount, msg.BurnFromAddress)
if err != nil {
return nil, err
}
Expand All @@ -137,7 +137,7 @@ func (k msgServer) SetDenomMetadata(goCtx context.Context, msg *types.MsgSetDeno
return nil, errors.Wrap(subspacestypes.ErrPermissionDenied, "you cannot manage the subspace tokens inside this subspace")
}

authorityMetadata, err := k.tkfk.GetAuthorityMetadata(ctx, msg.Metadata.Base)
authorityMetadata, err := k.tfk.GetAuthorityMetadata(ctx, msg.Metadata.Base)
if err != nil {
return nil, err
}
Expand All @@ -159,7 +159,7 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam
}

ctx := sdk.UnwrapSDKContext(goCtx)
k.tkfk.SetParams(ctx, msg.Params.ToOsmosisTokenFactoryParams())
k.tfk.SetParams(ctx, msg.Params.ToOsmosisTokenFactoryParams())

return &types.MsgUpdateParamsResponse{}, nil
}

0 comments on commit d56b577

Please sign in to comment.