getLogs
Get blockchain logs matching the given filters
Parameters
fromBlock
:(string)
OPTIONAL - Starting block for logs retrieval (default latest)toBlock
: (string)
OPTIONAL - Ending block for logs retrieval (default latest)blockHash
:(string)
- Block hash for retrieving all logs within a single block (equivalent to fromBlock = toBlock)contractAddress
:(string)
OPTIONAL - The address of the log events sender contracttopic0
:(string)
OPTIONAL - Topic hash to retrieve logs withtopic1
:(string)
OPTIONAL - Topic hash to retrieve logs withtopic2
:(string)
OPTIONAL - Topic hash to retrieve logs withtopic3
:(string)
OPTIONAL - Topic hash to retrieve logs withpageSize
:(integer)
OPTIONAL - Number of records to be retrieved on one pagepageKey
:(string)
OPTIONAL - Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response
Returns
count
:<integer>
- The number of the logs returnednextPageKey
: <string>
- Key to get the next page of results, if more results are availablelogs
:<array>
- The array of Log objectsblockHash
:<string>
- The hash of the block containing the logsblockNumber
:<integer>
- The height of the block containing the logsblockTimestamp
:<string>
- The timestamp of the block containing the logstransactionHash
:<string>
- Log transaction hashtransactionIndex
:<integer>
- Log transaction numbercontractAddress
:<string>
- The address of the contract generating the logtopic0
:(string)
- Topic to describe the log event, usually the first topic is the signature of the event nametopic1
:(string)
- Topic to describe the log eventtopic2
:(string)
- Topic to describe the log eventtopic3
:(string)
- Topic to describe the log eventdata
:<string>
- Additional data of the log event
Example Request and Result for getLogs
Request
Result
Last updated