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

feat: Add support Etherscan rate limit [APE-774] #86

Merged
merged 3 commits into from
May 6, 2023

Conversation

theref
Copy link
Contributor

@theref theref commented May 1, 2023

What I did

fixes: #

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

Overrides #77

antazoey
antazoey previously approved these changes May 1, 2023
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing PR! works great i think, tho going to test a little longer.

i wish there were tests. could use the mock client to raise a 429 once in a side-effect and then return the correct response the second time.

i can help add the test tho at some point...

ape_etherscan/__init__.py Outdated Show resolved Hide resolved
ape_etherscan/config.py Outdated Show resolved Hide resolved
@theref
Copy link
Contributor Author

theref commented May 2, 2023

@antazoey are you on the ape discord, couldn't see anyone with the same pic (mine is also different).

@antazoey
Copy link
Member

antazoey commented May 2, 2023

@antazoey are you on the ape discord, couldn't see anyone with the same pic (mine is also different).

im antazoey#5084 on discord, same pic

@theref
Copy link
Contributor Author

theref commented May 5, 2023

Are you suggesting adding a new class to conftest.py? i guess that inherits from MockEtherscanBackend and just overwrites get_mock_response to return a 429 and then a proper response

@antazoey
Copy link
Member

antazoey commented May 5, 2023

Are you suggesting adding a new class to conftest.py? i guess that inherits from MockEtherscanBackend and just overwrites get_mock_response to return a 429 and then a proper response

i think there is an add_handler() method which allow you to set up a mock.. let me check to see if i can something started

@antazoey
Copy link
Member

antazoey commented May 5, 2023

tests only failing because of secrets / forked repo etc
passes locally

@NotPeopling2day NotPeopling2day merged commit 81bfb70 into ApeWorX:main May 6, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants