crytic / echidna

Ethereum smart contract fuzzer
https://secure-contracts.com/program-analysis/echidna/index.html
GNU Affero General Public License v3.0
2.71k stars 357 forks source link

ETHERSCAN_API_KEY should be captured as a requirement in README.md and made scalable to other blockchain #1188

Closed viper7882 closed 7 months ago

viper7882 commented 7 months ago

Describe the desired feature

Despite ETHERSCAN_API_KEY environment variable seems to be a requirement to run Echidna on-chain in order to prevent API timeout but I see no trace of it been mentioned in README.md file.

I saw ETHERSCAN_API_KEY is hardcoded in the Echidna's source code and I wonder if ETHERSCAN_API_KEY could be moved to .env file (python-decouple module) so that Echidna could further scalable to other blockchain? For instant, despite with proper RPC configured for BSCScan, due to lack of ability for Echidna to configure BSCScan APIKey, run Echidna on-chain for BSCScan seems impossible at this moment of time but yet the API provided by Ethereum and BSCScan are identical. It seems like a low hanging fruit Echidna could opt for and support more blockchain networks.

My ask is for Echidna to replace the hardcoded ETHERSCAN_API_KEY with reading API key from .env file for any blockchain. I trust this move will significantly improve popularity of Echidna to all blockchains with RPC endpoints.

ggrieco-tob commented 7 months ago

Just to clarify, running Echidna on BSC is possible. The fetching of the source map will fail, since this is hardcoded for etherscan, but that only happens when the fuzzing campaign is over and it will not trigger a hard failure. According to @arcz, BSC scan and other Etherscan alternatives do not provide source mappings, so it seems this feature will not be useful even if we implement it.

viper7882 commented 7 months ago

I see. I remember when I tried with different chain it didn't work. Nvm, let's close this case for now.