@campnetwork/origin 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +62 -62
- package/dist/core.d.ts +1 -5
- package/dist/core.esm.d.ts +1 -5
- package/dist/core.esm.js +68 -68
- package/dist/react/index.esm.d.ts +1 -5
- package/dist/react/index.esm.js +651 -528
- package/package.json +1 -1
package/dist/react/index.esm.js
CHANGED
|
@@ -164,8 +164,8 @@ var constants = {
|
|
|
164
164
|
TIKTOK_LINKED: "4a2ffdd3-f0e9-4784-8b49-ff76ec1c0a6a",
|
|
165
165
|
TELEGRAM_LINKED: "9006bc5d-bcc9-4d01-a860-4f1a201e8e47",
|
|
166
166
|
},
|
|
167
|
-
DATANFT_CONTRACT_ADDRESS: "
|
|
168
|
-
MARKETPLACE_CONTRACT_ADDRESS: "
|
|
167
|
+
DATANFT_CONTRACT_ADDRESS: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690",
|
|
168
|
+
MARKETPLACE_CONTRACT_ADDRESS: "0xAc79E9Ef69021F9bf7Ccb175611F3115Ff65A44D",
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
let providers = [];
|
|
@@ -263,11 +263,6 @@ var abi$1 = [
|
|
|
263
263
|
internalType: "string",
|
|
264
264
|
name: "_symbol",
|
|
265
265
|
type: "string"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
internalType: "string",
|
|
269
|
-
name: "_baseURI",
|
|
270
|
-
type: "string"
|
|
271
266
|
}
|
|
272
267
|
],
|
|
273
268
|
stateMutability: "nonpayable",
|
|
@@ -282,28 +277,93 @@ var abi$1 = [
|
|
|
282
277
|
{
|
|
283
278
|
inputs: [
|
|
284
279
|
{
|
|
285
|
-
internalType: "
|
|
286
|
-
name: "
|
|
287
|
-
type: "
|
|
280
|
+
internalType: "address",
|
|
281
|
+
name: "sender",
|
|
282
|
+
type: "address"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
internalType: "uint256",
|
|
286
|
+
name: "tokenId",
|
|
287
|
+
type: "uint256"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
internalType: "address",
|
|
291
|
+
name: "owner",
|
|
292
|
+
type: "address"
|
|
288
293
|
}
|
|
289
294
|
],
|
|
290
|
-
name: "
|
|
295
|
+
name: "ERC721IncorrectOwner",
|
|
291
296
|
type: "error"
|
|
292
297
|
},
|
|
293
298
|
{
|
|
294
299
|
inputs: [
|
|
300
|
+
{
|
|
301
|
+
internalType: "address",
|
|
302
|
+
name: "operator",
|
|
303
|
+
type: "address"
|
|
304
|
+
},
|
|
295
305
|
{
|
|
296
306
|
internalType: "uint256",
|
|
297
307
|
name: "tokenId",
|
|
298
308
|
type: "uint256"
|
|
299
|
-
}
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
name: "ERC721InsufficientApproval",
|
|
312
|
+
type: "error"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
inputs: [
|
|
300
316
|
{
|
|
301
317
|
internalType: "address",
|
|
302
|
-
name: "
|
|
318
|
+
name: "approver",
|
|
303
319
|
type: "address"
|
|
304
320
|
}
|
|
305
321
|
],
|
|
306
|
-
name: "
|
|
322
|
+
name: "ERC721InvalidApprover",
|
|
323
|
+
type: "error"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
inputs: [
|
|
327
|
+
{
|
|
328
|
+
internalType: "address",
|
|
329
|
+
name: "operator",
|
|
330
|
+
type: "address"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
name: "ERC721InvalidOperator",
|
|
334
|
+
type: "error"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
inputs: [
|
|
338
|
+
{
|
|
339
|
+
internalType: "address",
|
|
340
|
+
name: "owner",
|
|
341
|
+
type: "address"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
name: "ERC721InvalidOwner",
|
|
345
|
+
type: "error"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
inputs: [
|
|
349
|
+
{
|
|
350
|
+
internalType: "address",
|
|
351
|
+
name: "receiver",
|
|
352
|
+
type: "address"
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
name: "ERC721InvalidReceiver",
|
|
356
|
+
type: "error"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
inputs: [
|
|
360
|
+
{
|
|
361
|
+
internalType: "address",
|
|
362
|
+
name: "sender",
|
|
363
|
+
type: "address"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
name: "ERC721InvalidSender",
|
|
307
367
|
type: "error"
|
|
308
368
|
},
|
|
309
369
|
{
|
|
@@ -314,37 +374,103 @@ var abi$1 = [
|
|
|
314
374
|
type: "uint256"
|
|
315
375
|
}
|
|
316
376
|
],
|
|
317
|
-
name: "
|
|
377
|
+
name: "ERC721NonexistentToken",
|
|
318
378
|
type: "error"
|
|
319
379
|
},
|
|
320
380
|
{
|
|
321
381
|
inputs: [
|
|
322
382
|
],
|
|
323
|
-
name: "
|
|
383
|
+
name: "EnforcedPause",
|
|
324
384
|
type: "error"
|
|
325
385
|
},
|
|
326
386
|
{
|
|
327
387
|
inputs: [
|
|
328
388
|
],
|
|
329
|
-
name: "
|
|
389
|
+
name: "ExpectedPause",
|
|
330
390
|
type: "error"
|
|
331
391
|
},
|
|
332
392
|
{
|
|
333
393
|
inputs: [
|
|
334
394
|
],
|
|
335
|
-
name: "
|
|
395
|
+
name: "InvalidDeadline",
|
|
336
396
|
type: "error"
|
|
337
397
|
},
|
|
338
398
|
{
|
|
339
399
|
inputs: [
|
|
400
|
+
{
|
|
401
|
+
internalType: "uint16",
|
|
402
|
+
name: "royaltyBps",
|
|
403
|
+
type: "uint16"
|
|
404
|
+
}
|
|
340
405
|
],
|
|
341
|
-
name: "
|
|
406
|
+
name: "InvalidRoyalty",
|
|
342
407
|
type: "error"
|
|
343
408
|
},
|
|
344
409
|
{
|
|
345
410
|
inputs: [
|
|
346
411
|
],
|
|
347
|
-
name: "
|
|
412
|
+
name: "InvalidSignature",
|
|
413
|
+
type: "error"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
inputs: [
|
|
417
|
+
{
|
|
418
|
+
internalType: "uint256",
|
|
419
|
+
name: "tokenId",
|
|
420
|
+
type: "uint256"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
internalType: "address",
|
|
424
|
+
name: "caller",
|
|
425
|
+
type: "address"
|
|
426
|
+
}
|
|
427
|
+
],
|
|
428
|
+
name: "NotTokenOwner",
|
|
429
|
+
type: "error"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
inputs: [
|
|
433
|
+
{
|
|
434
|
+
internalType: "address",
|
|
435
|
+
name: "owner",
|
|
436
|
+
type: "address"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
name: "OwnableInvalidOwner",
|
|
440
|
+
type: "error"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
inputs: [
|
|
444
|
+
{
|
|
445
|
+
internalType: "address",
|
|
446
|
+
name: "account",
|
|
447
|
+
type: "address"
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
name: "OwnableUnauthorizedAccount",
|
|
451
|
+
type: "error"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
inputs: [
|
|
455
|
+
],
|
|
456
|
+
name: "SignatureAlreadyUsed",
|
|
457
|
+
type: "error"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
inputs: [
|
|
461
|
+
{
|
|
462
|
+
internalType: "uint256",
|
|
463
|
+
name: "tokenId",
|
|
464
|
+
type: "uint256"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
name: "TokenAlreadyExists",
|
|
468
|
+
type: "error"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
inputs: [
|
|
472
|
+
],
|
|
473
|
+
name: "Unauthorized",
|
|
348
474
|
type: "error"
|
|
349
475
|
},
|
|
350
476
|
{
|
|
@@ -370,9 +496,9 @@ var abi$1 = [
|
|
|
370
496
|
},
|
|
371
497
|
{
|
|
372
498
|
indexed: false,
|
|
373
|
-
internalType: "
|
|
499
|
+
internalType: "uint256",
|
|
374
500
|
name: "newExpiry",
|
|
375
|
-
type: "
|
|
501
|
+
type: "uint256"
|
|
376
502
|
},
|
|
377
503
|
{
|
|
378
504
|
indexed: false,
|
|
@@ -442,6 +568,12 @@ var abi$1 = [
|
|
|
442
568
|
internalType: "uint256",
|
|
443
569
|
name: "tokenId",
|
|
444
570
|
type: "uint256"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
indexed: true,
|
|
574
|
+
internalType: "address",
|
|
575
|
+
name: "creator",
|
|
576
|
+
type: "address"
|
|
445
577
|
}
|
|
446
578
|
],
|
|
447
579
|
name: "DataDeleted",
|
|
@@ -461,9 +593,15 @@ var abi$1 = [
|
|
|
461
593
|
internalType: "address",
|
|
462
594
|
name: "creator",
|
|
463
595
|
type: "address"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
indexed: false,
|
|
599
|
+
internalType: "bytes32",
|
|
600
|
+
name: "contentHash",
|
|
601
|
+
type: "bytes32"
|
|
464
602
|
}
|
|
465
603
|
],
|
|
466
|
-
name: "
|
|
604
|
+
name: "DataMinted",
|
|
467
605
|
type: "event"
|
|
468
606
|
},
|
|
469
607
|
{
|
|
@@ -471,24 +609,31 @@ var abi$1 = [
|
|
|
471
609
|
inputs: [
|
|
472
610
|
{
|
|
473
611
|
indexed: true,
|
|
474
|
-
internalType: "
|
|
475
|
-
name: "
|
|
476
|
-
type: "
|
|
612
|
+
internalType: "address",
|
|
613
|
+
name: "previousOwner",
|
|
614
|
+
type: "address"
|
|
477
615
|
},
|
|
478
616
|
{
|
|
479
617
|
indexed: true,
|
|
480
618
|
internalType: "address",
|
|
481
|
-
name: "
|
|
619
|
+
name: "newOwner",
|
|
482
620
|
type: "address"
|
|
483
|
-
}
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
name: "OwnershipTransferred",
|
|
624
|
+
type: "event"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
anonymous: false,
|
|
628
|
+
inputs: [
|
|
484
629
|
{
|
|
485
630
|
indexed: false,
|
|
486
|
-
internalType: "
|
|
487
|
-
name: "
|
|
488
|
-
type: "
|
|
631
|
+
internalType: "address",
|
|
632
|
+
name: "account",
|
|
633
|
+
type: "address"
|
|
489
634
|
}
|
|
490
635
|
],
|
|
491
|
-
name: "
|
|
636
|
+
name: "Paused",
|
|
492
637
|
type: "event"
|
|
493
638
|
},
|
|
494
639
|
{
|
|
@@ -585,32 +730,17 @@ var abi$1 = [
|
|
|
585
730
|
type: "event"
|
|
586
731
|
},
|
|
587
732
|
{
|
|
733
|
+
anonymous: false,
|
|
588
734
|
inputs: [
|
|
589
735
|
{
|
|
736
|
+
indexed: false,
|
|
590
737
|
internalType: "address",
|
|
591
|
-
name: "
|
|
592
|
-
type: "address"
|
|
593
|
-
}
|
|
594
|
-
],
|
|
595
|
-
name: "addCreator",
|
|
596
|
-
outputs: [
|
|
597
|
-
],
|
|
598
|
-
stateMutability: "nonpayable",
|
|
599
|
-
type: "function"
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
inputs: [
|
|
603
|
-
{
|
|
604
|
-
internalType: "address",
|
|
605
|
-
name: "pauser",
|
|
738
|
+
name: "account",
|
|
606
739
|
type: "address"
|
|
607
740
|
}
|
|
608
741
|
],
|
|
609
|
-
name: "
|
|
610
|
-
|
|
611
|
-
],
|
|
612
|
-
stateMutability: "nonpayable",
|
|
613
|
-
type: "function"
|
|
742
|
+
name: "Unpaused",
|
|
743
|
+
type: "event"
|
|
614
744
|
},
|
|
615
745
|
{
|
|
616
746
|
inputs: [
|
|
@@ -635,7 +765,7 @@ var abi$1 = [
|
|
|
635
765
|
inputs: [
|
|
636
766
|
{
|
|
637
767
|
internalType: "address",
|
|
638
|
-
name: "
|
|
768
|
+
name: "owner",
|
|
639
769
|
type: "address"
|
|
640
770
|
}
|
|
641
771
|
],
|
|
@@ -650,20 +780,6 @@ var abi$1 = [
|
|
|
650
780
|
stateMutability: "view",
|
|
651
781
|
type: "function"
|
|
652
782
|
},
|
|
653
|
-
{
|
|
654
|
-
inputs: [
|
|
655
|
-
],
|
|
656
|
-
name: "baseURI",
|
|
657
|
-
outputs: [
|
|
658
|
-
{
|
|
659
|
-
internalType: "string",
|
|
660
|
-
name: "",
|
|
661
|
-
type: "string"
|
|
662
|
-
}
|
|
663
|
-
],
|
|
664
|
-
stateMutability: "view",
|
|
665
|
-
type: "function"
|
|
666
|
-
},
|
|
667
783
|
{
|
|
668
784
|
inputs: [
|
|
669
785
|
{
|
|
@@ -683,25 +799,6 @@ var abi$1 = [
|
|
|
683
799
|
stateMutability: "view",
|
|
684
800
|
type: "function"
|
|
685
801
|
},
|
|
686
|
-
{
|
|
687
|
-
inputs: [
|
|
688
|
-
{
|
|
689
|
-
internalType: "address",
|
|
690
|
-
name: "",
|
|
691
|
-
type: "address"
|
|
692
|
-
}
|
|
693
|
-
],
|
|
694
|
-
name: "creators",
|
|
695
|
-
outputs: [
|
|
696
|
-
{
|
|
697
|
-
internalType: "bool",
|
|
698
|
-
name: "",
|
|
699
|
-
type: "bool"
|
|
700
|
-
}
|
|
701
|
-
],
|
|
702
|
-
stateMutability: "view",
|
|
703
|
-
type: "function"
|
|
704
|
-
},
|
|
705
802
|
{
|
|
706
803
|
inputs: [
|
|
707
804
|
{
|
|
@@ -713,7 +810,7 @@ var abi$1 = [
|
|
|
713
810
|
name: "dataStatus",
|
|
714
811
|
outputs: [
|
|
715
812
|
{
|
|
716
|
-
internalType: "enum
|
|
813
|
+
internalType: "enum IpNFT.DataStatus",
|
|
717
814
|
name: "",
|
|
718
815
|
type: "uint8"
|
|
719
816
|
}
|
|
@@ -787,7 +884,7 @@ var abi$1 = [
|
|
|
787
884
|
type: "address"
|
|
788
885
|
}
|
|
789
886
|
],
|
|
790
|
-
internalType: "struct
|
|
887
|
+
internalType: "struct IpNFT.LicenseTerms",
|
|
791
888
|
name: "",
|
|
792
889
|
type: "tuple"
|
|
793
890
|
}
|
|
@@ -799,7 +896,7 @@ var abi$1 = [
|
|
|
799
896
|
inputs: [
|
|
800
897
|
{
|
|
801
898
|
internalType: "address",
|
|
802
|
-
name: "
|
|
899
|
+
name: "owner",
|
|
803
900
|
type: "address"
|
|
804
901
|
},
|
|
805
902
|
{
|
|
@@ -833,7 +930,7 @@ var abi$1 = [
|
|
|
833
930
|
},
|
|
834
931
|
{
|
|
835
932
|
internalType: "bytes32",
|
|
836
|
-
name: "
|
|
933
|
+
name: "creatorContentHash",
|
|
837
934
|
type: "bytes32"
|
|
838
935
|
},
|
|
839
936
|
{
|
|
@@ -864,7 +961,7 @@ var abi$1 = [
|
|
|
864
961
|
type: "address"
|
|
865
962
|
}
|
|
866
963
|
],
|
|
867
|
-
internalType: "struct
|
|
964
|
+
internalType: "struct IpNFT.LicenseTerms",
|
|
868
965
|
name: "licenseTerms",
|
|
869
966
|
type: "tuple"
|
|
870
967
|
},
|
|
@@ -874,19 +971,9 @@ var abi$1 = [
|
|
|
874
971
|
type: "uint256"
|
|
875
972
|
},
|
|
876
973
|
{
|
|
877
|
-
internalType: "
|
|
878
|
-
name: "
|
|
879
|
-
type: "
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
internalType: "bytes32",
|
|
883
|
-
name: "r",
|
|
884
|
-
type: "bytes32"
|
|
885
|
-
},
|
|
886
|
-
{
|
|
887
|
-
internalType: "bytes32",
|
|
888
|
-
name: "s",
|
|
889
|
-
type: "bytes32"
|
|
974
|
+
internalType: "bytes",
|
|
975
|
+
name: "signature",
|
|
976
|
+
type: "bytes"
|
|
890
977
|
}
|
|
891
978
|
],
|
|
892
979
|
name: "mintWithSignature",
|
|
@@ -967,63 +1054,11 @@ var abi$1 = [
|
|
|
967
1054
|
},
|
|
968
1055
|
{
|
|
969
1056
|
inputs: [
|
|
970
|
-
{
|
|
971
|
-
internalType: "address",
|
|
972
|
-
name: "",
|
|
973
|
-
type: "address"
|
|
974
|
-
}
|
|
975
1057
|
],
|
|
976
|
-
name: "
|
|
1058
|
+
name: "renounceOwnership",
|
|
977
1059
|
outputs: [
|
|
978
|
-
{
|
|
979
|
-
internalType: "bool",
|
|
980
|
-
name: "",
|
|
981
|
-
type: "bool"
|
|
982
|
-
}
|
|
983
1060
|
],
|
|
984
|
-
stateMutability: "
|
|
985
|
-
type: "function"
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
inputs: [
|
|
989
|
-
{
|
|
990
|
-
internalType: "address",
|
|
991
|
-
name: "creator",
|
|
992
|
-
type: "address"
|
|
993
|
-
}
|
|
994
|
-
],
|
|
995
|
-
name: "removeCreator",
|
|
996
|
-
outputs: [
|
|
997
|
-
],
|
|
998
|
-
stateMutability: "nonpayable",
|
|
999
|
-
type: "function"
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
inputs: [
|
|
1003
|
-
{
|
|
1004
|
-
internalType: "address",
|
|
1005
|
-
name: "pauser",
|
|
1006
|
-
type: "address"
|
|
1007
|
-
}
|
|
1008
|
-
],
|
|
1009
|
-
name: "removePauser",
|
|
1010
|
-
outputs: [
|
|
1011
|
-
],
|
|
1012
|
-
stateMutability: "nonpayable",
|
|
1013
|
-
type: "function"
|
|
1014
|
-
},
|
|
1015
|
-
{
|
|
1016
|
-
inputs: [
|
|
1017
|
-
{
|
|
1018
|
-
internalType: "uint256",
|
|
1019
|
-
name: "tokenId",
|
|
1020
|
-
type: "uint256"
|
|
1021
|
-
}
|
|
1022
|
-
],
|
|
1023
|
-
name: "requestDelete",
|
|
1024
|
-
outputs: [
|
|
1025
|
-
],
|
|
1026
|
-
stateMutability: "nonpayable",
|
|
1061
|
+
stateMutability: "nonpayable",
|
|
1027
1062
|
type: "function"
|
|
1028
1063
|
},
|
|
1029
1064
|
{
|
|
@@ -1165,6 +1200,25 @@ var abi$1 = [
|
|
|
1165
1200
|
stateMutability: "nonpayable",
|
|
1166
1201
|
type: "function"
|
|
1167
1202
|
},
|
|
1203
|
+
{
|
|
1204
|
+
inputs: [
|
|
1205
|
+
{
|
|
1206
|
+
internalType: "bytes4",
|
|
1207
|
+
name: "interfaceId",
|
|
1208
|
+
type: "bytes4"
|
|
1209
|
+
}
|
|
1210
|
+
],
|
|
1211
|
+
name: "supportsInterface",
|
|
1212
|
+
outputs: [
|
|
1213
|
+
{
|
|
1214
|
+
internalType: "bool",
|
|
1215
|
+
name: "",
|
|
1216
|
+
type: "bool"
|
|
1217
|
+
}
|
|
1218
|
+
],
|
|
1219
|
+
stateMutability: "view",
|
|
1220
|
+
type: "function"
|
|
1221
|
+
},
|
|
1168
1222
|
{
|
|
1169
1223
|
inputs: [
|
|
1170
1224
|
],
|
|
@@ -1217,7 +1271,7 @@ var abi$1 = [
|
|
|
1217
1271
|
inputs: [
|
|
1218
1272
|
{
|
|
1219
1273
|
internalType: "uint256",
|
|
1220
|
-
name: "",
|
|
1274
|
+
name: "_tokenId",
|
|
1221
1275
|
type: "uint256"
|
|
1222
1276
|
}
|
|
1223
1277
|
],
|
|
@@ -1256,6 +1310,20 @@ var abi$1 = [
|
|
|
1256
1310
|
stateMutability: "nonpayable",
|
|
1257
1311
|
type: "function"
|
|
1258
1312
|
},
|
|
1313
|
+
{
|
|
1314
|
+
inputs: [
|
|
1315
|
+
{
|
|
1316
|
+
internalType: "address",
|
|
1317
|
+
name: "newOwner",
|
|
1318
|
+
type: "address"
|
|
1319
|
+
}
|
|
1320
|
+
],
|
|
1321
|
+
name: "transferOwnership",
|
|
1322
|
+
outputs: [
|
|
1323
|
+
],
|
|
1324
|
+
stateMutability: "nonpayable",
|
|
1325
|
+
type: "function"
|
|
1326
|
+
},
|
|
1259
1327
|
{
|
|
1260
1328
|
inputs: [
|
|
1261
1329
|
],
|
|
@@ -1272,6 +1340,11 @@ var abi$1 = [
|
|
|
1272
1340
|
name: "tokenId",
|
|
1273
1341
|
type: "uint256"
|
|
1274
1342
|
},
|
|
1343
|
+
{
|
|
1344
|
+
internalType: "address",
|
|
1345
|
+
name: "_royaltyReceiver",
|
|
1346
|
+
type: "address"
|
|
1347
|
+
},
|
|
1275
1348
|
{
|
|
1276
1349
|
components: [
|
|
1277
1350
|
{
|
|
@@ -1295,7 +1368,7 @@ var abi$1 = [
|
|
|
1295
1368
|
type: "address"
|
|
1296
1369
|
}
|
|
1297
1370
|
],
|
|
1298
|
-
internalType: "struct
|
|
1371
|
+
internalType: "struct IpNFT.LicenseTerms",
|
|
1299
1372
|
name: "newTerms",
|
|
1300
1373
|
type: "tuple"
|
|
1301
1374
|
}
|
|
@@ -1305,6 +1378,25 @@ var abi$1 = [
|
|
|
1305
1378
|
],
|
|
1306
1379
|
stateMutability: "nonpayable",
|
|
1307
1380
|
type: "function"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
inputs: [
|
|
1384
|
+
{
|
|
1385
|
+
internalType: "bytes32",
|
|
1386
|
+
name: "",
|
|
1387
|
+
type: "bytes32"
|
|
1388
|
+
}
|
|
1389
|
+
],
|
|
1390
|
+
name: "usedNonces",
|
|
1391
|
+
outputs: [
|
|
1392
|
+
{
|
|
1393
|
+
internalType: "bool",
|
|
1394
|
+
name: "",
|
|
1395
|
+
type: "bool"
|
|
1396
|
+
}
|
|
1397
|
+
],
|
|
1398
|
+
stateMutability: "view",
|
|
1399
|
+
type: "function"
|
|
1308
1400
|
}
|
|
1309
1401
|
];
|
|
1310
1402
|
|
|
@@ -1321,17 +1413,7 @@ var abi$1 = [
|
|
|
1321
1413
|
*/
|
|
1322
1414
|
function mintWithSignature(to, tokenId, hash, uri, licenseTerms, deadline, signature) {
|
|
1323
1415
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1324
|
-
return yield this.callContractMethod(constants.DATANFT_CONTRACT_ADDRESS, abi$1, "mintWithSignature", [
|
|
1325
|
-
to,
|
|
1326
|
-
tokenId,
|
|
1327
|
-
hash,
|
|
1328
|
-
uri,
|
|
1329
|
-
licenseTerms,
|
|
1330
|
-
deadline,
|
|
1331
|
-
signature.v,
|
|
1332
|
-
signature.r,
|
|
1333
|
-
signature.s,
|
|
1334
|
-
], { waitForReceipt: true });
|
|
1416
|
+
return yield this.callContractMethod(constants.DATANFT_CONTRACT_ADDRESS, abi$1, "mintWithSignature", [to, tokenId, hash, uri, licenseTerms, deadline, signature], { waitForReceipt: true });
|
|
1335
1417
|
});
|
|
1336
1418
|
}
|
|
1337
1419
|
/**
|
|
@@ -1433,530 +1515,571 @@ function setApprovalForAll(operator, approved) {
|
|
|
1433
1515
|
|
|
1434
1516
|
var abi = [
|
|
1435
1517
|
{
|
|
1436
|
-
type: "constructor",
|
|
1437
1518
|
inputs: [
|
|
1438
1519
|
{
|
|
1520
|
+
internalType: "address",
|
|
1439
1521
|
name: "dataNFT_",
|
|
1440
|
-
type: "address"
|
|
1441
|
-
internalType: "address"
|
|
1522
|
+
type: "address"
|
|
1442
1523
|
},
|
|
1443
1524
|
{
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1525
|
+
internalType: "uint16",
|
|
1526
|
+
name: "protocolFeeBps_",
|
|
1527
|
+
type: "uint16"
|
|
1447
1528
|
},
|
|
1448
1529
|
{
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1530
|
+
internalType: "address",
|
|
1531
|
+
name: "treasury_",
|
|
1532
|
+
type: "address"
|
|
1452
1533
|
}
|
|
1453
1534
|
],
|
|
1454
|
-
stateMutability: "nonpayable"
|
|
1535
|
+
stateMutability: "nonpayable",
|
|
1536
|
+
type: "constructor"
|
|
1455
1537
|
},
|
|
1456
1538
|
{
|
|
1457
|
-
type: "function",
|
|
1458
|
-
name: "addFeeManager",
|
|
1459
1539
|
inputs: [
|
|
1460
|
-
{
|
|
1461
|
-
name: "feeManager",
|
|
1462
|
-
type: "address",
|
|
1463
|
-
internalType: "address"
|
|
1464
|
-
}
|
|
1465
1540
|
],
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
stateMutability: "nonpayable"
|
|
1541
|
+
name: "EnforcedPause",
|
|
1542
|
+
type: "error"
|
|
1469
1543
|
},
|
|
1470
1544
|
{
|
|
1471
|
-
type: "function",
|
|
1472
|
-
name: "addPauser",
|
|
1473
1545
|
inputs: [
|
|
1474
|
-
{
|
|
1475
|
-
name: "pauser",
|
|
1476
|
-
type: "address",
|
|
1477
|
-
internalType: "address"
|
|
1478
|
-
}
|
|
1479
|
-
],
|
|
1480
|
-
outputs: [
|
|
1481
1546
|
],
|
|
1482
|
-
|
|
1547
|
+
name: "ExpectedPause",
|
|
1548
|
+
type: "error"
|
|
1483
1549
|
},
|
|
1484
1550
|
{
|
|
1485
|
-
type: "function",
|
|
1486
|
-
name: "buyAccess",
|
|
1487
1551
|
inputs: [
|
|
1488
1552
|
{
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1553
|
+
internalType: "uint256",
|
|
1554
|
+
name: "expected",
|
|
1555
|
+
type: "uint256"
|
|
1492
1556
|
},
|
|
1493
1557
|
{
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1558
|
+
internalType: "uint256",
|
|
1559
|
+
name: "actual",
|
|
1560
|
+
type: "uint256"
|
|
1497
1561
|
}
|
|
1498
1562
|
],
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
stateMutability: "payable"
|
|
1563
|
+
name: "InvalidPayment",
|
|
1564
|
+
type: "error"
|
|
1502
1565
|
},
|
|
1503
1566
|
{
|
|
1504
|
-
type: "function",
|
|
1505
|
-
name: "dataNFT",
|
|
1506
1567
|
inputs: [
|
|
1507
|
-
],
|
|
1508
|
-
outputs: [
|
|
1509
1568
|
{
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1569
|
+
internalType: "uint32",
|
|
1570
|
+
name: "periods",
|
|
1571
|
+
type: "uint32"
|
|
1513
1572
|
}
|
|
1514
1573
|
],
|
|
1515
|
-
|
|
1574
|
+
name: "InvalidPeriods",
|
|
1575
|
+
type: "error"
|
|
1516
1576
|
},
|
|
1517
1577
|
{
|
|
1518
|
-
type: "function",
|
|
1519
|
-
name: "feeManagers",
|
|
1520
1578
|
inputs: [
|
|
1521
1579
|
{
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1526
|
-
],
|
|
1527
|
-
outputs: [
|
|
1528
|
-
{
|
|
1529
|
-
name: "",
|
|
1530
|
-
type: "bool",
|
|
1531
|
-
internalType: "bool"
|
|
1580
|
+
internalType: "uint16",
|
|
1581
|
+
name: "royaltyBps",
|
|
1582
|
+
type: "uint16"
|
|
1532
1583
|
}
|
|
1533
1584
|
],
|
|
1534
|
-
|
|
1585
|
+
name: "InvalidRoyalty",
|
|
1586
|
+
type: "error"
|
|
1535
1587
|
},
|
|
1536
1588
|
{
|
|
1537
|
-
type: "function",
|
|
1538
|
-
name: "hasAccess",
|
|
1539
1589
|
inputs: [
|
|
1540
1590
|
{
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
},
|
|
1545
|
-
{
|
|
1546
|
-
name: "tokenId",
|
|
1547
|
-
type: "uint256",
|
|
1548
|
-
internalType: "uint256"
|
|
1549
|
-
}
|
|
1550
|
-
],
|
|
1551
|
-
outputs: [
|
|
1552
|
-
{
|
|
1553
|
-
name: "",
|
|
1554
|
-
type: "bool",
|
|
1555
|
-
internalType: "bool"
|
|
1591
|
+
internalType: "address",
|
|
1592
|
+
name: "owner",
|
|
1593
|
+
type: "address"
|
|
1556
1594
|
}
|
|
1557
1595
|
],
|
|
1558
|
-
|
|
1596
|
+
name: "OwnableInvalidOwner",
|
|
1597
|
+
type: "error"
|
|
1559
1598
|
},
|
|
1560
1599
|
{
|
|
1561
|
-
type: "function",
|
|
1562
|
-
name: "owner",
|
|
1563
1600
|
inputs: [
|
|
1564
|
-
],
|
|
1565
|
-
outputs: [
|
|
1566
1601
|
{
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1602
|
+
internalType: "address",
|
|
1603
|
+
name: "account",
|
|
1604
|
+
type: "address"
|
|
1570
1605
|
}
|
|
1571
1606
|
],
|
|
1572
|
-
|
|
1607
|
+
name: "OwnableUnauthorizedAccount",
|
|
1608
|
+
type: "error"
|
|
1573
1609
|
},
|
|
1574
1610
|
{
|
|
1575
|
-
type: "function",
|
|
1576
|
-
name: "pause",
|
|
1577
1611
|
inputs: [
|
|
1578
1612
|
],
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
stateMutability: "nonpayable"
|
|
1613
|
+
name: "TransferFailed",
|
|
1614
|
+
type: "error"
|
|
1582
1615
|
},
|
|
1583
1616
|
{
|
|
1584
|
-
type: "function",
|
|
1585
|
-
name: "paused",
|
|
1586
1617
|
inputs: [
|
|
1587
1618
|
],
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
name: "",
|
|
1591
|
-
type: "bool",
|
|
1592
|
-
internalType: "bool"
|
|
1593
|
-
}
|
|
1594
|
-
],
|
|
1595
|
-
stateMutability: "view"
|
|
1619
|
+
name: "Unauthorized",
|
|
1620
|
+
type: "error"
|
|
1596
1621
|
},
|
|
1597
1622
|
{
|
|
1598
|
-
type: "function",
|
|
1599
|
-
name: "pausers",
|
|
1600
1623
|
inputs: [
|
|
1601
|
-
{
|
|
1602
|
-
name: "",
|
|
1603
|
-
type: "address",
|
|
1604
|
-
internalType: "address"
|
|
1605
|
-
}
|
|
1606
|
-
],
|
|
1607
|
-
outputs: [
|
|
1608
|
-
{
|
|
1609
|
-
name: "",
|
|
1610
|
-
type: "bool",
|
|
1611
|
-
internalType: "bool"
|
|
1612
|
-
}
|
|
1613
1624
|
],
|
|
1614
|
-
|
|
1625
|
+
name: "ZeroAddress",
|
|
1626
|
+
type: "error"
|
|
1615
1627
|
},
|
|
1616
1628
|
{
|
|
1617
|
-
|
|
1618
|
-
name: "protocolFeeBps",
|
|
1629
|
+
anonymous: false,
|
|
1619
1630
|
inputs: [
|
|
1620
|
-
],
|
|
1621
|
-
outputs: [
|
|
1622
1631
|
{
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
stateMutability: "view"
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
type: "function",
|
|
1632
|
-
name: "removeFeeManager",
|
|
1633
|
-
inputs: [
|
|
1632
|
+
indexed: true,
|
|
1633
|
+
internalType: "uint256",
|
|
1634
|
+
name: "tokenId",
|
|
1635
|
+
type: "uint256"
|
|
1636
|
+
},
|
|
1634
1637
|
{
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
+
indexed: true,
|
|
1639
|
+
internalType: "address",
|
|
1640
|
+
name: "buyer",
|
|
1641
|
+
type: "address"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
indexed: false,
|
|
1645
|
+
internalType: "uint32",
|
|
1646
|
+
name: "periods",
|
|
1647
|
+
type: "uint32"
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
indexed: false,
|
|
1651
|
+
internalType: "uint256",
|
|
1652
|
+
name: "newExpiry",
|
|
1653
|
+
type: "uint256"
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
indexed: false,
|
|
1657
|
+
internalType: "uint256",
|
|
1658
|
+
name: "amountPaid",
|
|
1659
|
+
type: "uint256"
|
|
1638
1660
|
}
|
|
1639
1661
|
],
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
stateMutability: "nonpayable"
|
|
1662
|
+
name: "AccessPurchased",
|
|
1663
|
+
type: "event"
|
|
1643
1664
|
},
|
|
1644
1665
|
{
|
|
1645
|
-
|
|
1646
|
-
name: "removePauser",
|
|
1666
|
+
anonymous: false,
|
|
1647
1667
|
inputs: [
|
|
1648
1668
|
{
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1669
|
+
indexed: true,
|
|
1670
|
+
internalType: "uint256",
|
|
1671
|
+
name: "tokenId",
|
|
1672
|
+
type: "uint256"
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
indexed: true,
|
|
1676
|
+
internalType: "address",
|
|
1677
|
+
name: "creator",
|
|
1678
|
+
type: "address"
|
|
1652
1679
|
}
|
|
1653
1680
|
],
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
stateMutability: "nonpayable"
|
|
1681
|
+
name: "DataDeleted",
|
|
1682
|
+
type: "event"
|
|
1657
1683
|
},
|
|
1658
1684
|
{
|
|
1659
|
-
|
|
1660
|
-
name: "renewAccess",
|
|
1685
|
+
anonymous: false,
|
|
1661
1686
|
inputs: [
|
|
1662
1687
|
{
|
|
1688
|
+
indexed: true,
|
|
1689
|
+
internalType: "uint256",
|
|
1663
1690
|
name: "tokenId",
|
|
1664
|
-
type: "uint256"
|
|
1665
|
-
internalType: "uint256"
|
|
1691
|
+
type: "uint256"
|
|
1666
1692
|
},
|
|
1667
1693
|
{
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1694
|
+
indexed: true,
|
|
1695
|
+
internalType: "address",
|
|
1696
|
+
name: "creator",
|
|
1697
|
+
type: "address"
|
|
1671
1698
|
},
|
|
1672
1699
|
{
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1700
|
+
indexed: false,
|
|
1701
|
+
internalType: "bytes32",
|
|
1702
|
+
name: "contentHash",
|
|
1703
|
+
type: "bytes32"
|
|
1676
1704
|
}
|
|
1677
1705
|
],
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
stateMutability: "payable"
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
type: "function",
|
|
1684
|
-
name: "router",
|
|
1685
|
-
inputs: [
|
|
1686
|
-
],
|
|
1687
|
-
outputs: [
|
|
1688
|
-
{
|
|
1689
|
-
name: "",
|
|
1690
|
-
type: "address",
|
|
1691
|
-
internalType: "contract RoyaltyRouter"
|
|
1692
|
-
}
|
|
1693
|
-
],
|
|
1694
|
-
stateMutability: "view"
|
|
1706
|
+
name: "DataMinted",
|
|
1707
|
+
type: "event"
|
|
1695
1708
|
},
|
|
1696
1709
|
{
|
|
1697
|
-
|
|
1698
|
-
name: "subscriptionExpiry",
|
|
1710
|
+
anonymous: false,
|
|
1699
1711
|
inputs: [
|
|
1700
1712
|
{
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1713
|
+
indexed: true,
|
|
1714
|
+
internalType: "address",
|
|
1715
|
+
name: "previousOwner",
|
|
1716
|
+
type: "address"
|
|
1704
1717
|
},
|
|
1705
1718
|
{
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
],
|
|
1711
|
-
outputs: [
|
|
1712
|
-
{
|
|
1713
|
-
name: "",
|
|
1714
|
-
type: "uint64",
|
|
1715
|
-
internalType: "uint64"
|
|
1719
|
+
indexed: true,
|
|
1720
|
+
internalType: "address",
|
|
1721
|
+
name: "newOwner",
|
|
1722
|
+
type: "address"
|
|
1716
1723
|
}
|
|
1717
1724
|
],
|
|
1718
|
-
|
|
1725
|
+
name: "OwnershipTransferred",
|
|
1726
|
+
type: "event"
|
|
1719
1727
|
},
|
|
1720
1728
|
{
|
|
1721
|
-
|
|
1722
|
-
name: "unpause",
|
|
1729
|
+
anonymous: false,
|
|
1723
1730
|
inputs: [
|
|
1731
|
+
{
|
|
1732
|
+
indexed: false,
|
|
1733
|
+
internalType: "address",
|
|
1734
|
+
name: "account",
|
|
1735
|
+
type: "address"
|
|
1736
|
+
}
|
|
1724
1737
|
],
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
stateMutability: "nonpayable"
|
|
1738
|
+
name: "Paused",
|
|
1739
|
+
type: "event"
|
|
1728
1740
|
},
|
|
1729
1741
|
{
|
|
1730
|
-
|
|
1731
|
-
name: "updateProtocolFee",
|
|
1742
|
+
anonymous: false,
|
|
1732
1743
|
inputs: [
|
|
1733
1744
|
{
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1745
|
+
indexed: true,
|
|
1746
|
+
internalType: "uint256",
|
|
1747
|
+
name: "tokenId",
|
|
1748
|
+
type: "uint256"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
indexed: false,
|
|
1752
|
+
internalType: "uint256",
|
|
1753
|
+
name: "royaltyAmount",
|
|
1754
|
+
type: "uint256"
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
indexed: false,
|
|
1758
|
+
internalType: "address",
|
|
1759
|
+
name: "creator",
|
|
1760
|
+
type: "address"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
indexed: false,
|
|
1764
|
+
internalType: "uint256",
|
|
1765
|
+
name: "protocolAmount",
|
|
1766
|
+
type: "uint256"
|
|
1737
1767
|
}
|
|
1738
1768
|
],
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
stateMutability: "nonpayable"
|
|
1769
|
+
name: "RoyaltyPaid",
|
|
1770
|
+
type: "event"
|
|
1742
1771
|
},
|
|
1743
1772
|
{
|
|
1744
|
-
|
|
1745
|
-
name: "AccessPurchased",
|
|
1773
|
+
anonymous: false,
|
|
1746
1774
|
inputs: [
|
|
1747
1775
|
{
|
|
1748
|
-
name: "tokenId",
|
|
1749
|
-
type: "uint256",
|
|
1750
1776
|
indexed: true,
|
|
1751
|
-
internalType: "uint256"
|
|
1777
|
+
internalType: "uint256",
|
|
1778
|
+
name: "tokenId",
|
|
1779
|
+
type: "uint256"
|
|
1752
1780
|
},
|
|
1753
1781
|
{
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1782
|
+
indexed: false,
|
|
1783
|
+
internalType: "uint128",
|
|
1784
|
+
name: "newPrice",
|
|
1785
|
+
type: "uint128"
|
|
1758
1786
|
},
|
|
1759
1787
|
{
|
|
1760
|
-
name: "periods",
|
|
1761
|
-
type: "uint32",
|
|
1762
1788
|
indexed: false,
|
|
1763
|
-
internalType: "uint32"
|
|
1789
|
+
internalType: "uint32",
|
|
1790
|
+
name: "newDuration",
|
|
1791
|
+
type: "uint32"
|
|
1764
1792
|
},
|
|
1765
1793
|
{
|
|
1766
|
-
name: "newExpiry",
|
|
1767
|
-
type: "uint64",
|
|
1768
1794
|
indexed: false,
|
|
1769
|
-
internalType: "
|
|
1795
|
+
internalType: "uint16",
|
|
1796
|
+
name: "newRoyaltyBps",
|
|
1797
|
+
type: "uint16"
|
|
1770
1798
|
},
|
|
1771
1799
|
{
|
|
1772
|
-
name: "amountPaid",
|
|
1773
|
-
type: "uint256",
|
|
1774
1800
|
indexed: false,
|
|
1775
|
-
internalType: "
|
|
1801
|
+
internalType: "address",
|
|
1802
|
+
name: "paymentToken",
|
|
1803
|
+
type: "address"
|
|
1776
1804
|
}
|
|
1777
1805
|
],
|
|
1778
|
-
|
|
1806
|
+
name: "TermsUpdated",
|
|
1807
|
+
type: "event"
|
|
1779
1808
|
},
|
|
1780
1809
|
{
|
|
1781
|
-
|
|
1782
|
-
name: "DataDeleted",
|
|
1810
|
+
anonymous: false,
|
|
1783
1811
|
inputs: [
|
|
1784
1812
|
{
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1813
|
+
indexed: false,
|
|
1814
|
+
internalType: "address",
|
|
1815
|
+
name: "account",
|
|
1816
|
+
type: "address"
|
|
1789
1817
|
}
|
|
1790
1818
|
],
|
|
1791
|
-
|
|
1819
|
+
name: "Unpaused",
|
|
1820
|
+
type: "event"
|
|
1792
1821
|
},
|
|
1793
1822
|
{
|
|
1794
|
-
type: "event",
|
|
1795
|
-
name: "DataDeletionRequested",
|
|
1796
1823
|
inputs: [
|
|
1797
1824
|
{
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
internalType: "uint256"
|
|
1802
|
-
},
|
|
1803
|
-
{
|
|
1804
|
-
name: "creator",
|
|
1805
|
-
type: "address",
|
|
1806
|
-
indexed: true,
|
|
1807
|
-
internalType: "address"
|
|
1825
|
+
internalType: "address",
|
|
1826
|
+
name: "feeManager",
|
|
1827
|
+
type: "address"
|
|
1808
1828
|
}
|
|
1809
1829
|
],
|
|
1810
|
-
|
|
1830
|
+
name: "addFeeManager",
|
|
1831
|
+
outputs: [
|
|
1832
|
+
],
|
|
1833
|
+
stateMutability: "nonpayable",
|
|
1834
|
+
type: "function"
|
|
1811
1835
|
},
|
|
1812
1836
|
{
|
|
1813
|
-
type: "event",
|
|
1814
|
-
name: "DataMinted",
|
|
1815
1837
|
inputs: [
|
|
1816
1838
|
{
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
internalType: "uint256"
|
|
1839
|
+
internalType: "address",
|
|
1840
|
+
name: "buyer",
|
|
1841
|
+
type: "address"
|
|
1821
1842
|
},
|
|
1822
1843
|
{
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
internalType: "address"
|
|
1844
|
+
internalType: "uint256",
|
|
1845
|
+
name: "tokenId",
|
|
1846
|
+
type: "uint256"
|
|
1827
1847
|
},
|
|
1828
1848
|
{
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
internalType: "bytes32"
|
|
1849
|
+
internalType: "uint32",
|
|
1850
|
+
name: "periods",
|
|
1851
|
+
type: "uint32"
|
|
1833
1852
|
}
|
|
1834
1853
|
],
|
|
1835
|
-
|
|
1854
|
+
name: "buyAccess",
|
|
1855
|
+
outputs: [
|
|
1856
|
+
],
|
|
1857
|
+
stateMutability: "payable",
|
|
1858
|
+
type: "function"
|
|
1836
1859
|
},
|
|
1837
1860
|
{
|
|
1838
|
-
type: "event",
|
|
1839
|
-
name: "RoyaltyPaid",
|
|
1840
1861
|
inputs: [
|
|
1862
|
+
],
|
|
1863
|
+
name: "dataNFT",
|
|
1864
|
+
outputs: [
|
|
1841
1865
|
{
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
},
|
|
1866
|
+
internalType: "contract IpNFT",
|
|
1867
|
+
name: "",
|
|
1868
|
+
type: "address"
|
|
1869
|
+
}
|
|
1870
|
+
],
|
|
1871
|
+
stateMutability: "view",
|
|
1872
|
+
type: "function"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
inputs: [
|
|
1853
1876
|
{
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1877
|
+
internalType: "address",
|
|
1878
|
+
name: "",
|
|
1879
|
+
type: "address"
|
|
1880
|
+
}
|
|
1881
|
+
],
|
|
1882
|
+
name: "feeManagers",
|
|
1883
|
+
outputs: [
|
|
1859
1884
|
{
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
internalType: "uint256"
|
|
1885
|
+
internalType: "bool",
|
|
1886
|
+
name: "",
|
|
1887
|
+
type: "bool"
|
|
1864
1888
|
}
|
|
1865
1889
|
],
|
|
1866
|
-
|
|
1890
|
+
stateMutability: "view",
|
|
1891
|
+
type: "function"
|
|
1867
1892
|
},
|
|
1868
1893
|
{
|
|
1869
|
-
type: "event",
|
|
1870
|
-
name: "TermsUpdated",
|
|
1871
1894
|
inputs: [
|
|
1872
1895
|
{
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
internalType: "uint256"
|
|
1896
|
+
internalType: "address",
|
|
1897
|
+
name: "user",
|
|
1898
|
+
type: "address"
|
|
1877
1899
|
},
|
|
1878
1900
|
{
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1901
|
+
internalType: "uint256",
|
|
1902
|
+
name: "tokenId",
|
|
1903
|
+
type: "uint256"
|
|
1904
|
+
}
|
|
1905
|
+
],
|
|
1906
|
+
name: "hasAccess",
|
|
1907
|
+
outputs: [
|
|
1884
1908
|
{
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1909
|
+
internalType: "bool",
|
|
1910
|
+
name: "",
|
|
1911
|
+
type: "bool"
|
|
1912
|
+
}
|
|
1913
|
+
],
|
|
1914
|
+
stateMutability: "view",
|
|
1915
|
+
type: "function"
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
inputs: [
|
|
1919
|
+
],
|
|
1920
|
+
name: "owner",
|
|
1921
|
+
outputs: [
|
|
1890
1922
|
{
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1923
|
+
internalType: "address",
|
|
1924
|
+
name: "",
|
|
1925
|
+
type: "address"
|
|
1926
|
+
}
|
|
1927
|
+
],
|
|
1928
|
+
stateMutability: "view",
|
|
1929
|
+
type: "function"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
inputs: [
|
|
1933
|
+
],
|
|
1934
|
+
name: "pause",
|
|
1935
|
+
outputs: [
|
|
1936
|
+
],
|
|
1937
|
+
stateMutability: "nonpayable",
|
|
1938
|
+
type: "function"
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
inputs: [
|
|
1942
|
+
],
|
|
1943
|
+
name: "paused",
|
|
1944
|
+
outputs: [
|
|
1896
1945
|
{
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
internalType: "address"
|
|
1946
|
+
internalType: "bool",
|
|
1947
|
+
name: "",
|
|
1948
|
+
type: "bool"
|
|
1901
1949
|
}
|
|
1902
1950
|
],
|
|
1903
|
-
|
|
1951
|
+
stateMutability: "view",
|
|
1952
|
+
type: "function"
|
|
1904
1953
|
},
|
|
1905
1954
|
{
|
|
1906
|
-
type: "error",
|
|
1907
|
-
name: "DurationZero",
|
|
1908
1955
|
inputs: [
|
|
1909
|
-
]
|
|
1956
|
+
],
|
|
1957
|
+
name: "protocolFeeBps",
|
|
1958
|
+
outputs: [
|
|
1959
|
+
{
|
|
1960
|
+
internalType: "uint16",
|
|
1961
|
+
name: "",
|
|
1962
|
+
type: "uint16"
|
|
1963
|
+
}
|
|
1964
|
+
],
|
|
1965
|
+
stateMutability: "view",
|
|
1966
|
+
type: "function"
|
|
1910
1967
|
},
|
|
1911
1968
|
{
|
|
1912
|
-
type: "error",
|
|
1913
|
-
name: "InvalidPayment",
|
|
1914
1969
|
inputs: [
|
|
1915
1970
|
{
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1971
|
+
internalType: "address",
|
|
1972
|
+
name: "feeManager",
|
|
1973
|
+
type: "address"
|
|
1974
|
+
}
|
|
1975
|
+
],
|
|
1976
|
+
name: "removeFeeManager",
|
|
1977
|
+
outputs: [
|
|
1978
|
+
],
|
|
1979
|
+
stateMutability: "nonpayable",
|
|
1980
|
+
type: "function"
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
inputs: [
|
|
1984
|
+
],
|
|
1985
|
+
name: "renounceOwnership",
|
|
1986
|
+
outputs: [
|
|
1987
|
+
],
|
|
1988
|
+
stateMutability: "nonpayable",
|
|
1989
|
+
type: "function"
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
inputs: [
|
|
1993
|
+
{
|
|
1994
|
+
internalType: "uint256",
|
|
1995
|
+
name: "",
|
|
1996
|
+
type: "uint256"
|
|
1919
1997
|
},
|
|
1920
1998
|
{
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1999
|
+
internalType: "address",
|
|
2000
|
+
name: "",
|
|
2001
|
+
type: "address"
|
|
1924
2002
|
}
|
|
1925
|
-
]
|
|
2003
|
+
],
|
|
2004
|
+
name: "subscriptionExpiry",
|
|
2005
|
+
outputs: [
|
|
2006
|
+
{
|
|
2007
|
+
internalType: "uint256",
|
|
2008
|
+
name: "",
|
|
2009
|
+
type: "uint256"
|
|
2010
|
+
}
|
|
2011
|
+
],
|
|
2012
|
+
stateMutability: "view",
|
|
2013
|
+
type: "function"
|
|
1926
2014
|
},
|
|
1927
2015
|
{
|
|
1928
|
-
type: "error",
|
|
1929
|
-
name: "InvalidPeriods",
|
|
1930
2016
|
inputs: [
|
|
1931
2017
|
{
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2018
|
+
internalType: "address",
|
|
2019
|
+
name: "newOwner",
|
|
2020
|
+
type: "address"
|
|
1935
2021
|
}
|
|
1936
|
-
]
|
|
2022
|
+
],
|
|
2023
|
+
name: "transferOwnership",
|
|
2024
|
+
outputs: [
|
|
2025
|
+
],
|
|
2026
|
+
stateMutability: "nonpayable",
|
|
2027
|
+
type: "function"
|
|
1937
2028
|
},
|
|
1938
2029
|
{
|
|
1939
|
-
type: "error",
|
|
1940
|
-
name: "InvalidRoyalty",
|
|
1941
2030
|
inputs: [
|
|
2031
|
+
],
|
|
2032
|
+
name: "treasury",
|
|
2033
|
+
outputs: [
|
|
1942
2034
|
{
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
2035
|
+
internalType: "address",
|
|
2036
|
+
name: "",
|
|
2037
|
+
type: "address"
|
|
1946
2038
|
}
|
|
1947
|
-
]
|
|
2039
|
+
],
|
|
2040
|
+
stateMutability: "view",
|
|
2041
|
+
type: "function"
|
|
1948
2042
|
},
|
|
1949
2043
|
{
|
|
1950
|
-
type: "error",
|
|
1951
|
-
name: "Unauthorized",
|
|
1952
2044
|
inputs: [
|
|
1953
|
-
]
|
|
2045
|
+
],
|
|
2046
|
+
name: "unpause",
|
|
2047
|
+
outputs: [
|
|
2048
|
+
],
|
|
2049
|
+
stateMutability: "nonpayable",
|
|
2050
|
+
type: "function"
|
|
1954
2051
|
},
|
|
1955
2052
|
{
|
|
1956
|
-
type: "error",
|
|
1957
|
-
name: "ZeroAddress",
|
|
1958
2053
|
inputs: [
|
|
1959
|
-
|
|
2054
|
+
{
|
|
2055
|
+
internalType: "uint16",
|
|
2056
|
+
name: "newFeeBps",
|
|
2057
|
+
type: "uint16"
|
|
2058
|
+
}
|
|
2059
|
+
],
|
|
2060
|
+
name: "updateProtocolFee",
|
|
2061
|
+
outputs: [
|
|
2062
|
+
],
|
|
2063
|
+
stateMutability: "nonpayable",
|
|
2064
|
+
type: "function"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
inputs: [
|
|
2068
|
+
{
|
|
2069
|
+
internalType: "address",
|
|
2070
|
+
name: "newTreasury",
|
|
2071
|
+
type: "address"
|
|
2072
|
+
}
|
|
2073
|
+
],
|
|
2074
|
+
name: "updateTreasury",
|
|
2075
|
+
outputs: [
|
|
2076
|
+
],
|
|
2077
|
+
stateMutability: "nonpayable",
|
|
2078
|
+
type: "function"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
stateMutability: "payable",
|
|
2082
|
+
type: "receive"
|
|
1960
2083
|
}
|
|
1961
2084
|
];
|
|
1962
2085
|
|
|
@@ -2070,13 +2193,8 @@ class Origin {
|
|
|
2070
2193
|
}
|
|
2071
2194
|
const deadline = BigInt(Math.floor(Date.now() / 1000) + 600); // 10 minutes from now
|
|
2072
2195
|
const registration = yield this.registerDataNFT("file", deadline, info.key);
|
|
2073
|
-
const { tokenId, signerAddress, hash,
|
|
2074
|
-
if (!tokenId ||
|
|
2075
|
-
!signerAddress ||
|
|
2076
|
-
!hash ||
|
|
2077
|
-
v === undefined ||
|
|
2078
|
-
r === undefined ||
|
|
2079
|
-
s === undefined) {
|
|
2196
|
+
const { tokenId, signerAddress, hash, signature } = registration;
|
|
2197
|
+
if (!tokenId || !signerAddress || !hash || signature === undefined) {
|
|
2080
2198
|
console.error("Invalid registration data:", registration);
|
|
2081
2199
|
return null;
|
|
2082
2200
|
}
|
|
@@ -2084,7 +2202,6 @@ class Origin {
|
|
|
2084
2202
|
method: "eth_requestAccounts",
|
|
2085
2203
|
params: [],
|
|
2086
2204
|
});
|
|
2087
|
-
const signature = { v, r, s };
|
|
2088
2205
|
const mintResult = yield this.mintWithSignature(account, tokenId, hash, info.url, license, deadline, signature);
|
|
2089
2206
|
return tokenId.toString();
|
|
2090
2207
|
}
|
|
@@ -2277,21 +2394,27 @@ class Origin {
|
|
|
2277
2394
|
args: params,
|
|
2278
2395
|
});
|
|
2279
2396
|
yield __classPrivateFieldGet(this, _Origin_instances, "m", _Origin_ensureChainId).call(this, testnet);
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2397
|
+
try {
|
|
2398
|
+
const txHash = yield this.viemClient.sendTransaction({
|
|
2399
|
+
to: contractAddress,
|
|
2400
|
+
data,
|
|
2401
|
+
account,
|
|
2402
|
+
value: options.value,
|
|
2403
|
+
gas: options.gas,
|
|
2404
|
+
});
|
|
2405
|
+
if (typeof txHash !== "string") {
|
|
2406
|
+
throw new Error("Transaction failed to send.");
|
|
2407
|
+
}
|
|
2408
|
+
if (!options.waitForReceipt) {
|
|
2409
|
+
return txHash;
|
|
2410
|
+
}
|
|
2411
|
+
const receipt = yield __classPrivateFieldGet(this, _Origin_instances, "m", _Origin_waitForTxReceipt).call(this, txHash);
|
|
2412
|
+
return receipt;
|
|
2289
2413
|
}
|
|
2290
|
-
|
|
2291
|
-
|
|
2414
|
+
catch (error) {
|
|
2415
|
+
console.error("Transaction failed:", error);
|
|
2416
|
+
throw new Error("Transaction failed: " + error);
|
|
2292
2417
|
}
|
|
2293
|
-
const receipt = yield __classPrivateFieldGet(this, _Origin_instances, "m", _Origin_waitForTxReceipt).call(this, txHash);
|
|
2294
|
-
return receipt;
|
|
2295
2418
|
}
|
|
2296
2419
|
});
|
|
2297
2420
|
}
|