@lukso/lsp-smart-contracts 0.6.1 → 0.6.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.
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +8 -8
- package/artifacts/LSP0ERC725AccountInit.json +13 -8
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +18 -2
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +18 -2
- package/artifacts/LSP4DigitalAssetMetadata.json +10 -0
- package/artifacts/LSP4DigitalAssetMetadataInit.json +10 -0
- package/artifacts/LSP6KeyManager.json +82 -13
- package/artifacts/LSP6KeyManagerInit.json +87 -13
- package/artifacts/LSP7CappedSupply.json +10 -0
- package/artifacts/LSP7CappedSupplyInit.json +10 -28
- package/artifacts/LSP7CompatibleERC20.json +714 -0
- package/artifacts/LSP7CompatibleERC20Init.json +760 -0
- package/artifacts/LSP7CompatibleERC20Mintable.json +742 -0
- package/artifacts/LSP7CompatibleERC20MintableInit.json +783 -0
- package/artifacts/LSP7DigitalAsset.json +12 -2
- package/artifacts/LSP7DigitalAssetInit.json +17 -2
- package/artifacts/LSP7Mintable.json +12 -2
- package/artifacts/LSP7MintableInit.json +17 -2
- package/artifacts/LSP8CappedSupply.json +10 -0
- package/artifacts/LSP8CappedSupplyInit.json +10 -23
- package/artifacts/LSP8CompatibleERC721.json +842 -0
- package/artifacts/LSP8CompatibleERC721Init.json +883 -0
- package/artifacts/LSP8CompatibleERC721Mintable.json +881 -0
- package/artifacts/LSP8CompatibleERC721MintableInit.json +922 -0
- package/artifacts/LSP8IdentifiableDigitalAsset.json +12 -2
- package/artifacts/LSP8IdentifiableDigitalAssetInit.json +17 -2
- package/artifacts/LSP8Mintable.json +12 -2
- package/artifacts/LSP8MintableInit.json +17 -2
- package/artifacts/LSP9Vault.json +9 -9
- package/artifacts/LSP9VaultInit.json +14 -9
- package/artifacts/UniversalFactory.json +2 -2
- package/artifacts/UniversalProfile.json +8 -8
- package/artifacts/UniversalProfileInit.json +13 -8
- package/artifacts/UniversalReceiverAddressStore.json +2 -2
- package/constants.js +49 -14
- package/contracts/Custom/ClaimOwnership.sol +10 -7
- package/contracts/Custom/IClaimOwnership.sol +1 -1
- package/contracts/Factories/Create2Factory.sol +3 -13
- package/contracts/Factories/UniversalFactory.sol +16 -7
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +3 -3
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +28 -19
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +10 -3
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +2 -2
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +12 -3
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +18 -16
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +8 -2
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +18 -4
- package/contracts/LSP2ERC725YJSONSchema/LSP2Errors.sol +9 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +69 -73
- package/contracts/LSP3UniversalProfile/LSP3Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +14 -3
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +16 -4
- package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +16 -0
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +27 -1
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +15 -15
- package/contracts/LSP6KeyManager/LSP6Errors.sol +34 -5
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +5 -3
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +224 -234
- package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +10 -3
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +4 -2
- package/contracts/LSP6KeyManager/LSP6Utils.sol +22 -26
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +4 -0
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +3 -1
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +11 -0
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +3 -1
- package/contracts/LSP7DigitalAsset/extensions/{ILSP7CompatibilityForERC20.sol → ILSP7CompatibleERC20.sol} +6 -6
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +5 -2
- package/contracts/LSP7DigitalAsset/extensions/{LSP7CompatibilityForERC20.sol → LSP7CompatibleERC20.sol} +6 -7
- package/contracts/LSP7DigitalAsset/extensions/{LSP7CompatibilityForERC20Core.sol → LSP7CompatibleERC20Core.sol} +21 -16
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Init.sol +29 -0
- package/contracts/LSP7DigitalAsset/extensions/{LSP7CompatibilityForERC20InitAbstract.sol → LSP7CompatibleERC20InitAbstract.sol} +11 -10
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +22 -0
- package/contracts/LSP7DigitalAsset/{extensions/LSP7CompatibilityForERC20Init.sol → presets/LSP7CompatibleERC20MintableInit.sol} +5 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +27 -0
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +8 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +10 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{ILSP8CompatibilityForERC721.sol → ILSP8CompatibleERC721.sol} +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +4 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityConstants.sol → LSP8CompatibleConstants.sol} +0 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721.sol → LSP8CompatibleERC721.sol} +12 -11
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721Core.sol → LSP8CompatibleERC721Core.sol} +16 -16
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721Init.sol → LSP8CompatibleERC721Init.sol} +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721InitAbstract.sol → LSP8CompatibleERC721InitAbstract.sol} +13 -9
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +22 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +23 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +27 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +7 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +3 -1
- package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +9 -5
- package/contracts/LSP9Vault/LSP9VaultCore.sol +37 -26
- package/contracts/LSP9Vault/LSP9VaultInit.sol +10 -3
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +8 -4
- package/contracts/Legacy/UniversalReceiverAddressStore.sol +3 -1
- package/contracts/UniversalProfile.sol +3 -4
- package/contracts/UniversalProfileInit.sol +10 -3
- package/contracts/UniversalProfileInitAbstract.sol +3 -5
- package/contracts/Utils/UtilsLib.sol +6 -34
- package/package.json +2 -2
- package/artifacts/LSP7CompatibilityForERC20.json +0 -686
- package/artifacts/LSP7CompatibilityForERC20Init.json +0 -727
- package/artifacts/LSP8CompatibilityForERC721.json +0 -832
- package/artifacts/LSP8CompatibilityForERC721Init.json +0 -873
|
@@ -5,9 +5,8 @@ pragma solidity ^0.8.0;
|
|
|
5
5
|
import {LSP0ERC725Account} from "./LSP0ERC725Account/LSP0ERC725Account.sol";
|
|
6
6
|
|
|
7
7
|
// constants
|
|
8
|
-
// prettier-ignore
|
|
9
8
|
import {
|
|
10
|
-
_LSP3_SUPPORTED_STANDARDS_KEY,
|
|
9
|
+
_LSP3_SUPPORTED_STANDARDS_KEY,
|
|
11
10
|
_LSP3_SUPPORTED_STANDARDS_VALUE
|
|
12
11
|
} from "./LSP3UniversalProfile/LSP3Constants.sol";
|
|
13
12
|
|
|
@@ -19,9 +18,9 @@ import {
|
|
|
19
18
|
contract UniversalProfile is LSP0ERC725Account {
|
|
20
19
|
/**
|
|
21
20
|
* @notice Sets the owner of the contract and sets the SupportedStandards:LSP3UniversalProfile key
|
|
22
|
-
* @param
|
|
21
|
+
* @param newOwner the owner of the contract
|
|
23
22
|
*/
|
|
24
|
-
constructor(address
|
|
23
|
+
constructor(address newOwner) LSP0ERC725Account(newOwner) payable {
|
|
25
24
|
// set key SupportedStandards:LSP3UniversalProfile
|
|
26
25
|
_setData(_LSP3_SUPPORTED_STANDARDS_KEY, _LSP3_SUPPORTED_STANDARDS_VALUE);
|
|
27
26
|
}
|
|
@@ -10,11 +10,18 @@ import {UniversalProfileInitAbstract} from "./UniversalProfileInitAbstract.sol";
|
|
|
10
10
|
* @dev Implementation of the ERC725Account + LSP1 universalReceiver
|
|
11
11
|
*/
|
|
12
12
|
contract UniversalProfileInit is UniversalProfileInitAbstract {
|
|
13
|
+
/**
|
|
14
|
+
* @dev initialize (= lock) base implementation contract on deployment
|
|
15
|
+
*/
|
|
16
|
+
constructor() {
|
|
17
|
+
_disableInitializers();
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
/**
|
|
14
21
|
* @notice Sets the owner of the contract and sets the SupportedStandards:LSP3UniversalProfile key
|
|
15
|
-
* @param
|
|
22
|
+
* @param newOwner the owner of the contract
|
|
16
23
|
*/
|
|
17
|
-
function initialize(address
|
|
18
|
-
UniversalProfileInitAbstract._initialize(
|
|
24
|
+
function initialize(address newOwner) public payable virtual initializer {
|
|
25
|
+
UniversalProfileInitAbstract._initialize(newOwner);
|
|
19
26
|
}
|
|
20
27
|
}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
// modules
|
|
5
|
-
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
|
|
6
5
|
import {LSP0ERC725AccountInitAbstract} from "./LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol";
|
|
7
6
|
|
|
8
7
|
// constants
|
|
9
|
-
// prettier-ignore
|
|
10
8
|
import {
|
|
11
|
-
_LSP3_SUPPORTED_STANDARDS_KEY,
|
|
9
|
+
_LSP3_SUPPORTED_STANDARDS_KEY,
|
|
12
10
|
_LSP3_SUPPORTED_STANDARDS_VALUE
|
|
13
11
|
} from "./LSP3UniversalProfile/LSP3Constants.sol";
|
|
14
12
|
|
|
@@ -18,8 +16,8 @@ import {
|
|
|
18
16
|
* @dev Implementation of the ERC725Account + LSP1 universalReceiver
|
|
19
17
|
*/
|
|
20
18
|
abstract contract UniversalProfileInitAbstract is LSP0ERC725AccountInitAbstract {
|
|
21
|
-
function _initialize(address
|
|
22
|
-
LSP0ERC725AccountInitAbstract._initialize(
|
|
19
|
+
function _initialize(address newOwner) internal virtual override onlyInitializing {
|
|
20
|
+
LSP0ERC725AccountInitAbstract._initialize(newOwner);
|
|
23
21
|
|
|
24
22
|
// set key SupportedStandards:LSP3UniversalProfile
|
|
25
23
|
_setData(_LSP3_SUPPORTED_STANDARDS_KEY, _LSP3_SUPPORTED_STANDARDS_VALUE);
|
|
@@ -11,49 +11,21 @@ library UtilsLib {
|
|
|
11
11
|
/**
|
|
12
12
|
* @dev concatenate two bytes16
|
|
13
13
|
*/
|
|
14
|
-
function concatTwoBytes16(bytes16 b1, bytes16 b2)
|
|
15
|
-
|
|
16
|
-
pure
|
|
17
|
-
returns (bytes memory result)
|
|
18
|
-
{
|
|
19
|
-
result = new bytes(32);
|
|
20
|
-
assembly {
|
|
21
|
-
mstore(add(result, 32), b1)
|
|
22
|
-
mstore(add(result, 48), b2)
|
|
23
|
-
}
|
|
14
|
+
function concatTwoBytes16(bytes16 b1, bytes16 b2) internal pure returns (bytes memory result) {
|
|
15
|
+
result = bytes.concat(b1, b2);
|
|
24
16
|
}
|
|
25
17
|
|
|
26
18
|
/**
|
|
27
19
|
* @dev cast uint256 to bytes
|
|
28
20
|
*/
|
|
29
|
-
function uint256ToBytes(uint256 num)
|
|
30
|
-
|
|
31
|
-
pure
|
|
32
|
-
returns (bytes memory bytes_)
|
|
33
|
-
{
|
|
34
|
-
bytes_ = new bytes(32);
|
|
35
|
-
assembly {
|
|
36
|
-
mstore(add(bytes_, 32), num)
|
|
37
|
-
}
|
|
21
|
+
function uint256ToBytes(uint256 num) internal pure returns (bytes memory bytes_) {
|
|
22
|
+
bytes_ = bytes.concat(bytes32(num));
|
|
38
23
|
}
|
|
39
24
|
|
|
40
25
|
/**
|
|
41
26
|
* @dev cast address to bytes
|
|
42
27
|
*/
|
|
43
|
-
function addressToBytes(address addr)
|
|
44
|
-
|
|
45
|
-
pure
|
|
46
|
-
returns (bytes memory bytes_)
|
|
47
|
-
{
|
|
48
|
-
assembly {
|
|
49
|
-
let m := mload(0x40)
|
|
50
|
-
addr := and(addr, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
|
|
51
|
-
mstore(
|
|
52
|
-
add(m, 20),
|
|
53
|
-
xor(0x140000000000000000000000000000000000000000, addr)
|
|
54
|
-
)
|
|
55
|
-
mstore(0x40, add(m, 52))
|
|
56
|
-
bytes_ := m
|
|
57
|
-
}
|
|
28
|
+
function addressToBytes(address addr) internal pure returns (bytes memory bytes_) {
|
|
29
|
+
bytes_ = bytes.concat(bytes20(addr));
|
|
58
30
|
}
|
|
59
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukso/lsp-smart-contracts",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "The reference implementation for universal profiles smart contracts",
|
|
5
5
|
"directories": {
|
|
6
6
|
"test": "test"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"homepage": "https://github.com/lukso-network/lsp-smart-contracts#readme",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@erc725/smart-contracts": "^3.1.
|
|
59
|
+
"@erc725/smart-contracts": "^3.1.2",
|
|
60
60
|
"@openzeppelin/contracts": "^4.6.0",
|
|
61
61
|
"solidity-bytes-utils": "0.8.0"
|
|
62
62
|
},
|