monadLogs
Returns logs (that match a given filter) as soon as the block is Proposed.
The monadLogs
subscription type emits logs that match a specified topic filter as soon as the block is Proposed and the node has speculatively executed the transactions. This provides earlier access to log data compared to regular logs
subscriptions which wait for block finalization.
Supported Networks
Check the Chains page for details about product and chain support!
Parameters
An object with the following fields:
-
address
(optional):string
orarray of strings
Singular address or array of addresses. Only logs created from one of these addresses will be emitted. -
topics
: an array of topic specifiers (up to 4 topics allowed per address).- Each topic specifier is either
null
, a single string, or an array of strings. - For every non
null
topic, a log will be emitted when activity associated with that topic occurs.
- Each topic specifier is either
To learn more about how log topics work, check out this tutorial.
Request
Result
Below you can find the explanation for individual properties of the response:
jsonrpc
: Thejsonrpc
property specifies the version of the JSON-RPC protocol that is being used, which in this case is “2.0”.method
: Themethod
property specifies the method that was called, which in this case iseth_subscription
.params
: Theparams
property contains the parameters of the method call. In this case, it contains asubscription
property, which specifies the subscription identifier, and aresult
property, which contains the result of the subscription.result
: Theresult
property contains information about a specific transaction on the Ethereum blockchain.address
: Theaddress
property specifies the address from which this log originated.blockhash
: TheblockHash
property specifies the hash of the block in which the transaction was included.blockNumber
: TheblockNumber
property specifies the number of the block in which the transaction was included. It is encoded as a hexadecimal string.data
: Contains one or more 32 Bytes non-indexed arguments of the log.logIndex
: ThelogIndex
property specifies the index or position of the log entry within the block. It is encoded as a hexadecimal string.topics
: An array of 0 to 4 32 bytes topic hashes of indexed log arguments (up to 4 topics allowed per address).transactionHash
: ThetransactionHash
property specifies the hash of the transaction.transactionIndex
: ThetransactionIndex
property specifies the index or position of the transaction within the block. It is encoded as a hexadecimal string.