-
Notifications
You must be signed in to change notification settings - Fork 2
/
keys.go
39 lines (31 loc) · 859 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
32
33
34
35
36
37
38
39
package types
import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/ethereum/go-ethereum/common"
)
// constants
const (
// module name
ModuleName = "erc20"
// StoreKey to be used when creating the KVStore
StoreKey = ModuleName
// RouterKey to be used for message routing
RouterKey = ModuleName
)
// ModuleAddress is the native module address for EVM
var ModuleAddress common.Address
func init() {
ModuleAddress = common.BytesToAddress(authtypes.NewModuleAddress(ModuleName).Bytes())
}
// prefix bytes for the EVM persistent store
const (
prefixTokenPair = iota + 1
prefixTokenPairByERC20
prefixTokenPairByDenom
)
// KVStore key prefixes
var (
KeyPrefixTokenPair = []byte{prefixTokenPair}
KeyPrefixTokenPairByERC20 = []byte{prefixTokenPairByERC20}
KeyPrefixTokenPairByDenom = []byte{prefixTokenPairByDenom}
)