-
Notifications
You must be signed in to change notification settings - Fork 23
/
constants.ts
123 lines (99 loc) · 2.92 KB
/
constants.ts
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
export enum ExternalReferenceType {
UserDefined = "userDefined",
Builtin = "builtin"
}
export enum DataLocation {
Storage = "storage",
Memory = "memory",
CallData = "calldata",
Default = "default"
}
export enum FunctionVisibility {
External = "external",
Public = "public",
Internal = "internal",
Private = "private",
Default = "default"
}
export enum FunctionStateMutability {
Pure = "pure",
View = "view",
Constant = "constant",
Payable = "payable",
NonPayable = "nonpayable"
}
export enum StateVariableVisibility {
Public = "public",
Internal = "internal",
Private = "private",
Default = "default"
}
export enum Mutability {
Mutable = "mutable",
Immutable = "immutable",
Constant = "constant"
}
export enum ContractKind {
Contract = "contract",
Library = "library",
Interface = "interface"
}
export enum FunctionKind {
Constructor = "constructor",
Function = "function",
Receive = "receive",
Fallback = "fallback",
Free = "freeFunction"
}
export enum FunctionCallKind {
FunctionCall = "functionCall",
TypeConversion = "typeConversion",
StructConstructorCall = "structConstructorCall"
}
export enum ModifierInvocationKind {
ModifierInvocation = "modifierInvocation",
BaseConstructorSpecifier = "baseConstructorSpecifier"
}
export enum LiteralKind {
Number = "number",
Bool = "bool",
String = "string",
HexString = "hexString",
UnicodeString = "unicodeString"
}
export enum EtherUnit {
Wei = "wei",
GWei = "gwei",
Szabo = "szabo",
Finney = "finney",
Ether = "ether"
}
export enum TimeUnit {
Seconds = "seconds",
Minutes = "minutes",
Hours = "hours",
Days = "days",
Weeks = "weeks",
Years = "years"
}
export enum RawCommentKind {
SingleLineComment = "single_line",
BlockComment = "block_comment",
LineGroupNatSpec = "line_group_natspec",
BlockNatSpec = "block_natspec"
}
export const PossibleDataLocations = new Set<string>(Object.values(DataLocation));
export const PossibleFunctionVisibilities = new Set<string>(Object.values(FunctionVisibility));
export const PossibleFunctionStateMutabilities = new Set<string>(
Object.values(FunctionStateMutability)
);
export const PossibleStateVariableVisibilities = new Set<string>(
Object.values(StateVariableVisibility)
);
export const PossibleMutabilities = new Set<string>(Object.values(Mutability));
export const PossibleContractKinds = new Set<string>(Object.values(ContractKind));
export const PossibleFunctionKinds = new Set<string>(Object.values(FunctionKind));
export const PossibleFunctionCallKinds = new Set<string>(Object.values(FunctionCallKind));
export const PossibleLiteralKinds = new Set<string>(Object.values(LiteralKind));
export const PossibleEtherUnits = new Set<string>(Object.values(EtherUnit));
export const PossibleTimeUnits = new Set<string>(Object.values(TimeUnit));