From d12639e23e7540082c7e929864f6efb7c111c304 Mon Sep 17 00:00:00 2001 From: vishal Date: Wed, 13 Dec 2023 11:46:28 +0530 Subject: [PATCH] made changes as per review --- app/app.go | 17 +++++++++++------ x/treasury/genesis.go | 14 +++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/app.go b/app/app.go index 4a190a28f..ec0eb8d67 100644 --- a/app/app.go +++ b/app/app.go @@ -121,6 +121,8 @@ import ( ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" palomamempool "github.com/palomachain/paloma/app/mempool" // xchain "github.com/palomachain/paloma/internal/x-chain" @@ -183,10 +185,10 @@ var ( stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, // gravitymoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - ibcfeetypes.ModuleName: nil, - icatypes.ModuleName: nil, - // wasm.ModuleName: {authtypes.Burner}, + ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + ibcfeetypes.ModuleName: nil, + icatypes.ModuleName: nil, + wasm.ModuleName: {authtypes.Burner}, treasurymoduletypes.ModuleName: {authtypes.Burner, authtypes.Minter}, } ) @@ -625,8 +627,8 @@ func New( govRouter. AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - // AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) - // AddRoute(evmmoduletypes.RouterKey, evm.NewReferenceChainReferenceIDProposalHandler(app.EvmKeeper)). + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). + AddRoute(evmmoduletypes.RouterKey, evm.NewReferenceChainReferenceIDProposalHandler(app.EvmKeeper)). // AddRoute(gravitymoduletypes.RouterKey, gravitymodulekeeper.NewGravityProposalHandler(app.GravityKeeper)). AddRoute(treasurymoduletypes.RouterKey, treasurymodule.NewFeeProposalHandler(app.TreasuryKeeper)) @@ -789,6 +791,9 @@ func New( }, ), }) + + app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) + app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. diff --git a/x/treasury/genesis.go b/x/treasury/genesis.go index e2a400a10..7ececfaae 100644 --- a/x/treasury/genesis.go +++ b/x/treasury/genesis.go @@ -11,15 +11,15 @@ import ( // InitGenesis initializes the capability module's state from a provided genesis // state. func InitGenesis(ctx context.Context, k keeper.Keeper, genState types.GenesisState) { - Ctx := sdk.UnwrapSDKContext(ctx) - k.SetParams(Ctx, genState.Params) + sdkctx := sdk.UnwrapSDKContext(ctx) + k.SetParams(sdkctx, genState.Params) - err := k.SetCommunityFundFee(Ctx, "0.01") + err := k.SetCommunityFundFee(sdkctx, "0.01") if err != nil { panic(err) } - err = k.SetSecurityFee(Ctx, "0.01") + err = k.SetSecurityFee(sdkctx, "0.01") if err != nil { panic(err) } @@ -27,12 +27,12 @@ func InitGenesis(ctx context.Context, k keeper.Keeper, genState types.GenesisSta // ExportGenesis returns the capability module's exported genesis. func ExportGenesis(ctx context.Context, k keeper.Keeper) *types.GenesisState { - Ctx := sdk.UnwrapSDKContext(ctx) + sdkctx := sdk.UnwrapSDKContext(ctx) genesis := types.DefaultGenesis() - genesis.Params = k.GetParams(Ctx) + genesis.Params = k.GetParams(sdkctx) - fees, err := k.GetFees(Ctx) + fees, err := k.GetFees(sdkctx) if err != nil { panic(err) }