Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EtherscanProvider.getHistory(), got an error; #2181

Open
jeffreyzzzs opened this issue Oct 18, 2021 · 1 comment
Open

EtherscanProvider.getHistory(), got an error; #2181

jeffreyzzzs opened this issue Oct 18, 2021 · 1 comment
Labels
investigate Under investigation and may be a bug.

Comments

@jeffreyzzzs
Copy link

I got this error on EtherscanProvider.getHistory(address);

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: ...

Here's my code:
const ethers = require('ethers'); const provider = new ethers.providers.EtherscanProvider(); const address = "0x99b02491Fd1A9a7A97a31d046767c08D5cCc9A1d"; const history = await provider.getHistory(address);

@jeffreyzzzs jeffreyzzzs added the investigate Under investigation and may be a bug. label Oct 18, 2021
@jeffreyzzzs
Copy link
Author

Where do I have problems writing this way, can you help me see it?

ethers version : "ethers": "^5.4.7"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug.
Projects
None yet
Development

No branches or pull requests

1 participant