-
Notifications
You must be signed in to change notification settings - Fork 2.3k
"Error: The contract code couldn't be stored, please check your gas amount." on any constructor error #522
Comments
Related, probably not the same, I frequently find that I have to |
I received this just now when copying my token code into another project. I didn't receive any sort of warning about any constructor error. My token code's
While the contract I imported my token code to has this
So I had to satisfy the constructor with the new Ownable param. But truffle did not warn of anything with this. It just gave me this error which was not very descriptive of the actual issue:
|
Could be contract name collision. Check your abstract contract names and see if they collide with anything. :? |
What me doing wring was modify array in constructor. I did this: |
I had this problem, and solved it by pasting the flattened code into Remix that then gave a better error description: I had an interface in the contract that I had not implemented correctly (wrong function signature). Trying to deploy an "abstract contract" gives this error, but a much better error would be what Remix gives: "This contract does not implement all functions and thus cannot be created." |
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem. |
Probably still valid though |
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can. |
Thanks for the explanation @jtakalai. We will look into improving the error messaging for that situation. |
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem. |
There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks! |
Any error instantiating a contract results in the above message. I remember truffle used to report stuff like: "contract is abstract" or "constructor threw"
The text was updated successfully, but these errors were encountered: