|
| 1 | +{ |
| 2 | + "title": "Populus configuration file schema", |
| 3 | + "type": "object", |
| 4 | + "version": "3", |
| 5 | + "required": ["version"], |
| 6 | + "properties": { |
| 7 | + "chains": { |
| 8 | + "$ref": "#/definitions/ProjectChainsConfig" |
| 9 | + }, |
| 10 | + "compilation": { |
| 11 | + "$ref": "#/definitions/CompilationConfig" |
| 12 | + }, |
| 13 | + "contracts": { |
| 14 | + "$ref": "#/definitions/ContractsConfig" |
| 15 | + }, |
| 16 | + "packaging": { |
| 17 | + "$ref": "#/definitions/PackagingConfig" |
| 18 | + }, |
| 19 | + "web3": { |
| 20 | + "$ref": "#/definitions/ProjectWeb3Config" |
| 21 | + }, |
| 22 | + "version": { |
| 23 | + "type": "string", |
| 24 | + "enum": ["3"] |
| 25 | + } |
| 26 | + }, |
| 27 | + "definitions": { |
| 28 | + "ChainClassConfig": { |
| 29 | + "title": "Configuration for a chain class", |
| 30 | + "type": "object", |
| 31 | + "required": ["class"], |
| 32 | + "properties": { |
| 33 | + "class": { |
| 34 | + "$ref": "#/definitions/PythonImportPath" |
| 35 | + }, |
| 36 | + "settings": { |
| 37 | + "title": "Additional configuration for the chain class", |
| 38 | + "type": "object" |
| 39 | + } |
| 40 | + } |
| 41 | + }, |
| 42 | + "ChainClassConfig": { |
| 43 | + "title": "Configuration for a chain class", |
| 44 | + "type": "object", |
| 45 | + "required": ["class"], |
| 46 | + "properties": { |
| 47 | + "class": { |
| 48 | + "$ref": "#/definitions/PythonImportPath" |
| 49 | + }, |
| 50 | + "settings": { |
| 51 | + "title": "Additional configuration for the chain class", |
| 52 | + "type": "object" |
| 53 | + } |
| 54 | + } |
| 55 | + }, |
| 56 | + "ChainConfig": { |
| 57 | + "title": "Configuration for a single project chain", |
| 58 | + "type": "object", |
| 59 | + "required": ["chain", "web3", "contracts"], |
| 60 | + "properties": { |
| 61 | + "chain": {"$ref": "#/definitions/ChainClassConfig"}, |
| 62 | + "web3": { |
| 63 | + "anyOf": [ |
| 64 | + {"$ref": "#/definitions/Reference"}, |
| 65 | + {"$ref": "#/definitions/Web3Config"} |
| 66 | + ] |
| 67 | + }, |
| 68 | + "contracts": { |
| 69 | + "title": "Configuration for the contract backends this chain will use", |
| 70 | + "type": "object", |
| 71 | + "required": ["backends"], |
| 72 | + "properties": { |
| 73 | + "backends": { |
| 74 | + "patternProperties": { |
| 75 | + "^[a-zA-Z0-9][-_a-zA-Z0-9]*$": { |
| 76 | + "anyOf": [ |
| 77 | + {"$ref": "#/definitions/Reference"}, |
| 78 | + {"$ref": "#/definitions/ContractBackendConfig"} |
| 79 | + ] |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + }, |
| 87 | + "CompilationConfig": { |
| 88 | + "title": "Configuration for how populus compiles source files", |
| 89 | + "type": "object", |
| 90 | + "properties": { |
| 91 | + "contracts_source_dir": { |
| 92 | + "title": "The root filesystem path under which the projects source files can be found", |
| 93 | + "type": "string" |
| 94 | + }, |
| 95 | + "settings": { |
| 96 | + "anyOf": [ |
| 97 | + {"$ref": "#/definitions/SolcCompilerSettings"} |
| 98 | + ] |
| 99 | + } |
| 100 | + } |
| 101 | + }, |
| 102 | + "ContractBackendConfig": { |
| 103 | + "title": "Configuration for a contract backend", |
| 104 | + "type": "object", |
| 105 | + "required": ["class", "priority"], |
| 106 | + "properties": { |
| 107 | + "class": { |
| 108 | + "$ref": "#/definitions/PythonImportPath" |
| 109 | + }, |
| 110 | + "priority": { |
| 111 | + "title": "The priority of this backend", |
| 112 | + "type": "integer" |
| 113 | + }, |
| 114 | + "settings": { |
| 115 | + "title": "Backend specific settings", |
| 116 | + "type": "object" |
| 117 | + } |
| 118 | + } |
| 119 | + }, |
| 120 | + "ContractsConfig": { |
| 121 | + "title": "Configuration for the contract store", |
| 122 | + "properties": { |
| 123 | + "backends": { |
| 124 | + "title": "The contract backends used by this project", |
| 125 | + "additionalProperties": false, |
| 126 | + "patternProperties": { |
| 127 | + "^[a-zA-Z0-9][-_a-zA-Z0-9]*$": { |
| 128 | + "$ref": "#/definitions/ContractBackendConfig" |
| 129 | + } |
| 130 | + } |
| 131 | + } |
| 132 | + } |
| 133 | + }, |
| 134 | + "EthereumAddress": { |
| 135 | + "title": "An Ethereum address", |
| 136 | + "type": "string", |
| 137 | + "pattern": "^0x[0-9a-fA-F]{40}$" |
| 138 | + }, |
| 139 | + "PackagingConfig": { |
| 140 | + "title": "Configuration for package installation and management", |
| 141 | + "type": "object", |
| 142 | + "properties": { |
| 143 | + "backends": { |
| 144 | + "title": "Global configurations for project backends which can be used by project chains", |
| 145 | + "additionalProperties": false, |
| 146 | + "patternProperties": { |
| 147 | + "^[a-zA-Z0-9][-_a-zA-Z0-9]*$": { |
| 148 | + "$ref": "#/definitions/PackageBackendConfig" |
| 149 | + } |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + }, |
| 154 | + "PackageBackendConfig": { |
| 155 | + "title": "Configuration for a package backend", |
| 156 | + "type": "object", |
| 157 | + "properties": { |
| 158 | + "class": { |
| 159 | + "$ref": "#/definitions/PythonImportPath" |
| 160 | + }, |
| 161 | + "priority": { |
| 162 | + "title": "The priority of this backend", |
| 163 | + "type": "integer" |
| 164 | + }, |
| 165 | + "settings": { |
| 166 | + "title": "Backend specific settings", |
| 167 | + "type": "object" |
| 168 | + } |
| 169 | + } |
| 170 | + }, |
| 171 | + "ProjectChainsConfig": { |
| 172 | + "title": "The configuration for each chain declared by this project", |
| 173 | + "type": "object", |
| 174 | + "additionalProperties": false, |
| 175 | + "patternProperties": { |
| 176 | + "^[a-zA-Z0-9][-_a-zA-Z0-9]*$": { |
| 177 | + "$ref": "#/definitions/ChainConfig" |
| 178 | + } |
| 179 | + } |
| 180 | + }, |
| 181 | + "ProjectWeb3Config": { |
| 182 | + "title": "Project level web3 configurations", |
| 183 | + "type": "object", |
| 184 | + "additionalProperties": false, |
| 185 | + "patternProperties": { |
| 186 | + "^[a-zA-Z0-9][-_a-zA-Z0-9]*$": { |
| 187 | + "$ref": "#/definitions/Web3Config" |
| 188 | + } |
| 189 | + } |
| 190 | + }, |
| 191 | + "PythonImportPath": { |
| 192 | + "title": "The string representation of an import path for a python module or object", |
| 193 | + "type": "string", |
| 194 | + "pattern": "^[a-zA-Z][_a-zA-Z0-9]*(?:\\.[a-zA-Z][_a-zA-Z0-9]*)*$" |
| 195 | + }, |
| 196 | + "Reference": { |
| 197 | + "title": "A reference to another section in the configuration file", |
| 198 | + "type": "object", |
| 199 | + "additionalProperties": false, |
| 200 | + "properties": { |
| 201 | + "$ref": { |
| 202 | + "title": "Dotted path from the root of the config file to the referenced configuration", |
| 203 | + "type": "string", |
| 204 | + "pattern": "^[a-zA-Z][_a-zA-Z0-9]*(?:\\.[a-zA-Z][_a-zA-Z0-9]*)*$" |
| 205 | + } |
| 206 | + } |
| 207 | + }, |
| 208 | + "SolcCompilerSettings": { |
| 209 | + "title": "Settings for the solc command line compiler", |
| 210 | + "type": "object", |
| 211 | + "properties": { |
| 212 | + "optimize": { |
| 213 | + "type": "boolean" |
| 214 | + }, |
| 215 | + "output_values": { |
| 216 | + "title": "Determines which compiler values will be output by the solc compiler", |
| 217 | + "type": "array", |
| 218 | + "items": { |
| 219 | + "type": "string" |
| 220 | + } |
| 221 | + } |
| 222 | + } |
| 223 | + }, |
| 224 | + "Web3Config": { |
| 225 | + "title": "Configuration for a web instance", |
| 226 | + "type": "object", |
| 227 | + "properties": { |
| 228 | + "provider": { |
| 229 | + "$ref": "#/definitions/ProviderConfig" |
| 230 | + }, |
| 231 | + "eth": { |
| 232 | + "$ref": "#/definitions/Web3EthConfig" |
| 233 | + } |
| 234 | + } |
| 235 | + }, |
| 236 | + "ProviderConfig": { |
| 237 | + "title": "Configuration for the provider of a web3 instance", |
| 238 | + "type": "object", |
| 239 | + "required": ["class"], |
| 240 | + "properties": { |
| 241 | + "class": { |
| 242 | + "$ref": "#/definitions/PythonImportPath" |
| 243 | + }, |
| 244 | + "settings": { |
| 245 | + "title": "Provider specific settings", |
| 246 | + "type": "object" |
| 247 | + } |
| 248 | + } |
| 249 | + }, |
| 250 | + "Web3EthConfig": { |
| 251 | + "title": "Configuration for the eth module of a web3 instance", |
| 252 | + "type": "object", |
| 253 | + "properties": { |
| 254 | + "default_account": { |
| 255 | + "$ref": "#/definitions/EthereumAddress" |
| 256 | + } |
| 257 | + } |
| 258 | + } |
| 259 | + } |
| 260 | +} |
0 commit comments