Skip to content

isModuleEnabled view function  #181

@gitpusha

Description

@gitpusha

Hi,

It would be cool to have a view state-reader function like isOwner just for whitelisted modules on the ModuleManager.

Something might look something like this:

    function isWhitelistedModule(address module)
        public
        view
        returns (bool)
    {
        return module != SENTINEL_MODULES && modules[module] != address(0);
    }

This could be useful, if you want to perform some sanity checks on-chain. Say for example, you only want GnosisSafeProxies to call your module's mint function, if those callers also have the contract already whitelisted as a module. Normally this should be the case already, but we cannot be 100% certain of that on-chain, unless we have a way to check the whitelist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions