Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
98 lines (84 loc) · 2.63 KB
/
Copy pathtypes.ts
File metadata and controls
98 lines (84 loc) · 2.63 KB
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
import type { SmartContractLicenseType } from 'types/api/contract';
import type { SmartContractVerificationMethod } from 'types/client/contract';
import type { Option } from 'ui/shared/forms/inputs/select/types';
export interface ContractLibrary {
name: string;
address: string;
}
interface MethodOption {
label: string;
value: SmartContractVerificationMethod;
}
export interface LicenseOption {
label: string;
value: SmartContractLicenseType;
}
interface FormFieldsBase {
address: string;
method: MethodOption;
license_type: LicenseOption | null;
}
export interface FormFieldsFlattenSourceCode extends FormFieldsBase {
is_yul: boolean;
name: string | undefined;
compiler: Option | null;
evm_version: Option | null;
is_optimization_enabled: boolean;
optimization_runs: string;
code: string;
autodetect_constructor_args: boolean;
constructor_args: string;
libraries: Array<ContractLibrary>;
}
export interface FormFieldsStandardInput extends FormFieldsBase {
name: string;
compiler: Option | null;
sources: Array<File>;
autodetect_constructor_args: boolean;
constructor_args: string;
}
export interface FormFieldsStandardInputZk extends FormFieldsBase {
name: string;
compiler: Option | null;
zk_compiler: Option | null;
sources: Array<File>;
autodetect_constructor_args: boolean;
constructor_args: string;
}
export interface FormFieldsSourcify extends FormFieldsBase {
sources: Array<File>;
contract_index?: Option;
}
export interface FormFieldsMultiPartFile extends FormFieldsBase {
compiler: Option | null;
evm_version: Option | null;
is_optimization_enabled: boolean;
optimization_runs: string;
sources: Array<File>;
libraries: Array<ContractLibrary>;
}
export interface FormFieldsVyperContract extends FormFieldsBase {
name: string;
evm_version: Option | null;
compiler: Option | null;
code: string;
constructor_args: string | undefined;
}
export interface FormFieldsVyperMultiPartFile extends FormFieldsBase {
compiler: Option | null;
evm_version: Option | null;
sources: Array<File>;
interfaces: Array<File>;
}
export interface FormFieldsVyperStandardInput extends FormFieldsBase {
compiler: Option | null;
sources: Array<File>;
}
export interface FormFieldsStylusGitHubRepo extends FormFieldsBase {
compiler: Option | null;
repository_url: string;
commit_hash: string;
path_prefix: string;
}
export type FormFields = FormFieldsFlattenSourceCode | FormFieldsStandardInput | FormFieldsStandardInputZk | FormFieldsSourcify |
FormFieldsMultiPartFile | FormFieldsVyperContract | FormFieldsVyperMultiPartFile | FormFieldsVyperStandardInput | FormFieldsStylusGitHubRepo;