@lukso/lsp-smart-contracts 0.11.1 → 0.12.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/README.md +10 -2
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +68 -47
- package/artifacts/LSP0ERC725AccountInit.json +68 -47
- package/artifacts/LSP11BasicSocialRecovery.json +18 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +18 -2
- package/artifacts/LSP16UniversalFactory.json +3 -3
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +27 -46
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +27 -46
- package/artifacts/LSP23LinkedContractsFactory.json +3 -3
- package/artifacts/LSP4DigitalAssetMetadata.json +16 -0
- package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +16 -0
- package/artifacts/LSP6KeyManager.json +34 -6
- package/artifacts/LSP6KeyManagerInit.json +34 -6
- package/artifacts/LSP7CappedSupply.json +64 -4
- package/artifacts/LSP7CappedSupplyInitAbstract.json +64 -4
- package/artifacts/LSP7CompatibleERC20.json +83 -23
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +83 -23
- package/artifacts/LSP7CompatibleERC20Mintable.json +86 -26
- package/artifacts/LSP7CompatibleERC20MintableInit.json +86 -26
- package/artifacts/LSP7DigitalAsset.json +64 -4
- package/artifacts/LSP7DigitalAssetInitAbstract.json +64 -4
- package/artifacts/LSP7Mintable.json +67 -7
- package/artifacts/LSP7MintableInit.json +67 -7
- package/artifacts/LSP8CappedSupply.json +57 -3
- package/artifacts/LSP8CappedSupplyInitAbstract.json +57 -3
- package/artifacts/LSP8CompatibleERC721.json +79 -25
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +79 -25
- package/artifacts/LSP8CompatibleERC721Mintable.json +87 -28
- package/artifacts/LSP8CompatibleERC721MintableInit.json +87 -28
- package/artifacts/LSP8IdentifiableDigitalAsset.json +57 -3
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +57 -3
- package/artifacts/LSP8Mintable.json +65 -6
- package/artifacts/LSP8MintableInit.json +65 -6
- package/artifacts/LSP9Vault.json +51 -35
- package/artifacts/LSP9VaultInit.json +51 -35
- package/artifacts/UniversalProfile.json +68 -47
- package/artifacts/UniversalProfileInit.json +68 -47
- package/contracts/Factories/Create2Factory.sol +1 -1
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -22
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +6 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +196 -123
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +5 -3
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +54 -14
- package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +1 -1
- package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +1 -1
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +2 -2
- package/contracts/LSP14Ownable2Step/LSP14Constants.sol +1 -1
- package/contracts/LSP14Ownable2Step/LSP14Errors.sol +9 -3
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +16 -12
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +65 -96
- package/contracts/LSP17ContractExtension/LSP17Errors.sol +1 -1
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +22 -15
- package/contracts/LSP17ContractExtension/LSP17Extension.sol +6 -5
- package/contracts/LSP17Extensions/Extension4337.sol +101 -0
- package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +15 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +1 -2
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +24 -0
- package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -0
- package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +0 -6
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +49 -33
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +33 -27
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +5 -48
- package/contracts/LSP20CallVerification/ILSP20CallVerifier.sol +13 -9
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +64 -45
- package/contracts/LSP20CallVerification/LSP20Constants.sol +6 -6
- package/contracts/LSP20CallVerification/LSP20Errors.sol +10 -4
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/ILSP23LinkedContractsFactory.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/IPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23Errors.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23LinkedContractsFactory.sol +5 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfileInitPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfilePostDeploymentModule.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +8 -3
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +1 -97
- package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +8 -3
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +8 -3
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Constants.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Errors.sol +2 -23
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +176 -101
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +1 -2
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol +27 -0
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +34 -28
- package/contracts/LSP6KeyManager/LSP6Utils.sol +29 -2
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +70 -10
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +2 -2
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +29 -13
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +273 -265
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +28 -12
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +17 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +4 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +7 -7
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +128 -54
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +129 -54
- package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +2 -2
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +1 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -4
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +16 -11
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +20 -6
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +32 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +67 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +143 -137
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +69 -15
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +172 -80
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +178 -91
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +8 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +5 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +13 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +9 -8
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +9 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +10 -8
- package/contracts/LSP9Vault/ILSP9Vault.sol +0 -21
- package/contracts/LSP9Vault/LSP9Constants.sol +6 -1
- package/contracts/LSP9Vault/LSP9Errors.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +119 -66
- package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -1
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
- package/contracts/UniversalProfile.sol +1 -1
- package/contracts/UniversalProfileInit.sol +1 -1
- package/contracts/UniversalProfileInitAbstract.sol +1 -1
- package/contracts/Version.sol +16 -0
- package/devdocs/LSP0ERC725Account.json +86 -52
- package/devdocs/LSP0ERC725AccountInit.json +86 -52
- package/devdocs/LSP11BasicSocialRecovery.json +13 -0
- package/devdocs/LSP11BasicSocialRecoveryInit.json +13 -0
- package/devdocs/LSP16UniversalFactory.json +9 -9
- package/devdocs/LSP1UniversalReceiverDelegateUP.json +7 -6
- package/devdocs/LSP1UniversalReceiverDelegateVault.json +7 -6
- package/devdocs/LSP4DigitalAssetMetadata.json +32 -10
- package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +32 -10
- package/devdocs/LSP6KeyManager.json +27 -13
- package/devdocs/LSP6KeyManagerInit.json +27 -13
- package/devdocs/LSP7CappedSupply.json +61 -28
- package/devdocs/LSP7CappedSupplyInitAbstract.json +61 -28
- package/devdocs/LSP7CompatibleERC20.json +102 -32
- package/devdocs/LSP7CompatibleERC20InitAbstract.json +102 -32
- package/devdocs/LSP7CompatibleERC20Mintable.json +102 -32
- package/devdocs/LSP7CompatibleERC20MintableInit.json +102 -32
- package/devdocs/LSP7DigitalAsset.json +61 -28
- package/devdocs/LSP7DigitalAssetInitAbstract.json +61 -28
- package/devdocs/LSP7Mintable.json +61 -28
- package/devdocs/LSP7MintableInit.json +61 -28
- package/devdocs/LSP8CappedSupply.json +66 -27
- package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -27
- package/devdocs/LSP8CompatibleERC721.json +93 -33
- package/devdocs/LSP8CompatibleERC721InitAbstract.json +93 -33
- package/devdocs/LSP8CompatibleERC721Mintable.json +95 -35
- package/devdocs/LSP8CompatibleERC721MintableInit.json +96 -36
- package/devdocs/LSP8IdentifiableDigitalAsset.json +70 -28
- package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -27
- package/devdocs/LSP8Mintable.json +68 -29
- package/devdocs/LSP8MintableInit.json +69 -30
- package/devdocs/LSP9Vault.json +69 -41
- package/devdocs/LSP9VaultInit.json +69 -41
- package/devdocs/UniversalProfile.json +86 -52
- package/devdocs/UniversalProfileInit.json +86 -52
- package/dist/constants.cjs.js +5565 -2846
- package/dist/constants.d.ts +3996 -1182
- package/dist/constants.es.js +5564 -2846
- package/package.json +8 -8
- package/userdocs/LSP0ERC725Account.json +20 -11
- package/userdocs/LSP0ERC725AccountInit.json +20 -11
- package/userdocs/LSP16UniversalFactory.json +26 -1
- package/userdocs/LSP1UniversalReceiverDelegateUP.json +4 -11
- package/userdocs/LSP1UniversalReceiverDelegateVault.json +4 -11
- package/userdocs/LSP4DigitalAssetMetadata.json +7 -4
- package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -4
- package/userdocs/LSP6KeyManager.json +3 -5
- package/userdocs/LSP6KeyManagerInit.json +3 -5
- package/userdocs/LSP7CappedSupply.json +17 -6
- package/userdocs/LSP7CappedSupplyInitAbstract.json +16 -5
- package/userdocs/LSP7CompatibleERC20.json +18 -5
- package/userdocs/LSP7CompatibleERC20InitAbstract.json +18 -5
- package/userdocs/LSP7CompatibleERC20Mintable.json +18 -5
- package/userdocs/LSP7CompatibleERC20MintableInit.json +18 -5
- package/userdocs/LSP7DigitalAsset.json +18 -5
- package/userdocs/LSP7DigitalAssetInitAbstract.json +18 -5
- package/userdocs/LSP7Mintable.json +18 -5
- package/userdocs/LSP7MintableInit.json +18 -5
- package/userdocs/LSP8CappedSupply.json +16 -5
- package/userdocs/LSP8CappedSupplyInitAbstract.json +15 -4
- package/userdocs/LSP8CompatibleERC721.json +30 -17
- package/userdocs/LSP8CompatibleERC721InitAbstract.json +30 -17
- package/userdocs/LSP8CompatibleERC721Mintable.json +31 -18
- package/userdocs/LSP8CompatibleERC721MintableInit.json +32 -19
- package/userdocs/LSP8IdentifiableDigitalAsset.json +18 -5
- package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +17 -4
- package/userdocs/LSP8Mintable.json +18 -5
- package/userdocs/LSP8MintableInit.json +19 -6
- package/userdocs/LSP9Vault.json +23 -14
- package/userdocs/LSP9VaultInit.json +23 -14
- package/userdocs/UniversalProfile.json +20 -11
- package/userdocs/UniversalProfileInit.json +20 -11
- package/CONTRIBUTING.md +0 -184
- package/artifacts/LSP4Compatibility.json +0 -216
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +0 -25
- package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +0 -38
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +0 -83
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +0 -175
- package/devdocs/LSP4Compatibility.json +0 -79
- package/userdocs/LSP4Compatibility.json +0 -20
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
pragma solidity ^0.8.4;
|
|
3
3
|
|
|
4
4
|
// interfaces
|
|
5
5
|
import {
|
|
6
|
-
ILSP1UniversalReceiver
|
|
6
|
+
ILSP1UniversalReceiver as ILSP1
|
|
7
7
|
} from "../LSP1UniversalReceiver/ILSP1UniversalReceiver.sol";
|
|
8
8
|
import {
|
|
9
9
|
ILSP8IdentifiableDigitalAsset
|
|
10
10
|
} from "./ILSP8IdentifiableDigitalAsset.sol";
|
|
11
11
|
|
|
12
|
+
// modules
|
|
13
|
+
import {Version} from "../Version.sol";
|
|
14
|
+
|
|
12
15
|
// libraries
|
|
13
16
|
import {
|
|
14
17
|
EnumerableSet
|
|
@@ -16,9 +19,24 @@ import {
|
|
|
16
19
|
import {
|
|
17
20
|
ERC165Checker
|
|
18
21
|
} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
|
|
22
|
+
import {LSP1Utils} from "../LSP1UniversalReceiver/LSP1Utils.sol";
|
|
19
23
|
|
|
20
24
|
// errors
|
|
21
|
-
import
|
|
25
|
+
import {
|
|
26
|
+
LSP8NonExistentTokenId,
|
|
27
|
+
LSP8NotTokenOwner,
|
|
28
|
+
LSP8CannotUseAddressZeroAsOperator,
|
|
29
|
+
LSP8TokenOwnerCannotBeOperator,
|
|
30
|
+
LSP8OperatorAlreadyAuthorized,
|
|
31
|
+
LSP8NotTokenOperator,
|
|
32
|
+
LSP8InvalidTransferBatch,
|
|
33
|
+
LSP8NonExistingOperator,
|
|
34
|
+
LSP8CannotSendToAddressZero,
|
|
35
|
+
LSP8TokenIdAlreadyMinted,
|
|
36
|
+
LSP8CannotSendToSelf,
|
|
37
|
+
LSP8NotifyTokenReceiverContractMissingLSP1Interface,
|
|
38
|
+
LSP8NotifyTokenReceiverIsEOA
|
|
39
|
+
} from "./LSP8Errors.sol";
|
|
22
40
|
|
|
23
41
|
// constants
|
|
24
42
|
import {_INTERFACEID_LSP1} from "../LSP1UniversalReceiver/LSP1Constants.sol";
|
|
@@ -34,10 +52,13 @@ import {
|
|
|
34
52
|
* @dev Core Implementation of a LSP8 compliant contract.
|
|
35
53
|
*/
|
|
36
54
|
abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
37
|
-
ILSP8IdentifiableDigitalAsset
|
|
55
|
+
ILSP8IdentifiableDigitalAsset,
|
|
56
|
+
Version
|
|
38
57
|
{
|
|
39
58
|
using EnumerableSet for EnumerableSet.AddressSet;
|
|
40
59
|
using EnumerableSet for EnumerableSet.Bytes32Set;
|
|
60
|
+
using ERC165Checker for address;
|
|
61
|
+
using LSP1Utils for address;
|
|
41
62
|
|
|
42
63
|
// --- Storage
|
|
43
64
|
|
|
@@ -59,7 +80,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
59
80
|
/**
|
|
60
81
|
* @inheritdoc ILSP8IdentifiableDigitalAsset
|
|
61
82
|
*/
|
|
62
|
-
function totalSupply() public view virtual returns (uint256) {
|
|
83
|
+
function totalSupply() public view virtual override returns (uint256) {
|
|
63
84
|
return _existingTokens;
|
|
64
85
|
}
|
|
65
86
|
|
|
@@ -70,7 +91,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
70
91
|
*/
|
|
71
92
|
function balanceOf(
|
|
72
93
|
address tokenOwner
|
|
73
|
-
) public view virtual returns (uint256) {
|
|
94
|
+
) public view virtual override returns (uint256) {
|
|
74
95
|
return _ownedTokens[tokenOwner].length();
|
|
75
96
|
}
|
|
76
97
|
|
|
@@ -79,7 +100,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
79
100
|
*/
|
|
80
101
|
function tokenOwnerOf(
|
|
81
102
|
bytes32 tokenId
|
|
82
|
-
) public view virtual returns (address) {
|
|
103
|
+
) public view virtual override returns (address) {
|
|
83
104
|
address tokenOwner = _tokenOwners[tokenId];
|
|
84
105
|
|
|
85
106
|
if (tokenOwner == address(0)) {
|
|
@@ -94,7 +115,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
94
115
|
*/
|
|
95
116
|
function tokenIdsOf(
|
|
96
117
|
address tokenOwner
|
|
97
|
-
) public view virtual returns (bytes32[] memory) {
|
|
118
|
+
) public view virtual override returns (bytes32[] memory) {
|
|
98
119
|
return _ownedTokens[tokenOwner].values();
|
|
99
120
|
}
|
|
100
121
|
|
|
@@ -107,7 +128,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
107
128
|
address operator,
|
|
108
129
|
bytes32 tokenId,
|
|
109
130
|
bytes memory operatorNotificationData
|
|
110
|
-
) public virtual {
|
|
131
|
+
) public virtual override {
|
|
111
132
|
address tokenOwner = tokenOwnerOf(tokenId);
|
|
112
133
|
|
|
113
134
|
if (tokenOwner != msg.sender) {
|
|
@@ -135,9 +156,14 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
135
156
|
bytes memory lsp1Data = abi.encode(
|
|
136
157
|
msg.sender,
|
|
137
158
|
tokenId,
|
|
159
|
+
true, // authorized
|
|
138
160
|
operatorNotificationData
|
|
139
161
|
);
|
|
140
|
-
|
|
162
|
+
|
|
163
|
+
operator.tryNotifyUniversalReceiver(
|
|
164
|
+
_TYPEID_LSP8_TOKENOPERATOR,
|
|
165
|
+
lsp1Data
|
|
166
|
+
);
|
|
141
167
|
}
|
|
142
168
|
|
|
143
169
|
/**
|
|
@@ -146,8 +172,9 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
146
172
|
function revokeOperator(
|
|
147
173
|
address operator,
|
|
148
174
|
bytes32 tokenId,
|
|
175
|
+
bool notify,
|
|
149
176
|
bytes memory operatorNotificationData
|
|
150
|
-
) public virtual {
|
|
177
|
+
) public virtual override {
|
|
151
178
|
address tokenOwner = tokenOwnerOf(tokenId);
|
|
152
179
|
|
|
153
180
|
if (tokenOwner != msg.sender) {
|
|
@@ -166,15 +193,23 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
166
193
|
operator,
|
|
167
194
|
tokenOwner,
|
|
168
195
|
tokenId,
|
|
196
|
+
notify,
|
|
169
197
|
operatorNotificationData
|
|
170
198
|
);
|
|
171
199
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
200
|
+
if (notify) {
|
|
201
|
+
bytes memory lsp1Data = abi.encode(
|
|
202
|
+
msg.sender,
|
|
203
|
+
tokenId,
|
|
204
|
+
false, // unauthorized
|
|
205
|
+
operatorNotificationData
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
operator.tryNotifyUniversalReceiver(
|
|
209
|
+
_TYPEID_LSP8_TOKENOPERATOR,
|
|
210
|
+
lsp1Data
|
|
211
|
+
);
|
|
212
|
+
}
|
|
178
213
|
}
|
|
179
214
|
|
|
180
215
|
/**
|
|
@@ -183,7 +218,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
183
218
|
function isOperatorFor(
|
|
184
219
|
address operator,
|
|
185
220
|
bytes32 tokenId
|
|
186
|
-
) public view virtual returns (bool) {
|
|
221
|
+
) public view virtual override returns (bool) {
|
|
187
222
|
_existsOrError(tokenId);
|
|
188
223
|
|
|
189
224
|
return _isOperatorOrOwner(operator, tokenId);
|
|
@@ -194,7 +229,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
194
229
|
*/
|
|
195
230
|
function getOperatorsOf(
|
|
196
231
|
bytes32 tokenId
|
|
197
|
-
) public view virtual returns (address[] memory) {
|
|
232
|
+
) public view virtual override returns (address[] memory) {
|
|
198
233
|
_existsOrError(tokenId);
|
|
199
234
|
|
|
200
235
|
return _operators[tokenId].values();
|
|
@@ -208,9 +243,8 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
208
243
|
address caller,
|
|
209
244
|
bytes32 tokenId
|
|
210
245
|
) internal view virtual returns (bool) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return (caller == tokenOwner || _operators[tokenId].contains(caller));
|
|
246
|
+
return (caller == tokenOwnerOf(tokenId) ||
|
|
247
|
+
_operators[tokenId].contains(caller));
|
|
214
248
|
}
|
|
215
249
|
|
|
216
250
|
// --- Transfer functionality
|
|
@@ -222,16 +256,14 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
222
256
|
address from,
|
|
223
257
|
address to,
|
|
224
258
|
bytes32 tokenId,
|
|
225
|
-
bool
|
|
259
|
+
bool force,
|
|
226
260
|
bytes memory data
|
|
227
|
-
) public virtual {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
if (!_isOperatorOrOwner(operator, tokenId)) {
|
|
231
|
-
revert LSP8NotTokenOperator(tokenId, operator);
|
|
261
|
+
) public virtual override {
|
|
262
|
+
if (!_isOperatorOrOwner(msg.sender, tokenId)) {
|
|
263
|
+
revert LSP8NotTokenOperator(tokenId, msg.sender);
|
|
232
264
|
}
|
|
233
265
|
|
|
234
|
-
_transfer(from, to, tokenId,
|
|
266
|
+
_transfer(from, to, tokenId, force, data);
|
|
235
267
|
}
|
|
236
268
|
|
|
237
269
|
/**
|
|
@@ -241,27 +273,21 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
241
273
|
address[] memory from,
|
|
242
274
|
address[] memory to,
|
|
243
275
|
bytes32[] memory tokenId,
|
|
244
|
-
bool[] memory
|
|
276
|
+
bool[] memory force,
|
|
245
277
|
bytes[] memory data
|
|
246
|
-
) public virtual {
|
|
278
|
+
) public virtual override {
|
|
247
279
|
uint256 fromLength = from.length;
|
|
248
280
|
if (
|
|
249
281
|
fromLength != to.length ||
|
|
250
282
|
fromLength != tokenId.length ||
|
|
251
|
-
fromLength !=
|
|
283
|
+
fromLength != force.length ||
|
|
252
284
|
fromLength != data.length
|
|
253
285
|
) {
|
|
254
286
|
revert LSP8InvalidTransferBatch();
|
|
255
287
|
}
|
|
256
288
|
|
|
257
|
-
for (uint256 i
|
|
258
|
-
transfer(
|
|
259
|
-
from[i],
|
|
260
|
-
to[i],
|
|
261
|
-
tokenId[i],
|
|
262
|
-
allowNonLSP1Recipient[i],
|
|
263
|
-
data[i]
|
|
264
|
-
);
|
|
289
|
+
for (uint256 i; i < fromLength; ) {
|
|
290
|
+
transfer(from[i], to[i], tokenId[i], force[i], data[i]);
|
|
265
291
|
|
|
266
292
|
unchecked {
|
|
267
293
|
++i;
|
|
@@ -276,14 +302,17 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
276
302
|
address operator,
|
|
277
303
|
address tokenOwner,
|
|
278
304
|
bytes32 tokenId,
|
|
305
|
+
bool notified,
|
|
279
306
|
bytes memory operatorNotificationData
|
|
280
307
|
) internal virtual {
|
|
281
308
|
bool isRemoved = _operators[tokenId].remove(operator);
|
|
282
309
|
if (!isRemoved) revert LSP8NonExistingOperator(operator, tokenId);
|
|
310
|
+
|
|
283
311
|
emit RevokedOperator(
|
|
284
312
|
operator,
|
|
285
313
|
tokenOwner,
|
|
286
314
|
tokenId,
|
|
315
|
+
notified,
|
|
287
316
|
operatorNotificationData
|
|
288
317
|
);
|
|
289
318
|
}
|
|
@@ -309,10 +338,11 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
309
338
|
];
|
|
310
339
|
|
|
311
340
|
uint256 operatorListLength = operatorsForTokenId.length();
|
|
312
|
-
|
|
341
|
+
address operator;
|
|
342
|
+
for (uint256 i; i < operatorListLength; ) {
|
|
313
343
|
// we are emptying the list, always remove from index 0
|
|
314
|
-
|
|
315
|
-
_revokeOperator(operator, tokenOwner, tokenId, "");
|
|
344
|
+
operator = operatorsForTokenId.at(0);
|
|
345
|
+
_revokeOperator(operator, tokenOwner, tokenId, false, "");
|
|
316
346
|
|
|
317
347
|
unchecked {
|
|
318
348
|
++i;
|
|
@@ -341,52 +371,50 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
341
371
|
/**
|
|
342
372
|
* @dev Create `tokenId` by minting it and transfers it to `to`.
|
|
343
373
|
*
|
|
344
|
-
* @custom:
|
|
345
|
-
* -
|
|
346
|
-
* - `
|
|
374
|
+
* @custom:info Any logic in the:
|
|
375
|
+
* - {_beforeTokenTransfer} function will run before updating the balances and ownership of `tokenId`s.
|
|
376
|
+
* - {_afterTokenTransfer} function will run after updating the balances and ownership of `tokenId`s, **but before notifying the recipient via LSP1**.
|
|
347
377
|
*
|
|
348
378
|
* @param to The address that will receive the minted `tokenId`.
|
|
349
379
|
* @param tokenId The token ID to create (= mint).
|
|
350
|
-
* @param
|
|
380
|
+
* @param force When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard.
|
|
351
381
|
* @param data Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address.
|
|
352
382
|
*
|
|
383
|
+
* @custom:requirements
|
|
384
|
+
* - `tokenId` must not exist and not have been already minted.
|
|
385
|
+
* - `to` cannot be the zero address.
|
|
386
|
+
|
|
353
387
|
* @custom:events {Transfer} event with `address(0)` as `from` address.
|
|
354
388
|
*/
|
|
355
389
|
function _mint(
|
|
356
390
|
address to,
|
|
357
391
|
bytes32 tokenId,
|
|
358
|
-
bool
|
|
392
|
+
bool force,
|
|
359
393
|
bytes memory data
|
|
360
394
|
) internal virtual {
|
|
361
395
|
if (to == address(0)) {
|
|
362
396
|
revert LSP8CannotSendToAddressZero();
|
|
363
397
|
}
|
|
364
398
|
|
|
399
|
+
_beforeTokenTransfer(address(0), to, tokenId, data);
|
|
400
|
+
|
|
401
|
+
// Check that `tokenId` was not minted inside the `_beforeTokenTransfer` hook
|
|
365
402
|
if (_exists(tokenId)) {
|
|
366
403
|
revert LSP8TokenIdAlreadyMinted(tokenId);
|
|
367
404
|
}
|
|
368
405
|
|
|
369
|
-
address operator = msg.sender;
|
|
370
|
-
|
|
371
|
-
_beforeTokenTransfer(address(0), to, tokenId);
|
|
372
|
-
|
|
373
406
|
// token being minted
|
|
374
|
-
_existingTokens
|
|
407
|
+
++_existingTokens;
|
|
375
408
|
|
|
376
409
|
_ownedTokens[to].add(tokenId);
|
|
377
410
|
_tokenOwners[tokenId] = to;
|
|
378
411
|
|
|
379
|
-
emit Transfer(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
to,
|
|
383
|
-
tokenId,
|
|
384
|
-
allowNonLSP1Recipient,
|
|
385
|
-
data
|
|
386
|
-
);
|
|
412
|
+
emit Transfer(msg.sender, address(0), to, tokenId, force, data);
|
|
413
|
+
|
|
414
|
+
_afterTokenTransfer(address(0), to, tokenId, data);
|
|
387
415
|
|
|
388
416
|
bytes memory lsp1Data = abi.encode(address(0), to, tokenId, data);
|
|
389
|
-
_notifyTokenReceiver(to,
|
|
417
|
+
_notifyTokenReceiver(to, force, lsp1Data);
|
|
390
418
|
}
|
|
391
419
|
|
|
392
420
|
/**
|
|
@@ -397,7 +425,9 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
397
425
|
* function, if it is a contract that supports the LSP1 interface. Its {universalReceiver} function will receive
|
|
398
426
|
* all the parameters in the calldata packed encoded.
|
|
399
427
|
*
|
|
400
|
-
* Any logic in the
|
|
428
|
+
* @custom:info Any logic in the:
|
|
429
|
+
* - {_beforeTokenTransfer} function will run before updating the balances and ownership of `tokenId`s.
|
|
430
|
+
* - {_afterTokenTransfer} function will run after updating the balances and ownership of `tokenId`s, **but before notifying the sender via LSP1**.
|
|
401
431
|
*
|
|
402
432
|
* @param tokenId The token to burn.
|
|
403
433
|
* @param data Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address.
|
|
@@ -411,19 +441,24 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
411
441
|
*/
|
|
412
442
|
function _burn(bytes32 tokenId, bytes memory data) internal virtual {
|
|
413
443
|
address tokenOwner = tokenOwnerOf(tokenId);
|
|
414
|
-
address operator = msg.sender;
|
|
415
444
|
|
|
416
|
-
_beforeTokenTransfer(tokenOwner, address(0), tokenId);
|
|
445
|
+
_beforeTokenTransfer(tokenOwner, address(0), tokenId, data);
|
|
446
|
+
|
|
447
|
+
// Re-fetch and update `tokenOwner` in case `tokenId`
|
|
448
|
+
// was transferred inside the `_beforeTokenTransfer` hook
|
|
449
|
+
tokenOwner = tokenOwnerOf(tokenId);
|
|
417
450
|
|
|
418
451
|
// token being burned
|
|
419
|
-
_existingTokens
|
|
452
|
+
--_existingTokens;
|
|
420
453
|
|
|
421
454
|
_clearOperators(tokenOwner, tokenId);
|
|
422
455
|
|
|
423
456
|
_ownedTokens[tokenOwner].remove(tokenId);
|
|
424
457
|
delete _tokenOwners[tokenId];
|
|
425
458
|
|
|
426
|
-
emit Transfer(
|
|
459
|
+
emit Transfer(msg.sender, tokenOwner, address(0), tokenId, false, data);
|
|
460
|
+
|
|
461
|
+
_afterTokenTransfer(tokenOwner, address(0), tokenId, data);
|
|
427
462
|
|
|
428
463
|
bytes memory lsp1Data = abi.encode(
|
|
429
464
|
tokenOwner,
|
|
@@ -431,7 +466,11 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
431
466
|
tokenId,
|
|
432
467
|
data
|
|
433
468
|
);
|
|
434
|
-
|
|
469
|
+
|
|
470
|
+
tokenOwner.tryNotifyUniversalReceiver(
|
|
471
|
+
_TYPEID_LSP8_TOKENSSENDER,
|
|
472
|
+
lsp1Data
|
|
473
|
+
);
|
|
435
474
|
}
|
|
436
475
|
|
|
437
476
|
/**
|
|
@@ -441,12 +480,14 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
441
480
|
* function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive
|
|
442
481
|
* all the parameters in the calldata packed encoded.
|
|
443
482
|
*
|
|
444
|
-
* Any logic in the
|
|
483
|
+
* @custom:info Any logic in the:
|
|
484
|
+
* - {_beforeTokenTransfer} function will run before updating the balances and ownership of `tokenId`s.
|
|
485
|
+
* - {_afterTokenTransfer} function will run after updating the balances and ownership of `tokenId`s, **but before notifying the sender/recipient via LSP1**.
|
|
445
486
|
*
|
|
446
487
|
* @param from The sender address.
|
|
447
488
|
* @param to The recipient address.
|
|
448
489
|
* @param tokenId The token to transfer.
|
|
449
|
-
* @param
|
|
490
|
+
* @param force When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard.
|
|
450
491
|
* @param data Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.
|
|
451
492
|
*
|
|
452
493
|
* @custom:requirements
|
|
@@ -461,7 +502,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
461
502
|
address from,
|
|
462
503
|
address to,
|
|
463
504
|
bytes32 tokenId,
|
|
464
|
-
bool
|
|
505
|
+
bool force,
|
|
465
506
|
bytes memory data
|
|
466
507
|
) internal virtual {
|
|
467
508
|
if (from == to) {
|
|
@@ -477,9 +518,11 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
477
518
|
revert LSP8CannotSendToAddressZero();
|
|
478
519
|
}
|
|
479
520
|
|
|
480
|
-
|
|
521
|
+
_beforeTokenTransfer(from, to, tokenId, data);
|
|
481
522
|
|
|
482
|
-
|
|
523
|
+
// Re-fetch and update `tokenOwner` in case `tokenId`
|
|
524
|
+
// was transferred inside the `_beforeTokenTransfer` hook
|
|
525
|
+
tokenOwner = tokenOwnerOf(tokenId);
|
|
483
526
|
|
|
484
527
|
_clearOperators(from, tokenId);
|
|
485
528
|
|
|
@@ -487,100 +530,63 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
|
|
|
487
530
|
_ownedTokens[to].add(tokenId);
|
|
488
531
|
_tokenOwners[tokenId] = to;
|
|
489
532
|
|
|
490
|
-
emit Transfer(
|
|
533
|
+
emit Transfer(msg.sender, from, to, tokenId, force, data);
|
|
534
|
+
|
|
535
|
+
_afterTokenTransfer(from, to, tokenId, data);
|
|
491
536
|
|
|
492
537
|
bytes memory lsp1Data = abi.encode(from, to, tokenId, data);
|
|
493
538
|
|
|
494
|
-
|
|
495
|
-
_notifyTokenReceiver(to,
|
|
539
|
+
from.tryNotifyUniversalReceiver(_TYPEID_LSP8_TOKENSSENDER, lsp1Data);
|
|
540
|
+
_notifyTokenReceiver(to, force, lsp1Data);
|
|
496
541
|
}
|
|
497
542
|
|
|
498
543
|
/**
|
|
499
544
|
* @dev Hook that is called before any token transfer, including minting and burning.
|
|
500
|
-
*
|
|
545
|
+
* Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function.
|
|
501
546
|
*
|
|
502
547
|
* @param from The sender address
|
|
503
548
|
* @param to The recipient address
|
|
504
549
|
* @param tokenId The tokenId to transfer
|
|
550
|
+
* @param data The data sent alongside the transfer
|
|
505
551
|
*/
|
|
506
552
|
function _beforeTokenTransfer(
|
|
507
553
|
address from,
|
|
508
554
|
address to,
|
|
509
|
-
bytes32 tokenId
|
|
555
|
+
bytes32 tokenId,
|
|
556
|
+
bytes memory data // solhint-disable-next-line no-empty-blocks
|
|
510
557
|
) internal virtual {}
|
|
511
558
|
|
|
512
559
|
/**
|
|
513
|
-
* @dev
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
|
|
517
|
-
* @param
|
|
518
|
-
* @param
|
|
519
|
-
|
|
520
|
-
function _notifyTokenOperator(
|
|
521
|
-
address operator,
|
|
522
|
-
bytes memory lsp1Data
|
|
523
|
-
) internal virtual {
|
|
524
|
-
if (
|
|
525
|
-
ERC165Checker.supportsERC165InterfaceUnchecked(
|
|
526
|
-
operator,
|
|
527
|
-
_INTERFACEID_LSP1
|
|
528
|
-
)
|
|
529
|
-
) {
|
|
530
|
-
operator.call(
|
|
531
|
-
abi.encodeWithSelector(
|
|
532
|
-
ILSP1UniversalReceiver.universalReceiver.selector,
|
|
533
|
-
_TYPEID_LSP8_TOKENOPERATOR,
|
|
534
|
-
lsp1Data
|
|
535
|
-
)
|
|
536
|
-
);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* @dev An attempt is made to notify the token sender about the `tokenId` changing owners using
|
|
542
|
-
* LSP1 interface.
|
|
560
|
+
* @dev Hook that is called after any token transfer, including minting and burning.
|
|
561
|
+
* Allows to run custom logic after updating balances, but **before notifiying sender/recipient via LSP1** by overriding this function.
|
|
562
|
+
*
|
|
563
|
+
* @param from The sender address
|
|
564
|
+
* @param to The recipient address
|
|
565
|
+
* @param tokenId The tokenId to transfer
|
|
566
|
+
* @param data The data sent alongside the transfer
|
|
543
567
|
*/
|
|
544
|
-
function
|
|
568
|
+
function _afterTokenTransfer(
|
|
545
569
|
address from,
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
from,
|
|
551
|
-
_INTERFACEID_LSP1
|
|
552
|
-
)
|
|
553
|
-
) {
|
|
554
|
-
ILSP1UniversalReceiver(from).universalReceiver(
|
|
555
|
-
_TYPEID_LSP8_TOKENSSENDER,
|
|
556
|
-
lsp1Data
|
|
557
|
-
);
|
|
558
|
-
}
|
|
559
|
-
}
|
|
570
|
+
address to,
|
|
571
|
+
bytes32 tokenId,
|
|
572
|
+
bytes memory data // solhint-disable-next-line no-empty-blocks
|
|
573
|
+
) internal virtual {}
|
|
560
574
|
|
|
561
575
|
/**
|
|
562
576
|
* @dev An attempt is made to notify the token receiver about the `tokenId` changing owners
|
|
563
|
-
* using LSP1 interface. When
|
|
577
|
+
* using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
|
|
564
578
|
*
|
|
565
579
|
* The receiver may revert when the token being sent is not wanted.
|
|
566
580
|
*/
|
|
567
581
|
function _notifyTokenReceiver(
|
|
568
582
|
address to,
|
|
569
|
-
bool
|
|
583
|
+
bool force,
|
|
570
584
|
bytes memory lsp1Data
|
|
571
585
|
) internal virtual {
|
|
572
|
-
if (
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
)
|
|
577
|
-
) {
|
|
578
|
-
ILSP1UniversalReceiver(to).universalReceiver(
|
|
579
|
-
_TYPEID_LSP8_TOKENSRECIPIENT,
|
|
580
|
-
lsp1Data
|
|
581
|
-
);
|
|
582
|
-
} else if (!allowNonLSP1Recipient) {
|
|
583
|
-
if (to.code.length > 0) {
|
|
586
|
+
if (to.supportsERC165InterfaceUnchecked(_INTERFACEID_LSP1)) {
|
|
587
|
+
ILSP1(to).universalReceiver(_TYPEID_LSP8_TOKENSRECIPIENT, lsp1Data);
|
|
588
|
+
} else if (!force) {
|
|
589
|
+
if (to.code.length != 0) {
|
|
584
590
|
revert LSP8NotifyTokenReceiverContractMissingLSP1Interface(to);
|
|
585
591
|
} else {
|
|
586
592
|
revert LSP8NotifyTokenReceiverIsEOA(to);
|