Last updated
Last updated
Polling method for a filter, which returns an array of logs which occurred since last poll.
Parameters
Return Value
Array
- Array of log objects, or an empty array if nothing has changed since last poll.
로 생성된 필터의 경우 블록 해시(32바이트 크기의 DATA)를 반환합니다. 예. ["0x3454645634534..."]
.
로 생성된 필터의 경우 트랜잭션 해시(32바이트 크기의 DATA)를 반환합니다. 예. ["0x6345343454645..."]
.
로 생성된 필터의 경우 로그는 다음의 매개변수들을 가지는 객체입니다.
Example
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
Return Value
Example
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:
NOTE: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest"
and "latest"
are available.
Return Value
Examples
Parameters
None
Return Value
Example
Creates a filter object, based on filter options, to notify when the state changes (logs).
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:
NOTE: In versions earlier than Klaytn v1.7.0, only integer block number, the string "earliest"
and "latest"
are available.
Return Value
Example
Parameters
None
Return Value
Example
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"
.
Return Value
Example
Parameters
Return Value
Example
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
Return Value
Example
입력된 필터 ID와 일치하는 모든 로그를 배열 형태로 반환합니다. 필터 ID는 를 통해 얻을 수 있습니다. 이때 , 와 같은 다른 필터 생성 함수를 통해 얻은 필터 ID는 본 함수에 사용할 수 없습니다.
See
See
Creates a filter in the node, to notify when a new block arrives. 상태가 변경되었는지 확인하려면 를 호출하세요.
To check if the state has changed, call .
klay_newFilter
로 생성된 필터와 일치하는 모든 로그를 가져오려면 를 호출하세요.
Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call .
"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 .
This API is appropriate for use with a WebSocket tool, .
Uninstalls a filter with given id. Should always be called when watch is no longer needed. 또한, 일정 주기 동안 를 통해 요청되지 않으면 필터는 타임아웃 됩니다.
This API is appropriate for use with a WebSocket tool, .