From 5f39c7e46cab5631fe9a549472ac010c166cc118 Mon Sep 17 00:00:00 2001 From: Raul Date: Sun, 5 Nov 2023 17:43:58 -0300 Subject: [PATCH] add module registyr to SPG --- contracts/StoryProtocol.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/StoryProtocol.sol b/contracts/StoryProtocol.sol index d3ba72f9..9c084929 100644 --- a/contracts/StoryProtocol.sol +++ b/contracts/StoryProtocol.sol @@ -5,16 +5,19 @@ import { IIPOrgFactory } from "contracts/interfaces/ip-org/IIPOrgFactory.sol"; import { IPOrgParams } from "contracts/lib/IPOrgParams.sol"; import { Errors } from "contracts/lib/Errors.sol"; import { IPOrgParams } from "contracts/lib/IPOrgParams.sol"; +import { ModuleRegistry } from "contracts/modules/ModuleRegistry.sol"; contract StoryProtocol { // TODO: should this be immutable, or should the protocol be able to change factory IIPOrgFactory public immutable FACTORY; + ModuleRegistry public immutable MODULE_REGISTRY; - constructor(IIPOrgFactory ipOrgFactory_) { - if (address(ipOrgFactory_) == address(0)) { + constructor(IIPOrgFactory ipOrgFactory_, ModuleRegistry moduleRegistry_) { + if (address(ipOrgFactory_) == address(0) || address(moduleRegistry_) == address(0)) { revert Errors.ZeroAddress(); } FACTORY = ipOrgFactory_; + MODULE_REGISTRY = moduleRegistry_; } function registerIpOrg(IPOrgParams.RegisterIPOrgParams calldata params) external returns (address) {