i'm testing my Smart Contract with Truffle and Ganache, everything works fine while using hadfork version "Petersburg", but when i switch to Byzantium i receive this error while truffle performs deploy:
Compiling your contracts...
===========================
√ Fetching solc version list from solc-bin. Attempt #1
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\MyContract.sol
√ Fetching solc version list from solc-bin. Attempt #1
> Artifacts written to C:\Users\[...]\AppData\Local\Temp\test-202032-8352-17dkmqb.vs9r
> Compiled successfully using:
- solc: 0.5.17+commit.d19bba13.Emscripten.clang
Error: Returned error: VM Exception while processing transaction: invalid opcode at PromiEvent (C:\Users\User-PC\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\contract\lib\promievent.js:9:1)
at TruffleContract.setCompleted (C:\Users\User-PC\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\contract\lib\execute.js:169:1)
at Migration._deploy (C:\Users\User-PC\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\migration.js:93:
Truffle and Ganache are both updated to the latest version. i'm using web3 1.2
The Smart Contract is ok, i also did a lot of test and debuging on remix.
Any suggestion?