github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/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/core/types"
     6  )
     7  
     8  // GetIbcEnabled retrieves the ibc enabled boolean from the param store
     9  func (k Keeper) GetIbcEnabled(ctx sdk.Context) bool {
    10  	var res bool
    11  	k.paramSpace.Get(ctx, types.KeyIbcEnabled, &res)
    12  	return res
    13  }
    14  
    15  // GetParams returns the total set of ibc parameters.
    16  func (k Keeper) GetParams(ctx sdk.Context) types.Params {
    17  	return types.NewParams(k.GetIbcEnabled(ctx))
    18  }
    19  
    20  // SetParams sets the total set of ibc parameters.
    21  func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
    22  	k.paramSpace.SetParamSet(ctx, &params)
    23  }