Skip to content

Commit

Permalink
add module registyr to SPG
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul committed Nov 5, 2023
1 parent 0cdafb8 commit 5f39c7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contracts/StoryProtocol.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5f39c7e

Please sign in to comment.