[Filter] eth_getFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll.
JSONRPC: eth_getFilterChanges
Request
- application/json
Body
Default value: eth_getFilterChanges
Method name
Default value: 1
Request ID, Random or Auto incrementation
Default value: 2.0
JSON-RPC Version (2.0)
The filter id
Responses
- 200
Array - Array of log objects, or an empty array if nothing has changed since last poll.
- application/json
- Schema
- Example (from schema)
Schema
Array [
- BlockHash
- TransactionHash
- LogObject
]
Default value: 2.0
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
| code | message | description | |-----|-----|-------| | -32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. | |-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
result
object[]
Array of log objects, or an empty array if nothing has changed since last poll.
anyOf
string
string
true when the log was removed, due to a chain reorganization. false if its a valid log.
Integer of the log index position in the block. null when it is a pending log.
Integer of the transactions index position log was created from. null when pending.
Hash of the transactions this log was created from. null when pending.
Hash of the block where this log was in. null when pending.
The block number where this log was in. null when pending.
Address from which this log originated.
Contains the non-indexed arguments of the log.
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.).
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": [
{
"address": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b",
"topics": [
"0xd596fdad182d29130ce218f4c1590c4b5ede105bee36690727baa6592bd2bfc8"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000007b",
"blockNumber": "0x54",
"transactionHash": "0xcd4703cd62bd930d4652999bce8dcb75b7ade49d922fa42dc11e568c52a5fa6f",
"transactionIndex": "0x0",
"blockHash": "0x9a49f30f1d1876ff3913bd0aa58f328822e7a369cb13e0640b82234f26e781bb",
"logIndex": "0x0",
"removed": false
}
]
}