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

fix: waitForTransactionReceipt proper eth_call usage #4339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndriyAntonenko
Copy link

@AndriyAntonenko AndriyAntonenko commented Oct 14, 2024

This PR addresses a bug in the @wagmi/core library, specifically in the waitForTransactionReceipt function. The bug occurs when arguments are provided to skip simulation and gas estimation. The data field was not being passed to the eth_call function, which resulted in unexpected errors.

I've made a simple repository that has a script that reproduces this issue: https://github.com/AndriyAntonenko/wagmi-waitfortransaction-bug-poc

Copy link

changeset-bot bot commented Oct 14, 2024

🦋 Changeset detected

Latest commit: b362bfe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@wagmi/core Patch
@wagmi/connectors Patch
wagmi Patch
@wagmi/vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 9:30am

@tmm
Copy link
Member

tmm commented Oct 14, 2024

Let's update this PR so it only fixes the issue and doesn't add new features.

Also, I've added the possibility to pass abi and functionName as optional params in waitForTransactionReceipt. These arguments will be used to parse the possible error thrown by action_call function

Ideally this type of thing is added to Viem so Wagmi gets it for free. Please create a discussion over there before creating a PR.

@AndriyAntonenko AndriyAntonenko force-pushed the fix/wait-for-transaction-receipt-eth-call branch from 497b171 to b362bfe Compare October 15, 2024 09:24
@AndriyAntonenko
Copy link
Author

@tmm thanks, I've removed the part with error handling. Now this PR only fix the bug

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

Successfully merging this pull request may close these issues.

3 participants