-
Notifications
You must be signed in to change notification settings - Fork 5
/
params.go
38 lines (32 loc) · 1.29 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
package types
import (
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
)
// Parameter store keys.
var (
KeyIdentifier = []byte("Identifier")
KeyStartTime = []byte("StartTime")
KeyDuration = []byte("Duration")
KeyCurrentEpoch = []byte("CurrentEpoch")
KeyCurrentEpochStartTime = []byte("CurrentEpochStartTime")
KeyEpochCountingStarted = []byte("EpochCountingStarted")
KeyCurrentEpochStartHeight = []byte("CurrentEpochStartHeight")
)
// ParamTable for minting module.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&EpochInfo{})
}
// Implements params.ParamSet.
func (p *EpochInfo) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(KeyIdentifier, &p.Identifier, validate),
paramtypes.NewParamSetPair(KeyStartTime, &p.StartTime, validate),
paramtypes.NewParamSetPair(KeyDuration, &p.Duration, validate),
paramtypes.NewParamSetPair(KeyCurrentEpochStartTime, &p.CurrentEpochStartTime, validate),
paramtypes.NewParamSetPair(KeyEpochCountingStarted, &p.EpochCountingStarted, validate),
paramtypes.NewParamSetPair(KeyCurrentEpochStartHeight, &p.CurrentEpochStartHeight, validate),
}
}
func validate(i interface{}) error {
return nil
}