Skip to content

Commit

Permalink
integration test: Add test for ots get block details by hash (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
lupin012 authored May 10, 2024
1 parent a096407 commit 6d71501
Show file tree
Hide file tree
Showing 4 changed files with 285 additions and 0 deletions.
45 changes: 45 additions & 0 deletions integration/mainnet/ots_getBlockDetailsByHash/test_01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[
{
"request":{
"jsonrpc":"2.0",
"method":"ots_getBlockDetailsByHash",
"params":["0x596ddbb951a08858dcb7fb3c8296e966b73e1414cb03f8bf96df4cd630cac878"],
"id":1
},
"response":{
"jsonrpc":"2.0",
"id":1,
"result": {
"block": {
"difficulty": "0x3fdff02b32d1",
"extraData": "0x4477617266506f6f6c",
"gasLimit": "0x325a9d",
"gasUsed": "0x50316",
"hash": "0x596ddbb951a08858dcb7fb3c8296e966b73e1414cb03f8bf96df4cd630cac878",
"logsBloom": null,
"miner": "0x2a65aca4d5fc5b5c859090a6c34d164135398226",
"mixHash": "0x4c299a760b22eaf715a73c48b01fe534d7e0f4ba19d5edea0198b101a77b968c",
"nonce": "0x75104dfc05611221",
"number": "0x299fca",
"parentHash": "0xa62052f93cfe54db510cd23aac67fa4a12486694f32c2174ecd91f1fbe1a95d7",
"receiptsRoot": "0x73b4eded17b821df2a42e38af7104e4cfe287dce29298157366964daaba7a146",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x8ec",
"stateRoot": "0x61e3150a9036e96081730dc7e43b63b582f41aedd964c84146a3297bfb0a6798",
"timestamp": "0x58401840",
"totalDifficulty": "0x541d72873af4ba41c",
"transactionCount": 15,
"transactionsRoot": "0x454ca14088255d922ced365432f26713568b1ff6c6bbbffa32975a02f54fcfe3",
"uncles": []
},
"issuance": {
"blockReward": "0x4563918244f40000",
"issuance": "0x4563918244f40000",
"uncleReward": "0x0"
},
"totalFees": "0x17b654d916c000"
}
}
}
]

46 changes: 46 additions & 0 deletions integration/mainnet/ots_getBlockDetailsByHash/test_02.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"request":{
"jsonrpc":"2.0",
"method":"ots_getBlockDetailsByHash",
"params":["0x3dc4ef568ae2635db1419c5fec55c4a9322c05302ae527cd40bff380c1d465dd"],
"id":1
},
"response":{
"jsonrpc":"2.0",
"id":1,
"result": {
"block": {
"baseFeePerGas": "0x2976ca599",
"difficulty": "0x0",
"extraData": "0x4d616465206f6e20746865206d6f6f6e20627920426c6f636b6e6174697665",
"gasLimit": "0x1c9c380",
"gasUsed": "0x121cdff",
"hash": "0x3dc4ef568ae2635db1419c5fec55c4a9322c05302ae527cd40bff380c1d465dd",
"logsBloom": null,
"miner": "0xebec795c9c8bbd61ffc14a6662944748f299cacf",
"mixHash": "0xe197021bc2912013a6c5e3a42fa1260f00d80ad389a9f7137a5dafdaef38977a",
"nonce": "0x0000000000000000",
"number": "0xf42400",
"parentHash": "0x6f377dc6bd1f3e38b9ceb8c946a88c13211fa3f084622df3ee5cfcd98cc6bb16",
"receiptsRoot": "0x63c77297d9aace97c33e40c07c4f7d52f62e898f9be74f43ae8f8b751012e719",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x12b4f",
"stateRoot": "0xe5608defce0c3e193b4c2e3452ece5158e6ae35db211925cdfb4cd307587bbf0",
"timestamp": "0x63780c83",
"totalDifficulty": "0xc70d815d562d3cfa955",
"transactionCount": 211,
"transactionsRoot": "0xe0265e44b4639453428546d1c0046c9fbba7d679b7be3e67692904c776389890",
"uncles": []
},
"issuance": {
"blockReward": "0x0",
"issuance": "0x0",
"uncleReward": "0x0"
},
"totalFees": "0x3fcc8f706ebb74d"
}
}
}
]

