From d98f5875295046479c71ef3c66deb2bcc86a269c Mon Sep 17 00:00:00 2001 From: renaynay <41963722+renaynay@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:19:23 +0100 Subject: [PATCH 1/4] blockByNumber takes number, not hex --- .../ethereum/graphql/testcases/16_eth_getBlock_byNumber.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json b/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json index 36ae441a9e..a8c2518bb9 100644 --- a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json +++ b/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json @@ -1,7 +1,7 @@ { "request": - "{block (number : \"0x1e\") {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot ommers{hash} ommerAt(index : 1){hash} miner{address} account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\"){balance} parent{hash} }} ", + "{block (number : 30) {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot ommers{hash} ommerAt(index : 1){hash} miner{address} account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\"){balance} parent{hash} }} ", "responses":[{ From 402aab7c9150705c4b3d37e677ea475f3e6c32cb Mon Sep 17 00:00:00 2001 From: renaynay <41963722+renaynay@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:27:17 +0100 Subject: [PATCH 2/4] add additional response 17, fix 20 input --- .../17_eth_getBlock_byNumberInvalid.json | 41 +++++++++++-------- ...eth_getBlockTransactionCount_byNumber.json | 2 +- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json b/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json index 4fa9e85117..90eefbaf91 100644 --- a/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json +++ b/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json @@ -1,24 +1,31 @@ { "request": "{block (number: 88888888) {number }} ", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/block) : Block number 88888888 was not found", - "locations": [ - { - "line": 1, - "column": 2 + "responses": [ + { + "errors": [ + { + "message": "Exception while fetching data (/block) : Block number 88888888 was not found", + "locations": [ + { + "line": 1, + "column": 2 + } + ], + "path": [ + "block" + ], + "extensions": { + "classification": "DataFetchingException" } - ], - "path": [ - "block" - ], - "extensions": { - "classification": "DataFetchingException" } + ], + "data": null + }, + { + "data": { + "block": null } - ], - "data": null - }], + } + ], "statusCode": 400 } \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json b/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json index f558b6ac83..789b424657 100644 --- a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json +++ b/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json @@ -1,7 +1,7 @@ { "request": - "{block (number : \"0x1e\") {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}} ", + "{block (number : 30) {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}} ", "responses": [{ From 2b29d24fb6ef977b04b2135c2ab2077afd0249f7 Mon Sep 17 00:00:00 2001 From: renaynay <41963722+renaynay@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:30:38 +0100 Subject: [PATCH 3/4] block number input as decimal, not hex --- .../ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json | 2 +- .../testcases/28_eth_getTransaction_byBlockNumberAndIndex.json | 2 +- .../29_eth_getTransaction_byBlockNumberAndInvalidIndex.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json b/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json index f51b6292c3..4dc1db88b7 100644 --- a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json +++ b/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json @@ -1,5 +1,5 @@ { - "request": "{ block(number: \"0x17\") { logs( filter: { topics : [[\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580\"]]}) { index topics data account{address} transaction{hash} } } }", + "request": "{ block(number: 23) { logs( filter: { topics : [[\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580\"]]}) { index topics data account{address} transaction{hash} } } }", "responses": [{ "data" : { "block" : { diff --git a/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json b/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json index 2a9f021b82..00a41f132d 100644 --- a/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json +++ b/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json @@ -1,7 +1,7 @@ { "request": - "{ block(number: \"0x1e\") { transactionAt(index: 0) {block{hash} hash} } }", + "{ block(number: 30) { transactionAt(index: 0) {block{hash} hash} } }", "responses":[{ "data" : { diff --git a/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json b/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json index 6642274b76..f7dd2b9529 100644 --- a/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json +++ b/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json @@ -1,7 +1,7 @@ { "request": - "{ block(number: \"0x1e\") { transactionAt(index: 1) {block{hash} hash} } }", + "{ block(number: 30) { transactionAt(index: 1) {block{hash} hash} } }", "responses":[{ "data" : { From 9f4d8292378749ac0f0ba842594bac5c0899a024 Mon Sep 17 00:00:00 2001 From: renaynay <41963722+renaynay@users.noreply.github.com> Date: Thu, 25 Feb 2021 13:56:16 +0100 Subject: [PATCH 4/4] fix eth call block 8 testcase --- simulators/ethereum/graphql/testcases/02_eth_call_Block8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json b/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json index 50eda38a60..426a4846a5 100644 --- a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json +++ b/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json @@ -1,5 +1,5 @@ { - "request": "{block(number :\"0x8\") {number call (data : {from : \"a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", to: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x12a7b914\"}){data status}}}" + "request": "{block(number :8) {number call (data : {from : \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", to: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x12a7b914\"}){data status}}}" , "responses":[{ "data" : {