-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Problem
HashScan's "Show Logic Contract ABI" toggle currently works well for standard proxy contracts, but does not properly detect and handle GnosisSafeProxy contracts. When users try to interact with Safe proxy contracts (like 0xc159b19c5bd0e4a0709ec13c1303ff2bb67f7145
), the explorer doesn't recognize them as proxy contracts, preventing users from accessing the underlying Safe logic contract's ABI for read/write operations.
GnosisSafeProxy contracts use a different proxy pattern than standard proxies, implementing a minimal proxy (EIP-1167) that delegates all calls to a master copy contract. Without proper detection, users cannot:
- View the full Safe contract ABI through the proxy
- Execute Safe-specific functions like
getOwners()
,getThreshold()
,execTransaction()
, etc. - Properly interact with multisig functionality through the web interface
Solution
Extend HashScan's proxy detection logic to recognize GnosisSafeProxy contracts by:
- Pattern Detection: Add logic to identify contracts that implement the GnosisSafe proxy pattern (minimal proxy with specific bytecode patterns)
- Master Copy Resolution: Implement functionality to resolve the master copy contract address from GnosisSafeProxy instances
- ABI Integration: When "Show Logic Contract ABI" is toggled, fetch and display the master copy's ABI instead of the proxy's minimal interface
- UI Enhancement: Consider adding specific labeling for "Safe Proxy" contracts to distinguish them from other proxy types
This would enable users to fully interact with Safe contracts through HashScan's interface, improving the user experience for one of the most widely used smart contract patterns on Hedera.
Also see: #1207 (comment)
Alternatives
No response