@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.
- package/CONTRIBUTING.md +184 -0
- package/artifacts/LSP0ERC725Account.json +2 -2
- package/artifacts/LSP0ERC725AccountInit.json +2 -2
- package/artifacts/LSP6KeyManager.json +2 -2
- package/artifacts/LSP6KeyManagerInit.json +2 -2
- package/artifacts/LSP7CompatibleERC20Mintable.json +2 -2
- package/artifacts/LSP7CompatibleERC20MintableInit.json +2 -2
- package/artifacts/LSP8CompatibleERC721Mintable.json +2 -2
- package/artifacts/LSP8CompatibleERC721MintableInit.json +2 -2
- package/artifacts/LSP9Vault.json +2 -2
- package/artifacts/LSP9VaultInit.json +2 -2
- package/artifacts/UniversalProfile.json +2 -2
- package/artifacts/UniversalProfileInit.json +2 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +1 -1
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +6 -3
- package/contracts/LSP23MultiChainDeployment/IOwnerControlledContractDeployer.sol +174 -0
- package/contracts/LSP23MultiChainDeployment/IPostDeploymentModule.sol +10 -0
- package/contracts/LSP23MultiChainDeployment/LSP23Errors.sol +24 -0
- package/contracts/LSP23MultiChainDeployment/OwnerControlledContractDeployer.sol +388 -0
- package/contracts/LSP23MultiChainDeployment/modules/UniversalProfileInitPostDeploymentModule.sol +59 -0
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +5 -5
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +4 -4
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +1 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +5 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +1 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +23 -23
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +23 -23
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +1 -1
- package/contracts/LSP9Vault/LSP9VaultCore.sol +7 -2
- package/package.json +2 -1
package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol
CHANGED
|
@@ -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
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
|
|
@@ -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()
|
|
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.
|
|
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",
|