Skip to content

Commit

Permalink
disable the governance through set null router (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimmyExogenous authored Feb 23, 2025
1 parent 8ed5a43 commit a4d1dae
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ import (
ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v7/modules/core"
ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client"
ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
Expand Down Expand Up @@ -162,8 +160,6 @@ import (
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"

"github.com/cosmos/cosmos-sdk/x/slashing"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand Down Expand Up @@ -640,17 +636,19 @@ func NewImuachainApp(
// add the governance module, with first step being setting up the proposal types.
// any new proposals that are created within any module must be added here.
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
// TODO: Disable governance during the early phase of mainnet. It should be uncommented when
// governance is enabled.
/* govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(erc20types.RouterKey, erc20.NewErc20ProposalHandler(&app.Erc20Keeper))
AddRoute(erc20types.RouterKey, erc20.NewErc20ProposalHandler(&app.Erc20Keeper))*/
app.GovKeeper = *govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper,
// must be a pointer, since it is not yet initialized
// (but could alternatively make governance keeper later)
&app.StakingKeeper,
app.MsgServiceRouter(), govtypes.DefaultConfig(), authAddrString,
baseapp.NewMsgServiceRouter(), govtypes.DefaultConfig(), authAddrString,
)
// Set legacy router for backwards compatibility with gov v1beta1
(&app.GovKeeper).SetLegacyRouter(govRouter)
Expand Down

0 comments on commit a4d1dae

Please sign in to comment.