Skip to content

Commit

Permalink
Municipal Inflation: Adding v0.11.1 upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
pbukva committed Sep 7, 2023
1 parent 28d8aa4 commit 6362748
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,17 @@ func (app *App) GetSubspace(moduleName string) paramstypes.Subspace {
}

func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
app.UpgradeKeeper.SetUpgradeHandler("fetchd-v0.10.7", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.UpgradeKeeper.SetUpgradeHandler("v0.11.1", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
mobixInfl, err := sdk.NewDecFromStr("0.03")
if err != nil {
return module.VersionMap{}, err
}
minter := app.MintKeeper.GetMinter(ctx)
minter.MunicipalInflation = []*minttypes.MunicipalInflationPair{
{Denom: "nanomobx", Inflation: minttypes.NewMunicipalInflation("fetch1n8d5466h8he33uedc0vsgtahal0mrz55glre03", mobixInfl)},
}
app.MintKeeper.SetMinter(ctx, minter)

return app.mm.RunMigrations(ctx, cfg, fromVM)
})
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.33.2

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.19.0
replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.19.1

replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fetchai/cosmos-sdk v0.19.0 h1:CH5J4Zc8fzweHn6B3UNEqSEmWQHuW/LrkglGtLaMprE=
github.com/fetchai/cosmos-sdk v0.19.0/go.mod h1:Izf5d8rmo/AO2YFWH6O8jZmK3dCHZcCOLggS7HtjB8c=
github.com/fetchai/cosmos-sdk v0.19.1 h1:TKLWmX74afhsA59kJh2lSH9fjEEGIt1YmknpPf9BpAo=
github.com/fetchai/cosmos-sdk v0.19.1/go.mod h1:Izf5d8rmo/AO2YFWH6O8jZmK3dCHZcCOLggS7HtjB8c=
github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
Expand Down

0 comments on commit 6362748

Please sign in to comment.