-
Notifications
You must be signed in to change notification settings - Fork 149
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
Missing event watcher hook like useWatchContractEvent #465
Comments
Good catch! The good news is that the Starknet RPC spec includes a continuation token for the |
So we are getting a useWatchContractEvent hook for starknet-react? l'd be happy to contribute to it. |
Yes, it should be |
To implement this hook you'll need to add some extra work since it's the first hook that uses infinite queries.
|
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedWe develop smart contracts in Solidity for Ethereum's testnet and mainnet, and we use Next.js and React with TypeScript for the front end. Now, we're starting smart contract development on the Stellar blockchain using Soroban (Rust). I use Wagmi for wallet connections and hooks, and I've found it very effective. After reading the documentation, I have a good idea of how to implement something similar to the useWatchContractEvent hook. My focus is on maintaining clean, scalable code that aligns with the structure and quality of our existing codebase. How I plan on tackling this issueCreate a custom React hook similar to useWatchContractEvent for StartkNet. This hook would subscribe to specific events on the StartkNet smart contract and update your React component's state based on those events. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedHey! I'd like to collaborate on this project. I have five years of frontend development experience, I'm currently going through a Starknet bootcamp with Dojo Coding, which provides me with the foundational knowledge needed. I believe this combination of my experience and current training makes me well-suited to tackle this issue. I've already contributed to another project using Typescript and Starknet.js. Thanks for considering me. How I plan on tackling this issueI'd love this challenge, I would test the wagmi hook shared in issue and try to understand that implementation to replicate in this context. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveraged15 years of commercial development in Web 2.0 It's hard to tell, I know my way around technologies. How I plan on tackling this issueI'll do as describe in comment: To implement this hook you'll need to add some extra work since it's the first hook that uses infinite queries. First you need to wrap useInfiniteQuery like we did with useQuery in query.ts. It just makes only some parameters configurable. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am a web3 developer who has won multiple web3 hackathons and have contributed to web3 open source projects. I was the original poster of this issue which I raised because I encountered it in StarkHack hackathon. Because I was occupied with my university exams so I was not able to start working on this issue. Now that I'm back I can start working on this issue. I'll be able to implement this hook with the experience and the skills I have with react and typescript. How I plan on tackling this issueI think @fracek has provided a good detailed explanation about how to implement this hook. I'll be following that and start working on it. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedHi @fracek I'm available to work on creating a hook for logging contract events. My name is Benjamin, and I have extensive experience in developing and integrating custom hooks to manage blockchain interactions efficiently. My background includes working with various hooks and APIs to enhance functionality and performance in decentralized applications. Understanding the IssueCurrently, there is no hook available for logging contract events similar to How I plan on tackling this issueDevelop Contract Event Hook
Implementation Steps
TasksDevelop Hook
Testing
Documentation
|
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm Software Engineer frontend. I have experience with React and hooks How I plan on tackling this issueI will implemente a component useWatchContractEvent similar to the library wagmi. It's a useful component and the issue seems fun |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm a Full Stack Web Developer with a solid background in front-end and back-end development. So it will be a pleasure to contribute for the first time to this great project. I am a member of the Dojo Coding community. How I plan on tackling this issue
|
Hey @0xmihirsahu have a go at implementing this. Notice that like I mentioned starknet events rpc call has the possibility of paginating responses so we can use the useInfiniteQuery hook from react query. Make sure to wrap it like we do with useQuery |
@fracek is this issue still open? |
There's no hook for logging contract events like https://wagmi.sh/react/api/hooks/useWatchContractEvent#usewatchcontractevent
The text was updated successfully, but these errors were encountered: