Skip to content

Add GnosisSafeProxy support to "Show Logic Contract ABI" functionality #2207

@mshakeg

Description

@mshakeg

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:

  1. Pattern Detection: Add logic to identify contracts that implement the GnosisSafe proxy pattern (minimal proxy with specific bytecode patterns)
  2. Master Copy Resolution: Implement functionality to resolve the master copy contract address from GnosisSafeProxy instances
  3. ABI Integration: When "Show Logic Contract ABI" is toggled, fetch and display the master copy's ABI instead of the proxy's minimal interface
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions