VM invalid opcode

Error: VM Exception while processing transaction: invalid opcode
解决方法,
明天早上起来试试

New opcodes were introduced in Constantinople/St. Petersburg hard fork. Solidity compiler was able to produce such opcodes since 0.4.24, but this feature became enabled by default only in 0.5.5. Ganache Core supports this opcodes since version 2.5.1, but Ganache 2.0.0-beta.2 is based on Ganache Core 2.3.3. That’s why you contract failed to work.

改ganache版本

After updating Ganache to latest version(v2.0.1) it worked.

你可能感兴趣的:(笔记)