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

Unable to store contract code caused by an HDWalletProvider issue with node deployment #6

Open
scasplte2 opened this issue May 31, 2018 · 3 comments

Comments

@scasplte2
Copy link

scasplte2 commented May 31, 2018

Kept receiving the error "UnhandledPromiseRejectionWarning: Error: The contract code couldn't be stored, please check your gas limit" when trying to deploy the Inbox contract with node.

Seems there is some sort of issue with the HDWalletProvider 0.0.5, as documented here
https://stackoverflow.com/questions/50201353/unhandledpromiserejectionwarning-error-the-contract-code-couldnt-be-stored-p

Following the instructions and installing 0.0.3 resolved the issue for me.

@scasplte2 scasplte2 changed the title HDWalletProvider issue with node Unable to store contract code caused by an HDWalletProvider issue with node deployment May 31, 2018
@aidanbon
Copy link

aidanbon commented Jun 1, 2018

The other workaround to this issue (with HDWalletProvider 0.0.5) is to explicitly specify the contract bytecode is in hexadecimal format by prefixing the bytecode string with "0x". For example:

"0x" + bytecode

See discussion in https://ethereum.stackexchange.com/questions/47482/error-the-contract-code-couldnt-be-stored-please-check-your-gas-limit/

@Sherry-94
Copy link

@aidanbon Thanks a lot man! "0x" + bytecode this did the trick!

@dovuofficial
Copy link

Worked for me, too. Thanks @aidanbon :)

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 a pull request may close this issue.

3 participants