1 | import { SolcConfig } from "../config";
|
2 |
|
3 |
|
4 |
|
5 | export interface ResolvedFile {
|
6 | library?: LibraryInfo;
|
7 | sourceName: string;
|
8 | absolutePath: string;
|
9 | content: FileContent;
|
10 | lastModificationDate: Date;
|
11 | contentHash: string;
|
12 | getVersionedName(): string;
|
13 | }
|
14 | export type ArtifactsEmittedPerFile = Array<{
|
15 | file: ResolvedFile;
|
16 | artifactsEmitted: string[];
|
17 | }>;
|
18 |
|
19 |
|
20 |
|
21 | export interface LibraryInfo {
|
22 | name: string;
|
23 | version: string;
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export interface FileContent {
|
30 | rawContent: string;
|
31 | imports: string[];
|
32 | versionPragmas: string[];
|
33 | }
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export interface CompilationJob {
|
40 | emitsArtifacts(file: ResolvedFile): boolean;
|
41 | hasSolc9573Bug(): boolean;
|
42 | merge(other: CompilationJob): CompilationJob;
|
43 | getResolvedFiles(): ResolvedFile[];
|
44 | getSolcConfig(): SolcConfig;
|
45 | }
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | export interface DependencyGraph {
|
51 | getConnectedComponents(): DependencyGraph[];
|
52 | getDependencies(file: ResolvedFile): ResolvedFile[];
|
53 | getResolvedFiles(): ResolvedFile[];
|
54 | getTransitiveDependencies(file: ResolvedFile): TransitiveDependency[];
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 | export interface TransitiveDependency {
|
60 | dependency: ResolvedFile;
|
61 | |
62 |
|
63 |
|
64 |
|
65 | path: ResolvedFile[];
|
66 | }
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | export interface CompilationJobsCreationResult {
|
74 | jobs: CompilationJob[];
|
75 | errors: CompilationJobCreationError[];
|
76 | }
|
77 | export interface CompilationJobCreationError {
|
78 | reason: CompilationJobCreationErrorReason;
|
79 | file: ResolvedFile;
|
80 | extra?: any;
|
81 | }
|
82 | export declare enum CompilationJobCreationErrorReason {
|
83 | OTHER_ERROR = "other",
|
84 | NO_COMPATIBLE_SOLC_VERSION_FOUND = "no-compatible-solc-version-found",
|
85 | INCOMPATIBLE_OVERRIDEN_SOLC_VERSION = "incompatible-overriden-solc-version",
|
86 | DIRECTLY_IMPORTS_INCOMPATIBLE_FILE = "directly-imports-incompatible-file",
|
87 | INDIRECTLY_IMPORTS_INCOMPATIBLE_FILE = "indirectly-imports-incompatible-file"
|
88 | }
|
89 | export interface SolcBuild {
|
90 | version: string;
|
91 | longVersion: string;
|
92 | compilerPath: string;
|
93 | isSolcJs: boolean;
|
94 | }
|
95 |
|
\ | No newline at end of file |