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

Create useContractEvents hook #207

Closed
0xEniotna opened this issue Jan 3, 2023 · 5 comments
Closed

Create useContractEvents hook #207

0xEniotna opened this issue Jan 3, 2023 · 5 comments

Comments

@0xEniotna
Copy link

Hey, do you think it is a good idea to add Wagmi's useContractEvent hook ? https://wagmi.sh/react/hooks/useContractEvent

I'd live to use that for my project so I guess it could be the case for others as well !

As a junior dev I'm not sure how difficult it is to make the necessary changes to adapt this file useContractEvent but I'd love to give it a try !

@fracek
Copy link
Contributor

fracek commented Jan 3, 2023

Yes, I think that would be a great idea! The main issue is that starknet.js provider doesn't support it because it defaults to the gateway provider. Until the ecosystem moves over to the json rpc provider I don't think it's possible to add this in a way that integrates with the rest of the library.

To go more in detail, the default provider is replaced with the wallet's provider once the user connects (so network changes with the user's wallet), so we cannot rely on the json rpc at all.

For your use case, you can manually instantiate a RpcProvider and use that in your code.

Keeping this issue open so in the future we can revisit this decision.

@Pet3ris
Copy link

Pet3ris commented May 21, 2023

Alchemy does have an events API and it seems fairly similar to TokenFlow? Could they be harmonized/supported?

@fracek
Copy link
Contributor

fracek commented May 22, 2023

For this to happen we need wallets to switch to the rpc provider. Once that happens, we can implement this issue.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had activity in the six months. It will be closed in 2 weeks if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant.

@fracek
Copy link
Contributor

fracek commented Aug 7, 2024

Close in favour of #465

@fracek fracek closed this as completed Aug 7, 2024
@fracek fracek removed the no stale label Aug 7, 2024
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

3 participants