-
Notifications
You must be signed in to change notification settings - Fork 43
/
keys.go
49 lines (38 loc) · 1.41 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package types
const (
// ModuleName defines the module name
ModuleName = "tokenfactory"
// StoreKey defines the primary module store key
StoreKey = ModuleName
// RouterKey defines the module's message routing key
RouterKey = ModuleName
// MemStoreKey defines the in-memory store key
MemStoreKey = "mem_tokenfactory"
PausedKey = "Paused/value/"
MasterMinterKey = "MasterMinter/value/"
PauserKey = "Pauser/value/"
BlacklisterKey = "Blacklister/value/"
OwnerKey = "Owner/value/"
PendingOwnerKey = "PendingOwner/value/"
BlacklistedKeyPrefix = "Blacklisted/value/"
MintersKeyPrefix = "Minters/value/"
MinterControllerKeyPrefix = "MinterController/value/"
)
func KeyPrefix(p string) []byte {
return []byte(p)
}
// BlacklistedKey returns the store key to retrieve a Blacklisted from the index fields
func BlacklistedKey(addressBz []byte) []byte {
return append(addressBz, []byte("/")...)
}
// MintersKey returns the store key to retrieve a Minters from the index fields
func MintersKey(address string) []byte {
return append([]byte(address), []byte("/")...)
}
// MinterControllerKey returns the store key to retrieve a MinterController from the index fields
func MinterControllerKey(controllerAddress string) []byte {
return append([]byte(controllerAddress), []byte("/")...)
}
const (
MintingDenomKey = "MintingDenom/value/"
)