博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
以太坊问题
阅读量:5986 次
发布时间:2019-06-20

本文共 2265 字,大约阅读时间需要 7 分钟。

hot3.png

Error: The method eth_getCompilers does not exist/is not available

因为以太坊高版本中该API被废弃

 

TypeError: web3.eth.contract is not a function

因为1.0以后API废弃

 

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.
(/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"}

转载于:https://my.oschina.net/kingwjb/blog/1861489

你可能感兴趣的文章
ajax提交json数据,后台解析问题
查看>>
【转】iOS开发里的Bundle是个啥玩意?!
查看>>
2016第43周四
查看>>
Qt Creator快捷键
查看>>
解读Raft(四 成员变更)
查看>>
mysql case when 判断null
查看>>
Convert enumeraltor to Dictionary object
查看>>
ios中封装网络和tableview的综合运用
查看>>
如何做好微信营销?
查看>>
Ubuntu下将python从2.7升级到3.5
查看>>
Fastboot线刷“复活”之刷机心得(三)——错误处理
查看>>
vim Google style format
查看>>
m_Orchestrate learning system---十六、如何快速在一堆字符图标中找到所需
查看>>
猎婚族
查看>>
A breakdown pie chart - ReportLab Snippets (Beta)
查看>>
字符串&Math&date
查看>>
基于阿里云物联网平台,我们这样实现简易出入监控
查看>>
双十一,作为老用户看我怎么优雅的薅阿里云羊毛!
查看>>
[译] JavaScript 是如何工作的:CSS 和 JS 动画背后的原理 + 如何优化性能
查看>>
电视行业的三大回春良药:升级技术、加强实用性、优化服务
查看>>