-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add support for Etherscan's rate limit [APE-774] #77
Conversation
APE-774 "feat: add support for Etherscan's rate limit" (ApeWorX/ape-etherscan #77)
What I didfixes: # How I did itHow to verify itChecklist
ApeWorX/ape-etherscan #77 by fubuloubu on GitHub via LinearSync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this aint bad but we should catch the 429 error, wait , then try
import requests
import time
def make_request(url, retries=5, backoff_factor=2):
for i in range(retries):
response = requests.get(url)
if response.status_code == 429:
time.sleep(backoff_factor ** i)
else:
return response
return None
This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days. |
What is the status of this? I've been running into some rate limit issues |
Haven't had a chance to fix it up and incorporate @antazoey's feedback. If you copy my work into a new PR with those comments addressed, we can review and merge it |
does anything differ from what was done here: #86 ? |
No, you can close 🚀 |
What I did
Added a rate limit on the etherscan client that's config-driven, replicated some of the logic inside of
estimate_query
for more accurately depicting the rate limitfixes: #76
How I did it
How to verify it
Checklist