Get logs by contract address
GET/:network/chain/logs/contract/:contract_address
Get logs by contract address
Request
Path Parameters
Blockchain network name or chain id
Contract address to filter logs
Query Parameters
The starting block number.
The ending block number. Must be greater than startBlock and not more than 2000 blocks further.
The block hash to filter logs.
The topics array to filter logs.
Responses
- 200
- 400
The logs for the specified contract.
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
Blockchain network name For the requested query
The chain ID of the network.
The total number of logs returned.
logs
object[]
required
The logs returned by the query.
The address of the contract that emitted the event.
The topics of the log entry, typically an event signature and indexed parameters.
The data of the log entry, typically non-indexed event parameters.
The block number where this log was included.
The block hash where this log was included.
The index position of this log in the block.
The transaction hash of the transaction that emitted the event.
The index position of the event log within the transaction.
Whether the event was removed due to a chain reorganization.
[
{
"network_name": "eth-mainnet",
"chain_id": 1,
"count": 1,
"logs": [
{
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
"topics": [
"string"
],
"data": "string",
"block_height": 0,
"block_hash": "string",
"log_index": 0,
"transaction_hash": "string",
"transaction_index": 0,
"removed": true
}
]
}
]
Failed to fetch logs.