-
Notifications
You must be signed in to change notification settings - Fork 0
/
solc-fast.d.ts
101 lines (96 loc) · 2.53 KB
/
solc-fast.d.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
declare module 'solc-fast' {
type SoliditySourceFile = {
keccak256?: string
} & ({ urls: string[] } | { content: string })
export interface SolidityStandardJsonInput {
language: 'Solidity' | 'Yul'
sources: {
[fileName: string]: SoliditySourceFile
}
settings?: {
stopAfter?: 'parsing'
remappings?: string[]
optimizer?: {
enabled: boolean
runs: number
details?: any
}
evmVersion?:
| 'homestead'
| 'tangerineWhistle'
| 'spuriousDragon'
| 'byzantium'
| 'constantinople'
| 'petersburg'
| 'istanbul'
| 'berlin'
viaIR?: boolean
debug?: {
revertStrings?: 'default' | 'strip' | 'debug' | 'verboseDebug'
debugInfo?: ['location' | 'snippet' | '*']
}
metadata?: {
useLiteralContent?: boolean
bytecodeHash?: 'none' | 'ipfs' | 'bzzr1'
}
libraries?: {
[libraryName: string]: { [contractName: string]: string }
}
outputSelection?: Record<string, any>
modelChecker?: any
}
}
interface SourceLocation {
file: string
start: number
end: number
}
interface Bytecode {
functionDebugData: Record<string, any>
object: string
opcodes: string
sourceMap: string
generatedSources: Record<string, any>
linkReferences?: Record<string, any>
}
export interface SolidityStandardJsonOutput {
errors?: {
sourceLocation?: SourceLocation
secondarySourceLocations?: SourceLocation[]
type: string
component: string
message: string
severity: 'error' | 'warning' | 'info'
errorCode?: string
formattedMessage?: string
}[]
sources: { [fileName: string]: { id: string; ast: Record<string, any> } }
contracts: {
[fileName: string]: {
[contractName: string]: {
abi: any[]
evm: {
assembly: string
legacyAssembly: any
bytecode: Bytecode
deployedBytecode: Bytecode & {
immutableReferences?: Record<string, any>
}
methodIdentifiers: Record<string, string>
gasEstimates: {
creation: Record<string, string>
external: Record<string, string>
internal: Record<string, string>
}
}
metadata: any
userdoc: any
devdoc: any
}
}
}
}
export function compile(
input: SolidityStandardJsonInput
): Promise<SolidityStandardJsonOutput>
}