Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
peerchemist opened this issue May 16, 2024 · 1 comment

Comments

@peerchemist
Copy link

Akin to:

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

in web3.py?

@gabedonnan
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants