-
Notifications
You must be signed in to change notification settings - Fork 406
graphql: test cases for withdrawals #764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0949a9c
graphql: fix test case indices
s1na 79fe132
fix existing test cases
s1na 270abd5
extend chain with shanghai block
s1na 07f41f6
add withdrawals test cases
s1na 90be5f3
add shanghai block tx test cases
s1na 3f1e748
test block field in withdrawal
s1na fb5d65f
clear genesis fork config
s1na e4e56ac
minor formatting
s1na a0fca6c
rm block field
s1na 8c25da2
Merge branch 'master' into graphql/withdrawals
s1na File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+752 Bytes
(100%)
simulators/ethereum/graphql/init/testBlockchain.blocks
100644 → 100755
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| "responses": [{ | ||
| "data" : { | ||
| "block" : { | ||
| "number" : "0x20" | ||
| "number" : "0x21" | ||
| } | ||
| } | ||
| }], | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 6 additions & 17 deletions
23
simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,13 @@ | ||
| { | ||
| "request": "{block{ account(address: \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\") { transactionCount } }}", | ||
| "responses": [ | ||
| { | ||
| "data": { | ||
| "block": { | ||
| "account": { | ||
| "transactionCount": "0x20" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "data": { | ||
| "block": { | ||
| "account": { | ||
| "transactionCount": "0x20" | ||
| } | ||
| "responses": [{ | ||
| "data": { | ||
| "block": { | ||
| "account": { | ||
| "transactionCount": "0x21" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| }], | ||
| "statusCode": 200 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,9 @@ | |
| }, | ||
| { | ||
| "number": "0x20" | ||
| }, | ||
| { | ||
| "number": "0x21" | ||
| } | ||
| ] | ||
| } | ||
|
|
||
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
simulators/ethereum/graphql/testcases/47_block_withdrawals_pre_shanghai.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "request": | ||
| "{ block (number: 32) { number withdrawalsRoot withdrawals { index amount } } }", | ||
|
|
||
| "responses": [{ | ||
| "data" : { | ||
| "block" : { | ||
| "number" : "0x20", | ||
| "withdrawalsRoot": null, | ||
| "withdrawals": null | ||
| } | ||
| } | ||
| }], | ||
| "statusCode": 200 | ||
| } |
23 changes: 23 additions & 0 deletions
23
simulators/ethereum/graphql/testcases/48_block_withdrawals.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "request": | ||
| "{ block (number: 33) { number withdrawalsRoot withdrawals { index amount validator address block { hash } } } }", | ||
|
|
||
| "responses": [{ | ||
| "data" : { | ||
| "block" : { | ||
| "number" : "0x21", | ||
| "withdrawalsRoot": "0x37945ab58d2712a26df2a38d217e822694927e29b30d5993d7a53ccea618d1f3", | ||
| "withdrawals": [{ | ||
| "index": "0x0", | ||
| "amount": "0x2540be400", | ||
| "validator": "0xa", | ||
| "address": "0x0000000000000000000000000000000000000dad", | ||
| "block": { | ||
| "hash": "0x30e688f50392780a71899dcb4c35997f5c1d168cf90306d8e6919ea805097810" | ||
| } | ||
| }] | ||
| } | ||
| } | ||
| }], | ||
| "statusCode": 200 | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
simulators/ethereum/graphql/testcases/49_get_type2Transaction.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "request": "{transaction (hash : \"0x3ecd2ca6cf26c864d0ea5f038a58d4cd4a46a3e242fe92f446f392fdc232dd98\") { accessList { address storageKeys } maxFeePerGas maxPriorityFeePerGas nonce type status } } ", | ||
| "responses": [{ | ||
| "data": { | ||
| "transaction": { | ||
| "accessList": [{ | ||
| "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", | ||
| "storageKeys": ["0x0000000000000000000000000000000000000000000000000000000000000000"] | ||
| }], | ||
| "maxFeePerGas": "0xb2d05e00", | ||
| "maxPriorityFeePerGas": "0x3b9aca00", | ||
| "nonce": "0x20", | ||
| "type": "0x2", | ||
| "status": "0x1" | ||
| } | ||
| } | ||
| }], | ||
| "statusCode": 200 | ||
| } |
29 changes: 29 additions & 0 deletions
29
simulators/ethereum/graphql/testcases/50_eth_getBlock_shanghai.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "request": "{block (number : 33) { baseFeePerGas difficulty extraData miner { address } mixHash nonce stateRoot totalDifficulty withdrawalsRoot withdrawals { address amount index validator } }} ", | ||
| "responses":[{ | ||
| "data" : { | ||
| "block" : { | ||
| "baseFeePerGas": "0x3b9aca00", | ||
| "difficulty": "0x0", | ||
| "extraData": "0x", | ||
| "miner": { | ||
| "address": "0x0000000000000000000000000000000000000000" | ||
| }, | ||
| "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "nonce": "0x0000000000000000", | ||
| "stateRoot": "0x0d3c456bb68669bad05da3a1a766daab236c9df1da8f74edf5ebe9383f00084c", | ||
| "totalDifficulty": "0x427c00", | ||
| "withdrawalsRoot": "0x37945ab58d2712a26df2a38d217e822694927e29b30d5993d7a53ccea618d1f3", | ||
| "withdrawals": [ | ||
| { | ||
| "address": "0x0000000000000000000000000000000000000dad", | ||
| "amount": "0x2540be400", | ||
| "index": "0x0", | ||
| "validator": "0xa" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }], | ||
| "statusCode": 200 | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.