1
- import { privateKeyA , privateKeyB , privateKeyC , accountA , accountB , accountC , nftContractAddress } from '../../config/config'
2
- import { mintNFTWithRetry } from '../../utils/utils'
3
- import { registerIpAsset , attachLicenseTerms , mintLicenseTokens , registerDerivative , registerDerivativeWithLicenseTokens } from '../../utils/sdkUtils'
4
- import { expect } from 'chai'
1
+ import { privateKeyA , privateKeyB , privateKeyC , accountA , accountB , accountC , nftContractAddress } from '../../config/config' ;
2
+ import { mintNFTWithRetry } from '../../utils/utils' ;
3
+ import { registerIpAsset , attachLicenseTerms , mintLicenseTokens , registerDerivative , registerDerivativeWithLicenseTokens } from '../../utils/sdkUtils' ;
4
+ import { expect } from 'chai' ;
5
5
6
6
import chai from 'chai' ;
7
7
import chaiAsPromised from 'chai-as-promised' ;
@@ -42,14 +42,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
42
42
ipIdA = response . ipId ;
43
43
} ) ;
44
44
45
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
46
- const response = await expect (
47
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
48
- ) . to . not . be . rejected ;
49
-
50
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
51
- } ) ;
52
-
53
45
step ( "Wallet A mint a license token with the receiverAddress set as Wallet B, get a licenseTokenId (licenseTokenIdA)" , async function ( ) {
54
46
const response = await expect (
55
47
mintLicenseTokens ( "A" , ipIdA , nonComLicenseTermsId , 2 , accountB . address , waitForTransaction )
@@ -143,14 +135,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
143
135
ipIdA = response . ipId ;
144
136
} ) ;
145
137
146
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
147
- const response = await expect (
148
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
149
- ) . to . not . be . rejected ;
150
-
151
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
152
- } ) ;
153
-
154
138
step ( "Mint a NFT to WalletB, get a tokenId (tokenidB)" , async function ( ) {
155
139
tokenIdB = await mintNFTWithRetry ( privateKeyB ) ;
156
140
if ( tokenIdB === '' ) {
@@ -170,14 +154,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
170
154
ipIdB = response . ipId ;
171
155
} ) ;
172
156
173
- step ( "Wallet B attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
174
- const response = await expect (
175
- attachLicenseTerms ( "B" , ipIdB , nonComLicenseTermsId , waitForTransaction )
176
- ) . to . not . be . rejected ;
177
-
178
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
179
- } ) ;
180
-
181
157
step ( "Mint a NFT to WalletC, get a tokenId (tokenidC)" , async function ( ) {
182
158
tokenIdC = await mintNFTWithRetry ( privateKeyC ) ;
183
159
if ( tokenIdC === '' ) {
@@ -226,14 +202,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
226
202
ipIdA = response . ipId ;
227
203
} ) ;
228
204
229
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
230
- const response = await expect (
231
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
232
- ) . to . not . be . rejected ;
233
-
234
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
235
- } ) ;
236
-
237
205
step ( "Wallet A mint a license token with the receiverAddress set as Wallet B, get a licenseId (licenseTokenIdA)" , async function ( ) {
238
206
const response = await expect (
239
207
mintLicenseTokens ( "A" , ipIdA , nonComLicenseTermsId , 2 , accountC . address , waitForTransaction )
@@ -264,14 +232,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
264
232
ipIdB = response . ipId ;
265
233
} ) ;
266
234
267
- step ( "Wallet B attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdB" , async function ( ) {
268
- const response = await expect (
269
- attachLicenseTerms ( "B" , ipIdB , nonComLicenseTermsId , waitForTransaction )
270
- ) . to . not . be . rejected ;
271
-
272
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
273
- } ) ;
274
-
275
235
step ( "Wallet B mint a license token with the receiverAddress set as Wallet C, get a licenseTokenId (licenseTokenIdB)" , async function ( ) {
276
236
const response = await expect (
277
237
mintLicenseTokens ( "B" , ipIdB , nonComLicenseTermsId , 2 , accountC . address , waitForTransaction )
@@ -331,14 +291,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
331
291
ipIdA = response . ipId ;
332
292
} ) ;
333
293
334
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
335
- const response = await expect (
336
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
337
- ) . to . not . be . rejected ;
338
-
339
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
340
- } ) ;
341
-
342
294
step ( "Wallet A mint a license token with the receiverAddress set as Wallet B, get a licenseId (licenseTokenIdA)" , async function ( ) {
343
295
const response = await expect (
344
296
mintLicenseTokens ( "A" , ipIdA , nonComLicenseTermsId , 2 , accountB . address , waitForTransaction )
@@ -369,14 +321,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
369
321
ipIdB = response . ipId ;
370
322
} ) ;
371
323
372
- step ( "Wallet B attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdB" , async function ( ) {
373
- const response = await expect (
374
- attachLicenseTerms ( "B" , ipIdB , nonComLicenseTermsId , waitForTransaction )
375
- ) . to . not . be . rejected ;
376
-
377
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
378
- } ) ;
379
-
380
324
step ( "Wallet B mint a license token with the receiverAddress set as Wallet C, get a licenseTokenId (licenseTokenIdB)" , async function ( ) {
381
325
const response = await expect (
382
326
mintLicenseTokens ( "B" , ipIdB , nonComLicenseTermsId , 2 , accountC . address , waitForTransaction )
@@ -435,14 +379,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
435
379
ipIdA = response . ipId ;
436
380
} ) ;
437
381
438
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
439
- const response = await expect (
440
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
441
- ) . to . not . be . rejected ;
442
-
443
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
444
- } ) ;
445
-
446
382
step ( "Wallet A mint a license token with ipIdA and get a licenseTokenId (licenseTokenIdA)" , async function ( ) {
447
383
const response = await expect (
448
384
mintLicenseTokens ( "A" , ipIdA , nonComLicenseTermsId , 1 , accountB . address , waitForTransaction )
@@ -527,14 +463,6 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
527
463
ipIdA = response . ipId ;
528
464
} ) ;
529
465
530
- step ( "Wallet A attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA" , async function ( ) {
531
- const response = await expect (
532
- attachLicenseTerms ( "A" , ipIdA , nonComLicenseTermsId , waitForTransaction )
533
- ) . to . not . be . rejected ;
534
-
535
- expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
536
- } ) ;
537
-
538
466
step ( "Wallet A mint a license token with ipIdA and get a licenseTokenId (licenseTokenIdA)" , async function ( ) {
539
467
const response = await expect (
540
468
mintLicenseTokens ( "A" , ipIdA , nonComLicenseTermsId , 1 , accountB . address , waitForTransaction )
@@ -565,17 +493,17 @@ describe("SDK E2E Test - Register Derivative IP Asset with Non-Commercial Social
565
493
ipIdB = response . ipId ;
566
494
} ) ;
567
495
568
- step ( "Wallet B attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdA " , async function ( ) {
496
+ step ( "Wallet B attach nonComLicenseTermsId(non-commercial social remixing PIL) to ipIdB " , async function ( ) {
569
497
const response = await expect (
570
- attachLicenseTerms ( "B" , ipIdB , nonComLicenseTermsId , waitForTransaction )
498
+ attachLicenseTerms ( "B" , ipIdB , 0n , waitForTransaction )
571
499
) . to . not . be . rejected ;
572
500
573
501
expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
574
502
} ) ;
575
503
576
504
step ( "Wallet B mint a license token with ipIdB and get a licenseTokenId (licenseTokenIdB)" , async function ( ) {
577
505
const response = await expect (
578
- mintLicenseTokens ( "B" , ipIdB , nonComLicenseTermsId , 1 , accountA . address , waitForTransaction )
506
+ mintLicenseTokens ( "B" , ipIdB , 0n , 1 , accountA . address , waitForTransaction )
579
507
) . to . not . be . rejected ;
580
508
581
509
expect ( response . txHash ) . to . be . a ( "string" ) . and . not . empty ;
0 commit comments