Parameters
- subscription typestringREQUIRED
The type of Flashblock event you want to subscribe to. This method supports the following Flashblock-specific subscription types:
- newFlashblockTransactions
Streams transactions as they are included in Flashblocks. Optionally pass a second boolean parameter set to true for enriched transaction and log data
- pendingLogs
Streams logs matching a given filter as they appear in Flashblocks. Accepts an optional filter object with address and topics fields
- newFlashblocks
Streams block state updates for each new Flashblock
- optionsobject
Optional parameters depending on the subscription type. For newFlashblockTransactions, pass true as a boolean for enriched data. For pendingLogs, pass a filter object with address and topics fields
- addressstring
The contract address or a list of addresses from which logs should originate (used with pendingLogs)
- topicsarray
An array of topic hashes to filter logs by (used with pendingLogs)
Returns
- resultstring
The hex-encoded subscription ID. This ID will be attached to all received events and can also be used to cancel the subscription using eth_unsubscribe
1{2"id": 1,3"jsonrpc": "2.0",4"result": "0x1887ec8b9589ccad00000000000532da"5}
1{2"id": 1,3"jsonrpc": "2.0",4"result": "0x1887ec8b9589ccad00000000000532da"5}