github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/apps/27-interchain-accounts/controller/keeper/params.go (about) 1 package keeper 2 3 import ( 4 sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 5 "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/apps/27-interchain-accounts/controller/types" 6 ) 7 8 // IsControllerEnabled retrieves the controller enabled boolean from the paramstore. 9 // True is returned if the controller submodule is enabled. 10 func (k Keeper) IsControllerEnabled(ctx sdk.Context) bool { 11 var res bool 12 k.paramSpace.Get(ctx, types.KeyControllerEnabled, &res) 13 return res 14 } 15 16 // GetParams returns the total set of the controller submodule parameters. 17 func (k Keeper) GetParams(ctx sdk.Context) types.Params { 18 return types.NewParams(k.IsControllerEnabled(ctx)) 19 } 20 21 // SetParams sets the total set of the controller submodule parameters. 22 func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { 23 k.paramSpace.SetParamSet(ctx, ¶ms) 24 }