@lukso/lsp-smart-contracts 0.4.3 → 0.6.1
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/LSP0ERC725Account.json +398 -0
- package/artifacts/LSP0ERC725AccountInit.json +439 -0
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +7 -7
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +7 -7
- package/artifacts/LSP4Compatibility.json +195 -0
- package/artifacts/LSP4DigitalAssetMetadata.json +169 -0
- package/artifacts/LSP4DigitalAssetMetadataInit.json +231 -0
- package/artifacts/LSP6KeyManager.json +50 -28
- package/artifacts/LSP6KeyManagerInit.json +58 -23
- package/artifacts/LSP7CappedSupply.json +136 -11
- package/artifacts/LSP7CappedSupplyInit.json +163 -35
- package/artifacts/LSP7CompatibilityForERC20.json +204 -13
- package/artifacts/LSP7CompatibilityForERC20Init.json +727 -0
- package/artifacts/LSP7DigitalAsset.json +128 -13
- package/artifacts/LSP7DigitalAssetInit.json +152 -34
- package/artifacts/LSP7Mintable.json +129 -14
- package/artifacts/LSP7MintableInit.json +153 -35
- package/artifacts/LSP8CappedSupply.json +137 -11
- package/artifacts/LSP8CappedSupplyInit.json +172 -20
- package/artifacts/LSP8CompatibilityForERC721.json +138 -17
- package/artifacts/LSP8CompatibilityForERC721Init.json +873 -0
- package/artifacts/LSP8IdentifiableDigitalAsset.json +129 -13
- package/artifacts/LSP8IdentifiableDigitalAssetInit.json +161 -19
- package/artifacts/LSP8Mintable.json +141 -14
- package/artifacts/LSP8MintableInit.json +173 -20
- package/artifacts/LSP9Vault.json +374 -0
- package/artifacts/LSP9VaultInit.json +415 -0
- package/artifacts/UniversalFactory.json +127 -0
- package/artifacts/UniversalProfile.json +78 -53
- package/artifacts/UniversalProfileInit.json +117 -53
- package/artifacts/UniversalReceiverAddressStore.json +209 -0
- package/constants.js +500 -0
- package/contracts/Custom/ClaimOwnership.sol +31 -0
- package/contracts/Custom/ERC165Checker.sol +130 -0
- package/contracts/Custom/IClaimOwnership.sol +10 -0
- package/contracts/Factories/UniversalFactory.sol +155 -0
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +5 -9
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +6 -8
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +92 -48
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +5 -5
- 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 +61 -165
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +49 -6
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/Handling/TokenHandling.sol +50 -90
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +40 -6
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +48 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +205 -0
- package/contracts/LSP3UniversalProfile/LSP3Constants.sol +11 -0
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +6 -15
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +10 -4
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +11 -8
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInit.sol +9 -13
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +14 -20
- package/contracts/LSP5ReceivedAssets/LSP5Constants.sol +10 -0
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +205 -0
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +21 -18
- package/contracts/LSP6KeyManager/LSP6Constants.sol +61 -24
- package/contracts/LSP6KeyManager/LSP6Errors.sol +37 -0
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +3 -4
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +475 -260
- package/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol +6 -5
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +7 -15
- package/contracts/LSP6KeyManager/LSP6Utils.sol +111 -0
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +3 -8
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +5 -4
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +22 -8
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +70 -96
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInit.sol +8 -9
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +23 -21
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +23 -0
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CappedSupply.sol +1 -1
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibilityForERC20.sol +22 -6
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +7 -6
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyCore.sol +14 -12
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInit.sol +3 -8
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +9 -17
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20.sol +37 -45
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20Core.sol +107 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20Init.sol +22 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibilityForERC20InitAbstract.sol +66 -0
- package/contracts/LSP7DigitalAsset/{extensions → presets}/ILSP7Mintable.sol +1 -1
- 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 +3 -2
- 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 +21 -8
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +102 -135
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInit.sol +8 -11
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +22 -19
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CappedSupply.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibilityForERC721.sol +17 -22
- 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 +9 -18
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721.sol +37 -189
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721Core.sol +187 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721Init.sol +25 -0
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibilityForERC721InitAbstract.sol +89 -0
- package/contracts/LSP8IdentifiableDigitalAsset/{extensions → presets}/ILSP8Mintable.sol +1 -1
- 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 +4 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +35 -0
- package/contracts/LSP9Vault/LSP9Constants.sol +14 -5
- package/contracts/LSP9Vault/LSP9Vault.sol +15 -37
- package/contracts/LSP9Vault/LSP9VaultCore.sol +105 -85
- package/contracts/LSP9Vault/LSP9VaultInit.sol +5 -4
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +15 -45
- package/contracts/Legacy/Registries/AddressRegistry.sol +43 -0
- package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +33 -0
- package/contracts/Legacy/UniversalReceiverAddressStore.sol +60 -0
- package/contracts/UniversalProfile.sol +11 -20
- package/contracts/UniversalProfileInit.sol +5 -4
- package/contracts/UniversalProfileInitAbstract.sol +14 -35
- package/contracts/Utils/UtilsLib.sol +47 -11
- package/package.json +23 -9
- package/artifacts/LSP1UniversalReceiverDelegateUPInit.json +0 -66
- package/artifacts/LSP1UniversalReceiverDelegateVaultInit.json +0 -66
- package/constants.ts +0 -350
- 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/LSP7MintableInitAbstract.sol +0 -47
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8MintableInitAbstract.sol +0 -44
- package/contracts/UniversalProfileCore.sol +0 -56
- package/contracts/Utils/ERC725Utils.sol +0 -169
- package/contracts/Utils/LSP2Utils.sol +0 -127
- package/contracts/Utils/LSP6Utils.sol +0 -77
package/constants.ts
DELETED
|
@@ -1,350 +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
|
-
ERC721 = "0x80ac58cd",
|
|
13
|
-
ERC721Metadata = "0x5b5e139f",
|
|
14
|
-
ERC725X = "0x44c028fe",
|
|
15
|
-
ERC725Y = "0x5a988c0f",
|
|
16
|
-
ERC725Account = "0x63cb749b",
|
|
17
|
-
LSP1 = "0x6bb56a14",
|
|
18
|
-
LSP1Delegate = "0xc2d7bcc1",
|
|
19
|
-
LSP6 = "0x6f4df48b",
|
|
20
|
-
LSP7 = "0xe33f65c3",
|
|
21
|
-
LSP8 = "0x49399145",
|
|
22
|
-
LSP9 = "0x75edcee5",
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ERC1271
|
|
26
|
-
// ----------
|
|
27
|
-
|
|
28
|
-
export const enum ERC1271 {
|
|
29
|
-
MAGIC_VALUE = "0x1626ba7e",
|
|
30
|
-
FAIL_VALUE = "0xffffffff",
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ERC725X
|
|
34
|
-
// ----------
|
|
35
|
-
|
|
36
|
-
export const enum OPERATIONS {
|
|
37
|
-
CALL = 0,
|
|
38
|
-
CREATE = 1,
|
|
39
|
-
CREATE2 = 2,
|
|
40
|
-
STATICCALL = 3,
|
|
41
|
-
DELEGATECALL = 4,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ERC725Y
|
|
45
|
-
// ----------
|
|
46
|
-
|
|
47
|
-
export const SupportedStandards = {
|
|
48
|
-
LSP3UniversalProfile: {
|
|
49
|
-
key: "0xeafec4d89fa9619884b6b89135626455000000000000000000000000abe425d6",
|
|
50
|
-
value: "0xabe425d6",
|
|
51
|
-
},
|
|
52
|
-
LSP4DigitalAsset: {
|
|
53
|
-
key: "0xeafec4d89fa9619884b6b89135626455000000000000000000000000a4d96624",
|
|
54
|
-
value: "0xa4d96624",
|
|
55
|
-
},
|
|
56
|
-
LSP9Vault: {
|
|
57
|
-
key: "0xeafec4d89fa9619884b6b891356264550000000000000000000000007c0334a1",
|
|
58
|
-
value: "0x7c0334a1",
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* For more infos on the type of each keys
|
|
64
|
-
* @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
|
|
65
|
-
*/
|
|
66
|
-
export const ERC725YKeys = {
|
|
67
|
-
LSP0: {
|
|
68
|
-
// keccak256('LSP1UniversalReceiverDelegate')
|
|
69
|
-
LSP1UniversalReceiverDelegate:
|
|
70
|
-
"0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47",
|
|
71
|
-
},
|
|
72
|
-
LSP3: {
|
|
73
|
-
// keccak256('LSP3Profile')
|
|
74
|
-
LSP3Profile:
|
|
75
|
-
"0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5",
|
|
76
|
-
// LSP3IssuedAssetsMap:<address>
|
|
77
|
-
LSP3IssuedAssetsMap: "0x83f5e77bfb14241600000000",
|
|
78
|
-
// keccak256('LSP3IssuedAssets[]')
|
|
79
|
-
"LSP3IssuedAssets[]":
|
|
80
|
-
"0x3a47ab5bd3a594c3a8995f8fa58d0876c96819ca4516bd76100c92462f2f9dc0",
|
|
81
|
-
},
|
|
82
|
-
LSP4: {
|
|
83
|
-
// keccak256('LSP4TokenName')
|
|
84
|
-
LSP4TokenName:
|
|
85
|
-
"0xdeba1e292f8ba88238e10ab3c7f88bd4be4fac56cad5194b6ecceaf653468af1",
|
|
86
|
-
// keccak256('LSP4TokenSymbol')
|
|
87
|
-
LSP4TokenSymbol:
|
|
88
|
-
"0x2f0a68ab07768e01943a599e73362a0e17a63a72e94dd2e384d2c1d4db932756",
|
|
89
|
-
// keccak256('LSP4Metadata')
|
|
90
|
-
LSP4Metadata:
|
|
91
|
-
"0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e",
|
|
92
|
-
// keccak256('"LSP4Creators[]')
|
|
93
|
-
"LSP4Creators[]":
|
|
94
|
-
"0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7",
|
|
95
|
-
},
|
|
96
|
-
LSP5: {
|
|
97
|
-
// LSP5ReceivedAssetsMap:<address>
|
|
98
|
-
LSP5ReceivedAssetsMap: "0x812c4334633eb81600000000",
|
|
99
|
-
// keccak256('LSP5ReceivedAssets[]')
|
|
100
|
-
"LSP5ReceivedAssets[]":
|
|
101
|
-
"0x6460ee3c0aac563ccbf76d6e1d07bada78e3a9514e6382b736ed3f478ab7b90b",
|
|
102
|
-
},
|
|
103
|
-
LSP6: {
|
|
104
|
-
// keccak256('AddressPermissions[]')
|
|
105
|
-
"AddressPermissions[]":
|
|
106
|
-
"0xdf30dba06db6a30e65354d9a64c609861f089545ca58c6b4dbe31a5f338cb0e3",
|
|
107
|
-
// AddressPermissions:Permissions:<address>
|
|
108
|
-
"AddressPermissions:Permissions": "0x4b80742d0000000082ac0000",
|
|
109
|
-
// AddressPermissions:AllowedAddresses:<address>
|
|
110
|
-
"AddressPermissions:AllowedAddresses": "0x4b80742d00000000c6dd0000",
|
|
111
|
-
// AddressPermissions:AllowedFunctions:<address>
|
|
112
|
-
"AddressPermissions:AllowedFunctions": "0x4b80742d000000008efe0000",
|
|
113
|
-
// AddressPermissions:AllowedStandards:<address>
|
|
114
|
-
"AddressPermissions:AllowedStandards": "0x4b80742d000000003efa0000",
|
|
115
|
-
},
|
|
116
|
-
LSP10: {
|
|
117
|
-
// keccak256('LSP10VaultsMap')
|
|
118
|
-
LSP10VaultsMap: "0x192448c3c0f88c7f00000000",
|
|
119
|
-
// keccak256('LSP10Vaults[]')
|
|
120
|
-
"LSP10Vaults[]":
|
|
121
|
-
"0x55482936e01da86729a45d2b87a6b1d3bc582bea0ec00e38bdb340e3af6f9f06",
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export const BasicUPSetup_Schema = [
|
|
126
|
-
{
|
|
127
|
-
name: "LSP3Profile",
|
|
128
|
-
key: ERC725YKeys.LSP3["LSP3Profile"],
|
|
129
|
-
keyType: "Singleton",
|
|
130
|
-
valueContent: "JSONURL",
|
|
131
|
-
valueType: "bytes",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: "LSP1UniversalReceiverDelegate",
|
|
135
|
-
key: ERC725YKeys.LSP0["LSP1UniversalReceiverDelegate"],
|
|
136
|
-
keyType: "Singleton",
|
|
137
|
-
valueContent: "Address",
|
|
138
|
-
valueType: "address",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "LSP3IssuedAssets[]",
|
|
142
|
-
key: ERC725YKeys.LSP3["LSP3IssuedAssets[]"],
|
|
143
|
-
keyType: "Array",
|
|
144
|
-
valueContent: "Number",
|
|
145
|
-
valueType: "uint256",
|
|
146
|
-
},
|
|
147
|
-
];
|
|
148
|
-
|
|
149
|
-
// LSP6
|
|
150
|
-
// ----------
|
|
151
|
-
|
|
152
|
-
// binary = .... 1111 1111 1111 (only 1s)
|
|
153
|
-
export const ALL_PERMISSIONS_SET =
|
|
154
|
-
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
|
|
155
|
-
// prettier-ignore
|
|
156
|
-
export const enum PERMISSIONS {
|
|
157
|
-
CHANGEOWNER = 0x0000000000000000000000000000000000000000000000000000000000000001, // .... 0000 0000 0001
|
|
158
|
-
CHANGEPERMISSIONS = 0x0000000000000000000000000000000000000000000000000000000000000002, // .... .... .... 0010
|
|
159
|
-
ADDPERMISSIONS = 0x0000000000000000000000000000000000000000000000000000000000000004, // .... .... .... 0100
|
|
160
|
-
SETDATA = 0x0000000000000000000000000000000000000000000000000000000000000008, // .... .... .... 1000
|
|
161
|
-
CALL = 0x0000000000000000000000000000000000000000000000000000000000000010, // .... .... 0001 ....
|
|
162
|
-
STATICCALL = 0x0000000000000000000000000000000000000000000000000000000000000020, // .... .... 0010 ....
|
|
163
|
-
DELEGATECALL = 0x0000000000000000000000000000000000000000000000000000000000000040, // .... .... 0100 ....
|
|
164
|
-
DEPLOY = 0x0000000000000000000000000000000000000000000000000000000000000080, // .... .... 1000 ....
|
|
165
|
-
TRANSFERVALUE = 0x0000000000000000000000000000000000000000000000000000000000000100, // .... 0001 .... ....
|
|
166
|
-
SIGN = 0x0000000000000000000000000000000000000000000000000000000000000200, // .... 0010 .... ....
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// ----------
|
|
170
|
-
|
|
171
|
-
export const EventSignatures = {
|
|
172
|
-
ERC173: {
|
|
173
|
-
/**
|
|
174
|
-
* event OwnershipTransferred(
|
|
175
|
-
* address indexed previousOwner,
|
|
176
|
-
* address indexed newOwner,
|
|
177
|
-
* );
|
|
178
|
-
*
|
|
179
|
-
* signature = keccak256('OwnershipTransferred(address,address)')
|
|
180
|
-
*/
|
|
181
|
-
OwnershipTransfered:
|
|
182
|
-
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
|
|
183
|
-
},
|
|
184
|
-
ERC725X: {
|
|
185
|
-
/**
|
|
186
|
-
* event ContractCreated(
|
|
187
|
-
* uint256 indexed _operation,
|
|
188
|
-
* address indexed _contractAddress,
|
|
189
|
-
* uint256 indexed _value
|
|
190
|
-
* );
|
|
191
|
-
*
|
|
192
|
-
* signature = keccak256('ContractCreated(uint256,address,uint256)')
|
|
193
|
-
*/
|
|
194
|
-
ContractCreated:
|
|
195
|
-
"0x01c42bd7e97a66166063b02fce6924e6656b6c2c61966630165095c4fb0b7b2f",
|
|
196
|
-
/**
|
|
197
|
-
* event Executed(
|
|
198
|
-
* uint256 indexed _operation,
|
|
199
|
-
* address indexed _to,
|
|
200
|
-
* uint256 indexed _value,
|
|
201
|
-
* bytes _data
|
|
202
|
-
* );
|
|
203
|
-
*
|
|
204
|
-
* signature = keccak256('Executed(uint256,address,uint256,bytes)')
|
|
205
|
-
*/
|
|
206
|
-
Executed:
|
|
207
|
-
"0x1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b8",
|
|
208
|
-
},
|
|
209
|
-
ERC725Y: {
|
|
210
|
-
/**
|
|
211
|
-
* event DataChanged(
|
|
212
|
-
* bytes32 indexed key,
|
|
213
|
-
* bytes value
|
|
214
|
-
* );
|
|
215
|
-
*
|
|
216
|
-
* signature = keccak256('DataChanged(bytes32,bytes)')
|
|
217
|
-
*/
|
|
218
|
-
DataChanged:
|
|
219
|
-
"0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2",
|
|
220
|
-
},
|
|
221
|
-
// ERC725Account
|
|
222
|
-
LSP0: {
|
|
223
|
-
/**
|
|
224
|
-
* event ValueReceived(
|
|
225
|
-
* address indexed sender,
|
|
226
|
-
* uint256 indexed value
|
|
227
|
-
* );
|
|
228
|
-
*
|
|
229
|
-
* signature = keccak256('ValueReceived(address,uint256)')
|
|
230
|
-
*/
|
|
231
|
-
ValueReceived:
|
|
232
|
-
"0x7e71433ddf847725166244795048ecf3e3f9f35628254ecbf736056664233493",
|
|
233
|
-
},
|
|
234
|
-
LSP1: {
|
|
235
|
-
/**
|
|
236
|
-
* event UniversalReceiver(
|
|
237
|
-
* address indexed from,
|
|
238
|
-
* bytes32 indexed typeId,
|
|
239
|
-
* bytes32 indexed returnedValue,
|
|
240
|
-
* bytes receivedData
|
|
241
|
-
* );
|
|
242
|
-
*
|
|
243
|
-
* signature = keccak256('UniversalReceiver(address,bytes32,bytes32,bytes)')
|
|
244
|
-
*/
|
|
245
|
-
UniversalReceiver:
|
|
246
|
-
"0x8187df79ab47ad16102e7bc8760349a115b3ba9869b8cedd78996f930ac9cac3",
|
|
247
|
-
},
|
|
248
|
-
LSP6: {
|
|
249
|
-
/**
|
|
250
|
-
* event Executed(
|
|
251
|
-
* uint256 indexed _value,
|
|
252
|
-
* bytes _data
|
|
253
|
-
* );
|
|
254
|
-
*
|
|
255
|
-
* signature = keccak256('Executed(uint256,bytes)')
|
|
256
|
-
*/
|
|
257
|
-
Executed:
|
|
258
|
-
"0x2e733a17851169f232b3859260eb3ad2a086afd54e999eb4ea9afb7791702e41",
|
|
259
|
-
},
|
|
260
|
-
LSP7: {
|
|
261
|
-
/**
|
|
262
|
-
* event Transfer(
|
|
263
|
-
* address indexed operator,
|
|
264
|
-
* address indexed from,
|
|
265
|
-
* address indexed to,
|
|
266
|
-
* uint256 amount,
|
|
267
|
-
* bool force,
|
|
268
|
-
* bytes data
|
|
269
|
-
* );
|
|
270
|
-
*
|
|
271
|
-
* signature = keccak256('Transfer(address,address,address,uint256,bool,bytes)')
|
|
272
|
-
*/
|
|
273
|
-
Transfer:
|
|
274
|
-
"0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6",
|
|
275
|
-
/**
|
|
276
|
-
* event AuthorizedOperator(
|
|
277
|
-
* address indexed operator,
|
|
278
|
-
* address indexed tokenOwner,
|
|
279
|
-
* uint256 indexed amount
|
|
280
|
-
* );
|
|
281
|
-
*
|
|
282
|
-
* signature = keccak256('AuthorizedOperator(address,address,uint256)')
|
|
283
|
-
*/
|
|
284
|
-
AuthorizedOperator:
|
|
285
|
-
"0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c",
|
|
286
|
-
/**
|
|
287
|
-
* event RevokedOperator(
|
|
288
|
-
* address indexed operator,
|
|
289
|
-
* address indexed tokenOwner
|
|
290
|
-
* );
|
|
291
|
-
*
|
|
292
|
-
* signature = keccak256('RevokedOperator(address,address)')
|
|
293
|
-
*/
|
|
294
|
-
RevokedOperator:
|
|
295
|
-
"0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1",
|
|
296
|
-
},
|
|
297
|
-
LSP8: {
|
|
298
|
-
/**
|
|
299
|
-
* event Transfer(
|
|
300
|
-
* address operator,
|
|
301
|
-
* address indexed from,
|
|
302
|
-
* address indexed to,
|
|
303
|
-
* bytes32 indexed tokenId,
|
|
304
|
-
* bool force,
|
|
305
|
-
* bytes data
|
|
306
|
-
* );
|
|
307
|
-
*
|
|
308
|
-
* signature = keccak256('Transfer(address,address,address,bytes32,bool,bytes)')
|
|
309
|
-
*/
|
|
310
|
-
Transfer:
|
|
311
|
-
"b333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf",
|
|
312
|
-
/**
|
|
313
|
-
* event AuthorizedOperator(
|
|
314
|
-
* address indexed operator,
|
|
315
|
-
* address indexed tokenOwner,
|
|
316
|
-
* bytes32 indexed tokenId
|
|
317
|
-
* );
|
|
318
|
-
*
|
|
319
|
-
* signature = keccak256('AuthorizedOperator(address,address,bytes32)')
|
|
320
|
-
*/
|
|
321
|
-
AuthorizedOperator:
|
|
322
|
-
"34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988",
|
|
323
|
-
/**
|
|
324
|
-
* event RevokedOperator(
|
|
325
|
-
* address indexed operator,
|
|
326
|
-
* address indexed tokenOwner,
|
|
327
|
-
* bytes32 indexed tokenId
|
|
328
|
-
* );
|
|
329
|
-
*
|
|
330
|
-
* signature = keccak256('RevokedOperator(address,address,bytes32)')
|
|
331
|
-
*/
|
|
332
|
-
RevokedOperator:
|
|
333
|
-
"17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5",
|
|
334
|
-
},
|
|
335
|
-
Helpers: {
|
|
336
|
-
/**
|
|
337
|
-
* event ReceivedERC777(
|
|
338
|
-
* address indexed token,
|
|
339
|
-
* address indexed _operator,
|
|
340
|
-
* address indexed _from,
|
|
341
|
-
* address _to,
|
|
342
|
-
* uint256 _amount
|
|
343
|
-
* );
|
|
344
|
-
*
|
|
345
|
-
* signature = keccak256('ReceivedERC777(address,address,address,address,uint256)')
|
|
346
|
-
*/
|
|
347
|
-
ReceivedERC777:
|
|
348
|
-
"0xdc38539587ea4d67f9f649ad9269646bab26927bad175bdcdfdab5dd297d5e1c",
|
|
349
|
-
},
|
|
350
|
-
};
|
|
@@ -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,47 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
import "./LSP7MintableCore.sol";
|
|
6
|
-
import "../LSP7DigitalAssetInit.sol";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @dev LSP7 extension, mintable.
|
|
10
|
-
*/
|
|
11
|
-
abstract contract LSP7MintableInitAbstract is
|
|
12
|
-
LSP7MintableCore,
|
|
13
|
-
LSP7DigitalAssetInit
|
|
14
|
-
{
|
|
15
|
-
/**
|
|
16
|
-
* @notice Sets the token-Metadata and register LSP7InterfaceId
|
|
17
|
-
* @param name_ The name of the token
|
|
18
|
-
* @param symbol_ The symbol of the token
|
|
19
|
-
* @param newOwner_ The owner of the the token-Metadata
|
|
20
|
-
* @param isNFT_ Specify if the LSP7 token is a fungible or non-fungible token
|
|
21
|
-
*/
|
|
22
|
-
function initialize(
|
|
23
|
-
string memory name_,
|
|
24
|
-
string memory symbol_,
|
|
25
|
-
address newOwner_,
|
|
26
|
-
bool isNFT_
|
|
27
|
-
) public virtual override onlyInitializing {
|
|
28
|
-
LSP7DigitalAssetInitAbstract.initialize(
|
|
29
|
-
name_,
|
|
30
|
-
symbol_,
|
|
31
|
-
newOwner_,
|
|
32
|
-
isNFT_
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @inheritdoc LSP7MintableCore
|
|
38
|
-
*/
|
|
39
|
-
function mint(
|
|
40
|
-
address to,
|
|
41
|
-
uint256 amount,
|
|
42
|
-
bool force,
|
|
43
|
-
bytes memory data
|
|
44
|
-
) public override onlyOwner {
|
|
45
|
-
_mint(to, amount, force, data);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
import "./LSP8MintableCore.sol";
|
|
6
|
-
import "../LSP8IdentifiableDigitalAssetInit.sol";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @dev LSP8 extension.
|
|
10
|
-
*/
|
|
11
|
-
abstract contract LSP8MintableInitAbstract is
|
|
12
|
-
LSP8MintableCore,
|
|
13
|
-
LSP8IdentifiableDigitalAssetInit
|
|
14
|
-
{
|
|
15
|
-
/**
|
|
16
|
-
* @notice Sets the token-Metadata and register LSP8InterfaceId
|
|
17
|
-
* @param name_ The name of the token
|
|
18
|
-
* @param symbol_ The symbol of the token
|
|
19
|
-
* @param newOwner_ The owner of the the token-Metadata
|
|
20
|
-
*/
|
|
21
|
-
function initialize(
|
|
22
|
-
string memory name_,
|
|
23
|
-
string memory symbol_,
|
|
24
|
-
address newOwner_
|
|
25
|
-
) public virtual override onlyInitializing {
|
|
26
|
-
LSP8IdentifiableDigitalAssetInitAbstract.initialize(
|
|
27
|
-
name_,
|
|
28
|
-
symbol_,
|
|
29
|
-
newOwner_
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @inheritdoc LSP8MintableCore
|
|
35
|
-
*/
|
|
36
|
-
function mint(
|
|
37
|
-
address to,
|
|
38
|
-
bytes32 tokenId,
|
|
39
|
-
bool force,
|
|
40
|
-
bytes memory data
|
|
41
|
-
) public virtual override onlyOwner {
|
|
42
|
-
_mint(to, tokenId, force, data);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
// modules
|
|
5
|
-
import "./LSP0ERC725Account/LSP0ERC725AccountCore.sol";
|
|
6
|
-
import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol";
|
|
7
|
-
|
|
8
|
-
// libraries
|
|
9
|
-
import "./Utils/ERC725Utils.sol";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @title Core implementation of a LUKSO's Universal Profile based on LSP3
|
|
13
|
-
* @author Fabian Vogelsteller <fabian@lukso.network>, Jean Cavallera, Yamen Merhi
|
|
14
|
-
* @dev Implementation of the ERC725Account + LSP1 universalReceiver
|
|
15
|
-
*/
|
|
16
|
-
abstract contract UniversalProfileCore is ERC165Storage, LSP0ERC725AccountCore {
|
|
17
|
-
bytes32[] public dataKeys;
|
|
18
|
-
|
|
19
|
-
/* non-standard public functions */
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @dev Returns all the keys set on the account
|
|
23
|
-
* @return The array of keys set on the account
|
|
24
|
-
*/
|
|
25
|
-
function allDataKeys() public view returns (bytes32[] memory) {
|
|
26
|
-
return dataKeys;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* Standard public functions */
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @inheritdoc IERC725Y
|
|
33
|
-
* @dev Sets array of data at multiple given `key`
|
|
34
|
-
* Push all the keys to the `dataKeys` array
|
|
35
|
-
* SHOULD only be callable by the owner of the contract set via ERC173
|
|
36
|
-
*
|
|
37
|
-
* Emits a {DataChanged} event.
|
|
38
|
-
*/
|
|
39
|
-
function setData(bytes32[] memory _keys, bytes[] memory _values)
|
|
40
|
-
public
|
|
41
|
-
virtual
|
|
42
|
-
override
|
|
43
|
-
onlyOwner
|
|
44
|
-
{
|
|
45
|
-
require(
|
|
46
|
-
_keys.length == _values.length,
|
|
47
|
-
"Keys length not equal to values length"
|
|
48
|
-
);
|
|
49
|
-
for (uint256 ii = 0; ii < _keys.length; ii++) {
|
|
50
|
-
if (store[_keys[ii]].length == 0) {
|
|
51
|
-
dataKeys.push(_keys[ii]);
|
|
52
|
-
}
|
|
53
|
-
_setData(_keys[ii], _values[ii]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|