aboutsummaryrefslogtreecommitdiffstats
path: root/JSONSchema/vm-schema.json
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2018-06-01 10:39:41 +0800
committerGitHub <noreply@github.com>2018-06-01 10:39:41 +0800
commit7c228f70fc055ee48489078331328a18c5455586 (patch)
tree79d0a60162d5dfa53997f36859e4de035a280bf0 /JSONSchema/vm-schema.json
parent0eef2f31ab59016a7ccad2a99d4644f753eebcb9 (diff)
parent3dabf27265670f95717ff646841acdfeaccddfb1 (diff)
downloadtangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar.gz
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar.bz2
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar.lz
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar.xz
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.tar.zst
tangerine-tests-7c228f70fc055ee48489078331328a18c5455586.zip
Merge pull request #466 from ehildenb/test-validator-script
Test validator script
Diffstat (limited to 'JSONSchema/vm-schema.json')
-rw-r--r--JSONSchema/vm-schema.json141
1 files changed, 141 insertions, 0 deletions
diff --git a/JSONSchema/vm-schema.json b/JSONSchema/vm-schema.json
new file mode 100644
index 000000000..f88b92a2e
--- /dev/null
+++ b/JSONSchema/vm-schema.json
@@ -0,0 +1,141 @@
+{
+ "definitions": {
+ "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"
+ }
+ },
+ "patternProperties": {
+ "^.*$": {
+ "properties": {
+ "_info": {
+ "$ref": "#/definitions/Info"
+ },
+ "env": {
+ "additionalproperties": false,
+ "properties": {
+ "currentCoinbase": {
+ "$ref": "#/definitions/HexData"
+ },
+ "currentDifficulty": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "currentGasLimit": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "currentNumber": {
+ "$ref": "#/definitions/ConfusedHexType"
+ },
+ "currentTimestamp": {
+ "$ref": "#/definitions/ConfusedHexType"
+ }
+ },
+ "required": [
+ "currentCoinbase",
+ "currentDifficulty",
+ "currentGasLimit",
+ "currentNumber",
+ "currentTimestamp"
+ ],
+ "type": "object"
+ },
+ "exec": {
+ "additionalproperties": false,
+ "properties": {
+ "address": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "caller": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "code": {
+ "$ref": "#/definitions/HexMaybePrefixOrEmpty"
+ },
+ "data": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
+ "gas": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "gasPrice": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "origin": {
+ "$ref": "#/definitions/AddressMaybePrefixOrEmpty"
+ },
+ "value": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ }
+ },
+ "required": [
+ "address",
+ "caller",
+ "code",
+ "data",
+ "gas",
+ "gasPrice",
+ "origin",
+ "value"
+ ]
+ },
+ "gas": {
+ "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex"
+ },
+ "logs": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
+ "out": {
+ "$ref": "#/definitions/HexDataOrEmpty"
+ },
+ "post": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]*": {
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "poststate account address with 0x prefix"
+ }
+ },
+ "type": "object"
+ },
+ "pre": {
+ "additionalProperties": false,
+ "patternProperties": {
+ "^0x[0-9a-f]*": {
+ "$ref": "#/definitions/PreStateAccount",
+ "description": "prestate account address with 0x prefix"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+}