-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.go
32 lines (26 loc) · 912 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/furya-network/furya/x/strategicreserve/types"
)
// Get all parameters as types.Params
func (k Keeper) GetParams(ctx sdk.Context) types.Params {
return types.NewParams(
k.GetMaxBookParticipationsAllowed(ctx),
k.GetBatchSettlementCount(ctx),
)
}
// set the params
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.paramstore.SetParamSet(ctx, ¶ms)
}
// GetMaxBookParticipationsAllowed - Max number of book participations allowed.
func (k Keeper) GetMaxBookParticipationsAllowed(ctx sdk.Context) (res uint64) {
k.paramstore.Get(ctx, types.KeyMaxBookParticipations, &res)
return
}
// GetBatchSettlementCount - number of deposits to be settled in end blocker.
func (k Keeper) GetBatchSettlementCount(ctx sdk.Context) (res uint64) {
k.paramstore.Get(ctx, types.KeyBatchSettlementCount, &res)
return
}