forked from crescent-network/crescent
/
params.go
56 lines (43 loc) 路 1.53 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package keeper
import (
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/jesse-pinkman-cre/crescent/x/lpfarm/types"
)
// GetParams returns the parameters for the module.
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
k.paramSpace.GetParamSet(ctx, ¶ms)
return
}
// SetParams sets the parameters for the module.
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.paramSpace.SetParamSet(ctx, ¶ms)
}
func (k Keeper) GetPrivatePlanCreationFee(ctx sdk.Context) (fee sdk.Coins) {
k.paramSpace.Get(ctx, types.KeyPrivatePlanCreationFee, &fee)
return
}
func (k Keeper) SetPrivatePlanCreationFee(ctx sdk.Context, fee sdk.Coins) {
k.paramSpace.Set(ctx, types.KeyPrivatePlanCreationFee, fee)
}
func (k Keeper) GetFeeCollector(ctx sdk.Context) (feeCollector string) {
k.paramSpace.Get(ctx, types.KeyFeeCollector, &feeCollector)
return
}
func (k Keeper) SetFeeCollector(ctx sdk.Context, feeCollector string) {
k.paramSpace.Set(ctx, types.KeyFeeCollector, feeCollector)
}
func (k Keeper) GetMaxNumPrivatePlans(ctx sdk.Context) (num uint32) {
k.paramSpace.Get(ctx, types.KeyMaxNumPrivatePlans, &num)
return
}
func (k Keeper) SetMaxNumPrivatePlans(ctx sdk.Context, num uint32) {
k.paramSpace.Set(ctx, types.KeyMaxNumPrivatePlans, num)
}
func (k Keeper) GetMaxBlockDuration(ctx sdk.Context) (d time.Duration) {
k.paramSpace.Get(ctx, types.KeyMaxBlockDuration, &d)
return
}
func (k Keeper) SetMaxBlockDuration(ctx sdk.Context, d time.Duration) {
k.paramSpace.Set(ctx, types.KeyMaxBlockDuration, d)
}