2021-09-27 06:41:16 +00:00
|
|
|
package keeper
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/tharsis/ethermint/x/bond/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
// GetMaxBondAmount max bond amount
|
|
|
|
func (k Keeper) GetMaxBondAmount(ctx sdk.Context) (res sdk.Coin) {
|
|
|
|
k.paramSubspace.Get(ctx, types.ParamStoreKeyMaxBondAmount, &res)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-09-29 12:48:30 +00:00
|
|
|
// GetParams - Get all parameter as types.Params.
|
2021-09-27 06:41:16 +00:00
|
|
|
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
|
|
|
|
getMaxBondAmount := k.GetMaxBondAmount(ctx)
|
|
|
|
return types.Params{MaxBondAmount: getMaxBondAmount}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetParams - set the params.
|
|
|
|
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
|
|
|
k.paramSubspace.SetParamSet(ctx, ¶ms)
|
|
|
|
}
|