您好,登錄后才能下訂單哦!
本篇內容主要講解“以太坊相關問題怎么解決”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“以太坊相關問題怎么解決”吧!
Error: The method eth_getCompilers does not exist/is not available
因為以太坊高版本中該API被廢棄
TypeError: web3.eth.contract is not a function
因為1.0以后API廢棄
TypeError: web3.eth.contract is not a function · Issue #382 · trufflesuite/ganache-cli
Error: Returned error: authentication needed: password or unlock
用戶被鎖定
personal.unlockAccount("0x....", "password");
TypeError: web3.eth.accounts is not a function
web3.eth.getAccounts()
(node:30706) UnhandledPromiseRejectionWarning: Error: Returned error: unknown account
地址不存在。
Error: The contract code couldn't be stored, please check your gas limit.
參數中添加gas
send({ from: '0x104847cdbaccb429d691145c19a5678353878e0c', gasPrice: '1490000', gas:3144658 })
(node:30475) UnhandledPromiseRejectionWarning: Error: Returned error: insufficient funds for gas * price + value at Object.ErrorResponse (/opt/workspace/web3/node_modules/web3-core-helpers/src/errors.js:29:16) at /opt/workspace/web3/node_modules/web3-core-requestmanager/src/index.js:140:36 at XMLHttpRequest.request.onreadystatechange (/opt/workspace/web3/node_modules/web3-providers-http/src/index.js:77:13) at XMLHttpRequestEventTarget.dispatchEvent (/opt/workspace/web3/node_modules/xhr2/lib/xhr2.js:64:18) at XMLHttpRequest._setReadyState (/opt/workspace/web3/node_modules/xhr2/lib/xhr2.js:354:12) at XMLHttpRequest._onHttpResponseEnd (/opt/workspace/web3/node_modules/xhr2/lib/xhr2.js:509:12) at IncomingMessage.<anonymous> (/opt/workspace/web3/node_modules/xhr2/lib/xhr2.js:469:24) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)
是因為chainId為0, 修改為其他值即可。
{ "config": { "chainId": 100, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "alloc" : {}, "coinbase" : "0x0000000000000000000000000000000000000000", "difficulty" : "0x20000", "extraData" : "", "gasLimit" : "0x2fefd8", "nonce" : "0x0000000000000042", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp" : "0x00" }
到此,相信大家對“以太坊相關問題怎么解決”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。