148 changes: 148 additions & 0 deletions integration/mainnet/ots_getBlockDetailsByHash/test_03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
[
{
"request":{
"jsonrpc":"2.0",
"method":"ots_getBlockDetailsByHash",
"params":["0xe1629604a508fb8dff451435a73e348583aa1974257dd6615554092a350c677d"],
"id":1
},
"response":{
"jsonrpc":"2.0",
"id":1,
"result": {
"block": {
"baseFeePerGas": "0x2ea933c62",
"blobGasUsed": "0x0",
"difficulty": "0x0",
"excessBlobGas": "0x0",
"extraData": "0x7273796e632d6275696c6465722e78797a",
"gasLimit": "0x1c9c380",
"gasUsed": "0x1c9874f",
"hash": "0xe1629604a508fb8dff451435a73e348583aa1974257dd6615554092a350c677d",
"logsBloom": null,
"miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
"mixHash": "0x29372e69b7d8b60b50658712ac442e5c4fe90432d695a67e26b89ad7a9f6bf62",
"nonce": "0x0000000000000000",
"number": "0x12c135b",
"parentBeaconBlockRoot": "0x10f08cb8021b20570a4ba50e0cc80d09660de5f28e68b3160693bbe03d239f4d",
"parentHash": "0x37eadf115d88edecbcf50e4cb8daba20d3badb67ccb22945cbbedeeb0b9aca83",
"receiptsRoot": "0x90b3c5eb82428696f6fe55c60f81ce8797ca371b34ecf59210d68610e5c7ec75",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x2de24",
"stateRoot": "0xbe7122821e9c0496c006a0e6536c0d1a36dad0e115595431c0dde29b3b41d08a",
"timestamp": "0x661e02c3",
"totalDifficulty": "0xc70d815d562d3cfa955",
"transactionCount": 233,
"transactionsRoot": "0xe19718247ce0070c6cba41766b751f96df060d882bb7ae89858b531c3513940a",
"uncles": [],
"withdrawals": [
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117e4d8",
"index": "0x28248a6",
"validatorIndex": "0x125cf2"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x11775da",
"index": "0x28248a7",
"validatorIndex": "0x125cf3"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117b38a",
"index": "0x28248a8",
"validatorIndex": "0x125cf4"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x1182374",
"index": "0x28248a9",
"validatorIndex": "0x125cf5"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117c681",
"index": "0x28248aa",
"validatorIndex": "0x125cf6"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x118529f",
"index": "0x28248ab",
"validatorIndex": "0x125cf7"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x1176302",
"index": "0x28248ac",
"validatorIndex": "0x125cf8"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117ca7e",
"index": "0x28248ad",
"validatorIndex": "0x125cf9"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117c0cb",
"index": "0x28248ae",
"validatorIndex": "0x125cfa"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x11737c2",
"index": "0x28248af",
"validatorIndex": "0x125cfb"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117b7f9",
"index": "0x28248b0",
"validatorIndex": "0x125cfc"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117d814",
"index": "0x28248b1",
"validatorIndex": "0x125cfd"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x1186505",
"index": "0x28248b2",
"validatorIndex": "0x125cfe"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x117e8ad",
"index": "0x28248b3",
"validatorIndex": "0x125cff"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x116f548",
"index": "0x28248b4",
"validatorIndex": "0x125d00"
},
{
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "0x1180f24",
"index": "0x28248b5",
"validatorIndex": "0x125d01"
}
],
"withdrawalsRoot": "0x4c7b0f23b62e53da5fa8927fa4773021e17b7f7cd80604c8425bbd02bded0765"
},
"issuance": {
"blockReward": "0x0",
"issuance": "0x0",
"uncleReward": "0x0"
},
"totalFees": "0x56dc8726c947468"
}
}
}
]

46 changes: 46 additions & 0 deletions integration/mainnet/ots_getBlockDetailsByHash/test_04.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"request":{
"jsonrpc":"2.0",
"method":"ots_getBlockDetailsByHash",
"params":["0x9a71a95be3fe957457b11817587e5af4c7e24836d5b383c430ff25b9286a457f"],
"id":1
},
"response":{
"jsonrpc":"2.0",
"id":1,
"result": {
"block": {
"baseFeePerGas": "0x34bcab274",
"difficulty": "0x3124462a736f88",
"extraData": "0x6575726f70652d77657374312d686c7378",
"gasLimit": "0x1c9c380",
"gasUsed": "0x1c9bed2",
"hash": "0x9a71a95be3fe957457b11817587e5af4c7e24836d5b383c430ff25b9286a457f",
"logsBloom": null,
"miner": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
"mixHash": "0xf715cb8fc0d9d92b9661627f80b2f3640f0d5529ec5c0f8b9e6a742abca4ae0b",
"nonce": "0xa0ba23490d99d85c",
"number": "0xe4e1c0",
"parentHash": "0x93a8a23a2f5296db7251ab4c5e9b10bdc5a6c9c4ed56fb230dc729d3dc03a138",
"receiptsRoot": "0xa10e7dc9233c1e0929f799567c2a65c618b98413dfdb460e905f3158e1c2cefa",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x24286",
"stateRoot": "0x4d2d9f3456f4fea7969fc6553404baa494569c6810eb3baf6ef0df47e3bc0b00",
"timestamp": "0x62b12cc4",
"totalDifficulty": "0xb0e2ecfcb700441c770",
"transactionCount": 348,
"transactionsRoot": "0x930c5bc61ca43f7ba1c73106765d5f22f10177ae8992345ad00e92a049ae0bf2",
"uncles": []
},
"issuance": {
"blockReward": "0x1bc16d674ec80000",
"issuance": "0x1bc16d674ec80000",
"uncleReward": "0x0"
},
"totalFees": "0x8b7da814a61cef7"
}
}
}
]

0 comments on commit 6d71501

Please sign in to comment.