@lukso/lsp-smart-contracts 0.6.2 → 0.7.0

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 (112) hide show
  1. package/README.md +2 -10
  2. package/artifacts/Create2Factory.json +2 -2
  3. package/artifacts/LSP0ERC725Account.json +36 -3
  4. package/artifacts/LSP0ERC725AccountInit.json +36 -29
  5. package/artifacts/LSP1UniversalReceiverDelegateUP.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateVault.json +2 -2
  7. package/artifacts/LSP4Compatibility.json +6 -0
  8. package/artifacts/LSP4DigitalAssetMetadata.json +6 -0
  9. package/artifacts/{LSP4DigitalAssetMetadataInit.json → LSP4DigitalAssetMetadataInitAbstract.json} +8 -51
  10. package/artifacts/LSP6KeyManager.json +13 -2
  11. package/artifacts/LSP6KeyManagerInit.json +13 -2
  12. package/artifacts/LSP7CappedSupply.json +37 -26
  13. package/artifacts/{LSP7CappedSupplyInit.json → LSP7CappedSupplyInitAbstract.json} +39 -67
  14. package/artifacts/LSP7CompatibleERC20.json +39 -49
  15. package/artifacts/LSP7CompatibleERC20InitAbstract.json +717 -0
  16. package/artifacts/LSP7CompatibleERC20Mintable.json +39 -28
  17. package/artifacts/LSP7CompatibleERC20MintableInit.json +44 -54
  18. package/artifacts/LSP7DigitalAsset.json +39 -54
  19. package/artifacts/LSP7DigitalAssetInitAbstract.json +540 -0
  20. package/artifacts/LSP7Mintable.json +40 -29
  21. package/artifacts/LSP7MintableInit.json +40 -55
  22. package/artifacts/LSP8CappedSupply.json +43 -0
  23. package/artifacts/{LSP8CappedSupplyInit.json → LSP8CappedSupplyInitAbstract.json} +45 -41
  24. package/artifacts/LSP8CompatibleERC721.json +88 -23
  25. package/artifacts/LSP8CompatibleERC721InitAbstract.json +920 -0
  26. package/artifacts/LSP8CompatibleERC721Mintable.json +88 -2
  27. package/artifacts/LSP8CompatibleERC721MintableInit.json +93 -28
  28. package/artifacts/LSP8IdentifiableDigitalAsset.json +45 -23
  29. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +628 -0
  30. package/artifacts/LSP8Mintable.json +45 -2
  31. package/artifacts/LSP8MintableInit.json +45 -28
  32. package/artifacts/LSP9Vault.json +36 -3
  33. package/artifacts/LSP9VaultInit.json +36 -29
  34. package/artifacts/UniversalFactory.json +2 -2
  35. package/artifacts/UniversalProfile.json +36 -3
  36. package/artifacts/UniversalProfileInit.json +36 -29
  37. package/artifacts/UniversalReceiverAddressStore.json +2 -2
  38. package/constants.js +73 -14
  39. package/contracts/Custom/ClaimOwnership.sol +67 -5
  40. package/contracts/Custom/ERC165Checker.sol +1 -1
  41. package/contracts/Custom/IClaimOwnership.sol +3 -1
  42. package/contracts/Factories/UniversalFactory.sol +7 -12
  43. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  44. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +20 -18
  45. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +1 -1
  46. package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +2 -2
  47. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/Handling/TokenAndVaultHandling.sol +1 -4
  48. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +2 -8
  49. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +1 -4
  50. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +2 -2
  51. package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +1 -1
  52. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +92 -6
  53. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +15 -6
  54. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +15 -6
  55. package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +2 -2
  56. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +3 -3
  57. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +1 -1
  58. package/contracts/LSP6KeyManager/LSP6Constants.sol +16 -21
  59. package/contracts/LSP6KeyManager/LSP6Errors.sol +8 -0
  60. package/contracts/LSP6KeyManager/LSP6KeyManager.sol +1 -1
  61. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +103 -84
  62. package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +1 -1
  63. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +1 -1
  64. package/contracts/LSP6KeyManager/LSP6Utils.sol +2 -1
  65. package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +18 -5
  66. package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
  67. package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +4 -4
  68. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +33 -24
  69. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +2 -2
  70. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +2 -0
  71. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +1 -1
  72. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +1 -1
  73. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Core.sol +5 -6
  74. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +7 -0
  75. package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +9 -7
  76. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +3 -3
  77. package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +8 -7
  78. package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +3 -1
  79. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +4 -4
  80. package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +6 -0
  81. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +1 -1
  82. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +31 -30
  83. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +15 -1
  84. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8Enumerable.sol +17 -0
  85. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyCore.sol +1 -1
  86. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +1 -1
  87. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721Core.sol +51 -27
  88. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +21 -0
  89. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableCore.sol +50 -0
  90. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +24 -0
  91. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +7 -0
  92. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +6 -4
  93. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +5 -4
  94. package/contracts/LSP9Vault/LSP9Constants.sol +4 -1
  95. package/contracts/LSP9Vault/LSP9VaultCore.sol +117 -46
  96. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +1 -1
  97. package/contracts/Legacy/UniversalReceiverAddressStore.sol +1 -0
  98. package/contracts/Utils/GasLib.sol +17 -0
  99. package/package.json +27 -30
  100. package/artifacts/LSP7CompatibleERC20Init.json +0 -760
  101. package/artifacts/LSP7DigitalAssetInit.json +0 -588
  102. package/artifacts/LSP8CompatibleERC721Init.json +0 -883
  103. package/artifacts/LSP8IdentifiableDigitalAssetInit.json +0 -639
  104. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInit.sol +0 -26
  105. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +0 -39
  106. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInit.sol +0 -19
  107. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Init.sol +0 -29
  108. package/contracts/LSP7DigitalAsset/presets/LSP7MintableCore.sol +0 -26
  109. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +0 -35
  110. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInit.sol +0 -19
  111. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721Init.sol +0 -25
  112. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableCore.sol +0 -26
