Get Contract Logs
Last updated
Was this helpful?
Last updated
Was this helpful?
Search the logs across many contracts with 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.
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
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.
/api/v1/contracts/results/logs
Contract log index
{"summary":"--","value":""}
^((eq|gt|gte|lt|lte):)?\d{1,10}$
The maximum number of items to return
2
The order in which items are listed
asc
asc
, desc
The consensus timestamp in seconds.nanoseconds format with an optional comparison operator
{"summary":"--","value":""}
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.