Truffle

在部署 MultiSigWalletWithDailyLimit:處理事務時出現錯誤 VM 異常:還原

  • June 6, 2018

我正在通過 truffle 嘗試一個非常簡單的 js 腳本,以在本地 testrpc 網路上創建Gnosis 多重簽名錢包。然而它總是失敗。

JS部署文件:

const MultiSigWalletWithDailyLimit = artifacts.require("./MultiSigWalletWithDailyLimit.sol")
module.exports = async function (callback) {
 let wallet
 try {
   wallet = await MultiSigWalletWithDailyLimit.new([multisigWalletAddress1, multisigWalletAddress2], 2, multisigWalletDailyLimit)
   console.log(`MultisigWallet: ${wallet.address}`)
 } catch (error) {
   console.log('error → ', error)
 }
}

命令:

truffle exec exec/KickStarter/deploy.js --network testrpc

錯誤:

error →  Error: VM Exception while processing transaction: revert
   at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:43303:16)
   at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:331156:36
   at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:314196:9
   at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:315621:13)
   at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:70159:18)
   at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:70449:12)
   at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:70604:12)
   at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:70564:24)
   at IncomingMessage.emit (events.js:187:15)
   at endReadableNT (_stream_readable.js:1086:12)

確保檢查您送出給的所有值MultiSigWalletWithDailyLimit

在這種情況下,錯誤被拋出,因為multisigWalletAddress2是'0x0’。它需要第二個地址。

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