20 Compute Units and each notification delivered on the subscription will use 10 Compute Units regardless of size.
Reference: Here
Parameters
subscription name - string - The type of event you want to subscribe to (newHeads, logs, newPendingTransactions, syncing). This method supports the following subscription types:
- newHeads - Fires a notification each time a new header is appended to the chain, including chain reorganizations.
- logs - Returns logs that are included in new imported blocks and match the given filter criteria. Linea needs the filter object, even if empty:
["logs", {}]. - newPendingTransactions - Returns the hash of each transaction added to the node’s pending pool.
- syncing - Notifies when the node starts or stops syncing.
data - object - (Optional) - Arguments such as an address, multiple addresses, and topics. Only logs that match the address filter (any one of the listed addresses) and the topic filter are returned.
Returns
result - string - 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.