laconicd-deprecated/x/bond/keeper/params.go
Sai Kumar d28ef888ff
dxns bond module test (#4)
* WIP : added bond module tx and query cli commands

* added bond module invariant

* update the go.mod

* addressed the pr changes

* update to proto files

* refactor: move the proto package version from `v1` to `v1beta1` for vulcanize modules

* WIP : addin the unit test scripts to bond module

* refactor: refactored the test cases for bond module

* refactor: refactored the bond module test cases
1. refactored grpc gateway  endpoints of bond module
2. added test cases to cli query , cli tx and grpc end points

* addressed the pr comments
1. changed query-by-owner to by-owner in cli cmd
2. changed bonds-by-owner route to by-owner in bond module
2021-09-29 18:18:30 +05:30

24 lines
656 B
Go

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
}
// GetParams - Get all parameter as types.Params.
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, &params)
}