Skip to content

Commit

Permalink
remove circuit and unnecesasary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ajansari95 committed Aug 30, 2024
1 parent 504c11c commit dc70348
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 94 deletions.
92 changes: 1 addition & 91 deletions app/upgrades/v2/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ import (
"github.com/quasar-finance/quasar/app/keepers"
)

// qosmotypes "github.com/quasar-finance/quasar/x/qoracle/osmosis/types"

// TODO -SDK 50 - This files does not need to be present any more. However we will loose some old Handlers,
// RECHECK, what to do as some of the modules like qoracle is gone.

// TODO - SDK 50 - This is a dummy Handler for now.
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
Expand All @@ -23,88 +17,4 @@ func CreateUpgradeHandler(

return mm.RunMigrations(ctx, configurator, fromVM)
}
}

/*
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
bpm upgrades.BaseAppParamManager,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
fromVM[govtypes.ModuleName] = 1
baseAppLegacySS := keepers.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())
// https://github.com/cosmos/cosmos-sdk/pull/12363/files
// Set param key table for params module migration
for _, subspace := range keepers.ParamsKeeper.GetSubspaces() {
subspace := subspace
var keyTable paramstypes.KeyTable
switch subspace.Name() {
// sdk
case authtypes.ModuleName:
keyTable = authtypes.ParamKeyTable() //nolint:staticcheck
case banktypes.ModuleName:
keyTable = banktypes.ParamKeyTable() //nolint:staticcheck
case stakingtypes.ModuleName:
keyTable = stakingtypes.ParamKeyTable() //nolint:staticcheck
case minttypes.ModuleName:
keyTable = minttypes.ParamKeyTable() //nolint:staticcheck
case distrtypes.ModuleName:
keyTable = distrtypes.ParamKeyTable() //nolint:staticcheck
case slashingtypes.ModuleName:
keyTable = slashingtypes.ParamKeyTable() //nolint:staticcheck
case govtypes.ModuleName:
keyTable = govv1.ParamKeyTable() //nolint:staticcheck
case crisistypes.ModuleName:
keyTable = crisistypes.ParamKeyTable() //nolint:staticcheck
// ibc types
case ibctransfertypes.ModuleName:
keyTable = ibctransfertypes.ParamKeyTable() //nolint:staticcheck
case icahosttypes.SubModuleName:
keyTable = icahosttypes.ParamKeyTable() //nolint:staticcheck
case icacontrollertypes.SubModuleName:
keyTable = icacontrollertypes.ParamKeyTable() //nolint:staticcheck
case icqtypes.ModuleName:
keyTable = icqtypes.ParamKeyTable() //nolint:staticcheck
// wasm
case wasmtypes.ModuleName:
keyTable = wasmtypes.ParamKeyTable() //nolint:staticcheck
// quasar
//case qoraclemoduletypes.ModuleName:
// keyTable = qoraclemoduletypes.ParamKeyTable()
case qosmotypes.SubModuleName:
keyTable = qosmotypes.ParamKeyTable()
case qtransfertypes.ModuleName:
keyTable = qtransfertypes.ParamKeyTable()
case tftypes.ModuleName:
keyTable = tftypes.ParamKeyTable()
// qvesting does not have params
default:
continue
}
if !subspace.HasKeyTable() {
subspace.WithKeyTable(keyTable)
}
}
// Migrate Tendermint consensus parameters from x/params module to a deprecated x/consensus module.
// The old params module is required to still be imported in your app.go in order to handle this migration.
baseapp.MigrateParams(ctx, baseAppLegacySS, keepers.ConsensusParamsKeeper)
migrations, err := mm.RunMigrations(ctx, configurator, fromVM)
if err != nil {
return nil, err
}
return migrations, nil
}
}
*/
}
3 changes: 1 addition & 2 deletions app/upgrades/v3/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v3

import (
store "cosmossdk.io/store/types"
circuittypes "cosmossdk.io/x/circuit/types"
pfmtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/types"
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
Expand All @@ -20,7 +19,7 @@ var Upgrade = upgrades.Upgrade{
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{
circuittypes.StoreKey, feemarkettypes.StoreKey, ibchookstypes.StoreKey, pfmtypes.StoreKey, ratelimittypes.StoreKey,
feemarkettypes.StoreKey, ibchookstypes.StoreKey, pfmtypes.StoreKey, ratelimittypes.StoreKey,
},
Deleted: []string{},
},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require (
cosmossdk.io/store v1.1.0
cosmossdk.io/tools/confix v0.1.2
cosmossdk.io/tools/rosetta v0.2.1-0.20230613133644-0a778132a60f
cosmossdk.io/x/circuit v0.1.1
cosmossdk.io/x/evidence v0.1.1
cosmossdk.io/x/feegrant v0.1.1
cosmossdk.io/x/tx v0.13.4
Expand Down Expand Up @@ -45,6 +44,7 @@ require (
)

require (
cosmossdk.io/x/circuit v0.1.1 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
github.com/google/flatbuffers v1.12.1 // indirect
Expand Down

0 comments on commit dc70348

Please sign in to comment.