@lukso/lsp-smart-contracts 0.6.0 → 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.
- package/README.md +13 -12
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +66 -27
- package/artifacts/LSP0ERC725AccountInit.json +71 -53
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +23 -2
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +23 -2
- package/artifacts/LSP4Compatibility.json +15 -9
- package/artifacts/LSP4DigitalAssetMetadata.json +25 -9
- package/artifacts/{LSP4DigitalAssetMetadataInit.json → LSP4DigitalAssetMetadataInitAbstract.json} +27 -60
- package/artifacts/LSP6KeyManager.json +93 -13
- package/artifacts/LSP6KeyManagerInit.json +98 -13
- package/artifacts/LSP7CappedSupply.json +56 -35
- package/artifacts/{LSP7CappedSupplyInit.json → LSP7CappedSupplyInitAbstract.json} +58 -104
- package/artifacts/LSP7CompatibleERC20.json +704 -0
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +717 -0
- package/artifacts/LSP7CompatibleERC20Mintable.json +753 -0
- package/artifacts/LSP7CompatibleERC20MintableInit.json +773 -0
- package/artifacts/LSP7DigitalAsset.json +56 -61
- package/artifacts/LSP7DigitalAssetInitAbstract.json +540 -0
- package/artifacts/LSP7Mintable.json +59 -38
- package/artifacts/LSP7MintableInit.json +64 -64
- package/artifacts/LSP8CappedSupply.json +62 -9
- package/artifacts/{LSP8CappedSupplyInit.json → LSP8CappedSupplyInitAbstract.json} +64 -73
- package/artifacts/LSP8CompatibleERC721.json +907 -0
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +920 -0
- package/artifacts/LSP8CompatibleERC721Mintable.json +967 -0
- package/artifacts/LSP8CompatibleERC721MintableInit.json +987 -0
- package/artifacts/LSP8IdentifiableDigitalAsset.json +62 -30
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +628 -0
- package/artifacts/LSP8Mintable.json +64 -11
- package/artifacts/LSP8MintableInit.json +69 -37
- package/artifacts/LSP9Vault.json +63 -24
- package/artifacts/LSP9VaultInit.json +68 -50
- package/artifacts/UniversalFactory.json +2 -2
- package/artifacts/UniversalProfile.json +66 -27
- package/artifacts/UniversalProfileInit.json +71 -53
- package/artifacts/UniversalReceiverAddressStore.json +7 -2
- package/constants.js +273 -31
- package/contracts/Custom/ClaimOwnership.sol +74 -9
- package/contracts/Custom/ERC165Checker.sol +1 -1
- package/contracts/Custom/IClaimOwnership.sol +3 -1
- package/contracts/Factories/Create2Factory.sol +3 -13
- package/contracts/Factories/UniversalFactory.sol +20 -16
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +3 -3
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +49 -37
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +10 -3
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +3 -3
- package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +2 -2
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +3 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +4 -2
- package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -1
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/Handling/TokenAndVaultHandling.sol +22 -16
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +14 -10
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +35 -29
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +10 -3
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +24 -9
- package/contracts/LSP2ERC725YJSONSchema/LSP2Errors.sol +9 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +157 -75
- package/contracts/LSP3UniversalProfile/LSP3Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +24 -4
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +26 -5
- package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +16 -0
- package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +2 -2
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +151 -77
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +16 -16
- package/contracts/LSP6KeyManager/LSP6Constants.sol +16 -21
- package/contracts/LSP6KeyManager/LSP6Errors.sol +42 -5
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +6 -4
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +293 -284
- package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +11 -4
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +5 -3
- package/contracts/LSP6KeyManager/LSP6Utils.sol +24 -27
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +18 -5
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +1 -1
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +8 -4
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +35 -24
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +5 -3
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +2 -0
- package/contracts/LSP7DigitalAsset/extensions/{ILSP7CompatibilityForERC20.sol → ILSP7CompatibleERC20.sol} +6 -6
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +1 -1
- 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} +23 -19
- package/contracts/LSP7DigitalAsset/extensions/{LSP7CompatibilityForERC20InitAbstract.sol → LSP7CompatibleERC20InitAbstract.sol} +11 -10
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +22 -0
- package/contracts/{LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721Init.sol → LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol} +12 -7
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +27 -0
- package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +9 -7
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +11 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +8 -7
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +4 -4
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +6 -0
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +31 -30
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{ILSP8CompatibilityForERC721.sol → ILSP8CompatibleERC721.sol} +16 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8Enumerable.sol +17 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyCore.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} +61 -37
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721InitAbstract.sol → LSP8CompatibleERC721InitAbstract.sol} +13 -9
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +21 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableCore.sol +50 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +24 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +22 -0
- package/contracts/{LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20Init.sol → LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol} +12 -4
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +27 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +6 -4
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +7 -0
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +8 -5
- package/contracts/LSP9Vault/LSP9Constants.sol +6 -3
- package/contracts/LSP9Vault/LSP9Vault.sol +9 -5
- package/contracts/LSP9Vault/LSP9VaultCore.sol +152 -69
- package/contracts/LSP9Vault/LSP9VaultInit.sol +10 -3
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +9 -5
- package/contracts/Legacy/UniversalReceiverAddressStore.sol +6 -2
- package/contracts/UniversalProfile.sol +3 -4
- package/contracts/UniversalProfileInit.sol +10 -3
- package/contracts/UniversalProfileInitAbstract.sol +3 -5
- package/contracts/Utils/GasLib.sol +17 -0
- package/contracts/Utils/UtilsLib.sol +6 -34
- package/package.json +27 -30
- package/artifacts/LSP7CompatibilityForERC20.json +0 -686
- package/artifacts/LSP7CompatibilityForERC20Init.json +0 -727
- package/artifacts/LSP7DigitalAssetInit.json +0 -573
- package/artifacts/LSP8CompatibilityForERC721.json +0 -832
- package/artifacts/LSP8CompatibilityForERC721Init.json +0 -873
- package/artifacts/LSP8IdentifiableDigitalAssetInit.json +0 -624
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInit.sol +0 -26
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +0 -28
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInit.sol +0 -19
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableCore.sol +0 -26
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +0 -26
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInit.sol +0 -19
- 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,28 +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
|
-
contract LSP7DigitalAssetInit is LSP7DigitalAssetInitAbstract {
|
|
13
|
-
/**
|
|
14
|
-
* @notice Sets the token-Metadata
|
|
15
|
-
* @param name_ The name of the token
|
|
16
|
-
* @param symbol_ The symbol of the token
|
|
17
|
-
* @param newOwner_ The owner of the the token-Metadata
|
|
18
|
-
* @param isNFT_ Specify if the LSP7 token is a fungible or non-fungible token
|
|
19
|
-
*/
|
|
20
|
-
function initialize(
|
|
21
|
-
string memory name_,
|
|
22
|
-
string memory symbol_,
|
|
23
|
-
address newOwner_,
|
|
24
|
-
bool isNFT_
|
|
25
|
-
) public virtual initializer {
|
|
26
|
-
LSP7DigitalAssetInitAbstract._initialize(name_, symbol_, newOwner_, isNFT_);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -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,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,26 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import {LSP8IdentifiableDigitalAssetInitAbstract} from "./LSP8IdentifiableDigitalAssetInitAbstract.sol";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title LSP8IdentifiableDigitalAsset contract
|
|
9
|
-
* @author Matthew Stevens
|
|
10
|
-
* @dev Proxy Implementation of a LSP8 compliant contract.
|
|
11
|
-
*/
|
|
12
|
-
contract LSP8IdentifiableDigitalAssetInit is LSP8IdentifiableDigitalAssetInitAbstract {
|
|
13
|
-
/**
|
|
14
|
-
* @notice Sets the token-Metadata
|
|
15
|
-
* @param name_ The name of the token
|
|
16
|
-
* @param symbol_ The symbol of the token
|
|
17
|
-
* @param newOwner_ The owner of the the token-Metadata
|
|
18
|
-
*/
|
|
19
|
-
function initialize(
|
|
20
|
-
string memory name_,
|
|
21
|
-
string memory symbol_,
|
|
22
|
-
address newOwner_
|
|
23
|
-
) public virtual initializer {
|
|
24
|
-
LSP8IdentifiableDigitalAssetInitAbstract._initialize(name_, symbol_, newOwner_);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -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,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
|
-
}
|