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

fix: unnecessarily was using explorer when providing proxy info manually #2524

Merged
merged 8 commits into from
Feb 23, 2025

Conversation

antazoey
Copy link
Member

What I did

It seems to unnecessarily use the explorer when you provider the proxy manually and the contract type is already cached.

How I did it

How to verify it

Checklist

  • All changes are completed
  • Change is covered in tests
  • Documentation is complete

@antazoey antazoey marked this pull request as draft February 19, 2025 21:48
@antazoey antazoey requested a review from fubuloubu February 19, 2025 21:48
fubuloubu
fubuloubu previously approved these changes Feb 19, 2025

if proxy_info:
# Contract is a proxy (either was detected or provided).
if impl_contract := self._get_proxy_contract_type(
Copy link
Member

Choose a reason for hiding this comment

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

This can be one of 4 things:

  1. combined proxy + impl abi
  2. impl-only abi (for things like simple forwarder proxies)
  3. proxy-only abi (for things like upgradable proxies that don't have impls, or unverified impl)
  4. undeterminable contract_type (eitehr impl or proxy)

I think should add a note about this, and consider calling this variable like proxy_contract_type instead (maybe?)

@antazoey antazoey marked this pull request as ready for review February 20, 2025 05:24
fubuloubu
fubuloubu previously approved these changes Feb 20, 2025
Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

This looks great!

@antazoey antazoey force-pushed the fix/explorer-unnecessary branch from 7f018c0 to 73f8260 Compare February 20, 2025 22:15
fubuloubu
fubuloubu previously approved these changes Feb 20, 2025
@antazoey antazoey merged commit 12a281a into ApeWorX:main Feb 23, 2025
18 checks passed
@antazoey antazoey deleted the fix/explorer-unnecessary branch February 23, 2025 00:27
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.

2 participants