Contract event watching via port subscriptions.
-- Subscribe to Transfer events
subscriptions model =
Event.watchEvent
{ contract = tokenAddress
, event = "Transfer"
, filter = []
}
|> Event.decoder transferDecoder
|> onContractEvent TransferReceivedA decoded event log.
A query for getLogs with fromBlock/toBlock range.
Create an event watch command.
Encode an event filter for the JS port.
Decode a watchEvent log from the JS port.
Requires the message to have tag: "eventLog" — use logsDecoder for
the batch getLogs response which wraps logs in an array.
Encode a getLogs query for the JS port.
Decode a list of event logs with a custom data decoder.
Decodes the { tag: "logs", logs: [...] } response from getLogs.
An event subscription filter.