File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,13 @@ explanatory purposes.
124
124
" version" : 1 // NatSpec version
125
125
}
126
126
},
127
- // Required: Compiler settings. Reflects the settings in the JSON input during compilation.
128
- // Check the documentation of standard JSON input's "settings" field
127
+ // Required: Compiler settings.
128
+ // Reflects the settings in the JSON input during compilation, except the
129
+ // "compilationTarget" and the "libraries" fields. Check each field for details.
130
+ // See the standard JSON input's "settings" docs for the rest.
129
131
" settings" : {
130
132
// Required for Solidity: File path and the name of the contract or library this
131
- // metadata is created for.
133
+ // metadata is created for. Not a valid field in the standard JSON input settings.
132
134
" compilationTarget" : {
133
135
" myDirectory/myFile.sol" : " MyContract"
134
136
},
@@ -137,8 +139,11 @@ explanatory purposes.
137
139
// Optional: Only present if not null.
138
140
" eofVersion" : 1 ,
139
141
// Required for Solidity: Addresses for libraries used.
142
+ // Note that metadata has a different format for "libraries" field than the standard JSON input.
143
+ // metadata format = { "MyLib.sol:MyLib": "0x123123..." }
144
+ // standard JSON input format = { "MyLib.sol": { "MyLib": "0x123123..." } }
140
145
" libraries" : {
141
- " MyLib" : " 0x123123..."
146
+ " MyLib.sol:MyLib " : " 0x123123..."
142
147
},
143
148
" metadata" : {
144
149
// Reflects the setting used in the input json, defaults to "true"
You can’t perform that action at this time.
0 commit comments