trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.31k forks source link

BSC-Truffle-Starter-Box Deployment Failed #6094

Closed CocoStarZ closed 1 year ago

CocoStarZ commented 1 year ago
image

Issue

Got error when deploying the contract. Error: Deployment Failed

"SimpleStorage" hit an invalid opcode while deploying. Try:

Steps to Reproduce

truffle compile --config=truffle-config.bsc.js -all npm run migrate:bsc --network bscTestnet

Expected Behavior

Contract deployed.

Actual Results

Error prompts

eggplantzzz commented 1 year ago

Hey @CocoStarZ! Actually that box (https://github.com/bnb-chain/BSC-Truffle-Starter-Box) is not officially maintained by Truffle. Only boxes tagged "official" are maintained by Truffle. I would suggest creating an issue on that repo.

CocoStarZ commented 1 year ago

which repo should i use? Also you don't really test the box posted on your official site as an example?

haltman-at commented 1 year ago

The repo to file an issue on would be https://github.com/bnb-chain/BSC-Truffle-Starter-Box, as linked above.

Yes, the breakage of the box is unfortunate... at present, we only test community-submitted boxes on submission, we don't currently do periodic retests. Sorry!

By the way, although this isn't a Truffle issue per se, it seems to me to be worth saying something about that particular error. That error is one you can get if you compile a contract for one hardfork, but then deploy it using a client that only supports an older hardfork. If you want to know how to deal with the problem yourself before the box is fixed, I would suggest updating your client if possible, and, if not, setting your compilation options to target the older hardfork your client supports.

Hope that's helpful!

eggplantzzz commented 1 year ago

Closing this for issue maintenance.

tichita7 commented 1 year ago

Faced the same issue. Can somebody tell how to fix it?

BroLetsCodeIt commented 1 year ago

image I have changed the version and it works for me

umarsandhu397 commented 11 months ago

image I have changed the version and it works for me

am thankful ... its works