diff options
author | Jared Wasinger <j-wasinger@hotmail.com> | 2017-07-07 14:38:14 +0800 |
---|---|---|
committer | Ubuntu <ubuntu@ip-172-31-32-43.us-west-2.compute.internal> | 2017-08-08 04:41:46 +0800 |
commit | 53332daeef413c1a3684cd834cb5757234c8326d (patch) | |
tree | a1352e8fd782c5a6a8e2a323c693a6ab81bf14d8 | |
parent | 6bdff4b01b9bda7264b4208ee12d8b7206191f98 (diff) | |
download | dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar.gz dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar.bz2 dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar.lz dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar.xz dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.tar.zst dexon-tests-53332daeef413c1a3684cd834cb5757234c8326d.zip |
add ECDSA parameters r, s, v. Make sure certain fields are marked as required. Add regex for GasAmount.
-rw-r--r-- | JSONSchema/schema.json | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/JSONSchema/schema.json b/JSONSchema/schema.json index c01e73b47..2b45077cf 100644 --- a/JSONSchema/schema.json +++ b/JSONSchema/schema.json @@ -40,8 +40,7 @@ "pattern":"^0x[0-9a-f]*$" }, "currentGasLimit":{ - "type":"string", - "pattern":"^0x[0-9a-f]*$" + "$ref": "#/definitions/GasAmount" }, "currentNumber":{ "type":"string", @@ -56,6 +55,7 @@ "pattern":"^0x[0-9a-f]*$" } }, + "required": ["currentCoinbase", "currentDifficulty", "currentGasLimit", "currentNumber", "currentTimestamp", "previousHash"], "additionalproperties":false }, "pre":{ @@ -79,7 +79,9 @@ "storage":{ "type":"object" } - } + }, + "required": ["balance", "code", "nonce"], + "additionalproperties": false } }, "additionalProperties":false @@ -114,8 +116,8 @@ "pattern":"^0x[0-9a-f]*$" }, "to":{ - "type":"string", - "pattern":"^0x[0-9a-f]*$" + "type": "string", + "pattern":"^(0x([0-9a-f]*){10})?$" }, "value":{ "type":"array", @@ -123,8 +125,18 @@ "type":"string", "pattern":"^0x[0-9a-f]*$" } + }, + "r": { + "type": "string" + }, + "s": { + "type": "string" + }, + "v": { + "type": "string" } }, + "required": ["data", "gasLimit", "gasPrice", "nonce", "secretKey", "to", "value"], "additionalProperties":false } } @@ -153,16 +165,21 @@ "type": "integer" } }, + "required": ["data", "gas", "value"], "additionalProperties": false } }, + "required": ["hash", "indexes"], "additionalProperties": false } }, - "HexString": { + "Address": { "type": "string", - "pattern":"^0x[0-9a-f]*$" + "pattern":"^(0x[0-9a-f]*)?$" + }, + "GasAmount": { + "type":"string", + "pattern": "(^0x[76543210][0-9a-f]{15}$)|(^0x[0-9a-f]{0,15}$)" } - } } |