-
-
Notifications
You must be signed in to change notification settings - Fork 86
Description
I noticed a few more issues while running the proxy detection on the Sourcify database. Let's have a look at two example contracts on Ethereum mainnet:
0x56C5Aef1296d004707475c8440f540DdA409b53D
https://eth.blockscout.com/address/0x56C5Aef1296d004707475c8440f540DdA409b53D?tab=contract
For this contract I got 14 instances of the FixedProxyResolver
. They resolved only to 4 distinct addresses:
0xdd0694ed7ecb6494a9055a78cf848a6b146c88b5
0x652c78d85cdf25e85fe7df8d4c61b2a0f3c25d4f
0x2184298d600b5f2ff2febca0993626581a994095
0xcc985298cc007901c9994920fecedadbeba8380f
All of the 4 above addresses are libraries.
0x7dB8637A5fd20BbDab1176BdF49C943A96F2E9c6
https://eth.blockscout.com/address/0x7dB8637A5fd20BbDab1176BdF49C943A96F2E9c6?tab=contract
For this contract I got 1 FixedProxyResolver
and 5 EIP1967ProxyResolver
instances. The FixedProxyResolver
resolved to 0xf208a8fe1ef2b31b0e408c7399a5d696cadb0be9
which is a library again. All EIP1967ProxyResolver
instances resolved to 0x0000000000000000000000000000000000000000
, but the above address is actually no proxy. It is only able to deploy new EIP1967 proxies.
Problems
There are multiple problems here. I would expect the following behavior:
- don't return a FixedProxy for a library
- don't return FixedProxy multiple times for the same implementation address
- don't return a resolver for a factory contract that deploys proxies
If you want to see more examples, you can have a look here: https://github.com/sourcifyeth/data-analysis-scripts/blob/main/multi-proxy-analysis-results/multi-implementation-addresses.json
There, I collected all contracts that resolved to multiple implementation addresses (except DiamondProxies). The format is {chainId: [{proxyAddress: [[detectedProxies], ...distinctImplementationAddresses]}]}
.