This repository has been archived by the owner on Mar 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 565
/
Copy pathtypes.ts
938 lines (833 loc) · 21.5 KB
/
types.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
export interface AnalyzerModule {
name: string,
description: string,
category: ModuleCategory
algorithm: ModuleAlgorithm
version: SupportedVersion
visit: VisitFunction
report: ReportFunction
}
// This version signifies the module support for Solidity version.
// start will be minimum at 0.4.12 as since that version Solidity exports latest AST
// end should be a version in which analysis feature got deprecated.
// This will be helpful in version based analysis in future.
export interface SupportedVersion {
start: string
end?: string
}
export interface ModuleAlgorithm {
hasFalsePositives: boolean,
hasFalseNegatives: boolean,
id: string
}
export interface ModuleCategory {
displayName: string,
id: string
}
export interface ReportObj {
warning: string,
location: string,
more?: string
}
// Regarding location, the source mappings inside the AST use the following notation:
// s:l:f
// Where,
// s is the byte-offset to the start of the range in the source file,
// l is the length of the source range in bytes and
// f is the source index mentioned above.
export interface AnalysisReportObj {
warning: string,
location?: string,
more?: string
error? : string
}
export type AnalysisReport = {
name: string
report: AnalysisReportObj[]
}
export interface CompilationResult {
error?: CompilationError,
/** not present if no errors/warnings were encountered */
errors?: CompilationError[]
/** This contains the file-level outputs. In can be limited/filtered by the outputSelection settings */
sources?: {
[contractName: string]: CompilationSource
}
/** This contains the contract-level outputs. It can be limited/filtered by the outputSelection settings */
contracts: CompiledContractObj /** If the language used has no contract names, this field should equal to an empty string. */
}
export interface CompiledContractObj {
[fileName: string]: {
[contract: string]: CompiledContract
}
}
export type VisitFunction = (node: any) => void
export type ReportFunction = (compilationResult: CompilationResult) => ReportObj[]
export interface ContractHLAst {
node: ContractDefinitionAstNode,
functions: FunctionHLAst[],
relevantNodes: {
referencedDeclaration: number,
node: any
}[],
modifiers: ModifierHLAst[],
inheritsFrom: string[],
stateVariables: VariableDeclarationAstNode[]
}
export interface FunctionHLAst {
node: FunctionDefinitionAstNode,
relevantNodes: any[],
modifierInvocations: ModifierInvocationAstNode[],
localVariables: VariableDeclarationAstNode[],
parameters: string[],
returns: Record<string, string>[]
}
export interface ModifierHLAst {
node: ModifierDefinitionAstNode,
relevantNodes: any[],
localVariables: VariableDeclarationAstNode[],
parameters: string[],
}
export interface Context {
callGraph: Record<string, ContractCallGraph>
currentContract: ContractHLAst
stateVariables: VariableDeclarationAstNode[]
}
export interface FunctionCallGraph {
node: FunctionHLAst
calls: string[]
}
export interface ContractCallGraph {
contract: ContractHLAst
functions: Record<string, FunctionCallGraph>
}
/////////////////////////////////////////////////////////////
///////////// Specfic AST Nodes /////////////////////////////
/////////////////////////////////////////////////////////////
interface TypeDescription {
typeIdentifier: string
typeString: string
}
export interface SourceUnitAstNode {
id: number
nodeType: 'SourceUnit'
src: string
absolutePath: string
exportedSymbols: object
nodes: Array<AstNode>
}
export interface PragmaDirectiveAstNode {
id: number
nodeType: 'PragmaDirective'
src: string
literals?: Array<string>
}
interface SymbolAlias {
foreign: IdentifierAstNode
local: string | null
}
export interface ImportDirectiveAstNode {
id: number
nodeType: 'ImportDirective'
src: string
absolutePath: string
file: string
scope: number
sourceUnit: number
symbolAliases: Array<SymbolAlias>
unitAlias: string
}
export interface ContractDefinitionAstNode {
id: number
nodeType: 'ContractDefinition'
src: string
name: string
documentation: string | null
contractKind: 'interface' | 'contract' | 'library'
abstract: boolean
fullyImplemented: boolean
linearizedBaseContracts: Array<number>
baseContracts: Array<InheritanceSpecifierAstNode>
contractDependencies: Array<number>
nodes: Array<any>
scope: number
}
export interface InheritanceSpecifierAstNode {
id: number
nodeType: 'InheritanceSpecifier'
src: string
baseName: UserDefinedTypeNameAstNode
arguments: LiteralAstNode | null
}
export interface UsingForDirectiveAstNode {
id: number
nodeType: 'UsingForDirective'
src: string
libraryName: UserDefinedTypeNameAstNode
typeName: UserDefinedTypeNameAstNode | ElementaryTypeNameAstNode | null
}
export interface StructDefinitionAstNode {
id: number
nodeType: 'StructDefinition'
src: string
name: string
visibility: string
canonicalName: string
members: Array<VariableDeclarationAstNode>
scope: number
}
export interface EnumDefinitionAstNode {
id: number
nodeType: 'EnumDefinition'
src: string
name: string
canonicalName: string
members: Array<EnumValueAstNode>
}
export interface EnumValueAstNode {
id: number
nodeType: 'EnumValue'
src: string
name: string
}
export interface ParameterListAstNode {
id: number
nodeType: 'ParameterList'
src: string
parameters: Array<VariableDeclarationAstNode>
}
export interface OverrideSpecifierAstNode {
id: number
nodeType: 'OverrideSpecifier'
src: string
overrides: Array<UserDefinedTypeNameAstNode>
}
export interface FunctionDefinitionAstNode {
id: number
nodeType: 'FunctionDefinition'
src: string
name: string
documentation: string | null
kind: string
stateMutability: 'pure' | 'view' | 'nonpayable' | 'payable'
visibility: string
virtual: boolean
overrides: OverrideSpecifierAstNode | null
parameters: ParameterListAstNode
returnParameters: ParameterListAstNode
modifiers: Array<ModifierInvocationAstNode>
body: object | null
implemented: boolean
scope: number
functionSelector?: string
baseFunctions?: Array<number>
}
export interface VariableDeclarationAstNode {
id: number
nodeType: 'VariableDeclaration'
src: string
name: string
typeName: ElementaryTypeNameAstNode | UserDefinedTypeNameAstNode
constant: boolean
stateVariable: boolean
storageLocation: 'storage' | 'memory' | 'calldata' | 'default'
overrides: OverrideSpecifierAstNode | null
visibility: string
value: string | null
scope: number
typeDescriptions: TypeDescription
functionSelector?: string
indexed?: boolean
baseFunctions?: object
}
export interface ModifierDefinitionAstNode {
id: number
nodeType: 'ModifierDefinition'
src: string
name: string
documentation: object | null
visibility: string
parameters: ParameterListAstNode
virtual: boolean
overrides: OverrideSpecifierAstNode | null
body: BlockAstNode
baseModifiers?: Array<number>
}
export interface ModifierInvocationAstNode {
id: number
nodeType: 'ModifierInvocation'
src: string
modifierName: IdentifierAstNode
arguments: Array<LiteralAstNode> | null
}
export interface EventDefinitionAstNode {
id: number
nodeType: 'EventDefinition'
src: string
name: string
documentation: object | null
parameters: ParameterListAstNode
anonymous: boolean
}
export interface ElementaryTypeNameAstNode {
id: number
nodeType: 'ElementaryTypeName'
src: string
name: string
typeDescriptions: TypeDescription
stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable'
}
export interface UserDefinedTypeNameAstNode {
id: number
nodeType: 'UserDefinedTypeName'
src: string
name: string
referencedDeclaration: number
contractScope: number | null
typeDescriptions: TypeDescription
}
export interface FunctionTypeNameAstNode {
id: number
nodeType: 'FunctionTypeName'
src: string
name: string
visibility: string
stateMutability: 'pure' | 'view' | 'nonpayable' | 'payable'
parameterTypes: ParameterListAstNode
returnParameterTypes: ParameterListAstNode
typeDescriptions: TypeDescription
}
export interface MappingAstNode {
id: number
nodeType: 'Mapping'
src: string
keyType: UserDefinedTypeNameAstNode | ElementaryTypeNameAstNode
valueType: UserDefinedTypeNameAstNode | ElementaryTypeNameAstNode
typeDescriptions: TypeDescription
}
export interface ArrayTypeNameAstNode {
id: number
nodeType: 'ArrayTypeName'
src: string
baseType: UserDefinedTypeNameAstNode | ElementaryTypeNameAstNode
length: LiteralAstNode | null
typeDescriptions: TypeDescription
}
interface externalReference {
declaration: number
isOffset: boolean
isSlot: boolean
src: string
valueSize: number
}
export interface InlineAssemblyAstNode {
id: number
nodeType: 'InlineAssembly'
src: string
AST: YulBlockAstNode
externalReferences: Array<externalReference>
evmVersion: string
}
export interface BlockAstNode {
id: number
nodeType: 'Block'
src: string
statements: Array<any>
}
export interface PlaceholderStatementAstNode {
id: number
nodeType: 'PlaceholderStatement'
src: string
}
export interface IfStatementAstNode {
id: number
nodeType: 'IfStatement'
src: string
condition: object
trueBody: BlockAstNode | ExpressionStatementAstNode
falseBody: BlockAstNode | ExpressionStatementAstNode
}
export interface TryCatchClauseAstNode {
id: number
nodeType: 'TryCatchClause'
src: string
errorName: string
parameters: ParameterListAstNode
block: BlockAstNode
}
export interface TryStatementAstNode {
id: number
nodeType: 'TryStatement'
src: string
externalCall: object
clauses: Array<TryCatchClauseAstNode>
}
export interface WhileStatementAstNode {
id: number
nodeType: 'WhileStatement' | 'DoWhileStatement'
src: string
condition: any
body: BlockAstNode | ExpressionStatementAstNode
}
export interface ForStatementAstNode {
id: number
nodeType: 'ForStatement'
src: string
initializationExpression: VariableDeclarationStatementAstNode
condition: any
loopExpression: ExpressionStatementAstNode
body: BlockAstNode | ExpressionStatementAstNode
}
export interface ContinueAstNode {
id: number
nodeType: 'Continue'
src: string
}
export interface BreakAstNode {
id: number
nodeType: 'Break'
src: string
}
export interface ReturnAstNode {
id: number
nodeType: 'Return'
src: string
expression: object | null
functionReturnParameters: number
}
export interface ThrowAstNode {
id: number
nodeType: 'Throw'
src: string
}
export interface EmitStatementAstNode {
id: number
nodeType: 'EmitStatement'
src: string
eventCall: FunctionCallAstNode
}
export interface VariableDeclarationStatementAstNode {
id: number
nodeType: 'VariableDeclarationStatement'
src: string
assignments: Array<number>
declarations: Array<object>
initialValue: object
}
export interface ExpressionStatementAstNode {
id: number
nodeType: 'ExpressionStatement'
src: string
expression: any
}
interface ExpressionAttributes {
typeDescriptions: TypeDescription
isConstant: boolean
isPure: boolean
isLValue: boolean
lValueRequested: boolean
argumentTypes: Array<TypeDescription> | null
}
export interface ConditionalAstNode extends ExpressionAttributes {
id: number
nodeType: 'Conditional'
src: string
condition: object
trueExpression: object
falseExpression: object
}
export interface AssignmentAstNode extends ExpressionAttributes {
id: number
nodeType: 'Assignment'
src: string
operator: string
leftHandSide: any
rightHandSide: object
}
export interface TupleExpressionAstNode extends ExpressionAttributes {
id: number
nodeType: 'TupleExpression'
src: string
isInlineArray: boolean
components: Array<object>
}
export interface UnaryOperationAstNode extends ExpressionAttributes {
id: number
nodeType: 'UnaryOperation'
src: string
prefix: boolean
operator: string
subExpression: any
}
export interface BinaryOperationAstNode extends ExpressionAttributes {
id: number
nodeType: 'BinaryOperation'
src: string
operator: string
leftExpression: object
rightExpression: object
commonType: TypeDescription
}
export interface FunctionCallAstNode extends ExpressionAttributes {
id: number
nodeType: 'FunctionCall'
src: string
expression: any
names: Array<any>
arguments: object
tryCall: boolean
kind: 'functionCall' | 'typeConversion' | 'structConstructorCall'
}
export interface FunctionCallOptionsAstNode extends ExpressionAttributes {
id: number
nodeType: 'FunctionCallOptions'
src: string
expression: object
names: Array<string>
options: Array<object>
}
export interface NewExpressionAstNode extends ExpressionAttributes {
id: number
nodeType: 'NewExpression'
src: string
typeName: UserDefinedTypeNameAstNode | ElementaryTypeNameAstNode
}
export interface MemberAccessAstNode extends ExpressionAttributes {
id: number
nodeType: 'MemberAccess'
src: string
memberName: string
expression: any
referencedDeclaration: number | null
}
export interface IndexAccessAstNode extends ExpressionAttributes {
id: number
nodeType: 'IndexAccess'
src: string
baseExpression: object
indexExpression: object
}
export interface IndexRangeAccessAstNode extends ExpressionAttributes {
id: number
nodeType: 'IndexRangeAccess'
src: string
baseExpression: object
startExpression: object
endExpression: object
}
export interface ElementaryTypeNameExpressionAstNode extends ExpressionAttributes {
id: number
nodeType: 'ElementaryTypeNameExpression'
src: string
typeName: ElementaryTypeNameAstNode
}
export interface LiteralAstNode extends ExpressionAttributes {
id: number
nodeType: 'Literal'
src: string
kind: 'number' | 'string' | 'bool'
value: string
hexValue: string
subdenomination: 'wei' | 'szabo' | 'finney' | 'ether' | null
}
export interface IdentifierAstNode {
id: number
nodeType: 'Identifier'
src: string
name: string
referencedDeclaration: number
overloadedDeclarations: Array<any>
typeDescriptions: TypeDescription
argumentTypes: Array<TypeDescription> | null
}
export interface StructuredDocumentationAstNode {
id: number
nodeType: 'StructuredDocumentation'
src: string
text: string
}
export interface CommonAstNode {
id: number
nodeType: string
src: string
[x: string]: any
}
/////////////////////////////////////////////////////////
///////////// YUL AST Nodes /////////////////////////////
/////////////////////////////////////////////////////////
export interface YulTypedNameAstNode {
name: string
nodeType: 'YulTypedName'
src: string
type: string
}
export interface YulIdentifierAstNode {
name: string
nodeType: 'YulIdentifier'
src: string
}
export interface YulLiteralAstNode {
kind: string
nodeType: 'YulLiteral'
src: string
type: string
value: string
}
export interface YulVariableDeclarationAstNode {
nodeType: 'YulVariableDeclaration'
src: string
value: YulIdentifierAstNode | YulLiteralAstNode
variables: Array<YulTypedNameAstNode>
}
export interface YulBlockAstNode {
nodeType: 'YulBlock'
src: string
statements: Array<YulVariableDeclarationAstNode>
}
export interface CommonYulAstNode {
nodeType: string
src: string
[x: string]: any
}
///////////
// ERROR //
///////////
export interface CompilationError {
/** Location within the source file */
sourceLocation?: {
file: string
start: number
end: number
}
/** Error type */
type?: CompilationErrorType
/** Component where the error originated, such as "general", "ewasm", etc. */
component?: 'general' | 'ewasm' | string
severity?: 'error' | 'warning'
message?: string
mode?: 'panic'
/** the message formatted with source location */
formattedMessage?: string
}
type CompilationErrorType =
| 'JSONError'
| 'IOError'
| 'ParserError'
| 'DocstringParsingError'
| 'SyntaxError'
| 'DeclarationError'
| 'TypeError'
| 'UnimplementedFeatureError'
| 'InternalCompilerError'
| 'Exception'
| 'CompilerError'
| 'FatalError'
| 'Warning'
////////////
// SOURCE //
////////////
export interface CompilationSource {
/** Identifier of the source (used in source maps) */
id: number
/** The AST object */
ast: AstNode
/** The legacy AST object */
legacyAST: AstNodeLegacy
}
/////////
// AST //
/////////
export interface AstNode {
absolutePath?: string
exportedSymbols?: object
id: number
nodeType: string
nodes?: Array<AstNode>
src: string
literals?: Array<string>
file?: string
scope?: number
sourceUnit?: number
symbolAliases?: Array<string>
[x: string]: any
}
export interface AstNodeLegacy {
id: number
name: string
src: string
children?: Array<AstNodeLegacy>
attributes?: AstNodeAtt
}
export interface AstNodeAtt {
operator?: string
string?: null
type?: string
value?: string
constant?: boolean
name?: string
public?: boolean
exportedSymbols?: object
argumentTypes?: null
absolutePath?: string
[x: string]: any
}
//////////////
// CONTRACT //
//////////////
export interface CompiledContract {
/** The Ethereum Contract ABI. If empty, it is represented as an empty array. */
abi: ABIDescription[]
// See the Metadata Output documentation (serialised JSON string)
metadata: string
/** User documentation (natural specification) */
userdoc: UserDocumentation
/** Developer documentation (natural specification) */
devdoc: DeveloperDocumentation
/** Intermediate representation (string) */
ir: string
/** EVM-related outputs */
evm: {
assembly: string
legacyAssembly: {}
/** Bytecode and related details. */
bytecode: BytecodeObject
deployedBytecode: BytecodeObject
/** The list of function hashes */
methodIdentifiers: {
[functionIdentifier: string]: string
}
// Function gas estimates
gasEstimates: {
creation: {
codeDepositCost: string
executionCost: 'infinite' | string
totalCost: 'infinite' | string
}
external: {
[functionIdentifier: string]: string
}
internal: {
[functionIdentifier: string]: 'infinite' | string
}
}
}
/** eWASM related outputs */
ewasm: {
/** S-expressions format */
wast: string
/** Binary format (hex string) */
wasm: string
}
}
/////////
// ABI //
/////////
export type ABIDescription = FunctionDescription | EventDescription
export interface FunctionDescription {
/** Type of the method. default is 'function' */
type?: 'function' | 'constructor' | 'fallback' | 'receive'
/** The name of the function. Constructor and fallback function never have name */
name?: string
/** List of parameters of the method. Fallback function doesn’t have inputs. */
inputs?: ABIParameter[]
/** List of the outputs parameters for the method, if any */
outputs?: ABIParameter[]
/** State mutability of the method */
stateMutability: 'pure' | 'view' | 'nonpayable' | 'payable'
/** true if function accepts Ether, false otherwise. Default is false */
payable?: boolean
/** true if function is either pure or view, false otherwise. Default is false */
constant?: boolean
}
export interface EventDescription {
type: 'event'
name: string
inputs: ABIParameter &
{
/** true if the field is part of the log’s topics, false if it one of the log’s data segment. */
indexed: boolean
}[]
/** true if the event was declared as anonymous. */
anonymous: boolean
}
export interface ABIParameter {
internalType: string
/** The name of the parameter */
name: string
/** The canonical type of the parameter */
type: ABITypeParameter
/** Used for tuple types */
components?: ABIParameter[]
}
export type ABITypeParameter =
| 'uint'
| 'uint[]' // TODO : add <M>
| 'int'
| 'int[]' // TODO : add <M>
| 'address'
| 'address[]'
| 'bool'
| 'bool[]'
| 'fixed'
| 'fixed[]' // TODO : add <M>
| 'ufixed'
| 'ufixed[]' // TODO : add <M>
| 'bytes'
| 'bytes[]' // TODO : add <M>
| 'function'
| 'function[]'
| 'tuple'
| 'tuple[]'
| string // Fallback
///////////////////////////
// NATURAL SPECIFICATION //
///////////////////////////
// Userdoc
export interface UserDocumentation {
methods: UserMethodList
notice: string
}
export type UserMethodList = {
[functionIdentifier: string]: UserMethodDoc
} & {
'constructor'?: string
}
export interface UserMethodDoc {
notice: string
}
// Devdoc
export interface DeveloperDocumentation {
author: string
title: string
details: string
methods: DevMethodList
}
export interface DevMethodList {
[functionIdentifier: string]: DevMethodDoc
}
export interface DevMethodDoc {
author: string
details: string
return: string
params: {
[param: string]: string
}
}
//////////////
// BYTECODE //
//////////////
export interface BytecodeObject {
/** The bytecode as a hex string. */
object: string
/** Opcodes list */
opcodes: string
/** The source mapping as a string. See the source mapping definition. */
sourceMap: string
/** If given, this is an unlinked object. */
linkReferences?: {
[contractName: string]: {
/** Byte offsets into the bytecode. */
[library: string]: { start: number; length: number }[]
}
}
}