-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.go
32 lines (26 loc) · 930 Bytes
/
params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/furynet/furynetwork/x/house/types"
)
// GetParams return parameters of the module
func (k Keeper) GetParams(ctx sdk.Context) types.Params {
return types.NewParams(
k.GetMinAllowedDepositAmount(ctx),
k.GetHouseParticipationFee(ctx),
)
}
// SetParams set the params for the module
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.paramstore.SetParamSet(ctx, ¶ms)
}
// GetMinAllowedDepositAmount returns minimum acceptable deposit amount.
func (k Keeper) GetMinAllowedDepositAmount(ctx sdk.Context) (res sdk.Int) {
k.paramstore.Get(ctx, types.KeyMinDeposit, &res)
return
}
// GetHouseParticipationFee returns % of deposit to be paid for house participation by an account
func (k Keeper) GetHouseParticipationFee(ctx sdk.Context) (res sdk.Dec) {
k.paramstore.Get(ctx, types.KeyHouseParticipationFee, &res)
return
}