首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >EtherscanProvider.getHistory(),得到一个错误;

EtherscanProvider.getHistory(),得到一个错误;
EN

Ethereum用户
提问于 2021-10-18 10:31:42
回答 1查看 741关注 0票数 0
代码语言:javascript
运行
复制
nodejs.SERVER_ERRORError: missing response (requestBody=null, requestMethod="GET", serverError={"code":"ECONNRESET","path":null,"host":"api.etherscan.io","port":443}, url="https://api.etherscan.io/api?module=account&action=txlist&address=0x99b02491Fd1A9a7A97a31d046767c08D5cCc9A1d&startblock=0&endblock=99999999&sort=asc&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB", code=SERVER_ERROR, version=web/5.4.0)
at Logger.makeError (D:\workspace\defi\pms-defi\node_modules\@ethersproject\logger\lib\index.js:199:21)
at Logger.throwError (D:\workspace\defi\pms-defi\node_modules\@ethersproject\logger\lib\index.js:208:20)
at D:\workspace\defi\pms-defi\node_modules\@ethersproject\web\lib\index.js:213:36
at step (D:\workspace\defi\pms-defi\node_modules\@ethersproject\web\lib\index.js:33:23)
at Object.throw (D:\workspace\defi\pms-defi\node_modules\@ethersproject\web\lib\index.js:14:53)
at rejected (D:\workspace\defi\pms-defi\node_modules\@ethersproject\web\lib\index.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

reason: "missing response"
code: "SERVER_ERROR"
requestBody: null
requestMethod: "GET"
serverError: {"code":"ECONNRESET","path":null,"host":"api.etherscan.io","port":443}
url: "https://api.etherscan.io/api?module=account&action=txlist&address=0x99b02491Fd1A9a7A97a31d046767c08D5cCc9A1d&startblock=0&endblock=99999999&sort=asc&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"
name: "SERVER_ERRORError"
pid: 27988
hostname: ...

这是我的密码:

代码语言:javascript
运行
复制
const ethers = require('ethers');
const provider = new ethers.providers.EtherscanProvider();
const address = "0x99b02491Fd1A9a7A97a31d046767c08D5cCc9A1d";
const history = await provider.getHistory(address);

我在用这种方式写作时哪里有问题,你能帮我看一下吗?

醚版本:“醚”:"^5.4.7“

EN

回答 1

Ethereum用户

发布于 2021-10-22 11:22:10

在您的错误中,ECONNRESET是可见的。这意味着服务器意外地关闭了连接。这可能是由于您和Etherscan服务器之间的一些网络问题或Etherscan服务器本身的问题(不太可能立即修复)造成的。你能确保你的网络连接正常,然后再试一次吗?

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/111758

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档