Logs Methods
Last updated
Last updated
provider.getLogs(filter) ⇒ Promise<Array<
>>
Returns the Array of matching the filter.
Keep in mind that many backends will discard old events, and that requests which are too broad may get dropped as they require too many resources to execute the query.
const filterParams = {
// address: "0.0.25623322",
address: "0x000000000000000000000000000000000186fb1A",
fromTimestamp: "1642065156.264170833",
toTimestamp: "1642080642.176149864"
}
await provider.getLogs(filterParams);
// {
// "logs": [
// {
// "address": "0x000000000000000000000000000000000186fb1a",
// "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000040000000000000000000000000000000000000000000000002000000000008000000000000000000000000000000000000000000000000020000000000000000000800000400000000000000000010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
// "contract_id": "0.0.25623322",
// "data": "0x00000000000000000000000000000000000000000000003635c9adc5dea00000",
// "index": 0,
// "topics": [
// "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
// "0x0000000000000000000000000000000000000000000000000000000000000000",
// "0x0000000000000000000000000000000000000000000000000000000000179977"
// ],
// "root_contract_id": "0.0.25623322",
// "timestamp": "1642080642.176149864"
// },
// {
// "address": "0x000000000000000000000000000000000186fb1a",
// "bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000040000000000000000000000000000000000000000000000002000000000008000000000000000000000000000000000000000000000000020000000000000000000800000400000000000000000010000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
// "contract_id": "0.0.25623322",
// "data": "0x00000000000000000000000000000000000000000000003635c9adc5dea00000",
// "index": 0,
// "topics": [
// "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
// "0x0000000000000000000000000000000000000000000000000000000000000000",
// "0x0000000000000000000000000000000000000000000000000000000000179977"
// ],
// "root_contract_id": "0.0.25623322",
// "timestamp": "1642065156.264170833"
// }
// ]
// }