Skip to content

Commit

Permalink
add test for mainnet eth_getUncleCountByBlockHash (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
lupin012 authored May 10, 2024
1 parent 43620ac commit a096407
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
20 changes: 20 additions & 0 deletions integration/mainnet/eth_getUncleCountByBlockHash/test_01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"test": {
"reference": "https://etherscan.io/tx/0x827d30e914a3adeefabb9d53f70da87e6e0ed3d02a72e7d9ae9bfd1bf123c7a3",
"description": "with uncle not zero"
},
"request": {
"jsonrpc":"2.0",
"method":"eth_getUncleCountByBlockHash",
"params":["0x827d30e914a3adeefabb9d53f70da87e6e0ed3d02a72e7d9ae9bfd1bf123c7a3"],
"id":1
},
"response": {
"jsonrpc":"2.0",
"id":1,
"result":"0x1"
}
}
]

20 changes: 20 additions & 0 deletions integration/mainnet/eth_getUncleCountByBlockHash/test_02.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"test": {
"reference": "https://etherscan.io/tx/0x96cfa0fb5e50b0a3f6cc76f3299cfbf48f17e8b41798d1394474e67ec8a97e9f",
"description": "with zero uncle"
},
"request": {
"jsonrpc":"2.0",
"method":"eth_getUncleCountByBlockHash",
"params":["0x96cfa0fb5e50b0a3f6cc76f3299cfbf48f17e8b41798d1394474e67ec8a97e9f"],
"id":1
},
"response": {
"jsonrpc":"2.0",
"id":1,
"result":"0x0"
}
}
]

21 changes: 21 additions & 0 deletions integration/mainnet/eth_getUncleCountByBlockHash/test_03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"test": {
"reference": "",
"description": "with invalid hash"
},

"request": {
"jsonrpc":"2.0",
"method":"eth_getUncleCountByBlockHash",
"params":["0xffffffffff50b0a3f6cc76f3299cfbf48f17e8b41798d1394474e67ec8a97e9f"],
"id":1
},
"response": {
"jsonrpc":"2.0",
"id":1,
"result":"0x0"
}
}
]

0 comments on commit a096407

Please sign in to comment.