@lukso/lsp7-contracts 0.15.0-rc.5 → 0.16.2

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.
Files changed (42) hide show
  1. package/README.md +13 -1
  2. package/artifacts/ILSP7DigitalAsset.json +0 -112
  3. package/artifacts/LSP7Burnable.json +0 -11
  4. package/artifacts/LSP7BurnableInitAbstract.json +0 -16
  5. package/artifacts/LSP7CappedSupply.json +0 -11
  6. package/artifacts/LSP7CappedSupplyInitAbstract.json +0 -16
  7. package/artifacts/LSP7DigitalAsset.json +0 -11
  8. package/artifacts/LSP7DigitalAssetInitAbstract.json +0 -16
  9. package/artifacts/LSP7Mintable.json +2 -13
  10. package/artifacts/LSP7MintableInit.json +2 -13
  11. package/{compatibility-abis/LSP7DigitalAsset-v0.13.0.json → artifacts/LSP7Votes.json} +411 -15
  12. package/artifacts/LSP7VotesInitAbstract.json +1146 -0
  13. package/compatibility-abis/LSP7DigitalAsset-v0.12.0.json +727 -736
  14. package/compatibility-abis/LSP7DigitalAsset-v0.14.0.json +749 -758
  15. package/compatibility-abis/README.md +22 -5
  16. package/contracts/ILSP7DigitalAsset.sol +2 -9
  17. package/contracts/LSP7Constants.sol +10 -0
  18. package/contracts/LSP7DigitalAsset.sol +780 -27
  19. package/contracts/LSP7DigitalAssetInitAbstract.sol +784 -14
  20. package/contracts/extensions/LSP7CappedSupply.sol +1 -1
  21. package/contracts/extensions/LSP7CappedSupplyInitAbstract.sol +1 -1
  22. package/contracts/extensions/LSP7Votes.sol +416 -0
  23. package/contracts/extensions/LSP7VotesConstants.sol +8 -0
  24. package/contracts/extensions/LSP7VotesInitAbstract.sol +443 -0
  25. package/dist/index.cjs +10 -1
  26. package/dist/index.d.cts +10 -4
  27. package/dist/index.d.mts +10 -4
  28. package/dist/index.d.ts +10 -4
  29. package/dist/index.mjs +10 -2
  30. package/package.json +7 -6
  31. package/types/index.ts +3488 -1480
  32. package/contracts/LSP7DigitalAssetCore.sol +0 -744
  33. package/types/common.ts +0 -131
  34. package/types/contracts/ILSP7DigitalAsset.ts +0 -626
  35. package/types/contracts/LSP7DigitalAsset.ts +0 -698
  36. package/types/contracts/LSP7DigitalAssetInitAbstract.ts +0 -729
  37. package/types/contracts/extensions/LSP7Burnable.ts +0 -717
  38. package/types/contracts/extensions/LSP7BurnableInitAbstract.ts +0 -748
  39. package/types/contracts/extensions/LSP7CappedSupply.ts +0 -712
  40. package/types/contracts/extensions/LSP7CappedSupplyInitAbstract.ts +0 -743
  41. package/types/contracts/presets/LSP7Mintable.ts +0 -717
  42. package/types/contracts/presets/LSP7MintableInit.ts +0 -779
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "LSP7DigitalAsset",
4
- "sourceName": "contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol",
3
+ "contractName": "LSP7Votes",
4
+ "sourceName": "contracts/extensions/LSP7Votes.sol",
5
5
  "abi": [
6
6
  {
7
7
  "inputs": [],
@@ -40,6 +40,11 @@
40
40
  "name": "InvalidFunctionSelector",
41
41
  "type": "error"
42
42
  },
43
+ {
44
+ "inputs": [],
45
+ "name": "InvalidShortString",
46
+ "type": "error"
47
+ },
43
48
  {
44
49
  "inputs": [],
45
50
  "name": "LSP4TokenNameNotEditable",
@@ -115,17 +120,33 @@
115
120
  },
116
121
  {
117
122
  "inputs": [],
118
- "name": "LSP7CannotSendToSelf",
123
+ "name": "LSP7CannotSendWithAddressZero",
119
124
  "type": "error"
120
125
  },
121
126
  {
122
127
  "inputs": [],
123
- "name": "LSP7CannotSendWithAddressZero",
128
+ "name": "LSP7CannotUseAddressZeroAsOperator",
124
129
  "type": "error"
125
130
  },
126
131
  {
127
- "inputs": [],
128
- "name": "LSP7CannotUseAddressZeroAsOperator",
132
+ "inputs": [
133
+ {
134
+ "internalType": "address",
135
+ "name": "caller",
136
+ "type": "address"
137
+ },
138
+ {
139
+ "internalType": "address",
140
+ "name": "tokenOwner",
141
+ "type": "address"
142
+ },
143
+ {
144
+ "internalType": "address",
145
+ "name": "operator",
146
+ "type": "address"
147
+ }
148
+ ],
149
+ "name": "LSP7DecreaseAllowanceNotAuthorized",
129
150
  "type": "error"
130
151
  },
131
152
  {
@@ -160,6 +181,27 @@
160
181
  "name": "LSP7NotifyTokenReceiverIsEOA",
161
182
  "type": "error"
162
183
  },
184
+ {
185
+ "inputs": [
186
+ {
187
+ "internalType": "address",
188
+ "name": "caller",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "internalType": "address",
193
+ "name": "tokenOwner",
194
+ "type": "address"
195
+ },
196
+ {
197
+ "internalType": "address",
198
+ "name": "operator",
199
+ "type": "address"
200
+ }
201
+ ],
202
+ "name": "LSP7RevokeOperatorNotAuthorized",
203
+ "type": "error"
204
+ },
163
205
  {
164
206
  "inputs": [],
165
207
  "name": "LSP7TokenContractCannotHoldValue",
@@ -192,20 +234,20 @@
192
234
  "name": "OperatorAllowanceCannotBeIncreasedFromZero",
193
235
  "type": "error"
194
236
  },
237
+ {
238
+ "inputs": [],
239
+ "name": "OwnableCannotSetZeroAddressAsOwner",
240
+ "type": "error"
241
+ },
195
242
  {
196
243
  "inputs": [
197
244
  {
198
- "internalType": "address",
199
- "name": "callerAddress",
200
- "type": "address"
245
+ "internalType": "string",
246
+ "name": "str",
247
+ "type": "string"
201
248
  }
202
249
  ],
203
- "name": "OwnableCallerNotTheOwner",
204
- "type": "error"
205
- },
206
- {
207
- "inputs": [],
208
- "name": "OwnableCannotSetZeroAddressAsOwner",
250
+ "name": "StringTooLong",
209
251
  "type": "error"
210
252
  },
211
253
  {
@@ -227,6 +269,62 @@
227
269
  "name": "DataChanged",
228
270
  "type": "event"
229
271
  },
272
+ {
273
+ "anonymous": false,
274
+ "inputs": [
275
+ {
276
+ "indexed": true,
277
+ "internalType": "address",
278
+ "name": "delegator",
279
+ "type": "address"
280
+ },
281
+ {
282
+ "indexed": true,
283
+ "internalType": "address",
284
+ "name": "fromDelegate",
285
+ "type": "address"
286
+ },
287
+ {
288
+ "indexed": true,
289
+ "internalType": "address",
290
+ "name": "toDelegate",
291
+ "type": "address"
292
+ }
293
+ ],
294
+ "name": "DelegateChanged",
295
+ "type": "event"
296
+ },
297
+ {
298
+ "anonymous": false,
299
+ "inputs": [
300
+ {
301
+ "indexed": true,
302
+ "internalType": "address",
303
+ "name": "delegate",
304
+ "type": "address"
305
+ },
306
+ {
307
+ "indexed": false,
308
+ "internalType": "uint256",
309
+ "name": "previousBalance",
310
+ "type": "uint256"
311
+ },
312
+ {
313
+ "indexed": false,
314
+ "internalType": "uint256",
315
+ "name": "newBalance",
316
+ "type": "uint256"
317
+ }
318
+ ],
319
+ "name": "DelegateVotesChanged",
320
+ "type": "event"
321
+ },
322
+ {
323
+ "anonymous": false,
324
+ "inputs": [],
325
+ "name": "EIP712DomainChanged",
326
+ "type": "event"
327
+ },
230
328
  {
231
329
  "anonymous": false,
232
330
  "inputs": [
@@ -355,6 +453,32 @@
355
453
  "stateMutability": "payable",
356
454
  "type": "fallback"
357
455
  },
456
+ {
457
+ "inputs": [],
458
+ "name": "CLOCK_MODE",
459
+ "outputs": [
460
+ {
461
+ "internalType": "string",
462
+ "name": "",
463
+ "type": "string"
464
+ }
465
+ ],
466
+ "stateMutability": "view",
467
+ "type": "function"
468
+ },
469
+ {
470
+ "inputs": [],
471
+ "name": "DOMAIN_SEPARATOR",
472
+ "outputs": [
473
+ {
474
+ "internalType": "bytes32",
475
+ "name": "",
476
+ "type": "bytes32"
477
+ }
478
+ ],
479
+ "stateMutability": "view",
480
+ "type": "function"
481
+ },
358
482
  {
359
483
  "inputs": [
360
484
  {
@@ -440,6 +564,55 @@
440
564
  "stateMutability": "nonpayable",
441
565
  "type": "function"
442
566
  },
567
+ {
568
+ "inputs": [
569
+ {
570
+ "internalType": "address",
571
+ "name": "account",
572
+ "type": "address"
573
+ },
574
+ {
575
+ "internalType": "uint32",
576
+ "name": "pos",
577
+ "type": "uint32"
578
+ }
579
+ ],
580
+ "name": "checkpoints",
581
+ "outputs": [
582
+ {
583
+ "components": [
584
+ {
585
+ "internalType": "uint32",
586
+ "name": "fromBlock",
587
+ "type": "uint32"
588
+ },
589
+ {
590
+ "internalType": "uint224",
591
+ "name": "votes",
592
+ "type": "uint224"
593
+ }
594
+ ],
595
+ "internalType": "struct LSP7Votes.Checkpoint",
596
+ "name": "",
597
+ "type": "tuple"
598
+ }
599
+ ],
600
+ "stateMutability": "view",
601
+ "type": "function"
602
+ },
603
+ {
604
+ "inputs": [],
605
+ "name": "clock",
606
+ "outputs": [
607
+ {
608
+ "internalType": "uint48",
609
+ "name": "",
610
+ "type": "uint48"
611
+ }
612
+ ],
613
+ "stateMutability": "view",
614
+ "type": "function"
615
+ },
443
616
  {
444
617
  "inputs": [],
445
618
  "name": "decimals",
@@ -460,6 +633,11 @@
460
633
  "name": "operator",
461
634
  "type": "address"
462
635
  },
636
+ {
637
+ "internalType": "address",
638
+ "name": "tokenOwner",
639
+ "type": "address"
640
+ },
463
641
  {
464
642
  "internalType": "uint256",
465
643
  "name": "subtractedAmount",
@@ -476,6 +654,119 @@
476
654
  "stateMutability": "nonpayable",
477
655
  "type": "function"
478
656
  },
657
+ {
658
+ "inputs": [
659
+ {
660
+ "internalType": "address",
661
+ "name": "delegatee",
662
+ "type": "address"
663
+ }
664
+ ],
665
+ "name": "delegate",
666
+ "outputs": [],
667
+ "stateMutability": "nonpayable",
668
+ "type": "function"
669
+ },
670
+ {
671
+ "inputs": [
672
+ {
673
+ "internalType": "address",
674
+ "name": "delegatee",
675
+ "type": "address"
676
+ },
677
+ {
678
+ "internalType": "uint256",
679
+ "name": "nonce",
680
+ "type": "uint256"
681
+ },
682
+ {
683
+ "internalType": "uint256",
684
+ "name": "expiry",
685
+ "type": "uint256"
686
+ },
687
+ {
688
+ "internalType": "uint8",
689
+ "name": "v",
690
+ "type": "uint8"
691
+ },
692
+ {
693
+ "internalType": "bytes32",
694
+ "name": "r",
695
+ "type": "bytes32"
696
+ },
697
+ {
698
+ "internalType": "bytes32",
699
+ "name": "s",
700
+ "type": "bytes32"
701
+ }
702
+ ],
703
+ "name": "delegateBySig",
704
+ "outputs": [],
705
+ "stateMutability": "nonpayable",
706
+ "type": "function"
707
+ },
708
+ {
709
+ "inputs": [
710
+ {
711
+ "internalType": "address",
712
+ "name": "account",
713
+ "type": "address"
714
+ }
715
+ ],
716
+ "name": "delegates",
717
+ "outputs": [
718
+ {
719
+ "internalType": "address",
720
+ "name": "",
721
+ "type": "address"
722
+ }
723
+ ],
724
+ "stateMutability": "view",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [],
729
+ "name": "eip712Domain",
730
+ "outputs": [
731
+ {
732
+ "internalType": "bytes1",
733
+ "name": "fields",
734
+ "type": "bytes1"
735
+ },
736
+ {
737
+ "internalType": "string",
738
+ "name": "name",
739
+ "type": "string"
740
+ },
741
+ {
742
+ "internalType": "string",
743
+ "name": "version",
744
+ "type": "string"
745
+ },
746
+ {
747
+ "internalType": "uint256",
748
+ "name": "chainId",
749
+ "type": "uint256"
750
+ },
751
+ {
752
+ "internalType": "address",
753
+ "name": "verifyingContract",
754
+ "type": "address"
755
+ },
756
+ {
757
+ "internalType": "bytes32",
758
+ "name": "salt",
759
+ "type": "bytes32"
760
+ },
761
+ {
762
+ "internalType": "uint256[]",
763
+ "name": "extensions",
764
+ "type": "uint256[]"
765
+ }
766
+ ],
767
+ "stateMutability": "view",
768
+ "type": "function"
769
+ },
479
770
  {
480
771
  "inputs": [
481
772
  {
@@ -533,6 +824,68 @@
533
824
  "stateMutability": "view",
534
825
  "type": "function"
535
826
  },
827
+ {
828
+ "inputs": [
829
+ {
830
+ "internalType": "uint256",
831
+ "name": "timepoint",
832
+ "type": "uint256"
833
+ }
834
+ ],
835
+ "name": "getPastTotalSupply",
836
+ "outputs": [
837
+ {
838
+ "internalType": "uint256",
839
+ "name": "",
840
+ "type": "uint256"
841
+ }
842
+ ],
843
+ "stateMutability": "view",
844
+ "type": "function"
845
+ },
846
+ {
847
+ "inputs": [
848
+ {
849
+ "internalType": "address",
850
+ "name": "account",
851
+ "type": "address"
852
+ },
853
+ {
854
+ "internalType": "uint256",
855
+ "name": "timepoint",
856
+ "type": "uint256"
857
+ }
858
+ ],
859
+ "name": "getPastVotes",
860
+ "outputs": [
861
+ {
862
+ "internalType": "uint256",
863
+ "name": "",
864
+ "type": "uint256"
865
+ }
866
+ ],
867
+ "stateMutability": "view",
868
+ "type": "function"
869
+ },
870
+ {
871
+ "inputs": [
872
+ {
873
+ "internalType": "address",
874
+ "name": "account",
875
+ "type": "address"
876
+ }
877
+ ],
878
+ "name": "getVotes",
879
+ "outputs": [
880
+ {
881
+ "internalType": "uint256",
882
+ "name": "",
883
+ "type": "uint256"
884
+ }
885
+ ],
886
+ "stateMutability": "view",
887
+ "type": "function"
888
+ },
536
889
  {
537
890
  "inputs": [
538
891
  {
@@ -556,6 +909,44 @@
556
909
  "stateMutability": "nonpayable",
557
910
  "type": "function"
558
911
  },
912
+ {
913
+ "inputs": [
914
+ {
915
+ "internalType": "address",
916
+ "name": "owner",
917
+ "type": "address"
918
+ }
919
+ ],
920
+ "name": "nonces",
921
+ "outputs": [
922
+ {
923
+ "internalType": "uint256",
924
+ "name": "",
925
+ "type": "uint256"
926
+ }
927
+ ],
928
+ "stateMutability": "view",
929
+ "type": "function"
930
+ },
931
+ {
932
+ "inputs": [
933
+ {
934
+ "internalType": "address",
935
+ "name": "account",
936
+ "type": "address"
937
+ }
938
+ ],
939
+ "name": "numCheckpoints",
940
+ "outputs": [
941
+ {
942
+ "internalType": "uint32",
943
+ "name": "",
944
+ "type": "uint32"
945
+ }
946
+ ],
947
+ "stateMutability": "view",
948
+ "type": "function"
949
+ },
559
950
  {
560
951
  "inputs": [],
561
952
  "name": "owner",
@@ -583,6 +974,11 @@
583
974
  "name": "operator",
584
975
  "type": "address"
585
976
  },
977
+ {
978
+ "internalType": "address",
979
+ "name": "tokenOwner",
980
+ "type": "address"
981
+ },
586
982
  {
587
983
  "internalType": "bool",
588
984
  "name": "notify",