-
Notifications
You must be signed in to change notification settings - Fork 30
/
release-lockfile.spec.json
279 lines (279 loc) · 7.37 KB
/
release-lockfile.spec.json
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
{
"title": "Release Lock File Specification",
"type": "object",
"required": [
"lockfile_version",
"package_name",
"version"
],
"version": "1",
"additionalProperties": false,
"properties": {
"lockfile_version": {
"type": "string",
"title": "Lock File Version",
"default": "1",
"enum": ["1"]
},
"package_name": {
"title": "The name of the package that this release is for",
"type": "string",
"pattern": "^[a-z][-a-z0-9]{0,213}$"
},
"meta": {
"$ref": "#/definitions/PackageMeta"
},
"version": {
"title": "Version",
"type": "string"
},
"sources": {
"title": "Sources",
"type": "object",
"patternProperties": {
"\\.\\/.*": {
"anyOf": [
{
"title": "Source code",
"type": "string"
},
{
"$ref": "IPFS-URI"
}
]
}
}
},
"contract_types": {
"title": "The contract types included in this release",
"type": "object",
"patternProperties": {
"[a-zA-Z][-a-zA-Z0-9_]*(?:\\[[-a-zA-Z0-9]{1,256}\\])$": {
"$ref": "#/definitions/ContractType"
}
}
},
"deployments": {
"title": "The deployed contract instances in this release",
"type": "object",
"patternProperties": {
"^blockchain\\://[0-9a-zA-Z]{64}/block/[0-9a-zA-Z]{64}$": {
"type": "object",
"patternProperties": {
"^[a-zA-Z][a-zA-Z0-9_]*$": {
"$ref": "#/definitions/ContractInstance"
}
}
}
}
},
"build_dependencies": {
"title": "Build Dependencies",
"type": "object",
"patternProperties": {
"^[a-z][-a-z0-9]{0,213}$": {
"$ref": "#/definitions/IPFS-URI"
}
}
}
},
"definitions": {
"PackageMeta": {
"title": "Metadata about the package",
"type": "object",
"properties": {
"authors": {
"title": "Package authors",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"title": "The license that this package and it's source are released under",
"type": "string"
},
"description": {
"title": "Description of this package",
"type": "string"
},
"keywords": {
"title": "Keywords that apply to this package",
"type": "array",
"items": {
"type": "string"
}
},
"links": {
"title": "URIs for resources related to this package",
"type": "object",
"additionalProperties": {
"type": "string",
"format": "URI"
}
}
}
},
"ContractType": {
"title": "Data for a contract type included in this package",
"type": "object",
"properties":{
"contract_name": {
"title": "The name for this contract type as found in the project source code.",
"type": "string",
"pattern": "[a-zA-Z][a-zA-Z0-9_]*"
},
"bytecode": {
"title": "The unlinked '0x' prefixed bytecode for this contract type",
"type": "string"
},
"runtime_bytecode": {
"title": "The unlinked '0x' prefixed runtime portion of the bytecode for this contract type",
"type": "string"
},
"abi": {
"title": "The ABI for this contract type",
"type": "array"
},
"natspec": {
"title": "The combined user-doc and dev-doc for this contract",
"type": "object"
},
"compiler": {
"$ref": "#/definitions/CompilerInformation"
}
}
},
"ContractInstance": {
"title": "Data for a deployed instance of a contract",
"type": "object",
"required": [
"contract_type"
],
"properties": {
"contract_type": {
"title": "The contract type of this contract instance",
"type": "string",
"pattern": "^(?:[a-z][-a-z0-9]{0,213}\\:)?[a-zA-Z][-a-zA-Z0-9_]*(?:\\[[-a-zA-Z0-9]{1,256}\\])?$"
},
"address": {
"$ref": "#/definitions/Address"
},
"transaction": {
"$ref": "#/definitions/TransactionHash"
},
"block": {
"$ref": "#/definitions/BlockHash"
},
"runtime_bytecode": {
"title": "The on-chain bytecode for this contract instance.",
"type": "string"
},
"compiler": {
"$ref": "#/definitions/CompilerInformation"
},
"link_dependencies": {
"title": "The values for the link references found within this contract instances runtime bytecode",
"type": "array",
"items": {
"$ref": "#/definitions/LinkValue"
}
}
}
},
"LinkValue": {
"title": "A value for an individual link reference in a contract's bytecode",
"type": "object",
"required": [
"offset",
"value"
],
"properties": {
"offset": {
"type": "integer",
"minimum": 0
},
"value": {
"title": "The value for the link reference",
"type": "string",
"anyOf": [
{"$ref": "#/definitions/Address"},
{"$ref": "#/definitions/ContractInstanceName"},
{"$ref": "#/definitions/PackageContractInstanceName"}
]
}
}
},
"ContractInstanceName": {
"title": "The name of the deployed contract instance",
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
},
"PackageContractInstanceName": {
"title": "The name of the deployed contract instance in a package",
"type": "string",
"pattern": "^[a-z][-a-z0-9]{0,213}\\:[a-zA-Z][a-zA-Z0-9_]*$"
},
"CompilerInformation": {
"title": "Information about the software that was used to compile a contract type or instance",
"type": "object",
"required": [
"type",
"version"
],
"properties": {
"type": {
"title": "The name of the compiler",
"enum": [
"solc",
"solcjs"
]
},
"version": {
"title": "The version string for the compiler",
"type": "string"
},
"settings": {
"title": "The settings used for compilation",
"anyOf": [
{"$ref": "solc_Settings"}
]
}
}
},
"solc_Settings": {
"title": "Settings for use with the solc or solcjs compiler",
"type": "object",
"properties": {
"optimize": {
"type": "boolean"
},
"optimize_runs": {
"type": "integer",
"minimum": 1
}
}
},
"Address": {
"title": "An Ethereum address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"TransactionHash": {
"title": "An Ethereum transaction hash",
"type": "string",
"pattern": "^0x[0-9a-zA-Z]{64}$"
},
"BlockHash": {
"title": "An Ethereum block hash",
"type": "string",
"pattern": "^0x[0-9a-zA-Z]{64}$"
},
"IPFS-URI": {
"title": "An IPFS URI",
"type": "string",
"format": "uri",
"pattern": "^ipfs:/?/?.*$"
}
}
}