-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Getting contract deploy error even though deploy was successful ("The contract code couldn't be stored, please check your gas limit") #1477
Comments
the same for me with beta.34, but it only occurs with very large contracts (small contract deploy without this error). Actually I'm not totally sure that my large contract deploys, but it does get this error |
I'm seeing the same error on beta.26, which means it's definitely an unresolved issue with the 'error' promievent. It's quite intermittent though. |
Could you please add your code for better understanding? @mckapur |
Same here, I'm on 0.20.6. I'll try to come up with a minimal example for reproducing it. It seems to happen more frequently when using Infura. |
I've written a small script to try to figure out the cause. I'm basically repeatedly calling When running the script against a local node, the result is as expected: no tx receipt is returned from the
However, when running the script on Infura (mainnet), the result is not that consistent, and takes several seconds until it stabilizes:
Note that the I'm not sure about the best fix for this, but instead of relying on getCode, shouldn't it be best to check the |
FWIW, the trace using Infura on Ropsten is quite consistent. I could only reproduce this on mainnet so far.
|
Any word on the comment above @nivida? Building a project at Gitcoin and having issues with this. No solution found on the web works, but an intermittent error response with a consistent successful contract deployment on Rinkeby seems to fit. Using 1.0.0-beta.36. |
I've found a seeming fix. I had omitted |
@joshstevens19 @nivida hi from Gitcoin! Do you mind if we put a bounty on this to get some extra 👀 on it? we'd happily fund it, we rely on web3js for quite a bit :) |
@owocki I'm in the middle of the refactoring and currently writing all the tests. Because of this, it should be done against the ethereumProvider branch but I think it's too early. I'm already in contact with Scott Moore and I sent him some bounties I know that they could be done without relying on the ongoing refactoring. Bounty issues: https://github.com/ethereum/web3.js/issues?q=is%3Aopen+is%3Aissue+label%3Abounty |
@captnseagraves Sorry for that. I will do this with priority 1 after I merged the ethereumProvider branch. I have to write 300+ tests and to be sure all behaviors are the same as described in the documentation. If you're interested in the ongoing refactoring please have a look at the PR #2000. I give my best to be as fast as possible. |
@nivida No worries. We have a work-around in the meantime. For anyone else who lands here before the fixes are submitted I found this to work regardless if the error is present or not:
Excited to have this patch come through! Thanks nivida! |
@captnseagraves Thank you for your patch. |
@UnclePetros Hmm, I haven't had my application crash due to the error path being triggered. We are using a Django backend, perhaps Node has a reaction to the javascript error that we do not experience. You could try removing
to see if that helps work around? |
I've tested the contract deployment extensively with the latest release of Web3.js (beta.50) and didn't have any issue with it. Please open a new issue if I'm wrong. |
I'm on beta.33, and I'm seeing an issue where I deploy a contract and -- even though the contract successfully deployed -- I'll get an error saying: "The contract code couldn't be stored, please check your gas limit".
The text was updated successfully, but these errors were encountered: