Solidity

TRUFFLE MIGRATE:保存遷移到鏈。錯誤:錯誤:錯誤:返回錯誤:處理事務時 VM 異常:操作碼無效

  • May 3, 2020

$松​​露遷移

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.


Starting migrations...
======================
> Network name:    'development'
> Network id:      5777
> Block gas limit: 0x1ff973cafa8000


1_initial_migration.js
======================

  Deploying 'Migrations'
  ----------------------
  > transaction hash:    0xb1c862e8e0ef63c49e711d9816606ece17f3b542a63f3ee7231134c0893ecc5c
  > Blocks: 0            Seconds: 0
  > contract address:    0x1504492B6573ef3A9a14dAe6Cc09563Fb4781565
  > block number:        7
  > block timestamp:     1560679987
  > account:             0x8110D6959350570944fa2484E63D5803730e4406
  > balance:             99999.57577006
  > gas used:            261393
  > gas price:           20 gwei
  > value sent:          0 ETH
  > total cost:          0.00522786 ETH


  ⠙ Saving migration to chain.Error: Error: Error: Returned error: VM Exception while processing transaction: invalid opcode
   at Object.run (/Users/xxx/.nvm/versions/node/v8.9.4/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
   at <anonymous>
   at process._tickCallback (internal/process/next_tick.js:188:7)
Truffle v5.0.5 (core: 5.0.5)
Node v8.9.4

找不到問題的問題..只是試圖遷移非常基本的遷移契約,它會引發此錯誤。有任何想法嗎?

問題解決了

$ npm 和 -g truffle@v5.0.5

引用自:https://ethereum.stackexchange.com/questions/71906