diff --git a/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json b/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json index d74b9a8580..5ae54a0dc9 100644 --- a/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json +++ b/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json @@ -5,9 +5,9 @@ "responses": [{ "data" : { "block" : { - "number" : 32 + "number" : "0x20" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json b/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json index 426a4846a5..fdcac0dee6 100644 --- a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json +++ b/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json @@ -4,13 +4,13 @@ "responses":[{ "data" : { "block" : { - "number" : 8, + "number" : "0x8", "call" : { "data" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "status" : 1 + "status" : "0x1" } } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json b/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json index 6a21adac9a..cd51985471 100644 --- a/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json +++ b/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json @@ -4,13 +4,13 @@ "responses":[{ "data" : { "block" : { - "number" : 32, + "number" : "0x20", "call" : { "data" : "0x0000000000000000000000000000000000000000000000000000000000000001", - "status" : 1 + "status" : "0x1" } } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json b/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json index 7ab7ff729e..e16a07cbe4 100644 --- a/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json +++ b/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json @@ -3,9 +3,9 @@ "responses":[{ "data" : { "block" : { - "estimateGas" : 111953 + "estimateGas" : "0x1b551" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json b/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json index c36e86d557..a6eaa2bbc6 100644 --- a/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json +++ b/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json @@ -3,9 +3,9 @@ "responses":[{ "data" : { "block" : { - "estimateGas" : 21000 + "estimateGas" : "0x5208" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json b/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json index 913e29b594..c35dbadf46 100644 --- a/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json +++ b/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json @@ -3,9 +3,9 @@ "responses":[{ "data" : { "block" : { - "estimateGas" : 21000 + "estimateGas" : "0x5208" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json b/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json index 7abda81ac4..decf15c17a 100644 --- a/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json +++ b/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json @@ -7,28 +7,28 @@ "responses": [{ "data" : { "block" : { - "number" : 30, + "number" : "0x1e", "transactions" : [ { "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" } ], - "timestamp" : 1444660022, + "timestamp" : "0x561bc336", "difficulty" : "0x20740", "totalDifficulty" : "0x3e6cc0", - "gasUsed" : 23585, - "gasLimit" : 3141592, + "gasUsed" : "0x5c21", + "gasLimit" : "0x2fefd8", "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : 0, + "ommerCount" : "0x0", "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "extraData" : "0x", "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : 1, + "transactionCount" : "0x1", "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json b/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json index 0b50c7e9ee..34244dbc5c 100644 --- a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json +++ b/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json @@ -10,21 +10,21 @@ "transactions" : [ { "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" } ], - "timestamp" : 1444660022, + "timestamp" : "0x561bc336", "difficulty" : "0x20740", "totalDifficulty" : "0x3e6cc0", - "gasUsed" : 23585, - "gasLimit" : 3141592, + "gasUsed" : "0x5c21", + "gasLimit" : "0x2fefd8", "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : 0, + "ommerCount" : "0x0", "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "extraData" : "0x", "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : 1, + "transactionCount" : "0x1", "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01", "ommers" : [ ], "ommerAt" : null, @@ -41,4 +41,4 @@ } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json b/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json index d43de22a43..3a31866f19 100644 --- a/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json +++ b/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json @@ -7,7 +7,7 @@ "responses": [{ "data" : { "block" : { - "transactionCount" : 1 + "transactionCount" : "0x1" } } }], diff --git a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json b/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json index db2c9bc3ee..4573355dae 100644 --- a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json +++ b/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json @@ -10,24 +10,24 @@ "transactions" : [ { "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" } ], - "timestamp" : 1444660022, + "timestamp" : "0x561bc336", "difficulty" : "0x20740", "totalDifficulty" : "0x3e6cc0", - "gasUsed" : 23585, - "gasLimit" : 3141592, + "gasUsed" : "0x5c21", + "gasLimit" : "0x2fefd8", "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : 0, + "ommerCount" : "0x0", "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "extraData" : "0x", "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : 1, + "transactionCount" : "0x1", "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01" } } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json b/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json index 4dc1db88b7..cf7f6e4b15 100644 --- a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json +++ b/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json @@ -4,7 +4,7 @@ "data" : { "block" : { "logs" : [ { - "index" : 0, + "index" : "0x0", "topics" : [ "0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580" ], "data" : "0x000000000000000000000000000000000000000000000000000000000000002a", "account" : { diff --git a/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json b/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json index 52289500ab..6b04466744 100644 --- a/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json +++ b/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json @@ -4,7 +4,7 @@ "data": { "logs": [ { - "index": 0, + "index": "0x0", "topics": [ "0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580" ], @@ -15,12 +15,12 @@ "transaction": { "hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6", "block": { - "number": 23 + "number": "0x17" } } }, { - "index": 0, + "index": "0x0", "topics": [], "data": "0x000000000000000000000000000000000000000000000000000000000000002a", "account": { @@ -29,7 +29,7 @@ "transaction": { "hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e", "block": { - "number": 24 + "number": "0x18" } } } @@ -37,4 +37,4 @@ } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json b/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json index c560d9bc1e..b5607f0fbd 100644 --- a/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json +++ b/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json @@ -7,12 +7,12 @@ "block": { "hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" }, - "gas": 314159, + "gas": "0x4cb2f", "gasPrice": "0x1", "hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4", "inputData": "0xe8beef5b", - "nonce": 29, - "index": 0, + "nonce": "0x1d", + "index": "0x0", "value": "0xa", "from": { "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" @@ -22,7 +22,7 @@ }, "logs": [ { - "index": 0 + "index": "0x0" } ], "status": null, @@ -51,7 +51,7 @@ } ], "nonce": "0x1d", - "status": 0, + "status": "0x0", "to": { "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" }, @@ -61,4 +61,4 @@ } ], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json b/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json index 79af4ce165..675c8de0b3 100644 --- a/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json +++ b/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json @@ -5,7 +5,7 @@ "data": { "block": { "account": { - "transactionCount": 32 + "transactionCount": "0x20" } } } @@ -21,4 +21,4 @@ } ], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json b/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json index 5421442171..e481c1d7ee 100644 --- a/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json +++ b/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json @@ -11,14 +11,14 @@ "createdContract": { "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" }, - "cumulativeGasUsed": 493172, + "cumulativeGasUsed": "0x78674", "from": { "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" }, - "gas": 3141592, - "gasUsed": 493172, + "gas": "0x2fefd8", + "gasUsed": "0x78674", "hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed", - "index": 0, + "index": "0x0", "logs": [], "to": null } @@ -34,12 +34,12 @@ "createdContract": { "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" }, - "cumulativeGasUsed": 493172, + "cumulativeGasUsed": "0x78674", "from": { "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" }, "gas": "0x2fefd8", - "gasUsed": 493172, + "gasUsed": "0x78674", "hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed", "index": 0, "logs": [], diff --git a/simulators/ethereum/graphql/testcases/35_graphql_pending.json b/simulators/ethereum/graphql/testcases/35_graphql_pending.json index 96b7fe0a70..7aceb90647 100644 --- a/simulators/ethereum/graphql/testcases/35_graphql_pending.json +++ b/simulators/ethereum/graphql/testcases/35_graphql_pending.json @@ -5,20 +5,20 @@ "responses": [{ "data": { "pending": { - "transactionCount": 1, + "transactionCount": "0x1", "transactions": [ { - "nonce": 50, - "gas": 1048575 + "nonce": "0x32", + "gas": "0xfffff" } ], "account": { "balance": "0x140" }, - "estimateGas": 21000, + "estimateGas": "0x5208", "call": { "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "status": 1 + "status": "0x1" } } } diff --git a/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json b/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json index ade785cc23..1769109a8e 100644 --- a/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json +++ b/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json @@ -4,16 +4,16 @@ "data": { "blocks": [ { - "number": 30 + "number": "0x1e" }, { - "number": 31 + "number": "0x1f" }, { - "number": 32 + "number": "0x20" } ] } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json b/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json index f826c70e5e..1552e2de42 100644 --- a/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json +++ b/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json @@ -7,34 +7,34 @@ "responses":[{ "data" : { "blocks" : [ { - "number" : 30, - "gasUsed" : 23585, - "gasLimit" : 3141592, + "number" : "0x1e", + "gasUsed" : "0x5c21", + "gasLimit" : "0x2fefd8", "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", "nonce" : "0x5c321bd9e9f040f1", "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : 1 + "transactionCount" : "0x1" }, { - "number" : 31, - "gasUsed" : 24303, - "gasLimit" : 3141592, + "number" : "0x1f", + "gasUsed" : "0x5eef", + "gasLimit" : "0x2fefd8", "hash" : "0x0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49", "nonce" : "0xd3a27a3001616468", "stateRoot" : "0xa80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bd", "receiptsRoot" : "0x2440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6", - "transactionCount" : 1 + "transactionCount" : "0x1" }, { - "number" : 32, - "gasUsed" : 23705, - "gasLimit" : 3141592, + "number" : "0x20", + "gasUsed" : "0x5c99", + "gasLimit" : "0x2fefd8", "hash" : "0x71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53", "nonce" : "0xdb063000b00e8026", "stateRoot" : "0xf65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1be", "receiptsRoot" : "0xa50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183c", - "transactionCount" : 1 + "transactionCount" : "0x1" } ] } }], "statusCode": 200 -} \ No newline at end of file +} diff --git a/simulators/ethereum/graphql/testcases/46_getBlock_byHexNumber.json b/simulators/ethereum/graphql/testcases/46_getBlock_byHexNumber.json new file mode 100644 index 0000000000..0d4e0ed79e --- /dev/null +++ b/simulators/ethereum/graphql/testcases/46_getBlock_byHexNumber.json @@ -0,0 +1,14 @@ +{ + "request": "{block (number : \"0x1e\") { gasUsed gasLimit hash }} ", + + "responses":[{ + "data" : { + "block" : { + "gasUsed" : "0x5c21", + "gasLimit" : "0x2fefd8", + "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" + } + } + }], + "statusCode": 200 +} diff --git a/simulators/ethereum/graphql/testcases/47_eth_getLogs_range_hex.json b/simulators/ethereum/graphql/testcases/47_eth_getLogs_range_hex.json new file mode 100644 index 0000000000..f7891fc7d8 --- /dev/null +++ b/simulators/ethereum/graphql/testcases/47_eth_getLogs_range_hex.json @@ -0,0 +1,22 @@ +{ + "request": "{ logs( filter: { fromBlock:\"0x14\", toBlock: \"0x18\", topics : [], addresses : []}) { index transaction{hash} } }", + "responses": [{ + "data": { + "logs": [ + { + "index": "0x0", + "transaction": { + "hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6" + } + }, + { + "index": "0x0", + "transaction": { + "hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e" + } + } + ] + } + }], + "statusCode": 200 +} diff --git a/simulators/ethereum/graphql/testcases/48_transaction_fromByHexBlockNumber.json b/simulators/ethereum/graphql/testcases/48_transaction_fromByHexBlockNumber.json new file mode 100644 index 0000000000..96ff90d147 --- /dev/null +++ b/simulators/ethereum/graphql/testcases/48_transaction_fromByHexBlockNumber.json @@ -0,0 +1,18 @@ +{ + "request": "{transaction (hash : \"0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4\") { block { number } from(block: \"0x1d\") {transactionCount}} } ", + "responses": [ + { + "data": { + "transaction": { + "block": { + "number": "0x1e" + }, + "from": { + "transactionCount": "0x1d" + } + } + } + } + ], + "statusCode": 200 +}