From 3070d94e1ee1478395c87af8609fb9b3cc81edce Mon Sep 17 00:00:00 2001 From: Tim Lind Date: Thu, 5 May 2022 19:41:22 +0200 Subject: [PATCH 1/2] Mint 150M rowan for 0.13.2 --- app/setup_handlers.go | 23 ++++++++++++++++++++++- version | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/app/setup_handlers.go b/app/setup_handlers.go index 83506b1e1e..b447534862 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -1,17 +1,38 @@ 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) + } + // TODO: get destination address + address, err := sdk.AccAddressFromBech32("") + 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) }) diff --git a/version b/version index 0540a190cd..9beb74d490 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.13.2-rc.1 +0.13.2 From 7ab5ae2a31e33ee0880fcb925fa17210d8353737 Mon Sep 17 00:00:00 2001 From: Tim Lind Date: Thu, 5 May 2022 21:31:38 +0200 Subject: [PATCH 2/2] Add address --- app/setup_handlers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/setup_handlers.go b/app/setup_handlers.go index b447534862..b563606111 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -23,8 +23,7 @@ func SetupHandlers(app *SifchainApp) { if err != nil { panic(err) } - // TODO: get destination address - address, err := sdk.AccAddressFromBech32("") + address, err := sdk.AccAddressFromBech32("sif1ct2s3t8u2kffjpaekhtngzv6yc4vm97xajqyl3") if err != nil { panic(err) }