Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Avoid fetching implementation ContractData for the main proxy, since we already have the necessary V1 and V2 ContractData #4

Merged
merged 4 commits into from
Jul 7, 2023

Conversation

webthethird
Copy link
Collaborator

Adds optional is_main_proxy and main_proxy_impl arguments to get_contract_data_from_address, and uses them when getting the ContractData for the main proxy given via the -p argument.

Fetching the proxy's implementation ContractData based on the current implementation is helpful for additional targets which are also proxies, but for the main proxy we already have the necessary V1 and V2 ContractData. Fetching the current implementation's data only adds more overhead to the static analysis, and in cases like the malicious Ankr upgrade, trying to fetch the current implementation on chain causes Hybrid Mode to fail, since the current implementation is still unverified.

Tl;dr: now we can run:

diffusc 0x9E6616089E3d78FaA9B6A1361b67E562C1600871 ./contracts/implementation/ankr/AnkrBNBRewardCertificate/contracts/upgrades/aBNBc_Malicious.sol -p 0xe85afccdafbe7f2b096f268e31cce3da8da2990a -v 0.8.16 -n bsc

@webthethird webthethird merged commit e4c74b5 into dev Jul 7, 2023
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.

1 participant