Skip to main content
Ethereum API
Multichain API

eth_getFilterLogs

Summary: Returns an array of all logs matching the filter with the given ID (created using eth_newFilter).

Parameters

Filter identifier string

hex encoded unsigned integer

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Returns

Log objects oneOf

Filter results

new block or transaction hashes array

new block or transaction hashes

32 byte hex value string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

new logs array

new logs

log object
required

log

removed boolean

removed

logIndex string

log index

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

transactionIndex string

transaction index

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

transactionHash string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

blockHash string

32 byte hex value

Pattern: ^0x[0-9a-f]{64}$

blockNumber string

block number

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

address string

hex encoded address

Pattern: ^0x[0-9a-fA-F]{40}$

data string

data

Pattern: ^0x[0-9a-f]*$

topics array

topics

32 hex encoded bytes string

32 hex encoded bytes

Pattern: ^0x[0-9a-f]{64}$

Customize request
Parameter
Value
string
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "eth_getFilterLogs",
"params": [
"0x01"
],
});
Example response
[
{
"logIndex": "0x0",
"removed": false,
"blockNumber": "0x233",
"blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
"transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
"transactionIndex": "0x0",
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
"data": "0x0000000000000000000000000000000000000000000000000000000000000004",
"topics": [
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
]
},
{
"logIndex": "0x0",
"removed": false,
"blockNumber": "0x238",
"blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
"transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
"transactionIndex": "0x0",
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
"data": "0x0000000000000000000000000000000000000000000000000000000000000007",
"topics": [
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
]
}
]