pythereum icon indicating copy to clipboard operation
pythereum copied to clipboard

Would it be possible to subscribe to contract events using this library?

Open peerchemist opened this issue 1 year ago • 1 comments

Akin to:

  coin_burned_filter = await contract.events.wCoinBurned.create_filter(
      fromBlock=19883973, toBlock="latest"
  )

in web3.py?

peerchemist avatar May 16 '24 17:05 peerchemist

Hi Peerchemist,

This is a good feature that I have wanted to add to the library for a little while, it is not too difficult to do but I will need some time as I am swamped with work ATM.

The eventual goal syntax is

async with erpc.subscribe_events(contract.wCoinBurned) as sc:
    ...

or something along those lines

gabedonnan avatar May 17 '24 13:05 gabedonnan