question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lib/etherscan_provider.ts doesn't accept API key

See original GitHub issue

Note: Not all sections may be relevant, but please be as thorough while remaining concise as possible. Remove this Notice and any sections that don’t feel pertinent.

If you are unsure if something is a bug, start a thread in the “discussions” tab above…

Describe the bug I provide a defaultProvider object with all 4 API keys. However, the lib/etherscan_provider.ts file still prints a warning when executing a transaction (const response = await fromEthWallet.sendTransaction(tx);)

========= NOTICE =========
Request-Rate Exceeded  (this message will not be repeated)

The default API keys for each service are provided as a highly-throttled,
community resource for low-traffic projects and early prototyping.

While your application will continue to function, we highly recommended
signing up for your own API keys to improve performance, increase your
request rate/limit and enable other perks, such as metrics and advanced APIs.

For more details: https://docs.ethers.io/api-keys/
==========================

meaning the API key doesn’t work, although I copied it directly from Etherscan (it also shows 0 calls on etherscan). I put a print statement right before this message, and that is repeatedly printed from the same place as the code constantly retries.

Reproduction steps As above.

Environment: Running code with: npx --node-options='--trace-sigint' ts-node test.ts 2>&1 | tee -a log.out

Here is my relevant package.json:

  "dependencies": {
    "@alch/alchemy-web3": "^1.1.1",
    "ethers": "^5.4.1",
    "readline": "^1.3.0",
    "ts-node": "^10.1.0",
    "tslib": "^2.3.0",
    "typescript": "^4.3.5",
    "web3": "^1.4.0",
  },
  "devDependencies": {
    "@types/node": "^16.4.1",
    "hardhat": "^2.4.3",
    "nodemon": "^2.0.12"
  }

On desktop.

Search Terms N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ricmoocommented, Aug 5, 2021

This should be fixed in 5.4.4. Please try it out and let me know if you have any issues.

Thanks! 😃

1reaction
ricmoocommented, Aug 4, 2021

Interesting. I’ll look into this right away. Thanks for checking deeper into it. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Ethers.js
The ethers library offers default API keys for each service, so that each Provider works out-of-the-box. These API keys are provided as a...
Read more >
Top 5 @ethersproject/web Code Examples - Snyk
To help you get started, we've selected a few @ethersproject/web examples, based on popular ways it is used in public projects.
Read more >
When creating a definition file in Typescript, how can I add an ...
Clearly, without an API key, this doesn't work, and adding the key as in the JavaScript example didn't work either. So how can...
Read more >
@ethersproject/providers | Yarn - Package Manager
A complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript). Features: Keep your private keys in your client, safe and sound; Import ......
Read more >
Truffle/node_modules/ethers/dist/ethers.d.ts.map - gitlab@IfI
This project aims to introduce Smart Contracts that support the ... (and large)\n // libraries, so for now we simply do not support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found