# sbch\_queryLogs

Query logs by address, topics and block range. It is different from `eth_getLogs` in:

1. the contract address is required, not optional;
2. the topics are position-independent, which means as long as a log has the specified topics in any position, it will be included in the returned result.

Parameters:

1. `DATA`, 20 Bytes - contract address
2. `Array of DATA`, topics
3. `QUANTITY|TAG` - integer of start number, or string `"latest"` for the last mined block
4. `QUANTITY|TAG` - integer of end number, or string `"latest"` for the last mined block
5. `QUANTITY` - integer, the maximal number of txs to return, `0` stands for default limit.

Note: the start number can be greater than the end number, if so, the results will be sorted by block height in descending order.

Returns:

`Array` - array of log objects, see [eth\_getLogs](https://paralinker.gitbook.io/paralinker-docs/reference/ethereum-execution-layer/json-rpc-api/eth_getlogs)
