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

Handler fix #538

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import (
v8_3 "github.com/classic-terra/core/v3/app/upgrades/v8_3"

// v9 had been used by tax2gas and has to be skipped
v10 "github.com/classic-terra/core/v3/app/upgrades/v10"
v10_1 "github.com/classic-terra/core/v3/app/upgrades/v10_1"

customante "github.com/classic-terra/core/v3/custom/auth/ante"
custompost "github.com/classic-terra/core/v3/custom/auth/post"
Expand Down Expand Up @@ -94,7 +94,7 @@ var (
v8_1.Upgrade,
v8_2.Upgrade,
v8_3.Upgrade,
v10.Upgrade,
v10_1.Upgrade,
}

// Forks defines forks to be applied to the network
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package v10
//nolint:revive
package v10_1

import (
"github.com/classic-terra/core/v3/app/upgrades"
Expand All @@ -7,11 +8,11 @@ import (
tax2gastypes "github.com/classic-terra/core/v3/x/tax/types"
)

const UpgradeName = "v10"
const UpgradeName = "v10_1"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateV10UpgradeHandler,
CreateUpgradeHandler: CreateV101UpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{
tax2gastypes.ModuleName,
Expand Down
10 changes: 7 additions & 3 deletions app/upgrades/v10/upgrades.go → app/upgrades/v10_1/upgrades.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package v10
//nolint:revive
package v10_1

import (
"github.com/classic-terra/core/v3/app/keepers"
Expand All @@ -9,15 +10,18 @@ import (
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateV10UpgradeHandler(
func CreateV101UpgradeHandler(
mm *module.Manager,
cfg module.Configurator,
_ upgrades.BaseAppParamManager,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// set default oracle split
keepers.TreasuryKeeper.SetTaxRate(ctx, sdk.ZeroDec())
params := keepers.TreasuryKeeper.GetParams(ctx)
params.TaxPolicy.RateMax = sdk.ZeroDec()
params.TaxPolicy.RateMin = sdk.ZeroDec()
keepers.TreasuryKeeper.SetParams(ctx, params)

tax2gasParams := taxtypes.DefaultParams()
keepers.TaxKeeper.SetParams(ctx, tax2gasParams)
Expand Down
Loading