Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit c48a09b

Browse files
authored
fix: framework & policy struct in deploy (#34)
1 parent 2bbbbd0 commit c48a09b

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

script/foundry/deployment/Main.s.sol

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ contract Main is Script, BroadcastManager, JsonDeploymentHandler {
175175
);
176176
_postdeploy(contractKey, address(renderer));
177177

178-
179178
// mockModule = new MockModule(address(ipAccountRegistry), address(moduleRegistry), "MockModule");
180179
}
181180

@@ -241,22 +240,14 @@ contract Main is Script, BroadcastManager, JsonDeploymentHandler {
241240
////////////////////////////////////////////////////////////////*/
242241

243242
fwCreationParams["all_true"] = Licensing.FrameworkCreationParams({
244-
mintingVerifiers: new IParamVerifier[](0),
245-
mintingDefaultValues: new bytes[](0),
246-
linkParentVerifiers: new IParamVerifier[](0),
247-
linkParentDefaultValues: new bytes[](0),
248-
transferVerifiers: new IParamVerifier[](0),
249-
transferDefaultValues: new bytes[](0),
243+
parameters: new IParamVerifier[](0),
244+
defaultValues: new bytes[](0),
250245
licenseUrl: "https://very-nice-verifier-license.com"
251246
});
252247

253248
fwCreationParams["mint_payment"] = Licensing.FrameworkCreationParams({
254-
mintingVerifiers: new IParamVerifier[](0),
255-
mintingDefaultValues: new bytes[](0),
256-
linkParentVerifiers: new IParamVerifier[](0),
257-
linkParentDefaultValues: new bytes[](0),
258-
transferVerifiers: new IParamVerifier[](0),
259-
transferDefaultValues: new bytes[](0),
249+
parameters: new IParamVerifier[](0),
250+
defaultValues: new bytes[](0),
260251
licenseUrl: "https://expensive-minting-license.com"
261252
});
262253

@@ -269,16 +260,18 @@ contract Main is Script, BroadcastManager, JsonDeploymentHandler {
269260

270261
policies["test_true"] = Licensing.Policy({
271262
frameworkId: fwIds["all_true"],
272-
mintingParamValues: new bytes[](0),
273-
linkParentParamValues: new bytes[](0),
274-
transferParamValues: new bytes[](0)
263+
commercialUse: true,
264+
derivatives: true,
265+
paramNames: new bytes32[](0),
266+
paramValues: new bytes[](0)
275267
});
276268

277269
policies["expensive_mint"] = Licensing.Policy({
278270
frameworkId: fwIds["mint_payment"],
279-
mintingParamValues: new bytes[](0),
280-
linkParentParamValues: new bytes[](0),
281-
transferParamValues: new bytes[](0)
271+
commercialUse: true,
272+
derivatives: true,
273+
paramNames: new bytes32[](0),
274+
paramValues: new bytes[](0)
282275
});
283276

284277
uint256 policyId_test_true = licenseRegistry.addPolicy(policies["test_true"]);
@@ -295,11 +288,8 @@ contract Main is Script, BroadcastManager, JsonDeploymentHandler {
295288
// MINT LICENSES ON POLICIES
296289
// ////////////////////////////////////////////////////////////////*/
297290

298-
address[] memory licensorIpIds = new address[](1);
299-
licensorIpIds[0] = getIpId(mockNft, nftIds[1]);
300-
301291
// Mints 1 license for policy "test_true" on NFT id 1 IPAccount
302-
uint256 licenseId1 = licenseRegistry.mintLicense(policyId_test_true, licensorIpIds, 2, deployer);
292+
uint256 licenseId1 = licenseRegistry.mintLicense(policyId_test_true, getIpId(mockNft, nftIds[1]), 2, deployer);
303293

304294
registrationModule.registerDerivativeIp(
305295
licenseId1,

0 commit comments

Comments
 (0)