Blockchain 错误“块菌迁移”;处理事务时发生VM异常:操作码无效;
我使用project Metacoin迁移测试块菌并处理此错误Blockchain 错误“块菌迁移”;处理事务时发生VM异常:操作码无效;,blockchain,solidity,truffle,Blockchain,Solidity,Truffle,我使用project Metacoin迁移测试块菌并处理此错误 $ truffle migrate Compiling your contracts... =========================== > Everything is up to date, there is nothing to compile. Starting migrations... ====================== > Network name: 'development
$ truffle migrate
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'development'
> Network id: 1590824689051
> Block gas limit: 6721975 (0x6691b7)
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0x7a1e7674deb662dd59e821db7d102795724135c940f118855b5d70abb11ec64e
> Blocks: 0 Seconds: 0
> contract address: 0x2C962f16f596B423A2810B4202B09314691e2b16
> block number: 3
> block timestamp: 1590824746
> account: 0xd3a13CEEb9edFE9c0a6437f9ED124AeB5Fac9859
> balance: 99.85802118
> gas used: 188483 (0x2e043)
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.00376966 ETH
⠹ Saving migration to chain.
Error: Returned error: VM Exception while processing transaction: invalid opcode
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/migration.js:93:1)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/migration.js:57:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/migration.js:167:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:253:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:218:1
Truffle v5.1.28 (core: 5.1.28)
Node v12.17.0
我尝试了升级版本truffle、testrdc、ganeche,但仍然是错误的
$ npm install -g truffle@latest
$ npm install -g ethereumjs-testrpc@latest
$ npm install -g ganache-cli@latest
如果你有什么好的想法,请帮助我
谢谢,在使用“testrpc”命令启动本地区块链时,我也遇到了同样的错误。
当我使用“ganache cli”命令启动本地区块链时,错误得到了解决。这是一个很长的时间,但我刚刚遇到了这个问题,这是用于编译和ganache cli的编译器evmVersion不匹配。Ganache指定了拜占庭,编译器默认为其他版本(早期版本?Hi Pravin,我删除了它们并重新安装,然后解决了问题。