true when the log was removed, due to a chain reorganization. false if it is a valid log.
logIndex
QUANTITY
Integer of the log index position in the block. null when it is a pending log.
transactionIndex
QUANTITY
Integer of the transactions index position log was created from. null when pending.
transactionHash
32-byte DATA
Hash of the transactions this log was created from. null when pending.
blockHash
32-byte DATA
Hash of the block where this log was in. null when pending.
blockNumber
QUANTITY
The block number where this log was in. null when pending.
address
20-byte DATA
Address from which this log originated.
data
DATA
Contains the non-indexed arguments of the log.
topics
Array of DATA
Array of 0 to 4 32-byte DATA of indexed log arguments. (In Solidity: The first topic is the hash of the signature of the event (e.g., Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.).
Returns an array of all logs matching a given filter object.
The execution of this API can be limited by two node configurations to manage resources of Klaytn node safely.
The number of maximum returned results in a single query (Default: 10,000).
The execution duration limit of a single query (Default: 10 seconds).
Parameters
Object - The filter options:
Name
Type
Description
fromBlock
QUANTITY | TAG
(optional, default: "latest") Integer or hexadecimal block number, or the string "earliest", "latest" or "pending" as in the default block parameter.
toBlock
QUANTITY | TAG
(optional, default: "latest") Integer or hexadecimal block number, or the string "earliest", "latest" or "pending" as in the default block parameter.
address
20-byte DATA | Array
(optional) Contract address or a list of addresses from which logs should originate.
topics
Array of DATA
(optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options.
blockHash
32-byte DATA
(optional) A filter option that restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in in the filter criteria, then neither fromBlock nor toBlock are allowed.
NOTE: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.
A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:
[] "anything"
[A] "A in first position (and anything after)"
[null, B] "anything in first position AND B in second position (and anything after)"
[A, B] "A in first position AND B in second position (and anything after)"
[[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)"
Parameters
Object - The filter options:
Name
Type
Description
fromBlock
QUANTITY | TAG
(optional, default: "latest") Integer or hexadecimal block number, or the string "earliest", "latest" or "pending" as in the default block parameter.
toBlock
QUANTITY | TAG
(optional, default: "latest") Integer or hexadecimal block number, or the string "earliest", "latest" or "pending" as in the default block parameter.
address
20-byte DATA | Array
(optional) Contract address or a list of addresses from which logs should originate.
topics
Array of DATA
(optional) Array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.
NOTE: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest" and "latest" are available.
Creates a new subscription to specific events by using either RPC Pub/Sub over WebSockets or filters over HTTP. It allows clients to wait for events instead of polling for them.
The node will return a subscription id for each subscription created. For each event that matches the subscription, a notification with relevant data is sent together with the subscription id. If a connection is closed, all subscriptions created over the connection are removed.
Parameters
Object - A notification type: "newHeads" or "logs".
"newHeads" notifies you of each block added to the blockchain. "logs" notifies you of logs included in new blocks. This type requires a second parameter that specifies filter options. For more details, go to klay_newFilter > parameters.
Return Value
Type
Description
QUANTITY
A subscription id when a subscription is created. For each event that matches the subscription, a notification with relevant data will be delivered as well.
Example
This API is appropriate for use with a WebSocket tool, wscat.
Uninstalls a filter with given id. Should always be called when watch is no longer needed. 또한, 일정 주기 동안 klay_getFilterChanges를 통해 요청되지 않으면 필터는 타임아웃 됩니다.
Parameters
Name
Type
Description
filter
QUANTITY
A filter id.
Return Value
Type
Description
Boolean
true if the filter was successfully uninstalled, otherwise false.
Cancels the subscription with a specific subscription id by using either RPC Pub/Sub over WebSockets or filters over HTTP. Only the connection that created a subscription can unsubscribe from it.
Parameters
Type
Description
QUANTITY
A subscription id.
Return Value
Type
Description
Boolean
true if the subscription was successfully canceled, otherwise false.
Example
This API is appropriate for use with a WebSocket tool, wscat.