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

Improve verify process #3

Open
andreivladbrg opened this issue Dec 12, 2024 · 3 comments
Open

Improve verify process #3

andreivladbrg opened this issue Dec 12, 2024 · 3 comments

Comments

@andreivladbrg
Copy link
Member

andreivladbrg commented Dec 12, 2024

In the flow deployment I have passed for certain chains (major ones) the --verify flag.
It didn't work, and it reverted with the error: Too many api calls

instead of running 1 CLI (forge script <options> --verify --etherscan-api <key>) try to run 2:

  1. FOUNDRY_PROFILE=optimized forge script <options>
  2. FOUNDRY_PROFILE=optimized forge verify-contract <contract> <options>

disclaimer: not sure it will be fixed

@smol-ninja
Copy link
Member

Doesn't forge script --verify implies forge script and forge verify-contract under the hood? I think some chain explorers have this rate limiting where if you don't wait for 10 seconds or so, they return Too many api calls error. I have seen it as well.

Recently, I have also seen that forge verify-contract command waits for 10-15 seconds before making another request to the API.

@andreivladbrg
Copy link
Member Author

Doesn't forge script --verify implies forge script and forge verify-contract under the hood?

yes, most likely.

the problem here is that the block explorer takes a couple of seconds to fetch all the data from the chain. although the contract is deployed, the API call doesn’t recognize it immediately, which would throw this error:
Warning: Etherscan could not detect the deployment. ("X" tries remaining)

if we deploy all contracts first and then verify them, it is very likely that sufficient time will have passed for the block explorer to fetch the data, e.g.:

  1. deploy on arbitrum
  2. deploy on optimism
  3. deploy on polygon
  4. verify on arbitrum
  5. verify on optimism
  6. verify on polygon

lmk if this makes sense

I have also seen that forge verify-contract command waits for 10-15 seconds before making another request to the API.

interesting, haven't seen it

@smol-ninja
Copy link
Member

Thats a good explanation of it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants