Skip to content

Commit

Permalink
Some test
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor118 committed Oct 22, 2024
1 parent 5d46dde commit b514faa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 0 additions & 8 deletions x/tokenfactory/keeper/createdenom.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
9 changes: 9 additions & 0 deletions x/tokenfactory/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
"context"
"fmt"

"cosmossdk.io/errors"

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit b514faa

Please sign in to comment.