Skip to content

Commit

Permalink
update handler v1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCherepovskyi committed Nov 28, 2024
1 parent fadbe71 commit 4e85d93
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
23 changes: 23 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,29 @@ func New(
},
)

if upgradeInfo.Name == "v1.1.4" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{
Added: []string{rootupdatermoduletypes.ModuleName},
}))
}
app.UpgradeKeeper.SetUpgradeHandler(
"v1.1.4",
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.RootupdaterKeeper.SetParams(ctx, rootupdatermoduletypes.Params{
SourceContractAddress: "",
DestinationContractAddress: "",
Root: "0x00",
LastSignedRoot: "0x00",
LastSignedRootIndex: "0x00",
EventName: "RootUpdated",
RootTimestamp: 1724316208,
BlockHeight: 0,
})
fromVM[rootupdatermoduletypes.ModuleName] = rootupdatermodule.AppModule{}.ConsensusVersion()
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
)

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/rarimo/rarimo-core

go 1.20
go 1.21

toolchain go1.23.2

require (
cosmossdk.io/errors v1.0.1
Expand Down
Loading

0 comments on commit 4e85d93

Please sign in to comment.