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.
Hi,
It would be cool to have a
viewstate-readerfunctionlike isOwner just forwhitelistedmoduleson the ModuleManager.Something might look something like this:
This could be useful, if you want to perform some sanity checks
on-chain. Say for example, you only want GnosisSafeProxies to call yourmodule's mint function, if those callers also have the contract alreadywhitelistedas amodule. 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.