aboutsummaryrefslogtreecommitdiffstats
path: root/JSONSchema/st-schema.json
diff options
context:
space:
mode:
authorEverett Hildenbrandt <hildenb2@illinois.edu>2018-05-29 21:39:39 +0800
committerEverett Hildenbrandt <hildenb2@illinois.edu>2018-05-31 22:37:30 +0800
commit61d5603b69909282188f6e11616ea7d82f6569e0 (patch)
tree11fdf8bb81cbf87c8b5ae5ac41b993d055a03cf1 /JSONSchema/st-schema.json
parent6ea80ef71b8d2975cdc840c3fe2c10979de8e4d4 (diff)
downloaddexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.gz
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.bz2
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.lz
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.xz
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.tar.zst
dexon-tests-61d5603b69909282188f6e11616ea7d82f6569e0.zip
JSONSchema/*.json: sort/organize and standardize spacing
Diffstat (limited to 'JSONSchema/st-schema.json')
-rw-r--r--JSONSchema/st-schema.json215
1 files changed, 137 insertions, 78 deletions
diff --git a/JSONSchema/st-schema.json b/JSONSchema/st-schema.json
index 44411ae71..0aae8fcf2 100644
--- a/JSONSchema/st-schema.json
+++ b/JSONSchema/st-schema.json
@@ -1,66 +1,47 @@
{
"definitions": {
- "PreStateAccount": {
- "type": "object",
- "additionalproperties": true,
- "properties": {
- "balance": { "$ref": "#/definitions/ConfusedHexType" },
- "code": { "$ref": "#/definitions/HexMaybePrefixOrEmpty" },
- "nonce": { "$ref": "#/definitions/ConfusedHexType" },
- "storage": {
- "type": "object",
- "additionalProperties": false,
- "patternProperties": {
- "^0x[0-9a-f]+": {
- "description": "storage key with 0x. data is HexData",
- "$ref": "#/definitions/HexData"
- }
- }
- }
- },
- "required": [
- "balance",
- "code",
- "nonce"
- ]
- },
- "TxSigR": {
- "oneOf": [
- { "enum" : [ "0x00" ] }
- ]
- },
- "TxSigS": {
- "oneOf": [
- { "enum" : [ "0x00" ] }
- ]
- },
- "TxSigV": {
- "description": "a value of 0 is an invalid chainId, but used in a test case",
- "oneOf": [
- { "enum" : [ "0x00", "0x01" ] }
- ]
- },
- "Transaction": {
- "type": "object",
+ "NullSenderTransaction": {
"additionalProperties": true,
"not": {
- "required": ["r, s, v"]
+ "required": [
+ "secretKey"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/HexDataOrEmpty" },
+ "items": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "secretKey": { "$ref": "#/definitions/HexMaybePrefix" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "r": {
+ "$ref": "#/definitions/TxSigR"
+ },
+ "s": {
+ "$ref": "#/definitions/TxSigS"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "v": {
+ "$ref": "#/definitions/TxSigV"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -69,34 +50,80 @@
"gasLimit",
"gasPrice",
"nonce",
- "secretKey",
+ "r",
+ "s",
+ "v",
"to",
"value"
- ]
+ ],
+ "type": "object"
},
- "NullSenderTransaction": {
- "type": "object",
+ "PreStateAccount": {
+ "additionalproperties": true,
+ "properties": {
+ "balance": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "code": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "nonce": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "storage": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]+": {
+ "$ref": "#/definitions/HexData",
+ "description": "storage key with 0x. data is HexData"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": [
+ "balance",
+ "code",
+ "nonce"
+ ],
+ "type": "object"
+ },
+ "Transaction": {
"additionalProperties": true,
"not": {
- "required": ["secretKey"]
+ "required": [
+ "r, s, v"
+ ]
},
"properties": {
"data": {
- "items": { "$ref": "#/definitions/HexMaybePrefixOrEmpty" },
+ "items": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
"type": "array"
},
"gasLimit": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
},
- "gasPrice": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "nonce": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
- "r": { "$ref": "#/definitions/TxSigR" },
- "s": { "$ref": "#/definitions/TxSigS" },
- "to": { "$ref": "#/definitions/AddressMaybePrefixOrEmpty"},
- "v": { "$ref": "#/definitions/TxSigV" },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "nonce": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "secretKey": {
+ "$ref": "#/definitions/HexMaybePrefix"
+ },
+ "to": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
"value": {
- "items": { "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" },
+ "items": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
"type": "array"
}
},
@@ -105,11 +132,39 @@
"gasLimit",
"gasPrice",
"nonce",
- "r",
- "s",
- "v",
+ "secretKey",
"to",
"value"
+ ],
+ "type": "object"
+ },
+ "TxSigR": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigS": {
+ "oneOf": [
+ {
+ "enum": [
+ "0x00"
+ ]
+ }
+ ]
+ },
+ "TxSigV": {
+ "description": "a value of 0 is an invalid chainId, but used in a test case",
+ "oneOf": [
+ {
+ "enum": [
+ "0x00",
+ "0x01"
+ ]
+ }
]
}
},
@@ -154,22 +209,22 @@
"post": {
"additionalProperties": false,
"properties": {
- "EIP150": {
+ "Byzantium": {
"$ref": "#/definitions/TransactionResults"
},
- "EIP158": {
+ "Constantinople": {
"$ref": "#/definitions/TransactionResults"
},
- "Frontier": {
+ "EIP150": {
"$ref": "#/definitions/TransactionResults"
},
- "Homestead": {
+ "EIP158": {
"$ref": "#/definitions/TransactionResults"
},
- "Byzantium": {
+ "Frontier": {
"$ref": "#/definitions/TransactionResults"
},
- "Constantinople": {
+ "Homestead": {
"$ref": "#/definitions/TransactionResults"
}
},
@@ -179,16 +234,20 @@
"additionalProperties": false,
"patternProperties": {
"^0x[0-9a-f]*": {
- "description": "prestate account address with 0x prefix",
- "$ref": "#/definitions/PreStateAccount"
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "prestate account address with 0x prefix"
}
},
"type": "object"
},
"transaction": {
"oneOf": [
- { "$ref": "#/definitions/Transaction" },
- { "$ref": "#/definitions/NullSenderTransaction" }
+ {
+ "$ref": "#/definitions/Transaction"
+ },
+ {
+ "$ref": "#/definitions/NullSenderTransaction"
+ }
]
}
},
@@ -196,4 +255,4 @@
}
},
"type": "object"
-}
+} \ No newline at end of file