Closed jo-es closed 1 year ago
is this a hard error or a log?
Just an error log. The test run will proceed with execution and pass.
could you please add all logs for RUST_LOG=ethers,foundry_evm,foundry_cli,forge
?
The following sequence of logs repeats for every RPC request
2022-11-06T15:50:41.907278Z TRACE etherscanidentifier: fetching info for <CONTRACT_ADDRESS_A>
2022-11-06T15:50:41.907319Z TRACE etherscan: GET https://blockscout.com/poa/core/api
2022-11-06T15:50:42.218126Z ERROR etherscan: Failed to deserialize response: data did not match any variant of untagged enum ResponseData res="{\"message\":\"OK\",\"result\":[{\"Address\":\"<CONTRACT_ADDRESS_B>\"}],\"status\":\"1\"}"
2022-11-06T15:50:42.218243Z WARN etherscanidentifier: could not get etherscan info: Serde(Error("data did not match any variant of untagged enum ResponseData", line: 0, column: 0))
this is strange, because the response does not match the documented API: for the getsourcecode endpoint https://blockscout.com/eth/mainnet/api-docs#contract
I'm facing the same issue and I believe that Etherscan has changed their free tier:
Here are the traces I get when enabling the logs:
So apparently Foundry is querying Etherscan at a rate that is faster than 5 reqs/s.
There are some duplicate requests, so I guess some sort of caching could help alleviate the problem,.
Posting one more example from our project.
```text Run forge script script/DeployProxyTarget.s.sol --broadcast --rpc-url "goerli" --sig "run(address)" -vvvv "0xcf482b964883F58c2413b7500925FD8299293Cd1" forge script script/DeployProxyTarget.s.sol --broadcast --rpc-url "goerli" --sig "run(address)" -vvvv "0xcf48[2](https://github.com/sablierhq/v2-periphery/actions/runs/4930343514/jobs/8811136535#step:4:2)b96488[3](https://github.com/sablierhq/v2-periphery/actions/runs/4930343514/jobs/8811136535#step:4:3)F58c2413b7500925FD8299293Cd1" shell: /usr/bin/bash -e {0} Compiling 99 files with 0.8.19 Solc 0.8.19 finished in 13.80s Compiler run successful! 2023-05-09T20:50:57.579099Z ERROR etherscan: Failed to deserialize response: expected value at line 1 column 1 res="\n\n
\n@Evalir can we close this after the recent etherscan fixes?
Yep I believe so—we did have some deserialization issues that we fixed. Closing!
@Evalir the monthly subscription for Etherscan is $200 a month for 10 API calls per second, this is a major issue for developers, because I am not able to verify contracts manually either and not having them verified is unacceptable, forcing me to pay for Etherscan; could you just lower the API calls rate on the Foundry side!?
Yep I believe so—we did have some deserialization issues that we fixed. Closing!
How are deserialization fixes related to the api rate limit of Etherscan? Thank you
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (8b0af47 2022-11-06T00:06:24.552295Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
The following error seems to be thrown for every RPC request in a test case. (
SOME ADDRESS
points to a contract called in the test)