From 3b247ac1cde47c56fc42d83043a50c3f06847d46 Mon Sep 17 00:00:00 2001 From: Egor Kostetskiy Date: Thu, 28 Sep 2023 12:44:46 -0300 Subject: [PATCH] move meToken out of experimental --- app/app.go | 49 +++++++++++----------------------- app/wasm/test/cosmwasm_test.go | 6 +---- tests/e2e/e2e_metoken_test.go | 5 ---- 3 files changed, 17 insertions(+), 43 deletions(-) diff --git a/app/app.go b/app/app.go index 3d775fbf33..5bd328fd51 100644 --- a/app/app.go +++ b/app/app.go @@ -198,9 +198,7 @@ func init() { ugovmodule.AppModuleBasic{}, wasm.AppModuleBasic{}, incentivemodule.AppModuleBasic{}, - } - if Experimental { - moduleBasics = append(moduleBasics, metokenmodule.AppModuleBasic{}) + metokenmodule.AppModuleBasic{}, } ModuleBasics = module.NewBasicManager(moduleBasics...) @@ -224,12 +222,7 @@ func init() { oracletypes.ModuleName: nil, uibc.ModuleName: nil, ugov.ModuleName: nil, - } - - if Experimental { - maccPerms[metoken.ModuleName] = []string{ - authtypes.Minter, authtypes.Burner, - } + metoken.ModuleName: {authtypes.Minter, authtypes.Burner}, } } @@ -343,9 +336,7 @@ func New( bech32ibctypes.StoreKey, uibc.StoreKey, ugov.StoreKey, wasm.StoreKey, incentive.StoreKey, - } - if Experimental { - storeKeys = append(storeKeys, metoken.StoreKey) + metoken.StoreKey, } keys := sdk.NewKVStoreKeys(storeKeys...) @@ -499,16 +490,14 @@ func New( ) app.LeverageKeeper.SetBondHooks(app.IncentiveKeeper.BondHooks()) - if Experimental { - app.MetokenKeeperB = metokenkeeper.NewKeeperBuilder( - appCodec, - keys[metoken.StoreKey], - app.BankKeeper, - app.LeverageKeeper, - app.OracleKeeper, - app.UGovKeeperB.EmergencyGroup, - ) - } + app.MetokenKeeperB = metokenkeeper.NewKeeperBuilder( + appCodec, + keys[metoken.StoreKey], + app.BankKeeper, + app.LeverageKeeper, + app.OracleKeeper, + app.UGovKeeperB.EmergencyGroup, + ) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -738,10 +727,7 @@ func New( ugovmodule.NewAppModule(appCodec, app.UGovKeeperB), wasm.NewAppModule(app.appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), incentivemodule.NewAppModule(appCodec, app.IncentiveKeeper, app.BankKeeper, app.LeverageKeeper), - } - if Experimental { - appModules = append(appModules, metokenmodule.NewAppModule(appCodec, app.MetokenKeeperB)) - + metokenmodule.NewAppModule(appCodec, app.MetokenKeeperB), } app.mm = module.NewManager(appModules...) @@ -780,6 +766,7 @@ func New( ugov.ModuleName, wasm.ModuleName, incentive.ModuleName, + metoken.ModuleName, } endBlockers := []string{ crisistypes.ModuleName, @@ -798,6 +785,7 @@ func New( ugov.ModuleName, wasm.ModuleName, incentive.ModuleName, + metoken.ModuleName, } // NOTE: The genutils module must occur after staking so that pools are @@ -822,6 +810,7 @@ func New( ugov.ModuleName, wasm.ModuleName, incentive.ModuleName, + metoken.ModuleName, } orderMigrations := []string{ capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -838,13 +827,7 @@ func New( ugov.ModuleName, wasm.ModuleName, incentive.ModuleName, - } - - if Experimental { - beginBlockers = append(beginBlockers, metoken.ModuleName) - endBlockers = append(endBlockers, metoken.ModuleName) - initGenesis = append(initGenesis, metoken.ModuleName) - orderMigrations = append(orderMigrations, metoken.ModuleName) + metoken.ModuleName, } app.mm.SetOrderBeginBlockers(beginBlockers...) diff --git a/app/wasm/test/cosmwasm_test.go b/app/wasm/test/cosmwasm_test.go index 0a720d997b..590f86ebf6 100644 --- a/app/wasm/test/cosmwasm_test.go +++ b/app/wasm/test/cosmwasm_test.go @@ -2,8 +2,6 @@ package wasm_test import ( "testing" - - "github.com/umee-network/umee/v6/app" ) func TestCosmwasm(t *testing.T) { @@ -24,9 +22,7 @@ func TestCosmwasm(t *testing.T) { its.TestOracleQueries() its.TestLeverageTxs() its.TestIncentiveQueries() - if app.Experimental { - its.TestMetokenQueries() - } + its.TestMetokenQueries() // stargate queries its.TestStargateQueries() diff --git a/tests/e2e/e2e_metoken_test.go b/tests/e2e/e2e_metoken_test.go index 6a10c5fafa..55a80ccc58 100644 --- a/tests/e2e/e2e_metoken_test.go +++ b/tests/e2e/e2e_metoken_test.go @@ -8,7 +8,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/umee-network/umee/v6/app" "github.com/umee-network/umee/v6/tests/grpc" ltypes "github.com/umee-network/umee/v6/x/leverage/types" "github.com/umee-network/umee/v6/x/metoken" @@ -21,10 +20,6 @@ func (s *E2ETest) TestMetokenSwapAndRedeem() { s.Require().NoError(err) expectedBalance := mocks.EmptyUSDIndexBalances(mocks.MeUSDDenom) - if app.Experimental { - s.T().Skip("Skipping tests for experimental module x/metoken") - } - s.Run( "create_stable_index", func() { tokens := []ltypes.Token{