-
Notifications
You must be signed in to change notification settings - Fork 364
/
key.go
31 lines (24 loc) · 838 Bytes
/
key.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"
)
const (
// ModuleName name used throughout module
ModuleName = "validatorvesting"
// StoreKey to be used when creating the KVStore
StoreKey = ModuleName
// QuerierRoute should be set to module name
QuerierRoute = ModuleName
// QueryPath shortened name for public API (cli and REST)
QueryPath = "vesting"
)
var (
// BlocktimeKey key for the time of the previous block
BlocktimeKey = []byte{0x00}
// ValidatorVestingAccountPrefix store prefix for validator vesting accounts
ValidatorVestingAccountPrefix = []byte{0x01}
)
// ValidatorVestingAccountKey returns the account address bytes prefixed by ValidatorVestingAccountPrefix
func ValidatorVestingAccountKey(addr sdk.AccAddress) []byte {
return append(ValidatorVestingAccountPrefix, addr.Bytes()...)
}