Truffle Migrate Error: "<ContractName>" hit an invalid opcode while deploying #6214
Unanswered
kaquya
asked this question in
General Q&A
Replies: 1 comment 1 reply
-
i also get this prob for now😅... i found a post saying that it may be a problem with solidity, solc and node versions, and I found that your node version is relatively high, you can try using nvm to switch to a lower node version... i am also tring this method, hope it works🥲 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to deploy a contract named
InfinityCanvas
on a local Ganache blockchain using Truffle. However, I'm encountering an "invalid opcode" error during the deployment process.Issue:
When running
truffle migrate --reset
, I encounter the following error:Code Details:
Environment:
Any help or insights into why this is happening and how to resolve it would be greatly appreciated!
Fixes Tried:
InfinityCanvas
contract does not have any parameters in its constructor that might not be provided during migration.truffle-config.js
to ensure that the contract is not running out of gas during deployment.solc
to see if there were any issues not caught by Truffle.2_deploy_infinity_canvas.js
doesn't have any inconsistencies or errors.truffle-config.js
matches the version in the contract file.contracts
directory that might be causing conflicts during migration.Unfortunately, none of the above steps resolved the issue. Its also possible though, that I did do something wrong when trying the above named fixes.
Beta Was this translation helpful? Give feedback.
All reactions