-
Notifications
You must be signed in to change notification settings - Fork 55
/
keys.go
31 lines (24 loc) · 874 Bytes
/
keys.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
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/address"
)
const (
// ModuleName is the name of the liquidstaking module
ModuleName = "liquidstaking"
// RouterKey is the message router key for the liquidstaking module
RouterKey = ModuleName
// StoreKey is the default store key for the liquidstaking module
StoreKey = ModuleName
// QuerierRoute is the querier route for the liquidstaking module
QuerierRoute = ModuleName
)
var (
// Keys for store prefixes
LiquidValidatorsKey = []byte{0xc0} // prefix for each key to a liquid validator
)
// GetLiquidValidatorKey creates the key for the liquid validator with address
// VALUE: liquidstaking/LiquidValidator
func GetLiquidValidatorKey(operatorAddr sdk.ValAddress) []byte {
return append(LiquidValidatorsKey, address.MustLengthPrefix(operatorAddr)...)
}