aboutsummaryrefslogtreecommitdiffstats
path: root/JSONSchema/schema.json
diff options
context:
space:
mode:
authorcdetrio <cdetrio@gmail.com>2017-08-08 07:48:31 +0800
committercdetrio <cdetrio@gmail.com>2017-08-08 07:54:31 +0800
commit28ccaf0bbd9d02cb63095da08feedd927021622d (patch)
treef5c529386406c789daa2af9ff2c4457a217c9196 /JSONSchema/schema.json
parent4a582cf596bd4d4374e24ef6a7dd352fcd40d87f (diff)
downloaddexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.gz
dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.zst
dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.zip
add storage and code restrictions to json schema
Diffstat (limited to 'JSONSchema/schema.json')
-rw-r--r--JSONSchema/schema.json15
1 files changed, 13 insertions, 2 deletions
diff --git a/JSONSchema/schema.json b/JSONSchema/schema.json
index ef08eef1b..7b1536dae 100644
--- a/JSONSchema/schema.json
+++ b/JSONSchema/schema.json
@@ -5,10 +5,12 @@
"pattern": "^$"
},
"HexData": {
+ "description": "Hex data. see https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding",
"pattern": "^0x([0-9a-fA-F][0-9a-fA-F])*$",
"type": "string"
},
"HexQuantity": {
+ "description": "Hex quantity. see https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding",
"pattern": "(^0x0$)|(^0x[1-9a-fA-F][0-9a-fA-F]*$)",
"type": "string"
},
@@ -91,9 +93,18 @@
"additionalproperties": true,
"properties": {
"balance": { "$ref": "#/definitions/ConfusedHexType" },
- "code": { "type": "string" },
+ "code": { "$ref": "#/definitions/HexMaybePrefixOrEmpty" },
"nonce": { "$ref": "#/definitions/ConfusedHexType" },
- "storage": { "type": "object" }
+ "storage": {
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]+": {
+ "description": "storage key with 0x. data is HexData",
+ "$ref": "#/definitions/HexData"
+ }
+ }
+ }
},
"required": [
"balance",