add compliance modules as compliance agent
IliasElbarnoussi opened this issue · comments
Ilias Elbarnoussi commented
Hello, is it possible for agents to add compliance modules to the modular compliance contract, since currently only the owner can do that? I've also noticed that the role of compliance agents isn't being utilized anywhere.
function addModule(address _module) external override onlyOwner {
require(_module != address(0), "invalid argument - zero address");
require(!_moduleBound[_module], "module already bound");
require(_modules.length <= 24, "cannot add more than 25 modules");
IModule module = IModule(_module);
if (!module.isPlugAndPlay()) {
require(module.canComplianceBind(address(this)), "compliance is not suitable for binding to the module");
}
module.bindCompliance(address(this));
_modules.push(_module);
_moduleBound[_module] = true;
emit ModuleAdded(_module);
}