-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathoutput.go
69 lines (59 loc) · 2.44 KB
/
output.go
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
package solc
import (
"encoding/json"
)
type Output struct {
Errors []Error `json:"errors,omitempty"`
Sources map[string]SourceOut `json:"sources,omitempty"`
Contracts map[string]map[string]Contract `json:"contracts,omitempty"`
}
type Error struct {
SourceLocation SourceLocation `json:"sourceLocation,omitempty"`
Type string `json:"type,omitempty"`
Component string `json:"component,omitempty"`
Severity string `json:"severity,omitempty"`
Message string `json:"message,omitempty"`
FormattedMessage string `json:"formattedMessage,omitempty"`
}
type SourceLocation struct {
File string `json:"file,omitempty"`
Start int `json:"start,omitempty"`
End int `json:"end,omitempty"`
}
type SourceOut struct {
ID int `json:"id,omitempty"`
AST json.RawMessage `json:"ast,omitempty"`
LegacyAST json.RawMessage `json:"legacyAST,omitempty"`
}
type Contract struct {
ABI []json.RawMessage `json:"abi,omitempty"`
Metadata string `json:"metadata,omitempty"`
UserDoc json.RawMessage `json:"userdoc,omitempty"`
DevDoc json.RawMessage `json:"devdoc,omitempty"`
IR string `json:"ir,omitempty"`
// StorageLayout StorageLayout `json:"storageLayout,omitempty"`
EVM EVM `json:"evm,omitempty"`
EWASM EWASM `json:"ewasm,omitempty"`
}
type EVM struct {
Assembly string `json:"assembly,omitempty"`
LegacyAssembly json.RawMessage `json:"legacyAssembly,omitempty"`
Bytecode Bytecode `json:"bytecode,omitempty"`
DeployedBytecode Bytecode `json:"deployedBytecode,omitempty"`
MethodIdentifiers map[string]string `json:"methodIdentifiers,omitempty"`
GasEstimates map[string]map[string]string `json:"gasEstimates,omitempty"`
}
type Bytecode struct {
Object string `json:"object,omitempty"`
Opcodes string `json:"opcodes,omitempty"`
SourceMap string `json:"sourceMap,omitempty"`
LinkReferences map[string]map[string][]LinkReference `json:"linkReferences,omitempty"`
}
type LinkReference struct {
Start int `json:"start,omitempty"`
End int `json:"end,omitempty"`
}
type EWASM struct {
Wast string `json:"wast,omitempty"`
Wasm string `json:"wasm,omitempty"`
}