1 |
|
2 | export interface SrcIfc {
|
3 | [key: string]: {
|
4 | content: string;
|
5 | };
|
6 | }
|
7 |
|
8 | export interface FinalResult {
|
9 | totalPassing: number;
|
10 | totalFailing: number;
|
11 | totalTime: number;
|
12 | errors: any[];
|
13 | }
|
14 |
|
15 | export interface RunListInterface {
|
16 | name: string;
|
17 | type: string;
|
18 | constant: boolean;
|
19 | payable: boolean;
|
20 | signature?: any;
|
21 | }
|
22 | export interface ResultsInterface {
|
23 | passingNum: number;
|
24 | failureNum: number;
|
25 | timePassed: number;
|
26 | }
|
27 | export interface TestResultInterface {
|
28 | type: string;
|
29 | value: any;
|
30 | time?: number;
|
31 | context?: string;
|
32 | errMsg?: string;
|
33 | filename?: string;
|
34 | }
|
35 | export interface TestCbInterface {
|
36 | (error: Error | null | undefined, result: TestResultInterface): void;
|
37 | }
|
38 | export interface ResultCbInterface {
|
39 | (error: Error | null | undefined, result: ResultsInterface): void;
|
40 | }
|
41 | export interface Options {
|
42 | accounts?: string[] | null;
|
43 | web3?: any;
|
44 | }
|
45 | export interface CompilerConfiguration {
|
46 | currentCompilerUrl: string;
|
47 | evmVersion: string;
|
48 | optimize: boolean;
|
49 | usingWorker: boolean;
|
50 | }
|
51 |
|
52 | export interface CompilationSource {
|
53 |
|
54 | id: number;
|
55 |
|
56 | ast: AstNode;
|
57 |
|
58 | legacyAST: AstNodeLegacy;
|
59 | }
|
60 | export interface AstNodeLegacy {
|
61 | id: number;
|
62 | name: string;
|
63 | src: string;
|
64 | children?: Array<AstNodeLegacy>;
|
65 | attributes?: AstNodeAtt;
|
66 | }
|
67 | export interface AstNodeAtt {
|
68 | operator?: string;
|
69 | string?: null;
|
70 | type?: string;
|
71 | value?: string;
|
72 | constant?: boolean;
|
73 | name?: string;
|
74 | public?: boolean;
|
75 | exportedSymbols?: Object;
|
76 | argumentTypes?: null;
|
77 | absolutePath?: string;
|
78 | [x: string]: any;
|
79 | }
|
80 | export interface AstNode {
|
81 | absolutePath?: string;
|
82 | exportedSymbols?: Object;
|
83 | id: number;
|
84 | nodeType: string;
|
85 | nodes?: Array<AstNode>;
|
86 | src: string;
|
87 | literals?: Array<string>;
|
88 | file?: string;
|
89 | scope?: number;
|
90 | sourceUnit?: number;
|
91 | symbolAliases?: Array<string>;
|
92 | [x: string]: any;
|
93 | }
|
94 | export interface compilationInterface {
|
95 | [fileName: string]: {
|
96 | [contract: string]: CompiledContract;
|
97 | };
|
98 | }
|
99 | export interface ASTInterface {
|
100 | [contractName: string]: CompilationSource;
|
101 | }
|
102 | export interface CompiledContract {
|
103 |
|
104 | abi: ABIDescription[];
|
105 | metadata: string;
|
106 |
|
107 | userdoc: UserDocumentation;
|
108 |
|
109 | devdoc: DeveloperDocumentation;
|
110 |
|
111 | ir: string;
|
112 |
|
113 | evm: {
|
114 | assembly: string;
|
115 | legacyAssembly: {};
|
116 |
|
117 | bytecode: BytecodeObject;
|
118 | deployedBytecode: BytecodeObject;
|
119 |
|
120 | methodIdentifiers: {
|
121 | [functionIdentifier: string]: string;
|
122 | };
|
123 | gasEstimates: {
|
124 | creation: {
|
125 | codeDepositCost: string;
|
126 | executionCost: 'infinite' | string;
|
127 | totalCost: 'infinite' | string;
|
128 | };
|
129 | external: {
|
130 | [functionIdentifier: string]: string;
|
131 | };
|
132 | internal: {
|
133 | [functionIdentifier: string]: 'infinite' | string;
|
134 | };
|
135 | };
|
136 | };
|
137 | }
|
138 | export declare type ABIDescription = FunctionDescription | EventDescription;
|
139 | export interface FunctionDescription {
|
140 |
|
141 | type?: 'function' | 'constructor' | 'fallback' | 'receive';
|
142 |
|
143 | name?: string;
|
144 |
|
145 | inputs?: ABIParameter[];
|
146 |
|
147 | outputs?: ABIParameter[];
|
148 |
|
149 | stateMutability: 'pure' | 'view' | 'nonpayable' | 'payable';
|
150 |
|
151 | payable?: boolean;
|
152 |
|
153 | constant?: boolean;
|
154 | signature?: string;
|
155 | }
|
156 | export interface EventDescription {
|
157 | type: 'event';
|
158 | name: string;
|
159 | inputs: ABIParameter & {
|
160 |
|
161 | indexed: boolean;
|
162 | }[];
|
163 |
|
164 | anonymous: boolean;
|
165 | }
|
166 | export interface ABIParameter {
|
167 |
|
168 | name: string;
|
169 |
|
170 | type: ABITypeParameter;
|
171 |
|
172 | components?: ABIParameter[];
|
173 | }
|
174 | export declare type ABITypeParameter = 'uint' | 'uint[]' | 'int' | 'int[]' | 'address' | 'address[]' | 'bool' | 'bool[]' | 'fixed' | 'fixed[]' | 'ufixed' | 'ufixed[]' | 'bytes' | 'bytes[]' | 'function' | 'function[]' | 'tuple' | 'tuple[]' | string;
|
175 | export interface UserDocumentation {
|
176 | methods: UserMethodList;
|
177 | notice: string;
|
178 | }
|
179 | export declare type UserMethodList = {
|
180 | [functionIdentifier: string]: UserMethodDoc;
|
181 | } & {
|
182 | 'constructor'?: string;
|
183 | };
|
184 | export interface UserMethodDoc {
|
185 | notice: string;
|
186 | }
|
187 | export interface DeveloperDocumentation {
|
188 | author: string;
|
189 | title: string;
|
190 | details: string;
|
191 | methods: DevMethodList;
|
192 | }
|
193 | export interface DevMethodList {
|
194 | [functionIdentifier: string]: DevMethodDoc;
|
195 | }
|
196 | export interface DevMethodDoc {
|
197 | author: string;
|
198 | details: string;
|
199 | return: string;
|
200 | params: {
|
201 | [param: string]: string;
|
202 | };
|
203 | }
|
204 | export interface BytecodeObject {
|
205 |
|
206 | object: string;
|
207 |
|
208 | opcodes: string;
|
209 |
|
210 | sourceMap: string;
|
211 |
|
212 | linkReferences?: {
|
213 | [contractName: string]: {
|
214 |
|
215 | [library: string]: {
|
216 | start: number;
|
217 | length: number;
|
218 | }[];
|
219 | };
|
220 | };
|
221 | }
|