This repository has been archived by the owner on Jun 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
contract-object.spec.json
123 lines (114 loc) · 2.98 KB
/
contract-object.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
{
"id": "contract-object.spec.json",
"$schema": "http://json-schema.org/schema#",
"title": "Contract Object",
"description": "Describes a contract consumable by Truffle, possibly including deployed instances on networks",
"type": "object",
"properties": {
"contractName": {
"allOf": [
{ "$ref": "#/definitions/ContractName" },
{
"description": "Name used to identify the contract",
"default": "Contract"
}
]
},
"abi": {
"allOf": [
{ "$ref": "abi.spec.json#" },
{ "description": "Interface description returned by compiler for source" }
]
},
"bytecode": {
"allOf": [
{ "$ref": "#/definitions/Bytecode" },
{ "description": "Bytecode sent as contract-creation transaction data, with unresolved link references" }
]
},
"deployedBytecode": {
"allOf": [
{ "$ref": "#/definitions/Bytecode" },
{ "description": "On-chain deployed contract bytecode, with unresolved link references" }
]
},
"sourceMap": {
"allOf": [
{ "$ref": "#/definitions/SourceMap" },
{ "description": "Source mapping for contract-creation transaction data bytecode" }
]
},
"deployedSourceMap": {
"allOf": [
{ "$ref": "#/definitions/SourceMap" },
{ "description": "Source mapping for contract bytecode" }
]
},
"source": { "$ref": "#/definitions/Source" },
"sourcePath": { "$ref": "#/definitions/SourcePath" },
"ast": { "$ref": "#/definitions/AST" },
"legacyAST": { "$ref": "#/definitions/LegacyAST" },
"compiler": {
"type": "object",
"properties": {
"name": {"type": "string"},
"version": {"type": "string"}
}
},
"networks": {
"patternProperties": {
"^[a-zA-Z0-9]+$": { "$ref": "network-object.spec.json#" }
},
"additionalProperties": false
},
"schemaVersion": { "$ref": "#/definitions/SchemaVersion" },
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"abi"
],
"patternProperties": {
"^x-": { "anyOf": [
{ "type": "string" },
{ "type": "number" },
{ "type": "object" },
{ "type": "array" }
]}
},
"additionalProperties": false,
"definitions": {
"ContractName": {
"type": "string",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
},
"Bytecode": {
"type": "string",
"pattern": "^0x0$|^0x([a-fA-F0-9]{2}|__.{38})+$"
},
"Source": {
"type": "string"
},
"SourceMap": {
"type": "string",
"examples": [
"315:637:1:-;;;452:55;;;;;;;-1:-1:-1;;;;;485:9:1;476:19;:8;:19;;;;;;;;;;498:5;476:27;;452:55;315:637;;;;;;;"
]
},
"SourcePath": {
"type": "string"
},
"AST": {
"type": "object"
},
"LegacyAST": {
"type": "object"
},
"SchemaVersion": {
"type": "string",
"pattern": "[0-9]+\\.[0-9]+\\.[0-9]+"
}
}
}