@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,9 +1,26 @@
1
1
  # Compatibility ABIs for LSP7
2
2
 
3
- This folder contains historical ABIs from previous release versions.
4
-
5
- - `v0.14.0`: LSP7 interface ID was `0xb3c4928f`.
6
- - `v0.13.0`: LSP7 interface ID was `0xb3c4928f`.
7
- - `v0.12.0`: LSP7 interface ID was `0xdaa746b7`.
3
+ This folder contains historical ABIs of LSP7DigitalAsset from previous release versions.
8
4
 
9
5
  This is to enable dApps and projects to be backward compatible in their interfaces to display and interact with LSP7 token contracts deployed with these old versions, by consuming their old ABIs.
6
+
7
+ **🧬 Interface ID changes**
8
+
9
+ - `0.14.0`: LSP7 interface ID was `0xb3c4928f`.
10
+ - `0.12.0`: LSP7 interface ID was `0xdaa746b7`.
11
+
12
+ ## List of ABI changes from `0.12.0` to `0.14.0`:
13
+
14
+ - event `AuthorizedOperator` renamed to `OperatorAuthorizationChanged`
15
+ - event `RevokedOperator` renamed to `OperatorRevoked`
16
+ - new function `batchCalls(bytes[])` function.
17
+ - new custom errors: `LSP4TokenTypeNotEditable()` and `LSP7BatchCallFailed(uint256)`
18
+ - `version()` endpoint removed from `0.12.0`
19
+
20
+ - `0.14.0`: LSP7 interface ID was `0xb3c4928f`.
21
+
22
+ ## List of ABI changes from `0.14.0` to `latest`:
23
+
24
+ - removed custom error `LSP7CannotSendToSelf()`.
25
+ - new custom errors `LSP7DecreaseAllowanceNotAuthorized` and `LSP7RevokeOperatorNotAuthorized`.
26
+ - new function parameter `tokenOwner` in functions `decreaseAllowance(...)` and `revokedOperator(...)`
@@ -1,17 +1,10 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
-
3
2
  pragma solidity ^0.8.4;
4
3
 
5
- // interfaces
6
- import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
7
- import {
8
- IERC725Y
9
- } from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol";
10
-
11
4
  /**
12
5
  * @title Interface of the LSP7 - Digital Asset standard, a fungible digital asset.
13
6
  */
14
- interface ILSP7DigitalAsset is IERC165, IERC725Y {
7
+ interface ILSP7DigitalAsset {
15
8
  // --- Events
16
9
 
17
10
  /**
@@ -65,7 +58,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y {
65
58
  /**
66
59
  * @dev Returns the number of decimals used to get its user representation.
67
60
  * If the asset contract has been set to be non-divisible via the `isNonDivisible_` parameter in
68
- * the `constructor`, the decimals returned wiil be `0`. Otherwise `18` is the common value.
61
+ * the `constructor`, the decimals returned will be `0`. Otherwise `18` is the common value.
69
62
  *
70
63
  * @custom:notice This information is only used for _display_ purposes: it in
71
64
  * no way affects any of the arithmetic of the contract, including
@@ -4,8 +4,18 @@ pragma solidity ^0.8.4;
4
4
  // --- ERC165 interface ids
5
5
  bytes4 constant _INTERFACEID_LSP7 = 0xc52d6008;
6
6
 
7
+ bytes4 constant _INTERFACEID_LSP7_V0_12_0 = 0xdaa746b7;
8
+
9
+ bytes4 constant _INTERFACEID_LSP7_V0_14_0 = 0xb3c4928f;
10
+
7
11
  // --- Token Hooks
8
12
 
13
+ // keccak256('LSP7Tokens_DelegatorNotification')
14
+ bytes32 constant _TYPEID_LSP7_DELEGATOR = 0x997bd66a7e7823b09383ec7ce65fc306af29b8f82a45627f8efc0408475de016;
15
+
16
+ // keccak256('LSP7Tokens_DelegateeNotification')
17
+ bytes32 constant _TYPEID_LSP7_DELEGATEE = 0x03fae98a28026f93c23e2c9438c2ef0faa101585127a89919d18f067d907b319;
18
+
9
19
  // keccak256('LSP7Tokens_SenderNotification')
10
20
  bytes32 constant _TYPEID_LSP7_TOKENSSENDER = 0x429ac7a06903dbc9c13dfcb3c9d11df8194581fa047c96d7a4171fc7402958ea;
11
21