@@ -96,10 +96,6 @@ import (
9696 gravitykeeper "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/keeper"
9797 gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types"
9898 appParams "github.com/peggyjv/sommelier/v7/app/params"
99- v4 "github.com/peggyjv/sommelier/v7/app/upgrades/v4"
100- v5 "github.com/peggyjv/sommelier/v7/app/upgrades/v5"
101- v6 "github.com/peggyjv/sommelier/v7/app/upgrades/v6"
102- v7 "github.com/peggyjv/sommelier/v7/app/upgrades/v7"
10399 "github.com/peggyjv/sommelier/v7/x/auction"
104100 auctionclient "github.com/peggyjv/sommelier/v7/x/auction/client"
105101 auctionkeeper "github.com/peggyjv/sommelier/v7/x/auction/keeper"
@@ -223,6 +219,7 @@ var (
223219 // incidentally this permission is also required to be able to send tokens from module accounts
224220 allowedReceivingModAcc = map [string ]bool {
225221 axelarcorktypes .ModuleName : true ,
222+ cellarfeestypes .ModuleName : true ,
226223 }
227224
228225 _ simapp.App = (* SommelierApp )(nil )
@@ -492,7 +489,7 @@ func NewSommelierApp(
492489
493490 app .CellarFeesKeeper = cellarfeeskeeper .NewKeeper (
494491 appCodec , keys [cellarfeestypes .StoreKey ], app .GetSubspace (cellarfeestypes .ModuleName ),
495- app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .GravityKeeper , app . AuctionKeeper ,
492+ app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .AuctionKeeper ,
496493 )
497494
498495 app .IncentivesKeeper = incentiveskeeper .NewKeeper (
@@ -506,7 +503,6 @@ func NewSommelierApp(
506503 app .GravityKeeper = * app .GravityKeeper .SetHooks (
507504 gravitytypes .NewMultiGravityHooks (
508505 app .CorkKeeper .Hooks (),
509- app .CellarFeesKeeper .Hooks (),
510506 ))
511507
512508 // register the proposal types
@@ -578,7 +574,7 @@ func NewSommelierApp(
578574 authzmodule .NewAppModule (appCodec , app .AuthzKeeper , app .AccountKeeper , app .BankKeeper , app .interfaceRegistry ),
579575 cork .NewAppModule (app .CorkKeeper , appCodec ),
580576 incentives .NewAppModule (app .IncentivesKeeper , app .DistrKeeper , app .BankKeeper , app .MintKeeper , appCodec ),
581- cellarfees .NewAppModule (app .CellarFeesKeeper , appCodec , app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .GravityKeeper , app . AuctionKeeper ),
577+ cellarfees .NewAppModule (app .CellarFeesKeeper , appCodec , app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .AuctionKeeper ),
582578 auction .NewAppModule (app .AuctionKeeper , app .BankKeeper , app .AccountKeeper , appCodec ),
583579 pubsub .NewAppModule (appCodec , app .PubsubKeeper , app .StakingKeeper , app .GravityKeeper ),
584580 )
@@ -713,7 +709,7 @@ func NewSommelierApp(
713709 cork .NewAppModule (app .CorkKeeper , appCodec ),
714710 axelarcork .NewAppModule (app .AxelarCorkKeeper , appCodec ),
715711 incentives .NewAppModule (app .IncentivesKeeper , app .DistrKeeper , app .BankKeeper , app .MintKeeper , appCodec ),
716- cellarfees .NewAppModule (app .CellarFeesKeeper , appCodec , app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .GravityKeeper , app . AuctionKeeper ),
712+ cellarfees .NewAppModule (app .CellarFeesKeeper , appCodec , app .AccountKeeper , app .BankKeeper , app .MintKeeper , app .CorkKeeper , app .AuctionKeeper ),
717713 auction .NewAppModule (app .AuctionKeeper , app .BankKeeper , app .AccountKeeper , appCodec ),
718714 pubsub .NewAppModule (appCodec , app .PubsubKeeper , app .StakingKeeper , app .GravityKeeper ),
719715 )
@@ -969,75 +965,13 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() {
969965
970966 var storeUpgrades * storetypes.StoreUpgrades = nil
971967
972- if upgradeInfo .Name == v4 .UpgradeName {
973- storeUpgrades = & storetypes.StoreUpgrades {
974- Added : []string {corktypes .ModuleName , cellarfeestypes .ModuleName },
975- Deleted : []string {"allocation" },
976- }
977- }
978-
979- if upgradeInfo .Name == v5 .UpgradeName {
980- storeUpgrades = & storetypes.StoreUpgrades {
981- Added : []string {incentivestypes .ModuleName },
982- }
983- }
984-
985- if upgradeInfo .Name == v6 .UpgradeName {
986- storeUpgrades = & storetypes.StoreUpgrades {
987- Added : []string {icahosttypes .SubModuleName },
988- }
989- }
990-
991- if upgradeInfo .Name == v7 .UpgradeName {
992- storeUpgrades = & storetypes.StoreUpgrades {
993- Added : []string {auctiontypes .ModuleName , axelarcorktypes .ModuleName , cellarfeestypes .ModuleName , pubsubtypes .ModuleName },
994- }
995- }
968+ // TODO: Add v8 store loader when writing upgrade handler
996969
997970 if storeUpgrades != nil {
998971 app .SetStoreLoader (upgradetypes .UpgradeStoreLoader (upgradeInfo .Height , storeUpgrades ))
999972 }
1000973}
1001974
1002975func (app * SommelierApp ) setupUpgradeHandlers () {
1003- app .UpgradeKeeper .SetUpgradeHandler (
1004- v4 .UpgradeName ,
1005- v4 .CreateUpgradeHandler (
1006- app .mm ,
1007- app .configurator ,
1008- app .AccountKeeper ,
1009- app .BankKeeper ,
1010- ),
1011- )
1012-
1013- app .UpgradeKeeper .SetUpgradeHandler (
1014- v5 .UpgradeName ,
1015- v5 .CreateUpgradeHandler (
1016- app .mm ,
1017- app .configurator ,
1018- app .IncentivesKeeper ,
1019- ),
1020- )
1021-
1022- app .UpgradeKeeper .SetUpgradeHandler (
1023- v6 .UpgradeName ,
1024- v6 .CreateUpgradeHandler (
1025- app .mm ,
1026- app .configurator ,
1027- ),
1028- )
1029-
1030- app .UpgradeKeeper .SetUpgradeHandler (
1031- v7 .UpgradeName ,
1032- v7 .CreateUpgradeHandler (
1033- app .mm ,
1034- app .configurator ,
1035- app .AuctionKeeper ,
1036- app .AxelarCorkKeeper ,
1037- app .CellarFeesKeeper ,
1038- app .CorkKeeper ,
1039- app .ICAHostKeeper ,
1040- app .PubsubKeeper ,
1041- ),
1042- )
976+ // TODO: Add v8 upgrade handler
1043977}
0 commit comments