Skip to content

Commit

Permalink
Missing configs for new modules (storyprotocol#237)
Browse files Browse the repository at this point in the history
* missing configs for new modules

* Change Qualified Caller of GroupNFT from IPAssetRegistry to GroupingModule (storyprotocol#236)

* change caller of GroupNFT from IPAssetRegistry to GroupingModule

* update the modifier name

* reintroduce groupnft init pointing to grouping module

---------

Co-authored-by: Kingter <[email protected]>
  • Loading branch information
Ramarti and kingster-will authored Sep 10, 2024
1 parent 3dc3a93 commit 6a1557c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion script/foundry/utils/DeployHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag

contractKey = "GroupNFT";
_predeploy(contractKey);
impl = address(new GroupNFT( _getDeployedAddress(type(GroupingModule).name)));
impl = address(new GroupNFT(_getDeployedAddress(type(GroupingModule).name)));
groupNft = GroupNFT(
TestProxyHelper.deployUUPSProxy(
create3Deployer,
Expand Down Expand Up @@ -676,7 +676,9 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag
protocolPauser.addPausable(address(licensingModule));
protocolPauser.addPausable(address(royaltyModule));
protocolPauser.addPausable(address(royaltyPolicyLAP));
protocolPauser.addPausable(address(royaltyPolicyLRP));
protocolPauser.addPausable(address(ipAssetRegistry));
protocolPauser.addPausable(address(groupingModule));

// Module Registry
moduleRegistry.registerModule(DISPUTE_MODULE_KEY, address(disputeModule));
Expand Down Expand Up @@ -744,6 +746,17 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag
selectors,
ProtocolAdmin.UPGRADER_ROLE
);
protocolAccessManager.setTargetFunctionRole(
address(groupingModule),
selectors,
ProtocolAdmin.UPGRADER_ROLE
);
protocolAccessManager.setTargetFunctionRole(
address(groupNft),
selectors,
ProtocolAdmin.UPGRADER_ROLE
);


// Royalty and Upgrade Beacon
// Owner of the beacon is the RoyaltyModule
Expand Down Expand Up @@ -775,6 +788,11 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag
selectors,
ProtocolAdmin.PAUSE_ADMIN_ROLE
);
protocolAccessManager.setTargetFunctionRole(
address(royaltyPolicyLRP),
selectors,
ProtocolAdmin.PAUSE_ADMIN_ROLE
);
protocolAccessManager.setTargetFunctionRole(
address(ipAssetRegistry),
selectors,
Expand All @@ -785,6 +803,11 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag
selectors,
ProtocolAdmin.PAUSE_ADMIN_ROLE
);
protocolAccessManager.setTargetFunctionRole(
address(groupingModule),
selectors,
ProtocolAdmin.PAUSE_ADMIN_ROLE
);
protocolAccessManager.setTargetFunctionRole(address(protocolPauser), selectors, ProtocolAdmin.PAUSE_ADMIN_ROLE);
///////// Role Granting /////////
protocolAccessManager.grantRole(ProtocolAdmin.UPGRADER_ROLE, multisig, upgraderExecDelay);
Expand Down

0 comments on commit 6a1557c

Please sign in to comment.