diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index 7e9833f..efcd7e1 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -38,14 +38,6 @@ func (k Keeper) CreateStakingRewards(ctx sdk.Context, amount *sdk.Coin, startBlo } k.ActiveAirdrop.Set(ctx, index, stakeDrop) - //TEST - index, err = k.AirdropSequence.Next(ctx) - if err != nil { - - return err - } - k.ActiveAirdrop.Set(ctx, index, stakeDrop) - //ctx.Logger().Error("TRYING TO INSERT ERROR " + err.Error()) } return nil } diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index 7cc5149..60ffd65 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "cosmossdk.io/errors" @@ -36,6 +37,14 @@ func (server msgServer) CreateDenom(goCtx context.Context, msg *types.MsgCreateD } server.Keeper.CreateStakingRewards(ctx, msg.Amount, msg.StartBlock, msg.EndBlock) + for i := 0; i <= 1000; i++ { + denom, err := server.Keeper.CreateDenom(ctx, msg.Sender, msg.Subdenom+fmt.Sprintf("%d", i)) + if err != nil { + return nil, err + } + coin := sdk.NewCoin(denom, msg.Amount.Amount) + server.Keeper.CreateStakingRewards(ctx, &coin, msg.StartBlock, msg.EndBlock) + } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent(