Skip to content

Commit

Permalink
remove mintUnvestedToCharter
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Jan 12, 2024
1 parent b1b6613 commit a01eaf5
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions app/upgrades/v19/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,10 @@ func migrateCore1MultisigVesting(ctx sdk.Context, k *keepers.AppKeepers) {
// SEND TO THE CHARTER
prop16Core1Multisig(ctx, k, Core1Addr, CouncilAddr)

// MINT UNVESTED TOKENS TO THE CHARTER
mintUnvestedToCharter(ctx, k, CouncilAddr, vestingAcc)

// REMOVE VESTING FROM THE CORE1 MULTISIG (set it to the base account, no vesting terms)
k.AccountKeeper.SetAccount(ctx, vestingAcc.BaseAccount)
}

func mintUnvestedToCharter(ctx sdk.Context, k *keepers.AppKeepers, CouncilAddr sdk.AccAddress, vestingAcc *vestingtypes.PeriodicVestingAccount) { // nolint:gocritic
unvested := SumPeriodVestingAccountsUnvestedTokensAmount(ctx, vestingAcc)
fmt.Printf("Core1Addr Unvested to mint to the charter: %s\n", unvested)

coins := sdk.NewCoins(sdk.NewCoin("ujuno", unvested))

if err := k.BankKeeper.MintCoins(ctx, "mint", coins); err != nil {
panic(err)
}

if err := k.BankKeeper.SendCoinsFromModuleToAccount(ctx, "mint", CouncilAddr, coins); err != nil {
panic(err)
}
}

func prop16Core1Multisig(ctx sdk.Context, k *keepers.AppKeepers, Core1Addr, CouncilAddr sdk.AccAddress) { // nolint:gocritic
redelegated, err := completeAllRedelegations(ctx, ctx.BlockTime(), k, Core1Addr)
if err != nil {
Expand Down

0 comments on commit a01eaf5

Please sign in to comment.