I need to subscribe to my smart-contract events (#[ink(event)]
). So I state_subscribeStorage
to "System.Events" storage key. But then I get all system events of all smart contracts in my chain. Can I save websocket traffic and have only events that I am interested in?
Since substrate contract events have topics (#[ink(topic)]
), there has to be a way to filter the received events by the topics. Or else why are the topics introduced?
I know about external indexers. But I would like to be simple and use only the substrate node.
storage_changes
in the Substrate codebase