mirror of https://github.com/hyperledger/besu
Graphql - allow matching any topic (#3662)
* added test file to match any topic * add singleton list containing null if empty topic passed in Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>pull/3803/head
parent
baed1ef02c
commit
e8407ae344
@ -0,0 +1,26 @@ |
||||
{ |
||||
"request": "{ block(number: \"0x20\") { logs( filter: { topics : [[], [\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\"]]}) { index topics data account{address} transaction{hash} } } }", |
||||
"response": { |
||||
"data" : { |
||||
"block" : { |
||||
"logs" : [ { |
||||
"index" : 0, |
||||
"topics": [ |
||||
"0x0000000000000000000000000000000000000000000000000000000000000001", |
||||
"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", |
||||
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" |
||||
], |
||||
"data" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9000000000000000000000000000000000000000000000000000000000000002a", |
||||
"account" : { |
||||
"address" : "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" |
||||
}, |
||||
"transaction" : { |
||||
"hash" : "0xcef53f2311d7c80e9086d661e69ac11a5f3d081e28e02a9ba9b66749407ac310" |
||||
} |
||||
} ] |
||||
} |
||||
} |
||||
}, |
||||
|
||||
"statusCode": 200 |
||||
} |
@ -0,0 +1,22 @@ |
||||
{ |
||||
"request": "{ block(number: \"0x17\") { logs( filter: { topics : []}) { index topics data account{address} transaction{hash} } } }", |
||||
"response": { |
||||
"data" : { |
||||
"block" : { |
||||
"logs" : [ { |
||||
"index" : 0, |
||||
"topics" : [ "0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580" ], |
||||
"data" : "0x000000000000000000000000000000000000000000000000000000000000002a", |
||||
"account" : { |
||||
"address" : "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" |
||||
}, |
||||
"transaction" : { |
||||
"hash" : "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6" |
||||
} |
||||
} ] |
||||
} |
||||
} |
||||
}, |
||||
|
||||
"statusCode": 200 |
||||
} |
@ -0,0 +1,29 @@ |
||||
{ |
||||
"request": { |
||||
"id": 406, |
||||
"jsonrpc": "2.0", |
||||
"method": "eth_getLogs", |
||||
"params": [{ |
||||
"fromBlock": "0x17", |
||||
"toBlock": "0x17", |
||||
"address": [], |
||||
"topics": [] |
||||
}] |
||||
}, |
||||
"response": { |
||||
"jsonrpc": "2.0", |
||||
"id": 406, |
||||
"result" : [{ |
||||
"logIndex" : "0x0", |
||||
"removed": false, |
||||
"blockNumber" : "0x17", |
||||
"blockHash" : "0x3c419f39b340a4c35cc27b8f7880b779dc1abb9814ad13a2a5a55b885cc8ec2d", |
||||
"transactionHash" : "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6", |
||||
"transactionIndex" : "0x0", |
||||
"address" : "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", |
||||
"data" : "0x000000000000000000000000000000000000000000000000000000000000002a", |
||||
"topics" : ["0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580"] |
||||
}] |
||||
}, |
||||
"statusCode": 200 |
||||
} |
Loading…
Reference in new issue