@lukso/lsp-smart-contracts 0.5.0 → 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/README.md +38 -9
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +398 -0
- package/artifacts/LSP0ERC725AccountInit.json +444 -0
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +21 -5
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +21 -5
- package/artifacts/LSP4Compatibility.json +195 -0
- package/artifacts/LSP4DigitalAssetMetadata.json +179 -0
- package/artifacts/LSP4DigitalAssetMetadataInit.json +241 -0
- package/artifacts/LSP6KeyManager.json +110 -35
- package/artifacts/LSP6KeyManagerInit.json +123 -30
- package/artifacts/LSP7CappedSupply.json +146 -11
- package/artifacts/LSP7CappedSupplyInit.json +167 -57
- 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 +138 -13
- package/artifacts/LSP7DigitalAssetInit.json +167 -34
- package/artifacts/LSP7Mintable.json +139 -14
- package/artifacts/LSP7MintableInit.json +168 -35
- package/artifacts/LSP8CappedSupply.json +147 -11
- package/artifacts/LSP8CappedSupplyInit.json +176 -37
- 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 +139 -13
- package/artifacts/LSP8IdentifiableDigitalAssetInit.json +176 -19
- package/artifacts/LSP8Mintable.json +151 -14
- package/artifacts/LSP8MintableInit.json +188 -20
- package/artifacts/LSP9Vault.json +374 -0
- package/artifacts/LSP9VaultInit.json +420 -0
- package/artifacts/UniversalFactory.json +127 -0
- package/artifacts/UniversalProfile.json +89 -32
- package/artifacts/UniversalProfileInit.json +133 -32
- package/artifacts/UniversalReceiverAddressStore.json +209 -0
- package/constants.js +535 -0
- package/contracts/Custom/ClaimOwnership.sol +34 -0
- package/contracts/Custom/ERC165Checker.sol +130 -0
- package/contracts/Custom/IClaimOwnership.sol +10 -0
- package/contracts/Factories/Create2Factory.sol +3 -13
- package/contracts/Factories/UniversalFactory.sol +164 -0
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +5 -9
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +7 -9
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +108 -55
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +11 -4
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +6 -21
- package/contracts/LSP10ReceivedVaults/LSP10Constants.sol +10 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +3 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +4 -2
- package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +3 -9
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/Handling/TokenAndVaultHandling.sol +67 -184
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +58 -6
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +51 -89
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +46 -6
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +62 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Errors.sol +9 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +201 -0
- package/contracts/LSP3UniversalProfile/LSP3Constants.sol +11 -0
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +5 -14
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +10 -4
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +22 -8
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInit.sol +9 -13
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +26 -20
- package/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol +16 -0
- package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +10 -0
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +231 -0
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +28 -25
- package/contracts/LSP6KeyManager/LSP6Constants.sol +61 -25
- package/contracts/LSP6KeyManager/LSP6Errors.sol +66 -0
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +7 -6
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +465 -378
- package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +13 -5
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +9 -15
- package/contracts/LSP6KeyManager/LSP6Utils.sol +107 -0
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +3 -8
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +5 -4
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +27 -9
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +73 -95
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +19 -9
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +27 -23
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +23 -0
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CappedSupply.sol +1 -1
- package/contracts/LSP7DigitalAsset/extensions/{ILSP7CompatibilityForERC20.sol → ILSP7CompatibleERC20.sol} +7 -9
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +8 -7
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +14 -12
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInit.sol +3 -8
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +10 -15
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +67 -0
- package/contracts/LSP7DigitalAsset/extensions/{LSP7CompatibilityForERC20Core.sol → LSP7CompatibleERC20Core.sol} +36 -50
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20Init.sol +29 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +67 -0
- package/contracts/LSP7DigitalAsset/{extensions → presets}/ILSP7Mintable.sol +1 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +22 -0
- package/contracts/LSP7DigitalAsset/{extensions/LSP7CompatibilityForERC20Init.sol → presets/LSP7CompatibleERC20MintableInit.sol} +6 -5
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +27 -0
- package/contracts/LSP7DigitalAsset/{extensions → presets}/LSP7Mintable.sol +4 -3
- package/contracts/LSP7DigitalAsset/{extensions → presets}/LSP7MintableCore.sol +5 -5
- package/contracts/LSP7DigitalAsset/{extensions → presets}/LSP7MintableInit.sol +11 -3
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +34 -0
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +5 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +6 -3
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +22 -0
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +23 -10
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +103 -136
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +17 -11
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +26 -21
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CappedSupply.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{ILSP8CompatibilityForERC721.sol → ILSP8CompatibleERC721.sol} +4 -12
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +9 -15
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyCore.sol +14 -12
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInit.sol +3 -8
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +13 -20
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityConstants.sol → LSP8CompatibleConstants.sol} +0 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +101 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721Core.sol → LSP8CompatibleERC721Core.sol} +38 -95
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/{LSP8CompatibilityForERC721Init.sol → LSP8CompatibleERC721Init.sol} +4 -6
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +93 -0
- package/contracts/LSP8IdentifiableDigitalAsset/{extensions → presets}/ILSP8Mintable.sol +1 -1
- 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/{extensions → presets}/LSP8Mintable.sol +4 -3
- package/contracts/LSP8IdentifiableDigitalAsset/{extensions → presets}/LSP8MintableCore.sol +5 -8
- package/contracts/LSP8IdentifiableDigitalAsset/{extensions → presets}/LSP8MintableInit.sol +11 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +37 -0
- package/contracts/LSP9Vault/LSP9Constants.sol +14 -5
- package/contracts/LSP9Vault/LSP9Vault.sol +20 -38
- package/contracts/LSP9Vault/LSP9VaultCore.sol +123 -92
- package/contracts/LSP9Vault/LSP9VaultInit.sol +12 -4
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +20 -46
- package/contracts/Legacy/Registries/AddressRegistry.sol +43 -0
- package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +33 -0
- package/contracts/Legacy/UniversalReceiverAddressStore.sol +62 -0
- package/contracts/UniversalProfile.sol +11 -7
- package/contracts/UniversalProfileInit.sol +12 -4
- package/contracts/UniversalProfileInitAbstract.sol +12 -20
- package/contracts/Utils/UtilsLib.sol +21 -13
- package/package.json +23 -9
- package/artifacts/LSP1UniversalReceiverDelegateUPInit.json +0 -66
- package/artifacts/LSP1UniversalReceiverDelegateVaultInit.json +0 -66
- package/artifacts/LSP7CompatibilityForERC20.json +0 -571
- package/artifacts/LSP8CompatibilityForERC721.json +0 -716
- package/constants.ts +0 -356
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUPCore.sol +0 -52
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUPInit.sol +0 -26
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUPInitAbstract.sol +0 -28
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVaultCore.sol +0 -41
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVaultInit.sol +0 -23
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVaultInitAbstract.sol +0 -25
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20.sol +0 -56
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20InitAbstract.sol +0 -55
- package/contracts/LSP7DigitalAsset/extensions/LSP7MintableInitAbstract.sol +0 -47
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721.sol +0 -92
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721InitAbstract.sol +0 -90
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8MintableInitAbstract.sol +0 -44
- package/contracts/Utils/ERC725Utils.sol +0 -169
- package/contracts/Utils/LSP2Utils.sol +0 -127
- package/contracts/Utils/LSP6Utils.sol +0 -63
package/constants.ts
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set of constants values as defined by the LUKSO Standards Proposals.
|
|
3
|
-
* @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// ERC165
|
|
7
|
-
// ----------
|
|
8
|
-
|
|
9
|
-
export const enum INTERFACE_IDS {
|
|
10
|
-
ERC165 = "0x01ffc9a7",
|
|
11
|
-
ERC1271 = "0x1626ba7e",
|
|
12
|
-
ERC20 = "0x36372b07",
|
|
13
|
-
ERC223 = "0x87d43052",
|
|
14
|
-
ERC721 = "0x80ac58cd",
|
|
15
|
-
ERC721Metadata = "0x5b5e139f",
|
|
16
|
-
ERC777 = "0xe58e113c",
|
|
17
|
-
ERC1155 = "0xd9b67a26",
|
|
18
|
-
ERC725X = "0x44c028fe",
|
|
19
|
-
ERC725Y = "0x5a988c0f",
|
|
20
|
-
ERC725Account = "0x63cb749b",
|
|
21
|
-
LSP1 = "0x6bb56a14",
|
|
22
|
-
LSP1Delegate = "0xc2d7bcc1",
|
|
23
|
-
LSP6 = "0x6f4df48b",
|
|
24
|
-
LSP7 = "0xe33f65c3",
|
|
25
|
-
LSP8 = "0x49399145",
|
|
26
|
-
LSP9 = "0x75edcee5",
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// ERC1271
|
|
30
|
-
// ----------
|
|
31
|
-
|
|
32
|
-
export const enum ERC1271 {
|
|
33
|
-
MAGIC_VALUE = "0x1626ba7e",
|
|
34
|
-
FAIL_VALUE = "0xffffffff",
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ERC725X
|
|
38
|
-
// ----------
|
|
39
|
-
|
|
40
|
-
export const enum OPERATIONS {
|
|
41
|
-
CALL = 0,
|
|
42
|
-
CREATE = 1,
|
|
43
|
-
CREATE2 = 2,
|
|
44
|
-
STATICCALL = 3,
|
|
45
|
-
DELEGATECALL = 4,
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// ERC725Y
|
|
49
|
-
// ----------
|
|
50
|
-
|
|
51
|
-
export const SupportedStandards = {
|
|
52
|
-
LSP3UniversalProfile: {
|
|
53
|
-
key: "0xeafec4d89fa9619884b6b89135626455000000000000000000000000abe425d6",
|
|
54
|
-
value: "0xabe425d6",
|
|
55
|
-
},
|
|
56
|
-
LSP4DigitalAsset: {
|
|
57
|
-
key: "0xeafec4d89fa9619884b6b89135626455000000000000000000000000a4d96624",
|
|
58
|
-
value: "0xa4d96624",
|
|
59
|
-
},
|
|
60
|
-
LSP9Vault: {
|
|
61
|
-
key: "0xeafec4d89fa9619884b6b891356264550000000000000000000000007c0334a1",
|
|
62
|
-
value: "0x7c0334a1",
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* For more infos on the type of each keys
|
|
68
|
-
* @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
|
|
69
|
-
*/
|
|
70
|
-
export const ERC725YKeys = {
|
|
71
|
-
LSP0: {
|
|
72
|
-
// keccak256('LSP1UniversalReceiverDelegate')
|
|
73
|
-
LSP1UniversalReceiverDelegate:
|
|
74
|
-
"0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47",
|
|
75
|
-
},
|
|
76
|
-
LSP3: {
|
|
77
|
-
// keccak256('LSP3Profile')
|
|
78
|
-
LSP3Profile:
|
|
79
|
-
"0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5",
|
|
80
|
-
// LSP3IssuedAssetsMap:<address>
|
|
81
|
-
LSP3IssuedAssetsMap: "0x83f5e77bfb14241600000000",
|
|
82
|
-
// keccak256('LSP3IssuedAssets[]')
|
|
83
|
-
"LSP3IssuedAssets[]":
|
|
84
|
-
"0x3a47ab5bd3a594c3a8995f8fa58d0876c96819ca4516bd76100c92462f2f9dc0",
|
|
85
|
-
},
|
|
86
|
-
LSP4: {
|
|
87
|
-
// keccak256('LSP4TokenName')
|
|
88
|
-
LSP4TokenName:
|
|
89
|
-
"0xdeba1e292f8ba88238e10ab3c7f88bd4be4fac56cad5194b6ecceaf653468af1",
|
|
90
|
-
// keccak256('LSP4TokenSymbol')
|
|
91
|
-
LSP4TokenSymbol:
|
|
92
|
-
"0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756",
|
|
93
|
-
// keccak256('LSP4Metadata')
|
|
94
|
-
LSP4Metadata:
|
|
95
|
-
"0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e",
|
|
96
|
-
// keccak256('"LSP4Creators[]')
|
|
97
|
-
"LSP4Creators[]":
|
|
98
|
-
"0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7",
|
|
99
|
-
},
|
|
100
|
-
LSP5: {
|
|
101
|
-
// LSP5ReceivedAssetsMap:<address>
|
|
102
|
-
LSP5ReceivedAssetsMap: "0x812c4334633eb81600000000",
|
|
103
|
-
// keccak256('LSP5ReceivedAssets[]')
|
|
104
|
-
"LSP5ReceivedAssets[]":
|
|
105
|
-
"0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b",
|
|
106
|
-
},
|
|
107
|
-
LSP6: {
|
|
108
|
-
// keccak256('AddressPermissions[]')
|
|
109
|
-
"AddressPermissions[]":
|
|
110
|
-
"0xdf30dba06db6a30e65354d9a64c609861f089545ca58c6b4dbe31a5f338cb0e3",
|
|
111
|
-
// AddressPermissions:Permissions:<address>
|
|
112
|
-
"AddressPermissions:Permissions": "0x4b80742d0000000082ac0000",
|
|
113
|
-
// AddressPermissions:AllowedAddresses:<address>
|
|
114
|
-
"AddressPermissions:AllowedAddresses": "0x4b80742d00000000c6dd0000",
|
|
115
|
-
// AddressPermissions:AllowedFunctions:<address>
|
|
116
|
-
"AddressPermissions:AllowedFunctions": "0x4b80742d000000008efe0000",
|
|
117
|
-
// AddressPermissions:AllowedStandards:<address>
|
|
118
|
-
"AddressPermissions:AllowedStandards": "0x4b80742d000000003efa0000",
|
|
119
|
-
// AddressPermissions:AllowedERC725YKeys:<address>
|
|
120
|
-
"AddressPermissions:AllowedERC725YKeys": "0x4b80742d0000000090b80000",
|
|
121
|
-
},
|
|
122
|
-
LSP10: {
|
|
123
|
-
// keccak256('LSP10VaultsMap')
|
|
124
|
-
LSP10VaultsMap: "0x192448c3c0f88c7f00000000",
|
|
125
|
-
// keccak256('LSP10Vaults[]')
|
|
126
|
-
"LSP10Vaults[]":
|
|
127
|
-
"0x55482936e01da86729a45d2b87a6b1d3bc582bea0ec00e38bdb340e3af6f9f06",
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export const BasicUPSetup_Schema = [
|
|
132
|
-
{
|
|
133
|
-
name: "LSP3Profile",
|
|
134
|
-
key: ERC725YKeys.LSP3["LSP3Profile"],
|
|
135
|
-
keyType: "Singleton",
|
|
136
|
-
valueContent: "JSONURL",
|
|
137
|
-
valueType: "bytes",
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: "LSP1UniversalReceiverDelegate",
|
|
141
|
-
key: ERC725YKeys.LSP0["LSP1UniversalReceiverDelegate"],
|
|
142
|
-
keyType: "Singleton",
|
|
143
|
-
valueContent: "Address",
|
|
144
|
-
valueType: "address",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: "LSP3IssuedAssets[]",
|
|
148
|
-
key: ERC725YKeys.LSP3["LSP3IssuedAssets[]"],
|
|
149
|
-
keyType: "Array",
|
|
150
|
-
valueContent: "Number",
|
|
151
|
-
valueType: "uint256",
|
|
152
|
-
},
|
|
153
|
-
];
|
|
154
|
-
|
|
155
|
-
// LSP6
|
|
156
|
-
// ----------
|
|
157
|
-
|
|
158
|
-
// binary = .... 1111 1111 1111 (only 1s)
|
|
159
|
-
export const ALL_PERMISSIONS_SET =
|
|
160
|
-
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
|
|
161
|
-
// prettier-ignore
|
|
162
|
-
export const enum PERMISSIONS {
|
|
163
|
-
CHANGEOWNER = 0x0000000000000000000000000000000000000000000000000000000000000001, // .... 0000 0000 0001
|
|
164
|
-
CHANGEPERMISSIONS = 0x0000000000000000000000000000000000000000000000000000000000000002, // .... .... .... 0010
|
|
165
|
-
ADDPERMISSIONS = 0x0000000000000000000000000000000000000000000000000000000000000004, // .... .... .... 0100
|
|
166
|
-
SETDATA = 0x0000000000000000000000000000000000000000000000000000000000000008, // .... .... .... 1000
|
|
167
|
-
CALL = 0x0000000000000000000000000000000000000000000000000000000000000010, // .... .... 0001 ....
|
|
168
|
-
STATICCALL = 0x0000000000000000000000000000000000000000000000000000000000000020, // .... .... 0010 ....
|
|
169
|
-
DELEGATECALL = 0x0000000000000000000000000000000000000000000000000000000000000040, // .... .... 0100 ....
|
|
170
|
-
DEPLOY = 0x0000000000000000000000000000000000000000000000000000000000000080, // .... .... 1000 ....
|
|
171
|
-
TRANSFERVALUE = 0x0000000000000000000000000000000000000000000000000000000000000100, // .... 0001 .... ....
|
|
172
|
-
SIGN = 0x0000000000000000000000000000000000000000000000000000000000000200, // .... 0010 .... ....
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// ----------
|
|
176
|
-
|
|
177
|
-
export const EventSignatures = {
|
|
178
|
-
ERC173: {
|
|
179
|
-
/**
|
|
180
|
-
* event OwnershipTransferred(
|
|
181
|
-
* address indexed previousOwner,
|
|
182
|
-
* address indexed newOwner,
|
|
183
|
-
* );
|
|
184
|
-
*
|
|
185
|
-
* signature = keccak256('OwnershipTransferred(address,address)')
|
|
186
|
-
*/
|
|
187
|
-
OwnershipTransfered:
|
|
188
|
-
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
|
|
189
|
-
},
|
|
190
|
-
ERC725X: {
|
|
191
|
-
/**
|
|
192
|
-
* event ContractCreated(
|
|
193
|
-
* uint256 indexed _operation,
|
|
194
|
-
* address indexed _contractAddress,
|
|
195
|
-
* uint256 indexed _value
|
|
196
|
-
* );
|
|
197
|
-
*
|
|
198
|
-
* signature = keccak256('ContractCreated(uint256,address,uint256)')
|
|
199
|
-
*/
|
|
200
|
-
ContractCreated:
|
|
201
|
-
"0x01c42bd7e97a66166063b02fce6924e6656b6c2c61966630165095c4fb0b7b2f",
|
|
202
|
-
/**
|
|
203
|
-
* event Executed(
|
|
204
|
-
* uint256 indexed _operation,
|
|
205
|
-
* address indexed _to,
|
|
206
|
-
* uint256 indexed _value,
|
|
207
|
-
* bytes _data
|
|
208
|
-
* );
|
|
209
|
-
*
|
|
210
|
-
* signature = keccak256('Executed(uint256,address,uint256,bytes)')
|
|
211
|
-
*/
|
|
212
|
-
Executed:
|
|
213
|
-
"0x1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b8",
|
|
214
|
-
},
|
|
215
|
-
ERC725Y: {
|
|
216
|
-
/**
|
|
217
|
-
* event DataChanged(
|
|
218
|
-
* bytes32 indexed key,
|
|
219
|
-
* bytes value
|
|
220
|
-
* );
|
|
221
|
-
*
|
|
222
|
-
* signature = keccak256('DataChanged(bytes32,bytes)')
|
|
223
|
-
*/
|
|
224
|
-
DataChanged:
|
|
225
|
-
"0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2",
|
|
226
|
-
},
|
|
227
|
-
// ERC725Account
|
|
228
|
-
LSP0: {
|
|
229
|
-
/**
|
|
230
|
-
* event ValueReceived(
|
|
231
|
-
* address indexed sender,
|
|
232
|
-
* uint256 indexed value
|
|
233
|
-
* );
|
|
234
|
-
*
|
|
235
|
-
* signature = keccak256('ValueReceived(address,uint256)')
|
|
236
|
-
*/
|
|
237
|
-
ValueReceived:
|
|
238
|
-
"0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493",
|
|
239
|
-
},
|
|
240
|
-
LSP1: {
|
|
241
|
-
/**
|
|
242
|
-
* event UniversalReceiver(
|
|
243
|
-
* address indexed from,
|
|
244
|
-
* bytes32 indexed typeId,
|
|
245
|
-
* bytes32 indexed returnedValue,
|
|
246
|
-
* bytes receivedData
|
|
247
|
-
* );
|
|
248
|
-
*
|
|
249
|
-
* signature = keccak256('UniversalReceiver(address,bytes32,bytes32,bytes)')
|
|
250
|
-
*/
|
|
251
|
-
UniversalReceiver:
|
|
252
|
-
"0x8187df79ab47ad16102e7bc8760349a115b3ba9869b8cedd78996f930ac9cac3",
|
|
253
|
-
},
|
|
254
|
-
LSP6: {
|
|
255
|
-
/**
|
|
256
|
-
* event Executed(
|
|
257
|
-
* uint256 indexed _value,
|
|
258
|
-
* bytes _data
|
|
259
|
-
* );
|
|
260
|
-
*
|
|
261
|
-
* signature = keccak256('Executed(uint256,bytes)')
|
|
262
|
-
*/
|
|
263
|
-
Executed:
|
|
264
|
-
"0x2e733a17851169f232b3859260eb3ad2a086afd54e999eb4ea9afb7791702e41",
|
|
265
|
-
},
|
|
266
|
-
LSP7: {
|
|
267
|
-
/**
|
|
268
|
-
* event Transfer(
|
|
269
|
-
* address indexed operator,
|
|
270
|
-
* address indexed from,
|
|
271
|
-
* address indexed to,
|
|
272
|
-
* uint256 amount,
|
|
273
|
-
* bool force,
|
|
274
|
-
* bytes data
|
|
275
|
-
* );
|
|
276
|
-
*
|
|
277
|
-
* signature = keccak256('Transfer(address,address,address,uint256,bool,bytes)')
|
|
278
|
-
*/
|
|
279
|
-
Transfer:
|
|
280
|
-
"0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6",
|
|
281
|
-
/**
|
|
282
|
-
* event AuthorizedOperator(
|
|
283
|
-
* address indexed operator,
|
|
284
|
-
* address indexed tokenOwner,
|
|
285
|
-
* uint256 indexed amount
|
|
286
|
-
* );
|
|
287
|
-
*
|
|
288
|
-
* signature = keccak256('AuthorizedOperator(address,address,uint256)')
|
|
289
|
-
*/
|
|
290
|
-
AuthorizedOperator:
|
|
291
|
-
"0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c",
|
|
292
|
-
/**
|
|
293
|
-
* event RevokedOperator(
|
|
294
|
-
* address indexed operator,
|
|
295
|
-
* address indexed tokenOwner
|
|
296
|
-
* );
|
|
297
|
-
*
|
|
298
|
-
* signature = keccak256('RevokedOperator(address,address)')
|
|
299
|
-
*/
|
|
300
|
-
RevokedOperator:
|
|
301
|
-
"0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1",
|
|
302
|
-
},
|
|
303
|
-
LSP8: {
|
|
304
|
-
/**
|
|
305
|
-
* event Transfer(
|
|
306
|
-
* address operator,
|
|
307
|
-
* address indexed from,
|
|
308
|
-
* address indexed to,
|
|
309
|
-
* bytes32 indexed tokenId,
|
|
310
|
-
* bool force,
|
|
311
|
-
* bytes data
|
|
312
|
-
* );
|
|
313
|
-
*
|
|
314
|
-
* signature = keccak256('Transfer(address,address,address,bytes32,bool,bytes)')
|
|
315
|
-
*/
|
|
316
|
-
Transfer:
|
|
317
|
-
"b333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf",
|
|
318
|
-
/**
|
|
319
|
-
* event AuthorizedOperator(
|
|
320
|
-
* address indexed operator,
|
|
321
|
-
* address indexed tokenOwner,
|
|
322
|
-
* bytes32 indexed tokenId
|
|
323
|
-
* );
|
|
324
|
-
*
|
|
325
|
-
* signature = keccak256('AuthorizedOperator(address,address,bytes32)')
|
|
326
|
-
*/
|
|
327
|
-
AuthorizedOperator:
|
|
328
|
-
"34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988",
|
|
329
|
-
/**
|
|
330
|
-
* event RevokedOperator(
|
|
331
|
-
* address indexed operator,
|
|
332
|
-
* address indexed tokenOwner,
|
|
333
|
-
* bytes32 indexed tokenId
|
|
334
|
-
* );
|
|
335
|
-
*
|
|
336
|
-
* signature = keccak256('RevokedOperator(address,address,bytes32)')
|
|
337
|
-
*/
|
|
338
|
-
RevokedOperator:
|
|
339
|
-
"17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5",
|
|
340
|
-
},
|
|
341
|
-
Helpers: {
|
|
342
|
-
/**
|
|
343
|
-
* event ReceivedERC777(
|
|
344
|
-
* address indexed token,
|
|
345
|
-
* address indexed _operator,
|
|
346
|
-
* address indexed _from,
|
|
347
|
-
* address _to,
|
|
348
|
-
* uint256 _amount
|
|
349
|
-
* );
|
|
350
|
-
*
|
|
351
|
-
* signature = keccak256('ReceivedERC777(address,address,address,address,uint256)')
|
|
352
|
-
*/
|
|
353
|
-
ReceivedERC777:
|
|
354
|
-
"0xdc38539587ea4d67f9f649ad9269646bab26927bad175bdcdfdab5dd297d5e1c",
|
|
355
|
-
},
|
|
356
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import "./Handling/TokenAndVaultHandling.sol";
|
|
5
|
-
|
|
6
|
-
import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
|
|
7
|
-
|
|
8
|
-
import "../ILSP1UniversalReceiverDelegate.sol";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @title Core Implementation of contract writing the received Vaults and LSP7, LSP8 assets into your ERC725Account using
|
|
12
|
-
* the LSP5-ReceivedAsset and LSP10-ReceivedVaults standard and removing the sent vaults and assets.
|
|
13
|
-
*
|
|
14
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
15
|
-
* @dev Delegate contract of the initial universal receiver
|
|
16
|
-
*
|
|
17
|
-
* Owner of the UniversalProfile MUST be a KeyManager that allows (this) address to setData on the UniversalProfile
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
abstract contract LSP1UniversalReceiverDelegateUPCore is
|
|
21
|
-
ILSP1UniversalReceiverDelegate,
|
|
22
|
-
ERC165Storage,
|
|
23
|
-
TokenAndVaultHandlingContract
|
|
24
|
-
{
|
|
25
|
-
/**
|
|
26
|
-
* @inheritdoc ILSP1UniversalReceiverDelegate
|
|
27
|
-
* @dev Allows to register arrayKeys and Map of incoming vaults and assets and removing them after being sent
|
|
28
|
-
* @return result the return value of keyManager's execute function
|
|
29
|
-
*/
|
|
30
|
-
function universalReceiverDelegate(
|
|
31
|
-
address sender,
|
|
32
|
-
bytes32 typeId,
|
|
33
|
-
bytes memory data
|
|
34
|
-
) public override returns (bytes memory result) {
|
|
35
|
-
if (
|
|
36
|
-
typeId == _TYPEID_LSP7_TOKENSSENDER ||
|
|
37
|
-
typeId == _TYPEID_LSP7_TOKENSRECIPIENT ||
|
|
38
|
-
typeId == _TYPEID_LSP8_TOKENSSENDER ||
|
|
39
|
-
typeId == _TYPEID_LSP8_TOKENSRECIPIENT ||
|
|
40
|
-
typeId == _TYPEID_LSP9_VAULTSENDER ||
|
|
41
|
-
typeId == _TYPEID_LSP9_VAULTRECIPIENT
|
|
42
|
-
) {
|
|
43
|
-
result = _tokenAndVaultHandling(sender, typeId, data);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* @TODO
|
|
47
|
-
else if() {
|
|
48
|
-
result = FollowerHandling(sender, typeId, data);
|
|
49
|
-
}
|
|
50
|
-
*/
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import "./LSP1UniversalReceiverDelegateUPInitAbstract.sol";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title Deployable Proxy Implementation of contract writing the received Vaults and LSP7, LSP8 assets into your ERC725Account using
|
|
9
|
-
* the LSP5-ReceivedAsset and LSP10-ReceivedVaults standard and removing the sent vaults and assets.
|
|
10
|
-
*
|
|
11
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
12
|
-
* @dev Delegate contract of the initial universal receiver
|
|
13
|
-
*
|
|
14
|
-
* Owner of the UniversalProfile MUST be a KeyManager that allows (this) address to setData on the UniversalProfile
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
contract LSP1UniversalReceiverDelegateUPInit is
|
|
18
|
-
LSP1UniversalReceiverDelegateUPInitAbstract
|
|
19
|
-
{
|
|
20
|
-
/**
|
|
21
|
-
* @inheritdoc LSP1UniversalReceiverDelegateUPInitAbstract
|
|
22
|
-
*/
|
|
23
|
-
function initialize() public virtual override initializer {
|
|
24
|
-
LSP1UniversalReceiverDelegateUPInitAbstract.initialize();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import "./LSP1UniversalReceiverDelegateUPCore.sol";
|
|
6
|
-
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @title Inheritable Proxy Implementation of contract writing the received Vaults and LSP7, LSP8 assets into your ERC725Account using
|
|
10
|
-
* the LSP5-ReceivedAsset and LSP10-ReceivedVaults standard and removing the sent vaults and assets.
|
|
11
|
-
*
|
|
12
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
13
|
-
* @dev Delegate contract of the initial universal receiver
|
|
14
|
-
*
|
|
15
|
-
* Owner of the UniversalProfile MUST be a KeyManager that allows (this) address to setData on the UniversalProfile
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
abstract contract LSP1UniversalReceiverDelegateUPInitAbstract is
|
|
19
|
-
Initializable,
|
|
20
|
-
LSP1UniversalReceiverDelegateUPCore
|
|
21
|
-
{
|
|
22
|
-
/**
|
|
23
|
-
* @notice Register the LSP1UniversalReceiverDelegate InterfaceId
|
|
24
|
-
*/
|
|
25
|
-
function initialize() public virtual onlyInitializing {
|
|
26
|
-
_registerInterface(_INTERFACEID_LSP1_DELEGATE);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import "./Handling/TokenHandling.sol";
|
|
5
|
-
|
|
6
|
-
import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
|
|
7
|
-
|
|
8
|
-
import "../ILSP1UniversalReceiverDelegate.sol";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @title Core Implementation of contract writing the received LSP7 and LSP8 assets into your Vault using
|
|
12
|
-
* the LSP5-ReceivedAsset standard and removing the sent assets.
|
|
13
|
-
*
|
|
14
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
15
|
-
* @dev Delegate contract of the initial universal receiver
|
|
16
|
-
*/
|
|
17
|
-
abstract contract LSP1UniversalReceiverDelegateVaultCore is
|
|
18
|
-
ILSP1UniversalReceiverDelegate,
|
|
19
|
-
ERC165Storage,
|
|
20
|
-
TokenHandlingContract
|
|
21
|
-
{
|
|
22
|
-
/**
|
|
23
|
-
* @inheritdoc ILSP1UniversalReceiverDelegate
|
|
24
|
-
* @dev allows to register arrayKeys and Map of incoming assets and remove after being sent
|
|
25
|
-
* @return result The return value
|
|
26
|
-
*/
|
|
27
|
-
function universalReceiverDelegate(
|
|
28
|
-
address sender,
|
|
29
|
-
bytes32 typeId,
|
|
30
|
-
bytes memory data
|
|
31
|
-
) public override returns (bytes memory result) {
|
|
32
|
-
if (
|
|
33
|
-
typeId == _TYPEID_LSP7_TOKENSSENDER ||
|
|
34
|
-
typeId == _TYPEID_LSP7_TOKENSRECIPIENT ||
|
|
35
|
-
typeId == _TYPEID_LSP8_TOKENSSENDER ||
|
|
36
|
-
typeId == _TYPEID_LSP8_TOKENSRECIPIENT
|
|
37
|
-
) {
|
|
38
|
-
result = _tokenHandling(sender, typeId, data);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import "./LSP1UniversalReceiverDelegateVaultInitAbstract.sol";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title Deployable Proxy Implementation of contract writing the received LSP7 and LSP8 assets into your Vault using
|
|
9
|
-
* the LSP5-ReceivedAsset standard and removing the sent assets.
|
|
10
|
-
*
|
|
11
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
12
|
-
* @dev Delegate contract of the initial universal receiver
|
|
13
|
-
*/
|
|
14
|
-
contract LSP1UniversalReceiverDelegateVaultInit is
|
|
15
|
-
LSP1UniversalReceiverDelegateVaultInitAbstract
|
|
16
|
-
{
|
|
17
|
-
/**
|
|
18
|
-
* @inheritdoc LSP1UniversalReceiverDelegateVaultInitAbstract
|
|
19
|
-
*/
|
|
20
|
-
function initialize() public virtual override initializer {
|
|
21
|
-
LSP1UniversalReceiverDelegateVaultInitAbstract.initialize();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: CC0-1.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import "./LSP1UniversalReceiverDelegateVaultCore.sol";
|
|
6
|
-
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @title Inheritable Proxy Implementation of contract writing the received LSP7 and LSP8 assets into your Vault using
|
|
10
|
-
* the LSP5-ReceivedAsset standard and removing the sent assets.
|
|
11
|
-
*
|
|
12
|
-
* @author Fabian Vogelsteller, Yamen Merhi, Jean Cavallera
|
|
13
|
-
* @dev Delegate contract of the initial universal receiver
|
|
14
|
-
*/
|
|
15
|
-
abstract contract LSP1UniversalReceiverDelegateVaultInitAbstract is
|
|
16
|
-
Initializable,
|
|
17
|
-
LSP1UniversalReceiverDelegateVaultCore
|
|
18
|
-
{
|
|
19
|
-
/**
|
|
20
|
-
* @notice Register the LSP1UniversalReceiverDelegate InterfaceId
|
|
21
|
-
*/
|
|
22
|
-
function initialize() public virtual onlyInitializing {
|
|
23
|
-
_registerInterface(_INTERFACEID_LSP1_DELEGATE);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
// modules
|
|
6
|
-
import "../LSP7DigitalAsset.sol";
|
|
7
|
-
import "./LSP7CompatibilityForERC20Core.sol";
|
|
8
|
-
|
|
9
|
-
contract LSP7CompatibilityForERC20 is LSP7CompatibilityForERC20Core, LSP7DigitalAsset {
|
|
10
|
-
/* solhint-disable no-empty-blocks */
|
|
11
|
-
/**
|
|
12
|
-
* @notice Sets the name, the symbol and the owner of the token
|
|
13
|
-
* @param name_ The name of the token
|
|
14
|
-
* @param symbol_ The symbol of the token
|
|
15
|
-
* @param newOwner_ The owner of the token
|
|
16
|
-
*/
|
|
17
|
-
constructor(
|
|
18
|
-
string memory name_,
|
|
19
|
-
string memory symbol_,
|
|
20
|
-
address newOwner_
|
|
21
|
-
) LSP7DigitalAsset(name_, symbol_, newOwner_, false) {
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// --- Overrides
|
|
26
|
-
|
|
27
|
-
function authorizeOperator(address operator, uint256 amount)
|
|
28
|
-
public
|
|
29
|
-
virtual
|
|
30
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core)
|
|
31
|
-
{
|
|
32
|
-
super.authorizeOperator(operator, amount);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function _burn(address from, uint256 amount, bytes memory data)
|
|
36
|
-
internal
|
|
37
|
-
virtual
|
|
38
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core)
|
|
39
|
-
{
|
|
40
|
-
super._burn(from, amount, data);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function _mint(address to, uint256 amount, bool force, bytes memory data)
|
|
44
|
-
internal
|
|
45
|
-
virtual
|
|
46
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core) {
|
|
47
|
-
super._mint(to, amount, force, data);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _transfer(address from, address to, uint256 amount, bool force, bytes memory data)
|
|
51
|
-
internal
|
|
52
|
-
virtual
|
|
53
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core) {
|
|
54
|
-
super._transfer(from, to, amount, force, data);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
// modules
|
|
6
|
-
import "../LSP7DigitalAssetInitAbstract.sol";
|
|
7
|
-
import "./LSP7CompatibilityForERC20Core.sol";
|
|
8
|
-
|
|
9
|
-
contract LSP7CompatibilityForERC20InitAbstract is LSP7CompatibilityForERC20Core, LSP7DigitalAssetInitAbstract {
|
|
10
|
-
/**
|
|
11
|
-
* @notice Sets the name, the symbol and the owner of the token
|
|
12
|
-
* @param name_ The name of the token
|
|
13
|
-
* @param symbol_ The symbol of the token
|
|
14
|
-
* @param newOwner_ The owner of the token
|
|
15
|
-
*/
|
|
16
|
-
function initialize(
|
|
17
|
-
string memory name_,
|
|
18
|
-
string memory symbol_,
|
|
19
|
-
address newOwner_
|
|
20
|
-
) public virtual override onlyInitializing {
|
|
21
|
-
LSP7DigitalAssetInitAbstract.initialize(name_, symbol_, newOwner_, false);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// --- Overrides
|
|
25
|
-
|
|
26
|
-
function authorizeOperator(address operator, uint256 amount)
|
|
27
|
-
public
|
|
28
|
-
virtual
|
|
29
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core)
|
|
30
|
-
{
|
|
31
|
-
super.authorizeOperator(operator, amount);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _burn(address from, uint256 amount, bytes memory data)
|
|
35
|
-
internal
|
|
36
|
-
virtual
|
|
37
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core)
|
|
38
|
-
{
|
|
39
|
-
super._burn(from, amount, data);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function _mint(address to, uint256 amount, bool force, bytes memory data)
|
|
43
|
-
internal
|
|
44
|
-
virtual
|
|
45
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core) {
|
|
46
|
-
super._mint(to, amount, force, data);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _transfer(address from, address to, uint256 amount, bool force, bytes memory data)
|
|
50
|
-
internal
|
|
51
|
-
virtual
|
|
52
|
-
override(LSP7DigitalAssetCore, LSP7CompatibilityForERC20Core) {
|
|
53
|
-
super._transfer(from, to, amount, force, data);
|
|
54
|
-
}
|
|
55
|
-
}
|