forked from tonindexer/anton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknown.go
57 lines (49 loc) · 1.44 KB
/
known.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
50
51
52
53
54
55
56
57
package known
import "github.com/tonindexer/anton/abi"
var (
NFTCollection abi.ContractName = "nft_collection"
NFTItem abi.ContractName = "nft_item"
NFTEditable abi.ContractName = "nft_editable"
NFTRoyalty abi.ContractName = "nft_royalty"
JettonMinter abi.ContractName = "jetton_minter"
JettonWallet abi.ContractName = "jetton_wallet"
DedustV2Pool abi.ContractName = "dedust_v2_pool"
DedustV2Factory abi.ContractName = "dedust_v2_factory"
StonFiPool abi.ContractName = "stonfi_pool"
StonFiRouter abi.ContractName = "stonfi_router"
)
var (
walletInterfacesSet = map[abi.ContractName]struct{}{
"wallet_v1r1": {},
"wallet_v1r2": {},
"wallet_v1r3": {},
"wallet_v2r1": {},
"wallet_v2r2": {},
"wallet_v3r1": {},
"wallet_v3r2": {},
"wallet_v4r1": {},
"wallet_v4r2": {},
"wallet_lockup": {},
"wallet_highload_v1r1": {},
"wallet_highload_v1r2": {},
"wallet_highload_v2r1": {},
"wallet_highload_v2r2": {},
}
walletInterfacesList []abi.ContractName
)
func init() {
for w := range walletInterfacesSet {
walletInterfacesList = append(walletInterfacesList, w)
}
}
func GetAllWalletNames() []abi.ContractName {
return walletInterfacesList
}
func IsOnlyWalletInterfaces(interfaces []abi.ContractName) bool {
for _, i := range interfaces {
if _, ok := walletInterfacesSet[i]; !ok {
return false
}
}
return true
}