ape-etherscan icon indicating copy to clipboard operation
ape-etherscan copied to clipboard

False positive for "Etherscan API server rate limit error"

Open BlinkyStitt opened this issue 1 year ago • 3 comments

Environment information

  • OS: macOS
  • Python Version: 3.10.13
  • ape and plugin versions:
$ ape --version
0.7.11.dev9+ga8d1487d

$ ape plugins list
Installed Plugins
  alchemy         0.7.1
  ens             0.7.0
  etherscan       0.7.1
  foundry         0.7.4.dev6+ga535421
  ganache         0.7.0
  hardhat         0.7.0
  infura          0.7.1
  polygon         0.7.1
  solidity        0.7.1
  template        0.7.0
  tokens          0.7.1
  vyper           0.7.0

Third-party Plugins
  flashprofits    0.0.1
  roll            0.0.3

What went wrong?

I am tracing a transaction that calls some contracts that are not verified. The error message is incorrect and the red "ERROR" is rather scary.

ERROR: Unable to fetch contract type at '0xf081470f5C6FBCCF48cC4e5B82Dd926409DcdD67' from explorer.
Response indicated failure: Etherscan API server rate limit exceeded.

If ETHERSCAN_API_KEY is not set, the error message is slightly different (and has a minor typo with two periods):

Response indicated failure: Etherscan API server rate limit exceeded.. Try setting ETHERSCAN_API_KEY'.

How can it be fixed?

The error detection needs to distinguish between a contract without verified code and a rate limit error.

BlinkyStitt avatar Mar 10 '24 05:03 BlinkyStitt

transferred issue to correct plugin

fubuloubu avatar Mar 11 '24 18:03 fubuloubu