From dc70348ef20411e7db24ca5f02692af30c04f8b3 Mon Sep 17 00:00:00 2001 From: ajansari95 <53616488+ajansari95@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:01:24 +0530 Subject: [PATCH] remove circuit and unnecesasary comments --- app/upgrades/v2/upgrades.go | 92 +----------------------------------- app/upgrades/v3/constants.go | 3 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 94 deletions(-) diff --git a/app/upgrades/v2/upgrades.go b/app/upgrades/v2/upgrades.go index 91f4eafc3..4293c060d 100644 --- a/app/upgrades/v2/upgrades.go +++ b/app/upgrades/v2/upgrades.go @@ -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, @@ -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 - } -} -*/ +} \ No newline at end of file diff --git a/app/upgrades/v3/constants.go b/app/upgrades/v3/constants.go index 1a3bfe498..6f92b123c 100644 --- a/app/upgrades/v3/constants.go +++ b/app/upgrades/v3/constants.go @@ -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" @@ -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{}, }, diff --git a/go.mod b/go.mod index f6bf1b5df..676d50678 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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