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.
Contract log index
^((eq|gt|gte|lt|lte):)?\d{1,10}$
The maximum number of items to return
2
The order in which items are listed
"asc"
The consensus timestamp in seconds.nanoseconds format with an optional comparison operator
^((eq|gt|gte|lt|lte|ne):)?\d{1,10}(.\d{1,9})?$
The first topic associated with a contract log. Requires a timestamp range also be populated.
^(0x)?[0-9A-Fa-f]{1,64}$
The second topic associated with a contract log. Requires a timestamp range also be populated.
^(0x)?[0-9A-Fa-f]{1,64}$
The third topic associated with a contract log. Requires a timestamp range also be populated.
^(0x)?[0-9A-Fa-f]{1,64}$
The fourth topic associated with a contract log. Requires a timestamp range also be populated.
^(0x)?[0-9A-Fa-f]{1,64}$
OK
The hex encoded EVM address of the contract
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
^0x[0-9A-Fa-f]{40}$
"0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398"
The hex encoded bloom filter of the contract log
Network entity ID in the format of shard.realm.num
"0.1.2"
^\d{1,10}\.\d{1,10}\.\d{1,10}$
The hex encoded data of the contract log
"0x00000000000000000000000000000000000000000000000000000000000000fa"
The index of the contract log in the chain of logs for an execution
0
A list of hex encoded topics associated with this log event
The hex encoded block (record file chain) hash
"0x553f9311833391c0a3b2f9ed64540a89f2190a511986cd94889f1c0cf7fa63e898b1c6730f14a61755d1fb4ca05fb073"
The block height calculated as the number of record files starting from zero since network start.
10
Network entity ID in the format of shard.realm.num
"0.1.2"
^\d{1,10}\.\d{1,10}\.\d{1,10}$
The executed contract that created this contract log
"1586567700.453054000"
^\d{1,10}(\.\d{1,9})?$
A hex encoded transaction hash
"0x397022d1e5baeb89d0ab66e6bf602640610e6fb7e55d78638db861e2c6339aa9"
The position of the transaction in the block
1