List contract logs from a contract on the network
Search the logs of a specific contract across multiple contract calls. Chained logs are not included but can be found by calling /api/v1/contracts/{contractId}/results/{timestamp} or /api/v1/contracts/results/{transactionId}. When searching by topic a timestamp parameter must be supplied and span a time range of at most seven days.
Ordering
The order is governed by the combination of timestamp and index values. If the index param is omitted, the order is determined by the timestamp only.
Note: The default order for this API is currently DESC
Filtering
When filtering there are some restrictions enforced to ensure correctness and scalability.
The table below defines the restrictions and support for the endpoint
| Query Param | Comparison Operator | Support | Description | Example |
|---|---|---|---|---|
| index | eq | Y | Single occurrence only. Requires the presence of timestamp | ?index=X |
| ne | N | |||
| lt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=lte:X | |
| gt(e) | Y | Single occurrence only. Requires the presence of timestamp | ?index=gte:X | |
| timestamp | eq | Y | Single occurrence only. | ?timestamp=Y |
| ne | N | |||
| lt(e) | Y | Single occurrence only. Optional second timestamp gt(e) | ?timestamp=lte:Y | |
| gt(e) | Y | Single occurrence only. Optional second timestamp lt(e) | ?timestamp=gte:Y |
Both filters must be a single occurrence of gt(e) or lt(e) which provide a lower and or upper boundary for search.
Path parameters
Contract or account identifier in format shard.realm.num, realm.num, num or a 20-byte EVM address (with or without 0x prefix).
Query parameters
Contract log index
The maximum number of items to return
The order in which items are listed
The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
The first topic associated with a contract log. Requires a timestamp range also be populated.
The second topic associated with a contract log. Requires a timestamp range also be populated.
The third topic associated with a contract log. Requires a timestamp range also be populated.
The fourth topic associated with a contract log. Requires a timestamp range also be populated.
Response
OK
Changes
Changed in 2 of the 53 revisions of this API.82
- ○
removed the non-success response with the status
404response-non-success-status-removed
- ○
- ▲
the response property
_status/messages/items/databecame nullable for the status400response-property-became-nullable
- ▲
the response property
_status/messages/items/detailbecame nullable for the status400response-property-became-nullable
- ▲
the response property
links/nextbecame nullable for the status200response-property-became-nullable
- ▲
the response property
logs/items/allOf[ContractResultLog]/bloom/allOf[Bloom]/became nullable for the status200response-property-became-nullable
- ▲
the response property
logs/items/allOf[ContractResultLog]/contract_idbecame nullable for the status200response-property-became-nullable
- ▲
the response property
logs/items/allOf[ContractResultLog]/databecame nullable for the status200response-property-became-nullable
- ▲
the response property
logs/items/allOf[subschema #2]/root_contract_id/allOf[EntityId]/became nullable for the status200response-property-became-nullable
- ▲
the response property
logs/items/allOf[subschema #2]/transaction_indexbecame nullable for the status200response-property-became-nullable
- ○
added the non-success response with the status
404response-non-success-status-added
This revision also has 22 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