@@ -66,8 +66,8 @@ contract GroupingIntegration is BaseIntegration {
66
66
signerSk: testSenderSk
67
67
});
68
68
69
- StoryUSD. mint (testSender, testMintFee);
70
- StoryUSD .approve (address (spgNftContract), testMintFee);
69
+ wrappedIP. deposit { value: testMintFee }( );
70
+ wrappedIP .approve (address (spgNftContract), testMintFee);
71
71
(address ipId , uint256 tokenId ) = groupingWorkflows.mintAndRegisterIpAndAttachLicenseAndAddToGroup ({
72
72
spgNftContract: address (spgNftContract),
73
73
groupId: groupId,
@@ -99,8 +99,8 @@ contract GroupingIntegration is BaseIntegration {
99
99
private
100
100
logTest ("test_GroupingIntegration_registerIpAndAttachLicenseAndAddToGroup " )
101
101
{
102
- StoryUSD. mint (testSender, testMintFee);
103
- StoryUSD .approve (address (spgNftContract), testMintFee);
102
+ wrappedIP. deposit { value: testMintFee }( );
103
+ wrappedIP .approve (address (spgNftContract), testMintFee);
104
104
uint256 tokenId = spgNftContract.mint ({
105
105
to: testSender,
106
106
nftMetadataURI: testIpMetadata.nftMetadataURI,
@@ -228,8 +228,8 @@ contract GroupingIntegration is BaseIntegration {
228
228
uint256 [] memory licenseTermsIds = new uint256 [](1 );
229
229
licenseTermsIds[0 ] = testLicensesData[0 ].licenseTermsId;
230
230
231
- StoryUSD. mint (testSender, testMintFee);
232
- StoryUSD .approve (address (spgNftContract), testMintFee);
231
+ wrappedIP. deposit { value: testMintFee }( );
232
+ wrappedIP .approve (address (spgNftContract), testMintFee);
233
233
(address ipId1 , ) = derivativeWorkflows.mintAndRegisterIpAndMakeDerivative ({
234
234
spgNftContract: address (spgNftContract),
235
235
derivData: WorkflowStructs.MakeDerivative ({
@@ -246,8 +246,8 @@ contract GroupingIntegration is BaseIntegration {
246
246
allowDuplicates: true
247
247
});
248
248
249
- StoryUSD. mint (testSender, testMintFee);
250
- StoryUSD .approve (address (spgNftContract), testMintFee);
249
+ wrappedIP. deposit { value: testMintFee }( );
250
+ wrappedIP .approve (address (spgNftContract), testMintFee);
251
251
(address ipId2 , ) = derivativeWorkflows.mintAndRegisterIpAndMakeDerivative ({
252
252
spgNftContract: address (spgNftContract),
253
253
derivData: WorkflowStructs.MakeDerivative ({
@@ -264,20 +264,20 @@ contract GroupingIntegration is BaseIntegration {
264
264
allowDuplicates: true
265
265
});
266
266
267
- uint256 amount1 = 1_000 * 10 ** StoryUSD .decimals (); // 1,000 tokens
268
- StoryUSD. mint (testSender, amount1);
269
- StoryUSD .approve (address (royaltyModule), amount1);
270
- royaltyModule.payRoyaltyOnBehalf (ipId1, testSender, address (StoryUSD ), amount1);
271
- IGraphAwareRoyaltyPolicy (royaltyPolicyLRPAddr).transferToVault (ipId1, newGroupId, address (StoryUSD ));
267
+ uint256 amount1 = 1 * 10 ** wrappedIP .decimals (); // 1 token
268
+ wrappedIP. deposit { value: amount1 }( );
269
+ wrappedIP .approve (address (royaltyModule), amount1);
270
+ royaltyModule.payRoyaltyOnBehalf (ipId1, testSender, address (wrappedIP ), amount1);
271
+ IGraphAwareRoyaltyPolicy (royaltyPolicyLRPAddr).transferToVault (ipId1, newGroupId, address (wrappedIP ));
272
272
273
- uint256 amount2 = 10_000 * 10 ** StoryUSD .decimals (); // 10,000 tokens
274
- StoryUSD. mint (testSender, amount2);
275
- StoryUSD .approve (address (royaltyModule), amount2);
276
- royaltyModule.payRoyaltyOnBehalf (ipId2, testSender, address (StoryUSD ), amount2);
277
- IGraphAwareRoyaltyPolicy (royaltyPolicyLRPAddr).transferToVault (ipId2, newGroupId, address (StoryUSD ));
273
+ uint256 amount2 = 2 * 10 ** wrappedIP .decimals (); // 2 tokens
274
+ wrappedIP. deposit { value: amount2 }( );
275
+ wrappedIP .approve (address (royaltyModule), amount2);
276
+ royaltyModule.payRoyaltyOnBehalf (ipId2, testSender, address (wrappedIP ), amount2);
277
+ IGraphAwareRoyaltyPolicy (royaltyPolicyLRPAddr).transferToVault (ipId2, newGroupId, address (wrappedIP ));
278
278
279
279
address [] memory royaltyTokens = new address [](1 );
280
- royaltyTokens[0 ] = address (StoryUSD );
280
+ royaltyTokens[0 ] = address (wrappedIP );
281
281
282
282
uint256 [] memory collectedRoyalties = groupingWorkflows.collectRoyaltiesAndClaimReward (
283
283
newGroupId,
@@ -293,7 +293,10 @@ contract GroupingIntegration is BaseIntegration {
293
293
294
294
// check each member IP received the reward in their IP royalty vault
295
295
for (uint256 i = 0 ; i < ipIds.length ; i++ ) {
296
- assertEq (StoryUSD.balanceOf (royaltyModule.ipRoyaltyVaults (ipIds[i])), collectedRoyalties[0 ] / ipIds.length );
296
+ assertEq (
297
+ wrappedIP.balanceOf (royaltyModule.ipRoyaltyVaults (ipIds[i])),
298
+ collectedRoyalties[0 ] / ipIds.length
299
+ );
297
300
}
298
301
}
299
302
@@ -338,8 +341,8 @@ contract GroupingIntegration is BaseIntegration {
338
341
);
339
342
}
340
343
341
- StoryUSD. mint (testSender, testMintFee * numCalls);
342
- StoryUSD .approve (address (spgNftContract), testMintFee * numCalls);
344
+ wrappedIP. deposit { value: testMintFee * numCalls }( );
345
+ wrappedIP .approve (address (spgNftContract), testMintFee * numCalls);
343
346
344
347
// batch call `mintAndRegisterIpAndAttachLicenseAndAddToGroup`
345
348
bytes [] memory results = groupingWorkflows.multicall (data);
@@ -367,8 +370,8 @@ contract GroupingIntegration is BaseIntegration {
367
370
{
368
371
uint256 numCalls = 10 ;
369
372
370
- StoryUSD. mint (testSender, testMintFee * numCalls);
371
- StoryUSD .approve (address (spgNftContract), testMintFee * numCalls);
373
+ wrappedIP. deposit { value: testMintFee * numCalls }( );
374
+ wrappedIP .approve (address (spgNftContract), testMintFee * numCalls);
372
375
// mint a NFT from the spgNftContract
373
376
uint256 [] memory tokenIds = new uint256 [](numCalls);
374
377
for (uint256 i = 0 ; i < numCalls; i++ ) {
@@ -474,7 +477,7 @@ contract GroupingIntegration is BaseIntegration {
474
477
mintingFee: 0 ,
475
478
commercialRevShare: revShare,
476
479
royaltyPolicy: royaltyPolicyLRPAddr,
477
- currencyToken: address (StoryUSD )
480
+ currencyToken: address (wrappedIP )
478
481
})
479
482
),
480
483
licensingConfig: Licensing.LicensingConfig ({
@@ -549,8 +552,8 @@ contract GroupingIntegration is BaseIntegration {
549
552
);
550
553
}
551
554
552
- StoryUSD. mint (testSender, testMintFee * numIps);
553
- StoryUSD .approve (address (spgNftContract), testMintFee * numIps);
555
+ wrappedIP. deposit { value: testMintFee * numIps }( );
556
+ wrappedIP .approve (address (spgNftContract), testMintFee * numIps);
554
557
555
558
// batch call `mintAndRegisterIp`
556
559
bytes [] memory results = registrationWorkflows.multicall (data);
0 commit comments