@@ -1,26 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.0;
3
-
4
- // modules
5
- import {LSP4DigitalAssetMetadataInitAbstract} from "./LSP4DigitalAssetMetadataInitAbstract.sol";
6
-
7
- /**
8
- * @title LSP4DigitalAssetMetadata
9
- * @author Matthew Stevens
10
- * @dev Deployable Proxy Implementation of a LSP8 compliant contract.
11
- */
12
- abstract contract LSP4DigitalAssetMetadataInit is LSP4DigitalAssetMetadataInitAbstract {
13
- /**
14
- * @notice Sets the name, symbol of the token and the owner, and sets the SupportedStandards:LSP4DigitalAsset key
15
- * @param name_ The name of the token
16
- * @param symbol_ The symbol of the token
17
- * @param newOwner_ The owner of the token contract
18
- */
19
- function initialize(
20
- string memory name_,
21
- string memory symbol_,
22
- address newOwner_
23
- ) public virtual initializer {
24
- LSP4DigitalAssetMetadataInitAbstract._initialize(name_, symbol_, newOwner_);
25
- }
26
- }
@@ -1,39 +0,0 @@
1
- // SPDX-License-Identifier: CC0-1.0
2
- pragma solidity ^0.8.0;
3
-
4
- // modules
5
- import {LSP7DigitalAssetInitAbstract} from "./LSP7DigitalAssetInitAbstract.sol";
6
-
7
- /**
8
- * @title LSP7DigitalAsset contract
9
- * @author Matthew Stevens
10
- * @dev Proxy Implementation of a LSP7 compliant contract.
11
- *
12
- * This implementation is agnostic to the way tokens are created.
13
- * A supply mechanism has to be added in a derived contract using {_mint}
14
- * For a generic mechanism, see {LSP7Mintable}.
15
- */
16
- contract LSP7DigitalAssetInit is LSP7DigitalAssetInitAbstract {
17
- /**
18
- * @dev initialize (= lock) base implementation contract on deployment
19
- */
20
- constructor() {
21
- _disableInitializers();
22
- }
23
-
24
- /**
25
- * @notice Sets the token-Metadata
26
- * @param name_ The name of the token
27
- * @param symbol_ The symbol of the token
28
- * @param newOwner_ The owner of the the token-Metadata
29
- * @param isNFT_ Specify if the LSP7 token is a fungible or non-fungible token
30
- */
31
- function initialize(
32
- string memory name_,
33
- string memory symbol_,
34
- address newOwner_,
35
- bool isNFT_
36
- ) public virtual initializer {
37
- LSP7DigitalAssetInitAbstract._initialize(name_, symbol_, newOwner_, isNFT_);
38
- }
39
- }
@@ -1,19 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // modules
6
- import {LSP7CappedSupplyInitAbstract} from "./LSP7CappedSupplyInitAbstract.sol";
7
-
8
- /**
9
- * @dev LSP7 extension, adds token supply cap.
10
- */
11
- abstract contract LSP7CappedSupplyInit is LSP7CappedSupplyInitAbstract {
12
- /**
13
- * @notice Sets the token max supply
14
- * @param tokenSupplyCap_ The Token max supply
15
- */
16
- function initialize(uint256 tokenSupplyCap_) public virtual initializer {
17
- LSP7CappedSupplyInitAbstract._initialize(tokenSupplyCap_);
18
- }
19
- }
@@ -1,29 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // modules
6
- import {LSP7CompatibleERC20InitAbstract} from "./LSP7CompatibleERC20InitAbstract.sol";
7
-
8
- contract LSP7CompatibleERC20Init is LSP7CompatibleERC20InitAbstract {
9
- /**
10
- * @dev initialize (= lock) base implementation contract on deployment
11
- */
12
- constructor() {
13
- _disableInitializers();
14
- }
15
-
16
- /**
17
- * @notice Sets the name, the symbol and the owner of the token
18
- * @param name_ The name of the token
19
- * @param symbol_ The symbol of the token
20
- * @param newOwner_ The owner of the token
21
- */
22
- function initialize(
23
- string memory name_,
24
- string memory symbol_,
25
- address newOwner_
26
- ) public virtual initializer {
27
- LSP7CompatibleERC20InitAbstract._initialize(name_, symbol_, newOwner_);
28
- }
29
- }
@@ -1,26 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // interfaces
6
- import {ILSP7Mintable} from "./ILSP7Mintable.sol";
7
-
8
- // modules
9
- import {LSP7DigitalAssetCore} from "../LSP7DigitalAssetCore.sol";
10
-
11
- /**
12
- * @dev LSP7 extension, mintable .
13
- */
14
- abstract contract LSP7MintableCore is LSP7DigitalAssetCore, ILSP7Mintable {
15
- /**
16
- * @inheritdoc ILSP7Mintable
17
- */
18
- function mint(
19
- address to,
20
- uint256 amount,
21
- bool force,
22
- bytes memory data
23
- ) public virtual override {
24
- _mint(to, amount, force, data);
25
- }
26
- }
@@ -1,35 +0,0 @@
1
- // SPDX-License-Identifier: CC0-1.0
2
- pragma solidity ^0.8.0;
3
-
4
- // modules
5
- import {
6
- LSP8IdentifiableDigitalAssetInitAbstract
7
- } from "./LSP8IdentifiableDigitalAssetInitAbstract.sol";
8
-
9
- /**
10
- * @title LSP8IdentifiableDigitalAsset contract
11
- * @author Matthew Stevens
12
- * @dev Proxy Implementation of a LSP8 compliant contract.
13
- */
14
- contract LSP8IdentifiableDigitalAssetInit is LSP8IdentifiableDigitalAssetInitAbstract {
15
- /**
16
- * @dev initialize (= lock) base implementation contract on deployment
17
- */
18
- constructor() {
19
- _disableInitializers();
20
- }
21
-
22
- /**
23
- * @notice Sets the token-Metadata
24
- * @param name_ The name of the token
25
- * @param symbol_ The symbol of the token
26
- * @param newOwner_ The owner of the the token-Metadata
27
- */
28
- function initialize(
29
- string memory name_,
30
- string memory symbol_,
31
- address newOwner_
32
- ) public virtual initializer {
33
- LSP8IdentifiableDigitalAssetInitAbstract._initialize(name_, symbol_, newOwner_);
34
- }
35
- }
@@ -1,19 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // modules
6
- import {LSP8CappedSupplyInitAbstract} from "./LSP8CappedSupplyInitAbstract.sol";
7
-
8
- /**
9
- * @dev LSP8 extension, adds token supply cap.
10
- */
11
- abstract contract LSP8CappedSupplyInit is LSP8CappedSupplyInitAbstract {
12
- /**
13
- * @notice Sets the token max supply
14
- * @param tokenSupplyCap_ The Token max supply
15
- */
16
- function initialize(uint256 tokenSupplyCap_) public virtual initializer {
17
- LSP8CappedSupplyInitAbstract._initialize(tokenSupplyCap_);
18
- }
19
- }
@@ -1,25 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // modules
6
- import {LSP8CompatibleERC721InitAbstract} from "./LSP8CompatibleERC721InitAbstract.sol";
7
-
8
- /**
9
- * @dev LSP8 extension, for compatibility for clients / tools that expect ERC721.
10
- */
11
- contract LSP8CompatibleERC721Init is LSP8CompatibleERC721InitAbstract {
12
- /**
13
- * @notice Sets the name, the symbol and the owner of the token
14
- * @param name_ The name of the token
15
- * @param symbol_ The symbol of the token
16
- * @param newOwner_ The owner of the token
17
- */
18
- function initialize(
19
- string memory name_,
20
- string memory symbol_,
21
- address newOwner_
22
- ) public virtual initializer {
23
- LSP8CompatibleERC721InitAbstract._initialize(name_, symbol_, newOwner_);
24
- }
25
- }
@@ -1,26 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity ^0.8.0;
4
-
5
- // interfaces
6
- import {ILSP8Mintable} from "./ILSP8Mintable.sol";
7
-
8
- // modules
9
- import {LSP8IdentifiableDigitalAssetCore} from "../LSP8IdentifiableDigitalAssetCore.sol";
10
-
11
- /**
12
- * @dev LSP8 extension
13
- */
14
- abstract contract LSP8MintableCore is LSP8IdentifiableDigitalAssetCore, ILSP8Mintable {
15
- /**
16
- * @inheritdoc ILSP8Mintable
17
- */
18
- function mint(
19
- address to,
20
- bytes32 tokenId,
21
- bool force,
22
- bytes memory data
23
- ) public virtual override {
24
- _mint(to, tokenId, force, data);
25
- }
26
- }