eth_getLogs
Returns an array of all the logs matching the given filter object. See also the below Constraints section.
Parameters
A filter object containing the following:
address
: [optional] Contract address (20 bytes) or a list of addresses from which logs should originate.fromBlock
: [optional, default is "latest"] A hexadecimal block number, or one of the string tagslatest
,earliest
,pending
,safe
, orfinalized
. See the default block parameter.toBlock
: [optional, default is "latest"] A hexadecimal block number, or one of the string tagslatest
,earliest
,pending
,safe
, orfinalized
. See the default block parameter.topics
: [optional] Array of 32 bytes DATA topics. Topics are order-dependent.blockhash
: [optional] Restricts the logs returned to the single block referenced in the 32-byte hashblockHash
. UsingblockHash
is equivalent to settingfromBlock
andtoBlock
to the block number referenced in theblockHash
. IfblockHash
is present in in the filter criteria, then neitherfromBlock
nortoBlock
are allowed.