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 new script to retrieve chain info from Viem #1328

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

falvaradorodriguez
Copy link
Contributor

Closes #1268

@coveralls
Copy link

coveralls commented Sep 13, 2024

Pull Request Test Coverage Report for Build 10901957188

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 93.534%

Files with Coverage Reduction New Missed Lines %
safe_eth/eth/tests/clients/test_etherscan_client.py 1 90.91%
Totals Coverage Status
Change from base Build 10879826665: -0.01%
Covered Lines: 8781
Relevant Lines: 9388

💛 - Coveralls

@coveralls
Copy link

coveralls commented Sep 13, 2024

Pull Request Test Coverage Report for Build 10851177506

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 93.545%

Totals Coverage Status
Change from base Build 10831112712: 0.01%
Covered Lines: 8782
Relevant Lines: 9388

💛 - Coveralls

@falvaradorodriguez falvaradorodriguez marked this pull request as ready for review September 16, 2024 11:22
@falvaradorodriguez falvaradorodriguez requested a review from a team as a code owner September 16, 2024 11:22
@falvaradorodriguez falvaradorodriguez changed the title Add new script to retrieve chains info from Viem Add new script to retrieve chain info from Viem Sep 16, 2024
:return: The converted chain name suitable for use as a constant.
"""
# Change every symbol that is not a word or digit for underscore
name_converted = re.sub(r"[^\w\d]+", r"_", name.upper().replace(")", ""))
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's better to use re.compile as we are doing this multiple times, and same with other regular expressions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. Done here

@falvaradorodriguez falvaradorodriguez merged commit 29cafad into main Sep 17, 2024
7 checks passed
@falvaradorodriguez falvaradorodriguez deleted the get_chains_info_from_viem branch September 17, 2024 12:10
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
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.

Analyze if we can use chain information from Viem
3 participants