diff options
author | cdetrio <cdetrio@gmail.com> | 2017-08-08 07:48:31 +0800 |
---|---|---|
committer | cdetrio <cdetrio@gmail.com> | 2017-08-08 07:54:31 +0800 |
commit | 28ccaf0bbd9d02cb63095da08feedd927021622d (patch) | |
tree | f5c529386406c789daa2af9ff2c4457a217c9196 /JSONSchema/schema.json | |
parent | 4a582cf596bd4d4374e24ef6a7dd352fcd40d87f (diff) | |
download | dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.gz dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.bz2 dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.lz dexon-tests-28ccaf0bbd9d02cb63095da08feedd927021622d.tar.xz 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.json | 15 |
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", |