-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathenums.ts
50 lines (50 loc) · 1.01 KB
/
enums.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
export enum PointerType {
ERC20 = 0,
ERC721 = 1,
NATIVE = 2,
CW20 = 3,
CW721 = 4,
UNRECOGNIZED = -1
}
export const PointerTypeSDKType = PointerType;
export const PointerTypeAmino = PointerType;
export function pointerTypeFromJSON(object: any): PointerType {
switch (object) {
case 0:
case 'ERC20':
return PointerType.ERC20;
case 1:
case 'ERC721':
return PointerType.ERC721;
case 2:
case 'NATIVE':
return PointerType.NATIVE;
case 3:
case 'CW20':
return PointerType.CW20;
case 4:
case 'CW721':
return PointerType.CW721;
case -1:
case 'UNRECOGNIZED':
default:
return PointerType.UNRECOGNIZED;
}
}
export function pointerTypeToJSON(object: PointerType): string {
switch (object) {
case PointerType.ERC20:
return 'ERC20';
case PointerType.ERC721:
return 'ERC721';
case PointerType.NATIVE:
return 'NATIVE';
case PointerType.CW20:
return 'CW20';
case PointerType.CW721:
return 'CW721';
case PointerType.UNRECOGNIZED:
default:
return 'UNRECOGNIZED';
}
}