forked from AstraProtocol/astra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.go
29 lines (24 loc) · 764 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
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/dungtt-astra/astra/v3/x/feeburn/types"
)
// GetParams get all parameters as types.Params
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
k.paramstore.GetParamSetIfExists(ctx, ¶ms)
return params
}
// SetParams set the params
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.paramstore.SetParamSet(ctx, ¶ms)
}
// EnableFeeBurn returns the EnableFeeBurn param
func (k Keeper) EnableFeeBurn(ctx sdk.Context) (res bool) {
k.paramstore.Get(ctx, types.KeyEnableFeeBurn, &res)
return
}
// FeeBurn returns the FeeBurn param
func (k Keeper) FeeBurn(ctx sdk.Context) (res sdk.Dec) {
k.paramstore.Get(ctx, types.KeyFeeBurn, &res)
return
}