Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): add upgrade handlers #1121

Merged
merged 33 commits into from
Jun 3, 2022
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
adccebe
feat: wip mainnet upgrade handler
aleem1314 May 23, 2022
cd62000
wip: add ecocredit state migrations
aleem1314 May 24, 2022
5186804
implement recover funds from lost account
aleem1314 May 25, 2022
fd24f1b
chore: fix tests
aleem1314 May 25, 2022
94f830d
chore: add test
aleem1314 May 25, 2022
82bc8cc
chore: fix test
aleem1314 May 25, 2022
0e33ef0
Update app/stable_appconfig.go
aleem1314 May 25, 2022
0dc37be
chore: cleanup
aleem1314 May 25, 2022
4eaff10
chore: cleanup
aleem1314 May 25, 2022
02fedd8
feat: add redwood migrations
aleem1314 May 26, 2022
ccfa0f8
Update x/ecocredit/migrations/v3/patch.go
aleem1314 May 26, 2022
70b58e8
feat: add redwood migration tests
aleem1314 May 27, 2022
8efe829
Merge branch 'aleem/980-upgrade-handlers' of https://github.com/regen…
aleem1314 May 27, 2022
6747aa6
chore: revert core_test.go
aleem1314 May 27, 2022
11dfd85
Update app/stable_appconfig.go
aleem1314 May 27, 2022
0004544
Merge branch 'aleem/980-upgrade-handlers' of https://github.com/regen…
aleem1314 May 27, 2022
9ed5b5b
chore: review changes
aleem1314 May 27, 2022
765fb4f
chore: add redwood upgrade handler
aleem1314 May 27, 2022
61aceda
Update app/stable_appconfig.go
aleem1314 May 28, 2022
571c3b8
Update app/stable_appconfig.go
aleem1314 May 28, 2022
44ef5b7
Merge branch 'master' into aleem/980-upgrade-handlers
anilcse Jun 2, 2022
9dd7f37
Merge branch 'master' into aleem/980-upgrade-handlers
ryanchristo Jun 2, 2022
02af4e4
Update x/ecocredit/migrations/v3/patch_test.go
aleem1314 Jun 3, 2022
0f4aaa5
Update x/ecocredit/migrations/v3/patch_test.go
aleem1314 Jun 3, 2022
343af4a
Update x/ecocredit/migrations/v3/patch_test.go
aleem1314 Jun 3, 2022
50d012b
Update x/ecocredit/migrations/v3/patch_test.go
aleem1314 Jun 3, 2022
7ecc794
chore: review changes
aleem1314 Jun 3, 2022
168face
Merge branch 'aleem/980-upgrade-handlers' of https://github.com/regen…
aleem1314 Jun 3, 2022
372f378
Merge branch 'master' into aleem/980-upgrade-handlers
aleem1314 Jun 3, 2022
d6bc0f2
chore: fix errors
aleem1314 Jun 3, 2022
2e0def5
Update x/ecocredit/migrations/v3/patch.go
ryanchristo Jun 3, 2022
9982038
update reference id comments and checks
ryanchristo Jun 3, 2022
fe9dfaf
Merge branch 'master' into aleem/980-upgrade-handlers
ryanchristo Jun 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update app/stable_appconfig.go
  • Loading branch information
aleem1314 committed May 28, 2022
commit 571c3b8e36f1a360c855dd9426e9da2497276e8b
17 changes: 0 additions & 17 deletions app/stable_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,6 @@ func (app *RegenApp) registerUpgradeHandlers() {
return toVersion, nil
})

// redwood upgrade handler
const redwoodUpgradeName = "v4.0.0-redwood"
app.UpgradeKeeper.SetUpgradeHandler(upgradeName, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// run state migrations for sdk modules
toVersion, err := app.mm.RunMigrations(ctx, app.configurator, fromVM)
if err != nil {
return nil, err
}

// run x/ecocredit state migrations
if err := app.smm.RunMigrations(ctx, app.AppCodec()); err != nil {
return nil, err
}
toVersion[ecocredit.ModuleName] = ecocreditmodule.Module{}.ConsensusVersion()

return toVersion, nil
})
}

func recoverFunds(ctx sdk.Context, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper) error {
Expand Down