-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
forge create, cast call/send returns an error message saying transaction did not go through, even though it did #1362
Comments
This is more of an For a fix in Forge, we should consider doing what casts does and emit a warning when we think the transaction has been dropped, so the user can check for themselves: Line 600 in 92427e7
Also looping in @mattsse, maybe he has some ideas for fixing this in ethers Edit: Ah, I see some of these are cast commands. If cast returns that message, then it basically just means that the node you are talking to has no knowledge of the transaction. This can happen if the node is out of sync, but sometimes it's just because the node has not received the transaction yet. We should make the |
yeh this mempool related, this is rather an issue in ether's cc @prestwich |
yeah, I'm somewhat at a loss as to how to improve it. Maybe a grace period of n attempts before it assumes the tx was dropped? |
good internet connection, and have tested with different rpcs (alchemy, infura and quicknode) with the same results. Mainly on rinkeby! |
-.-
that's probably an easier fix for us, maybe with a retry counter or something |
could do something like a loop querying |
I think a grace period makes more sense. FWIW I've heard of multiple people having this issue on some testnets, in particular Rinkeby, so perhaps it's just a Rinkeby thing |
This should have been fixed in gakonst/ethers-rs#1221, let us know if it is not! |
Component
Forge, Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (90617a5 2022-04-12T00:13:04.257461+00:00)
What command(s) is the bug in?
forge create, cast call, cast send
Operating System
macOS (M1)
Describe the bug
running
forge create --rpc-url $my_rpc --private-key $my_pk src/Contract.sol:Contract
with this contract:
gives me this error message:
However if I go to my address on etherscan, the contract was deployed. I get this output from forge create around 80% of the time, and the expected "successful deployment" message 20% of the time.
If I instead run like this
this line stands out to me:
Essentially the same happens if I use cast call or cast send, for example this command:
cast call <address> "a()(uint)" --rpc-url $my_rpc
results in:
even though the message call went through. (exactly the same issue with cast send)
The text was updated successfully, but these errors were encountered: