Skip to content

Commit

Permalink
test: fix integration db tests
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Rusev <anton.rusev.code@gmail.com>
  • Loading branch information
ar-conmit committed May 3, 2022
1 parent 92f03b2 commit 1c8b85c
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 22 deletions.
@@ -1,49 +1,54 @@
{
"description": "Contract logs api calls with multiple topic0 and timestamp param",
"description": "Contract logs api calls with multiple topic1 and timestamp param",
"setup": {
"contractlogs": [
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 0,
"topic0": [
151, 193, 252, 10, 110, 213, 85, 27, 200, 49, 87, 19, 37, 233, 189, 179, 101, 208, 104, 3, 16, 13, 194, 6, 72,
100, 11, 162, 76, 230, 151, 80
]
"topic0": [10],
"topic1": [11]
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 1,
"topic0": [
152, 193, 252, 10, 110, 213, 85, 27, 200, 49, 87, 19, 37, 233, 189, 179, 101, 208, 104, 3, 16, 13, 194, 6, 72,
100, 11, 162, 76, 230, 151, 80
]
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 2,
"topic0": null
"topic0": [10],
"topic1": [12],
"topic2": [13]
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 3,
"topic0": null,
"topic1": [
151, 193, 252, 10, 110, 213, 85, 27, 200, 49, 87, 19, 37, 233, 189, 179, 101, 208, 104, 3, 16, 13, 194, 6, 72,
100, 11, 162, 76, 230, 151, 80
]
"topic1": null,
"topic2": null
}
]
},
"urls": [
"/api/v1/contracts/0.0.1000/results/logs?topic0=0x97c1fc0a6ed5551bc831571325e9bdb365d06803100dc20648640ba24ce69750&topic0=0xe8d47b56e8cdfa95f871b19d4f50a857217c44a95502b0811a350fec1500dd67&timestamp=1639010141.000000000"
"/api/v1/contracts/0.0.1000/results/logs?topic0=A&timestamp=1639010141.000000000",
"/api/v1/contracts/0.0.1000/results/logs?topic1=B&topic1=C&timestamp=1639010141.000000000"
],
"responseStatus": 200,
"responseJson": {
"logs": [
{
"address": "0x00000000000000000000000000000000000003e8",
"bloom": "0x0123",
"contract_id": "0.0.1000",
"data": "0x0123",
"index": 1,
"root_contract_id": null,
"timestamp": "1639010141.000000000",
"topics": [
"0x000000000000000000000000000000000000000000000000000000000000000a",
"0x000000000000000000000000000000000000000000000000000000000000000c",
"0x000000000000000000000000000000000000000000000000000000000000000d",
"0xe8d47b56e8cdfa95f871b19d4f50a857217c44a95502b0811a350fec1500dd67"
]
},
{
"address": "0x00000000000000000000000000000000000003e8",
"bloom": "0x0123",
Expand All @@ -53,8 +58,8 @@
"root_contract_id": null,
"timestamp": "1639010141.000000000",
"topics": [
"0x97c1fc0a6ed5551bc831571325e9bdb365d06803100dc20648640ba24ce69750",
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x000000000000000000000000000000000000000000000000000000000000000a",
"0x000000000000000000000000000000000000000000000000000000000000000b",
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0xe8d47b56e8cdfa95f871b19d4f50a857217c44a95502b0811a350fec1500dd67"
]
Expand Down
@@ -0,0 +1,41 @@
{
"description": "Contract logs api calls with mismatching topics",
"setup": {
"contractlogs": [
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 0,
"topic0": [10],
"topic1": [11]
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 1,
"topic0": [10],
"topic1": [12],
"topic2": [13]
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 3,
"topic0": null,
"topic1": null,
"topic2": null
},
{
"consensus_timestamp": 1639010141000000000,
"contract_id": 1000,
"index": 4,
"topic0": [14]
}
]
},
"urls": ["/api/v1/contracts/0.0.1000/results/logs?topic0=E&topic2=D&timestamp=1639010141.000000000"],
"responseStatus": 200,
"responseJson": {
"logs": []
}
}

0 comments on commit 1c8b85c

Please sign in to comment.