EVM RPC API
eth_newFilter
Creates an arbitrary filter object, based on filter options, to notify when the state changes (logs).
To check if the state has changed, call eth_getFilterChanges
.
note
Filters expire after 5 minutes of inactivity (no queries).
Note on specifying 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
- An object of type FilterfromBlock
:QUANTITY|TAG
- (optional, default “latest”) Integer block number, or “earliest”, “latest” or “pending” for not yet mined transactionstoBlock
:QUANTITY|TAG
- (optional, default “latest”) Integer block number, or “earliest”, “latest” or “pending” for not yet mined transactionsaddress
:DATA|Array of DATA
, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originatetopics
:Array of DATA
, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options
Returns
QUANTITY
- A filter id
POST
https://{network}.s.chainbase.online/v1
/
{api-key}
Path Parameters
Body
application/json