From 946cb9d4f56f4aa121fcef00aa1326bb38b8c86b Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 22 Aug 2024 17:12:13 +0530 Subject: [PATCH] Handle gov module custom config --- app/app.go | 10 +++++++++- app/app.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index 8d89fbb1..98dba649 100644 --- a/app/app.go +++ b/app/app.go @@ -34,7 +34,11 @@ import ( distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -49,7 +53,6 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects - _ "github.com/cosmos/cosmos-sdk/x/gov" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects @@ -113,6 +116,11 @@ func AppConfig() depinject.Config { // supply custom module basics map[string]module.AppModuleBasic{ genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }, + ), }, ), ) diff --git a/app/app.yaml b/app/app.yaml index 88920b62..75fae7f0 100644 --- a/app/app.yaml +++ b/app/app.yaml @@ -26,7 +26,7 @@ modules: - account: not_bonded_tokens_pool permissions: [burner, staking] - account: gov - permissions: [burner, staking] + permissions: [burner] - account: auction - account: auction_burn - account: bond