Skip to content

Commit

Permalink
Merge pull request #2728 from Sifchain/feature/0.13.2-minting
Browse files Browse the repository at this point in the history
Mint rowan for 0.13.2
  • Loading branch information
timlind authored May 6, 2022
2 parents 06cbc0b + 7ab5ae2 commit fcf0f3b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion app/setup_handlers.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
package app

import (
clptypes "github.com/Sifchain/sifnode/x/clp/types"
dispensationtypes "github.com/Sifchain/sifnode/x/dispensation/types"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
m "github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

const releaseVersion = "0.13.2-rc.1"
const releaseVersion = "0.13.2"

func SetupHandlers(app *SifchainApp) {
app.UpgradeKeeper.SetUpgradeHandler(releaseVersion, func(ctx sdk.Context, plan types.Plan, vm m.VersionMap) (m.VersionMap, error) {
app.Logger().Info("Running upgrade handler for " + releaseVersion)
amt, ok := sdk.NewIntFromString("150000000000000000000000000")
if !ok {
panic("error converting mint amount")
}
mintCoins := sdk.NewCoins(sdk.NewCoin(clptypes.GetSettlementAsset().Symbol, amt))
err := app.BankKeeper.MintCoins(ctx, dispensationtypes.ModuleName, mintCoins)
if err != nil {
panic(err)
}
address, err := sdk.AccAddressFromBech32("sif1ct2s3t8u2kffjpaekhtngzv6yc4vm97xajqyl3")
if err != nil {
panic(err)
}
err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, dispensationtypes.ModuleName, address, mintCoins)
if err != nil {
panic(err)
}

return app.mm.RunMigrations(ctx, app.configurator, vm)
})

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.2-rc.1
0.13.2

0 comments on commit fcf0f3b

Please sign in to comment.