-
Notifications
You must be signed in to change notification settings - Fork 30
/
keys.go
42 lines (31 loc) · 1.12 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
package types
import "fmt"
const (
// ModuleName is the name of the module.
ModuleName = "coinswap"
// RouterKey is the message route for the coinswap module.
RouterKey = ModuleName
// StoreKey is the default store key for the coinswap module.
StoreKey = ModuleName
// QuerierRoute is the querier route for the coinswap module.
QuerierRoute = StoreKey
// KeyNextPoolSequence is the key used to store the next pool sequence in
// the keeper.
KeyNextPoolSequence = "nextPoolSequence"
// KeyPool is the key used to store the pool information in
// the keeper.
KeyPool = "pool"
// KeyPoolLptDenom is the key used to store the pool information in
// the keeper.
KeyPoolLptDenom = "lptDenom"
// prefix for parameters for module x/coinswap
ParamsKey = "params"
)
// GetPoolKey return the stored pool key for the given pooId.
func GetPoolKey(pooId string) []byte {
return []byte(fmt.Sprintf("%s/%s", KeyPool, pooId))
}
// GetLptDenomKey return the stored pool key for the given liquidity pool token denom.
func GetLptDenomKey(lptDenom string) []byte {
return []byte(fmt.Sprintf("%s/%s", KeyPoolLptDenom, lptDenom))
}