8000 Provide a way to identify whether a contract is a SAFE. · Issue #714 · safe-global/safe-smart-account · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Provide a way to identify whether a contract is a SAFE. #714
Open
@MicahZoltu

Description

@MicahZoltu

Context / issue

When building applications that interact with SAFEs, it is necessary to first validate that a given address (e.g., user supplied or on-chain scanned) is actually a SAFE (or at least claims to be). Currently, the only way to do this is to either hard-code all versions of Gnosis SAFE proxy and master contracts and check to see if the contract is a proxy and if it points to a known master copy. Unfortunately, this doesn't scale in a censorship resistant way because as new SAFEs are developed, existing immutable applications now need to be updated with new SAFE proxies/masters. This solution also doesn't work if someone uses a non-standard proxy or if they deploy their own master directly.

Proposed solution

A. Add a getter on the SAFE master that just returns a constant string like Gnosis SAFE, along with perhaps a method that returns the VERSION constant. This would allow applications to simply call that function and see what it returns.

B. A more ecosystem friendly solution would be to define ERC-165 interfaces for all of the different components of a SAFE so users can query to see if a particular interface is supported. For example, the various module add/get/remove functions could be part of one interface, and the owners/threshold could be another interface, and the execution functions could be a third interface. This would allow an application to check to see if the set of methods it needs are supported by any contract (SAFE or not) and then interact with the contract regardless of whether it is a Gnosis SAFE or something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    futureFeatures for next major contract version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0