@lukso/lsp-smart-contracts 0.10.3 → 0.11.0-rc.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 (34) hide show
  1. package/CONTRIBUTING.md +184 -0
  2. package/artifacts/LSP0ERC725Account.json +2 -2
  3. package/artifacts/LSP0ERC725AccountInit.json +2 -2
  4. package/artifacts/LSP6KeyManager.json +2 -2
  5. package/artifacts/LSP6KeyManagerInit.json +2 -2
  6. package/artifacts/LSP7CompatibleERC20Mintable.json +2 -2
  7. package/artifacts/LSP7CompatibleERC20MintableInit.json +2 -2
  8. package/artifacts/LSP8CompatibleERC721Mintable.json +2 -2
  9. package/artifacts/LSP8CompatibleERC721MintableInit.json +2 -2
  10. package/artifacts/LSP9Vault.json +2 -2
  11. package/artifacts/LSP9VaultInit.json +2 -2
  12. package/artifacts/UniversalProfile.json +2 -2
  13. package/artifacts/UniversalProfileInit.json +2 -2
  14. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +1 -1
  15. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +6 -3
  16. package/contracts/LSP23MultiChainDeployment/IOwnerControlledContractDeployer.sol +174 -0
  17. package/contracts/LSP23MultiChainDeployment/IPostDeploymentModule.sol +10 -0
  18. package/contracts/LSP23MultiChainDeployment/LSP23Errors.sol +24 -0
  19. package/contracts/LSP23MultiChainDeployment/OwnerControlledContractDeployer.sol +388 -0
  20. package/contracts/LSP23MultiChainDeployment/modules/UniversalProfileInitPostDeploymentModule.sol +59 -0
  21. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +5 -5
  22. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +4 -4
  23. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +1 -1
  24. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
  25. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +5 -1
  26. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +1 -1
  27. package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +1 -1
  28. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
  29. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +23 -23
  30. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +23 -23
  31. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +1 -1
  32. package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +1 -1
  33. package/contracts/LSP9Vault/LSP9VaultCore.sol +7 -2
  34. package/package.json +2 -1
@@ -310,31 +310,31 @@ abstract contract LSP8CompatibleERC721InitAbstract is
310
310
  uint256 tokenId,
311
311
  bytes memory data
312
312
  ) private returns (bool) {
313
- if (to.code.length > 0) {
314
- try
315
- IERC721Receiver(to).onERC721Received(
316
- msg.sender,
317
- from,
318
- tokenId,
319
- data
320
- )
321
- returns (bytes4 retval) {
322
- return retval == IERC721Receiver.onERC721Received.selector;
323
- } catch (bytes memory reason) {
324
- if (reason.length == 0) {
325
- revert(
326
- "LSP8CompatibleERC721: transfer to non ERC721Receiver implementer"
327
- );
328
- } else {
329
- // solhint-disable no-inline-assembly
330
- /// @solidity memory-safe-assembly
331
- assembly {
332
- revert(add(32, reason), mload(reason))
333
- }
313
+ if (to.code.length == 0) {
314
+ return true;
315
+ }
316
+
317
+ try
318
+ IERC721Receiver(to).onERC721Received(
319
+ msg.sender,
320
+ from,
321
+ tokenId,
322
+ data
323
+ )
324
+ returns (bytes4 retval) {
325
+ return retval == IERC721Receiver.onERC721Received.selector;
326
+ } catch (bytes memory reason) {
327
+ if (reason.length == 0) {
328
+ revert(
329
+ "LSP8CompatibleERC721: transfer to non ERC721Receiver implementer"
330
+ );
331
+ } else {
332
+ // solhint-disable no-inline-assembly
333
+ /// @solidity memory-safe-assembly
334
+ assembly {
335
+ revert(add(32, reason), mload(reason))
334
336
  }
335
337
  }
336
- } else {
337
- return true;
338
338
  }
339
339
  }
340
340
 
@@ -15,7 +15,7 @@ contract LSP8CompatibleERC721Mintable is LSP8CompatibleERC721 {
15
15
  bytes32 tokenId,
16
16
  bool allowNonLSP1Recipient,
17
17
  bytes memory data
18
- ) public onlyOwner {
18
+ ) public virtual onlyOwner {
19
19
  _mint(to, tokenId, allowNonLSP1Recipient, data);
20
20
  }
21
21
  }
@@ -25,7 +25,7 @@ contract LSP8CompatibleERC721MintableInitAbstract is
25
25
  bytes32 tokenId,
26
26
  bool allowNonLSP1Recipient,
27
27
  bytes memory data
28
- ) public onlyOwner {
28
+ ) public virtual onlyOwner {
29
29
  _mint(to, tokenId, allowNonLSP1Recipient, data);
30
30
  }
31
31
  }
@@ -233,7 +233,7 @@ contract LSP9VaultCore is
233
233
  */
234
234
  function batchCalls(
235
235
  bytes[] calldata data
236
- ) public returns (bytes[] memory results) {
236
+ ) public virtual returns (bytes[] memory results) {
237
237
  results = new bytes[](data.length);
238
238
  for (uint256 i; i < data.length; ) {
239
239
  (bool success, bytes memory result) = address(this).delegatecall(
@@ -366,7 +366,12 @@ contract LSP9VaultCore is
366
366
  /**
367
367
  * @dev Modifier restricting the call to the owner of the contract and the UniversalReceiverDelegate
368
368
  */
369
- function _validateAndIdentifyCaller() internal view returns (bool isURD) {
369
+ function _validateAndIdentifyCaller()
370
+ internal
371
+ view
372
+ virtual
373
+ returns (bool isURD)
374
+ {
370
375
  if (msg.sender != owner()) {
371
376
  require(
372
377
  msg.sender == _reentrantDelegate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukso/lsp-smart-contracts",
3
- "version": "0.10.3",
3
+ "version": "0.11.0-rc.0",
4
4
  "description": "The reference implementation for universal profiles smart contracts",
5
5
  "directories": {
6
6
  "test": "test"
@@ -64,6 +64,7 @@
64
64
  "test:lsp11init": "hardhat test --no-compile tests/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.test.ts",
65
65
  "test:lsp20": "hardhat test --no-compile tests/LSP20CallVerification/LSP6/LSP20WithLSP6.test.ts",
66
66
  "test:lsp20init": "hardhat test --no-compile tests/LSP20CallVerification/LSP6/LSP20WithLSP6Init.test.ts",
67
+ "test:lsp23": "hardhat test --no-compile tests/LSP23MultiChainDeployment/LSP23MultiChainDeployment.test.ts",
67
68
  "test:universalfactory": "hardhat test --no-compile tests/LSP16UniversalFactory/LSP16UniversalFactory.test.ts",
68
69
  "test:reentrancy": "hardhat test --no-compile tests/Reentrancy/Reentrancy.test.ts",
69
70
  "test:reentrancyinit": "hardhat test --no-compile tests/Reentrancy/ReentrancyInit.test.ts",