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

Add async methods to source contracts clients #1505

Merged
merged 7 commits into from
Jan 2, 2025

Conversation

moisses89
Copy link
Member

@moisses89 moisses89 commented Dec 30, 2024

Description

  • Add asynchronous methods of SourcifyClient, EtherscanClientV2 and BlockScoutClient.
  • EtherscanClient V1 is not included.

Considerations

It was necessary extend the class with different method names because mypy does not let override functions with async and not asynchronous applications could have troubles generating aiohttp session.

@moisses89 moisses89 force-pushed the async_contractdata_clients branch from e36f40c to d74f3b0 Compare December 31, 2024 09:05
@coveralls
Copy link

coveralls commented Dec 31, 2024

Pull Request Test Coverage Report for Build 12582597053

Details

  • 159 of 175 (90.86%) changed or added relevant lines in 7 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 93.887%

Changes Missing Coverage Covered Lines Changed/Added Lines %
safe_eth/eth/clients/sourcify_client.py 25 26 96.15%
safe_eth/eth/clients/etherscan_client.py 19 21 90.48%
safe_eth/eth/tests/clients/test_sourcify_client.py 24 26 92.31%
safe_eth/eth/clients/blockscout_client.py 25 28 89.29%
safe_eth/eth/tests/clients/test_etherscan_client_v2.py 21 24 87.5%
safe_eth/eth/clients/etherscan_client_v2.py 33 38 86.84%
Files with Coverage Reduction New Missed Lines %
safe_eth/eth/clients/sourcify_client.py 1 90.48%
Totals Coverage Status
Change from base Build 12544314072: -0.05%
Covered Lines: 9430
Relevant Lines: 10044

💛 - Coveralls

@moisses89 moisses89 marked this pull request as ready for review December 31, 2024 09:12
@moisses89 moisses89 requested a review from a team as a code owner December 31, 2024 09:12
@moisses89 moisses89 merged commit 8e75014 into main Jan 2, 2025
6 checks passed
@moisses89 moisses89 deleted the async_contractdata_clients branch January 2, 2025 12:59
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants